<!--	
function addProduct (id, value) {
	if (!getCookie(id)) {
		setCookie(id, value) ;
		var newID = (!getCookie('idList'))? id : '!' + id ;
		setCookie('idList', getCookie('idList') + newID) ;
	} else setCookie(id, eval(value) + eval(getCookie(id))) ;
		
	updatecart();
}

function displayShopCart() {
	if (!getCookie('idList')) { 
		alert('Votre panier est vide...') ; return ;	
	}
	if (navigator.appVersion.indexOf("MSIE")!=-1){
		window.location = '/panier/shopCartIE.asp' ;	  
	} else {
		document.location = '/panier/shopCart.asp' ;	  
	}
}


function changeQuantity(input, increment) {
	if (input.value > 0) { 
		input.value = eval(input.value) + increment ; 
	}
}


function changeShopCartQuantity(id, input, increment) {	
	if (input.value == 1 && increment < 0)	{ 
		eraseProduct(id) ; return ; 
	}
	changeQuantity(input, increment) ;	
	setCookie(id, escape(input.value)) ;
	if (navigator.appVersion.indexOf("MSIE")!=-1){
		affDetCart();
		setTimeout('',500);
		updatecart();
	} else {
		document.location.reload();
	}
}


function eraseProduct(id) {
	if (window.confirm('Etes-vous sur de vouloir supprimer cet article ?')) {
		deleteCookie(id) ;
		var strIdList = getCookie('idList') ;
		if (strIdList.indexOf('!') < 0) {
			deleteCookie('idList') ;
			document.location.href = '/index.asp' ;
		} else {
			if (strIdList.indexOf(id) == 0)	{		
				strIdList = strIdList.replace(id + '!', '') ;
			} else { 
				strIdList = strIdList.replace('!' + id, '') ;
			}
			setCookie('idList', strIdList) ;
			if (navigator.appVersion.indexOf("MSIE")!=-1){
				affDetCart();
				setTimeout('',500);
				updatecart();
			} else {
				document.location.reload();
			}
		}
	}
}

function eraseArticle(id) {
		deleteCookie(id) ;
		var strIdList = getCookie('idList') ;
		//if (strIdList.indexOf('!') < 0) {
		//	deleteCookie('idList') ;
		//	document.location.href = '/index.asp' ;
		//} else {
			if (strIdList.indexOf(id) == 0)	{		
				strIdList = strIdList.replace(id + '!', '') ;
			} else { 
				strIdList = strIdList.replace('!' + id, '') ;
			}
			setCookie('idList', strIdList) ;
			//if (navigator.appVersion.indexOf("MSIE")!=-1){
			//	affDetCart();
			//	setTimeout('',500);
			//	updatecart();
			//} else {
			//	document.location.reload();
			//}
		//}
}
//-->
