function nothing(event) {
	// Compatibilité IE / Firefox
	if(!event&&window.event) {
		event=window.event;
	}
	// IE
	if(event.keyCode || event.keyCode==0) {
		event.returnValue = false;
		event.cancelBubble = true;
	}
	// DOM
	if(event.which || event.which==0) {
		event.preventDefault();
		event.stopPropagation();
	}
}

function updatePanierHead()
{
	xhr_object2 = AjaxObject();	
	xhr_object2.onreadystatechange = function()
	{
		if(xhr_object2.readyState == 4 && xhr_object2.status == 200)
		{
			var reponse2 = xhr_object2.responseText;
			document.getElementById('header-panier').innerHTML = reponse2;
		}
	}
	xhr_object2.open('GET','http://'+window.location.host+'/ajax/panierHead/',true);
	xhr_object2.send(null);
}

function addProductShop(qte,pdt)
{
	xhr_object = AjaxObject();
	var param = no_cache();
	xhr_object.onreadystatechange = function()
	{
		if(xhr_object.readyState == 4 && xhr_object.status == 200)
		{
			var reponse = xhr_object.responseText;
			document.getElementById('panier').innerHTML = reponse;
			updatePanierHead();
		}
	}
	xhr_object.open('GET','http://'+window.location.host+'/ajax/panier/' + param + '/' + pdt + '/' + qte + '/',true);
	xhr_object.send(null);
}

function addProductCart(pdt)
{
	var fdp = document.getElementById('fdp').value;
	xhr_object = AjaxObject();
	var param = no_cache();
	xhr_object.onreadystatechange = function()
	{
		if(xhr_object.readyState == 4 && xhr_object.status == 200)
		{
			var reponse = xhr_object.responseText;
			document.getElementById('cart').innerHTML = reponse;
			updatePanierHead();
		}
	}
	xhr_object.open('GET','http://'+window.location.host+'/ajax/addcart/' + param + '/' + fdp + '/' + pdt + '/' ,true);
	xhr_object.send(null);
}

function supProductCart(pdt)
{
	var fdp = document.getElementById('fdp').value;
	xhr_object = AjaxObject();
	var param = no_cache();
	xhr_object.onreadystatechange = function()
	{
		if(xhr_object.readyState == 4 && xhr_object.status == 200)
		{
			var reponse = xhr_object.responseText;
			document.getElementById('cart').innerHTML = reponse;
			updatePanierHead();
		}
	}
	xhr_object.open('GET','http://'+window.location.host+'/ajax/supcart/' + param + '/' + fdp + '/' + pdt + '/' ,true);
	xhr_object.send(null);
}

function chgFdp()
{
	var fdp = document.getElementById('fdp').value;
	xhr_object = AjaxObject();
	var param = no_cache();
	xhr_object.onreadystatechange = function()
	{
		if(xhr_object.readyState == 4 && xhr_object.status == 200)
		{
			var reponse = xhr_object.responseText;
			document.getElementById('cart').innerHTML = reponse;
			updatePanierHead();
		}
	}
	xhr_object.open('GET','http://'+window.location.host+'/ajax/chgfdp/' + param + '/' + fdp + '/' ,true);
	xhr_object.send(null);
}