function addProductToCartAJAX(product_id)
{
	balise = "addtocart" + product_id;
	$("#" + balise + "_cart").hide();
	$("#loader_cart").show();
	balise_text = '<div id="' + balise + '" name="' + balise + '" onclick="addProductToCartAJAX('+ product_id + ');" class="contenu_bt_orange_degrade" style="cursor: pointer">';
	balise_text += '<strong>En cours d\'ajout</strong>';
	balise_text += '</div>';
	$("#" + balise).replaceWith(balise_text);
	$.post("/cart.php",{ mode: "add", productid : product_id, cat: "", page: "", amount: "1", slot: "", addproductid: product_id },
			function success(){
		balise_text = '<div id="' + balise + '" name="' + balise + '" onclick="addProductToCartAJAX('+ product_id + ');" class="contenu_bt_orange_degrade" style="cursor: pointer">';
		balise_text += '<strong>Ajout&eacute;</strong>';
		balise_text += '</div>';
		$("#" + balise).replaceWith(balise_text);
		$("#" + balise + "_cart").show();
		$.post("/boutique/ajax/cart", {}, function success(data) {$("#zone_panier").replaceWith(data);});
	});
}

function addProductToMultiCartAJAX(product_id, producer, prefix_url)
{
	balise = "addtocart" + product_id;
	$("#" + balise + "_cart").hide();
	$("#loader_cart").show();
	balise_text = '<div id="' + balise + '" name="' + balise + '" onclick="addProductToMultiCartAJAX('+ product_id + ' , \'' + producer + '\' ,\'' + prefix_url + '\');" class="contenu_bt_orange_degrade" style="cursor: pointer">';
	balise_text += '<strong>En cours d\'ajout</strong>';
	balise_text += '</div>';
	$("#" + balise).replaceWith(balise_text);
	$.post("/cart.php",{ mode: "add", productid : product_id, cat: "", page: "", amount: "1", slot: "", addproductid: product_id},
			function success(){
		balise_text = '<div id="' + balise + '" name="' + balise + '" onclick="addProductToMultiCartAJAX('+ product_id + ' , \'' + producer + '\' ,\'' + prefix_url + '\');" class="contenu_bt_orange_degrade" style="cursor: pointer">';
		balise_text += '<strong>Ajout&eacute;</strong>';
		balise_text += '</div>';
		$("#" + balise).replaceWith(balise_text);
		$("#" + balise + "_cart").show();
		$.post("/boutique/ajax/cart", { url_prefix : prefix_url , current_producer: producer }, function success(data) {$("#zone_panier").replaceWith(data);});
	});
}
