function showFadeCart(id){
	var height = getScrollHeight()+document.body.clientHeight; 
	
	$("#cart_link_"+id).html("<img src=\"/img/shoporder/checked.png\" border=\"0\">"); 
	$("#cart_link_"+id).removeAttr("onclick");
	$('#bg_layer').css("height", height); 
	$('#cart_layer').css("margin-top", height-800); 
	$('#bg_layer').show();
	$("body").css("overflow", "hidden");
	AjaxRequest.send(null, '/action/shoporder/add_to_cart/', 'Добавление...', true, {'product_id':id});
	return false;
}
function hideFadeCart() {
	location.reload();
	return false;
}

function getScrollHeight(){
   var h = window.pageYOffset ||
           document.body.scrollTop ||
           document.documentElement.scrollTop;
           
   return h ? h : 0;
}

function currency_switch(id){ 
	$("span[id^='currency']").removeClass('currency_switcher_on').addClass('currency_switcher_off'); 
	$("#currency_"+id).removeClass('currency_switcher_off').addClass('currency_switcher_on'); 
	
	$("span[id^='prodprice']").hide();
	$("span[id^='prodprice_"+id+"']").show(); 
	AjaxRequest.send(null, '/action/shoporder/currency_switch/', 'Подождите...', true, {'id':id});
}
