<!--
	function handleHttpResponse() {
		if (xmlhttp.readyState == 4) {
			document.getElementById('div_panier').innerHTML = xmlhttp.responseText;
		}
	}
	
	// Chargement du panier
	function getPanier() {
		Element.update("div_panier", '<img src="/images/loading.gif" alt="Chargement ..." />');
		sendData('POST', '/client/panier-get.php', '');
		handleHttpResponse();
	}
	
	// Ajout d'un élément au panier
	function addItem(table, id) {
		//var quantite = (document.getElementById('t_' + table + '_q_' + id)) ? document.getElementById('t_' + table + '_q_' + id).value : '';
		var quantite = Form.Element.getValue('t_' + table + '_q_' + id);
		sendData('POST', '/client/panier-add.php', 'table=' + table + '&id=' + id + '&quantite=' + quantite);
		handleHttpResponse();
		confirm("Le produit a été ajouté à votre panier.");
	}
	
	// Ajout d'un élément au panier
	function addItemDevis(table, id) {
		//var quantite = (document.getElementById('t_' + table + '_q_' + id)) ? document.getElementById('t_' + table + '_q_' + id).value : '';
		var quantite = "1";
		sendData('POST', '/client/panier-add.php', 'table=' + table + '&id=' + id + '&quantite=' + quantite);
		handleHttpResponse();
		window.location = "/client/panier.html";
	}
	
	// Suppression d'un élément du panier
	function delItem(table, id) {
		sendData('POST', '/client/panier-del.php', 'table=' + table + '&id=' + id);
		handleHttpResponse();
		confirm("Le produit a été retiré de votre panier.");
	}
	
	// Vidage du panier
	function destroyPanier() {
		sendData('POST', '/client/panier-destroy.php', '');
		handleHttpResponse();
		confirm("Votre panier a été vidé.");
		window.location.reload(false);
	}
	
	// Déconnexion
	function deconnexion() {
		sendData('POST', '/client/deconnexion.php', '');
		confirm("Vous êtes maintenant déconnecté de l'application.");
		window.location.reload(false);
	}
	
	Event.observe(window, 'load', getPanier, false);
-->