var manquez_pas = 1;
var manquez_pas_total = 0;

function manquez_pas_time() {
	clearTimeout();
	manquez_pas++;
	if (manquez_pas > (manquez_pas_total)) {
		manquez_pas = 1;
	}

	$("#header .header_pub").hide();
	$("#deal_special_"+manquez_pas).show();
	setTimeout("manquez_pas_time()", 6000);
}

function manquez_pas_init(nb) {
	manquez_pas_total = nb;
	setTimeout("manquez_pas_time()", 6000);
}

function manquez_pas_change(id) {
	clearTimeout();
	manquez_pas = id;
	$("#header .header_pub").hide();
	$("#deal_special_"+id).show();
	setTimeout("manquez_pas_time()", 6000);
}

function wopen(url) {
	window.open(url,'','directories=yes, location=yes, menubar=yes, resizable=yes, scrollbars=yes, status=yes, toolbar=yes, width=600, height=600, left=500, top=10');
}

function showmenu(id) {
	document.getElementById("sous_menu_"+id).style.display = 'block';
}
function hidemenu(id) {
	document.getElementById("sous_menu_"+id).style.display = 'none';
}

function ajax(url)
{
	if(window.XMLHttpRequest) // FIREFOX
		xhr_object = new XMLHttpRequest();
	else if(window.ActiveXObject) // IEx
		xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
	else
		return(false);

	//url = encodeURIComponent(url);
	url = url.replace(/amp;/g, '');
		
	xhr_object.open("GET", url, false);
	xhr_object.send(null);

	if(xhr_object.readyState == 4)
		return(xhr_object.responseText);
	else
		return(false);
}

$(document).ready(function() {

	$("a[rel*='external']").click(function(){
		this.target = "_blank";
	});
	
	$(".selection_produit li").hover(function(){$(this).css("background-color","#CACACA");}, function(){$(this).css("background-color","#F4F4F4");});
	
	if (typeof imgLoad != "undefined") {
		for (var id in imgLoad)
		{
		   $("#p"+id).attr("src",imgLoad[id]);
		}

	}

});