<!--
function win()
        {
        subscribe=window.open("","subscribe","width=300,height=200,top=0,left=0,titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no");
        document.clever_subscribe.submit();
        }

function add_to_basket(id)
	{        
	var url='addtobasket.php?ajax=1&id='+id+"&rand="+Math.random();    
	show_window();
	new Ajax.Request(url, 
		{
	  	method: 'get',
	  	onSuccess: function(transport) 
	  		{
	  		hide_window();
	  		
	  		if (!transport.responseText.match(/#no_update#/))
	  			{
				var data=transport.responseText;
	  			$('basket_block').update(data);
	  			$('basket_block').scrollTop=9000;
	  			}
	      	}
		});
	}
Position.GetWindowSize = function(w) {
        w = w ? w : window;
        var width = w.innerWidth || (w.document.documentElement.clientWidth || w.document.body.clientWidth);
        var height = w.innerHeight || (w.document.documentElement.clientHeight || w.document.body.clientHeight);
        return [width, height]
}
Position.Center = function(element, parent) {
        var w, h, pw, ph;
        var d = Element.getDimensions(element);
        w = d.width;
        h = d.height;
        Position.prepare();
        if (!parent) {
                var ws = Position.GetWindowSize();
                pw = ws[0];
                ph = ws[1];
        } else {
                pw = parent.offsetWidth;
                ph = parent.offsetHeight;
        }
        element.style.top = (ph/2) - (h/2) +  Position.deltaY + "px";
        element.style.left = (pw/2) - (w/2) -  Position.deltaX + "px";
}
	
function show_window()
	{	
	$('axcrt').show();
	Position.Center($('axcrt'));
	}

function hide_window()
	{	
	$('axcrt').hide();
	}

function remove_from_basket(id)
	{
	var url='basket.php?ajax=1&IdF='+id+"&rand="+Math.random();    

	new Ajax.Request(url, 
		{
	  	method: 'get',
	  	onSuccess: function(transport) 
	  		{
	  	
	  		
	  		if (!transport.responseText.match(/#no_update#/))
	  			{
				var data=transport.responseText;
	  			$('basket_block').update(data);
	  			$('basket_block').scrollTop=9000;
	  			}
	      	}
		});
	}


var voted=false;
function vote(id,rank)
	{	
	if (voted)return ;
	var url='details.php?vote=1&ajax=1&id='+id+'&rank='+rank;    
	$('voters').update("<img src=\"/templates/img/loading.gif\" />");
	new Ajax.Request(url, 
		{
	  	method: 'get',
	  	onSuccess: function(transport) 
	  		{	  		
	  		if (!transport.responseText.match(/#no_update#/))
	  			{
				var data=transport.responseText.evalJSON();	  		
	  			$('rating').style.width=data.width+'%';
	  			$('voters').update(data.voters_str);
	  			voted=true;
	  			}
	      	}
		});		
}

//-->

