			function launchsearch() {
				if (document.Form1.frmsearch.value != '') {
					document.Form1.action = 'cmspage.aspx?pid=1';
					document.Form1.submit();
				} else {
					alert('Le champ de recherche ne peut ๊tre vide');
				}
			}
			function postFormulaire(piFormID,piActionType,psUrl) {
				document.Form1.frmid.value = piFormID;
				//document.Form1.enctype.value = 'multipart/form-data';
				//alert('on poste');
				if (piActionType == 3) {
					document.Form1.action = psUrl;
				} else {
					document.Form1.action = 'cmspost.aspx';
				}
				document.Form1.submit();
			}
			function postProduit(piProduitID,piPageID) {
				document.Form1.prdId.value = piProduitID;
				document.Form1.pageId.value = piPageID;

				document.Form1.action = 'boutique/panier/addPanier.aspx';
				document.Form1.submit();
			}
			
			function upFile(piProduitID,piPageID) {
				window.open('boutique/panier/uploadfile.aspx?piProduitID='+piProduitID+'&piPageID='+piPageID,'UploadImage','width=700,height=500')
			}
			
			function postFormInscription(piPageID) {
				document.Form1.pageId.value = piPageID;

				document.Form1.action = 'cmspage.aspx?pid=' + piPageID;
				document.Form1.submit();
			}
			
				function postCommande(piPageID) {
				document.Form1.pageId.value = piPageID;

				document.Form1.action = 'boutique/commande/valCoordonnees.aspx'
				document.Form1.submit();
			}

			function postAuthentification(piPageID,piAction,psDest) {
				document.Form1.pageId.value = piPageID;
				document.Form1.pageDest.value = psDest;
				document.Form1.action = 'authentification/vigile.aspx?action=' + piAction;
				document.Form1.submit();
			}
			
			function postPanier(piPageID,action,piLignePanier) {
				document.Form1.pageId.value = piPageID;

				if(action==0) {document.Form1.action = 'boutique/panier/updatePanier.aspx';}
				else { 
					if(action==1) {
						document.Form1.action = 'boutique/panier/delLignePanier.aspx?action=0';
						document.Form1.lignePanierId.value=piLignePanier;
					}
					else {
						if(action==2){
							document.Form1.action = 'boutique/panier/valCommande.aspx';
						}
						else { //action=3
							document.Form1.action = 'boutique/panier/delLignePanier.aspx?action=1';
						}
					}
				}
				document.Form1.submit();
			}
			
			function produitDynamique(piProduitID,piPageID) {

				document.Form1.action = 'cmspage.aspx?pid=' +piPageID + '&prdDID=' + piProduitID;
				document.Form1.submit();
			}

			function categorieDynamique(piCategorieID,piPageID) {

				document.Form1.action = 'cmspage.aspx?pid=' +piPageID + '&catDID=' + piCategorieID;
				document.Form1.submit();
			}
			
			function testRadio(poItem,psLibelle) {
				vNb = 0;
				for (i=0;i<poItem.length;i++) {
					if (poItem[i].checked==true) {
						vNb++;
					}
				}
				if (vNb>0) {
					return true;
				} else {
					alert ('Le champ "' + psLibelle + '" est obligatoire');
					return false;
				}
			}
			function testCheckBox(poItem,psLibelle) {
				vNb = 0;
				for (i=0;i<poItem.length;i++) {
					if (poItem[i].checked==true) {
						vNb++;
					}
				}
				if (vNb>0) {
					return true;
				} else {
					alert ('Le champ "' + psLibelle + '" est obligatoire');
					return false;
				}
			}
			function testInput(poItem,psLibelle) {
				if (poItem.value != '') {
					return true;
				} else {
					alert ('Le champ "' + psLibelle + '" est obligatoire');
					return false;
				}
			}
			function testEmail(poItem,psLibelle) {
				var str = poItem.value;
				if (str == '') 
					{
					return true;
					}
				if (window.RegExp)
					{
					var reg1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(\\.@)|(^\\.)");
					var reg2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");
					if (!reg1.test(str) && reg2.test(str))
					{
					return true;
					}
					alert (psLibelle);
					return false;
					}
					else
					{
					if(str.indexOf("@") <= 0)
						{
						return true;
						}
					alert (psLibelle);
					return false;
					}
					
			}
			function JsAnd(pbValue1,pbValue2) {
				return pbValue1 && pbValue2;
			}

//MAJ Prix et Dispo pour le produit boutique
		promo=0;
		pourcentage=0;
		remise=0;
		prixReduc=0.0;
		critere1=-1;
		critere2=-1;
		dispoGeneral=0;
	
		function updPrice(prdID,radioBName,surcout,prixBase,Tsurcout,Tdispo,critere1,critere2,dispoGeneral){
			var prix;
			Tsurcout[radioBName]=surcout;
			prix=prixBase;

			for(i in Tsurcout){
			
				prix=prix+Tsurcout[i];
			}
			if(promo==0){
				document.getElementById("prd_prix_" + prdID).innerHTML='<b>PrixTTC: </b>' + Math.round(prix*100)/100 + ' ';
			}else {
					document.getElementById("prd_prixSup_" + prdID).innerHTML='<b>Prix TTC: </b><del>' + Math.round(prix*100)/100 + ' </del>';
					totalSurcout=prix-prixBase;
					if(pourcentage!=0){
						document.getElementById("prd_reduc_" + prdID).innerHTML='<font color="red">' + Math.round((prix - prix*pourcentage/100)*100)/100 + ' </font>';
					}
					else{
						document.getElementById("prd_reduc_" + prdID).innerHTML='<font color="red">' + Math.round((prixReduc + totalSurcout)*100)/100 + ' </font>';
					}
			}
			if(critere1==null){
				valeurCritere1='';	
			}
			else {
				if (critere1!=-1){
					for(i=0;i<document.Form1.elements[critere1].length;i++){
						if(document.Form1.elements[critere1][i].checked==true){
						valeurCritere1=document.Form1.elements[critere1][i].value;
						}
					}
				}
				else {
					valeurCritere1='';
				}
			}
			if(critere2==null){
				valeurCritere2='';
			}
			else {
				if(critere2!=-1){
					for(i=0;i<document.Form1.elements[critere2].length;i++){
						if(document.Form1.elements[critere2][i].checked==true){
							valeurCritere2=document.Form1.elements[critere2][i].value;
						}
					}
				}
				else {
					valeurCritere2='';
				}
			}
			//if(dispoGeneral!=0){
				//alert(Tdispo.length);
				//dispo=Tdispo[valeurCritere1 + '_' + valeurCritere2];
				//if(dispo==0){
				//	document.getElementById("dispo").innerHTML='<img src="/images/graphismesboutique/icone_stocks_v2_6.gif" alt="non dispo"/>';
				//}
				//else{
				//	document.getElementById("dispo").innerHTML='<img src="/images/graphismesboutique/icone_stocks_v2_1.gif" alt="dispo"/>';
				//}
			//}
			
		}	
	
		function popup(url){
			window.open(url,'Agrandie','width=700,height=500');
		}
			
		function ShowThumb(path,piWidth,piHeight) {
			window.open(path,'visu','width=' + eval(piWidth + 20) + ',height=' + eval(piHeight + 25) + ',status=no, menu=no, toolbar=no, menubar=no, scrollbars=auto, location=no, resizable=no');
		}
		
		function writeStartMarquee(pStyle,pWidth,pHeight) {
			document.write('<marquee onmouseover="this.stop()" style="' + pStyle + '" onmouseout="this.start()" scrollAmount="1" scrollDelay="00" direction="up" width="' + pWidth + '" height=" + pHeight + ">');
		}

		function writeEndMarquee() {
			document.write('</marquee>');
		}
