function validation(obj){if(obj.checked)hasProduct=hasProduct+1;else hasProduct=hasProduct-1}function check(){if(hasProduct<=0||hasProduct%3!=0){alert("Vous devez sélectionner au moins "+(Math.floor(hasProduct/3)+1)*3+" produits.");return false}return true}function selectMessage(){if(hasProduct%3!=0){var nbToSelect=(Math.floor(hasProduct/3)+1)*3-hasProduct,result;if(nbToSelect==1)result="<br/> Choisissez votre dernier produit.";else result="<br/> Choisissez vos "+nbToSelect+" autres produits.";return result}if(hasProduct>0)return "<br/>Cliquez sur valider";return ""}function ManageBasket(theCheckBox,displayName,price){var theString="Vous avez sélectionné "+hasProduct+" produit";if(hasProduct>1)theString=theString+"s";if(theCheckBox!=null&&theCheckBox.checked)totalPrice=totalPrice+price;else totalPrice=totalPrice-price;if(hasProduct%3==0&&hasProduct>0)totalString="Pour un total de : "+Math.round(totalPrice*66.667)/100+" €";else{totalString="";if(hasProduct==0)totalPrice=0}if(document.getElementById){document.getElementById("selection").innerHTML=theString+selectMessage();document.getElementById("Total").innerHTML=totalString}else if(document.all){document.all["selection"].innerHTML=theString;document.all["Total"].innerHTML=totalString}if(totalString.length>0)setVisibility("Total",true);else setVisibility("Total",false)};
