function MM_openBrWindow(theURL,winName,features){window.open(theURL,winName,features);};function MM_callJS(jsStr){return eval(jsStr)};function MM_swapImgRestore(){var i,x,a=document.MM_sr;for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)x.src=x.oSrc;};function MM_preloadImages(){var d=document;if(d.images){if(!d.MM_p)d.MM_p=new Array();var i,j=d.MM_p.length,a=MM_preloadImages.arguments;for(i=0;i<a.length;i++)if(a[i].indexOf("#")!=0){d.MM_p[j]=new Image;d.MM_p[j++].src=a[i];}};};function MM_findObj(n,d){var p,i,x;if(!d)d=document;if((p=n.indexOf("?"))>0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p);};if(!(x=d[n])&&d.all)x=d.all[n];for(i=0;!x&&i<d.forms.length;i++)x=d.forms[i][n];for(i=0;!x&&d.layers&&i<d.layers.length;i++)x=MM_findObj(n,d.layers[i].document);return x;};function MM_swapImage(){var i,j=0,x,a=MM_swapImage.arguments;document.MM_sr=new Array;for(i=0;i<(a.length-2);i+=3)if((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x;if(!x.oSrc)x.oSrc=x.src;x.src=a[i+2];};};function lancerecherche(){if(document.getElementById("champrecherche").value!=""){s=nettoyer_recherche($("#champrecherche").val().toLowerCase());document.getElementById("champrecherche").value=s;document.forms["recherche"].elements["s"].value=s;document.forms["recherche"].submit()};};function opensignmaker(theURL,winName,features){window.open(theURL,winName,features);};function verifnumeric(){var checkOK="0123456789",checkStr;checkStr=document.getElementById("quantity").value;var allValid=true,decPoints=0,allNum="";for(i=0;i<checkStr.length;i++){ch=checkStr.charAt(i);for(j=0;j<checkOK.length;j++)if(ch==checkOK.charAt(j))break;if(j==checkOK.length){allValid=false;break;};if(ch=="."){decPoints++;}else allNum+=ch;};if(!allValid){alert('Entrez une quantite valide');document.getElementById("quantity").value=1;return(false);};verifquantimini()};function verifquantimini(){if(document.getElementById("quantity").value<1){alert('Quantitée Invalide');document.getElementById("quantity").value=1}else{prepararticle()};};function prepararticle(){quantite=document.getElementById("quantity").value;prixsession=Math.round((prixunitaire*quantite)*Math.pow(10,2))/Math.pow(10,2);leproduit='<table width="380" border="0" cellspacing="2" cellpadding="1"><tr><td width="65"><div align="center"><img src="/imageprodfini/vignetteprodfini/'+vignetteproduit+'"></div></td><td><div align="center"><span class="textearti">'+designationproduit+'</span></div></td> </tr></table>';chainehtml='<tr bgcolor="#FFFFFF">'+'<td width="400" style="border : 1px solid highlight"><div align="center">'+leproduit+'</div></td>'+'<td width="50" style="border : 1px solid highlight"><div align="center" class="textearti">'+quantite+'</div></td>'+'<td width="50" style="border : 1px solid highlight"><div align="center" class="texteartigras">'+prixsession+'&nbsp;€</div></td></tr>';commande='<table width="500" cellpadding="3" cellspacing="0">'+chainehtml+'</table>';lignearticle=commande;poids=poidsunitaire*quantite;lemballage=emballage;ajoutpanier();setTimeout('animbullepanier()',100)};function animbullepanier(){$('#bullepanier').fadeIn("slow");setTimeout("$('#bullepanier').fadeOut(\"slow\")",4000);};function ajoutpanier(){top.formcommande.document.forms["lacommande"].elements["lignearticle"].value=lignearticle;top.formcommande.document.forms["lacommande"].elements["commande"].value=commande;top.formcommande.document.forms["lacommande"].elements["delaisup"].value=delaisup;top.formcommande.document.forms["lacommande"].elements["poids"].value=poids;top.formcommande.document.forms["lacommande"].elements["emballage"].value=lemballage;top.formcommande.document.forms["lacommande"].elements["prixsession"].value=prixsession;top.formcommande.document.forms["lacommande"].submit()};var lechampquantite=new Object,lespanprix=new Object,leboutonpanier=new Object,prixsession=0,quantite=1,delaisup=0,emballage=0,mesure="ex",misedanspanier_possible='1';function initVariables(){lechampquantite=document.getElementById('quantity');lespanprix=document.getElementById("afprixunitaire");leboutonpanier=document.getElementById("btajoutpanier");};function arrondi(valeur,decimale){if((!decimale)&&(decimale!=0)){decimale=2;};resultat=Math.round(valeur*Math.pow(10,decimale))/Math.pow(10,decimale);return resultat;};function JeanGouny(prixjg,quantitejg,critique,ppmax){if((!critique)||(critique==0)){critique=100;};if((!ppmax)||(ppmax==0)){ppmax=2;};pm=prixjg;pp=prixjg/ppmax;qc=critique;Q=quantitejg;a=(1/(1-qc))*Math.log(pp/(10*(pm-pp)));resultat=((pm-pp)*Math.exp(a*(1-Q))+pp);resultat=(resultat);return resultat;};function valideSaisieQte(){quantite=lechampquantite.value;if((!verificationNumeric(quantite,true))&&(quantite!='')){quantite=1;lechampquantite.value=1;if(nompage_jav=="autocollant"){affiche_cont_assist('num');setTimeout("demande_affichage()",100);flag=true;}else{affiche_cont_assist('num');};if(misedanspanier_possible=='1'){leboutonpanier.disabled=false;lespanprix.style.visibility='visible';}else window.setTimeout("affiche_cont_assist('min')",1500);}else{if((quantite=='')||(quantite=='0')){leboutonpanier.disabled=true;lespanprix.style.visibility='hidden';}else{if(misedanspanier_possible=='1'){calculprixSession();calculprixUnit();if(mesure=="m")lespanprix.innerHTML="Prix au m&egrave;tre : "+passeTTC(prixunitaire);else lespanprix.innerHTML="Prix unitaire : "+passeTTC(prixunitaire);leboutonpanier.disabled=false;lespanprix.style.visibility='visible';};};};};function calculprixUnit(){prixunitaire=((prixsession/quantite));};function calculprixSession(){prixsession=JeanGouny(prixunitaire,quantite,0,0)*quantite;};function verificationNumeric(averifier,entier){var checkOK;if(entier){checkOK="0123456789";}else{checkOK="0123456789.";};var checkStr=averifier,allValid=true,decPoints=0,allNum="";for(i=0;i<checkStr.length;i++){ch=checkStr.charAt(i);for(j=0;j<checkOK.length;j++)if(ch==checkOK.charAt(j))break;if(j==checkOK.length){allValid=false;break;};};return(allValid);};function mettreDansPanier(type){if(type=="")type='null';quantite=lechampquantite.value;if(verificationNumeric(quantite,true)){calculprixSession();preparationArticle(type);logistique();ajouterPanier();setTimeout('animbullepanier()',100);affiche_cont_assist('panier');}else{if(assistant!="")affiche_cont_assist('num');else alert("Veuillez saisir une quantité valide");quantite.value=1;};};function preparationArticle(type){preparationProduit(type);chainehtml='<tr bgcolor="#FFFFFF">'+'<td width="400" style="border : 1px solid highlight"><div align="center">'+leproduit+'</div></td>'+'<td width="50" style="border : 1px solid highlight"><div align="center" class="textearti">'+quantite+'&nbsp;'+mesure+'.</div></td>'+'<td width="50" style="border : 1px solid highlight"><div align="center" class="texteartigras">'+prixsession+'&nbsp;€</div></td></tr>';lignearticle='<table width="500" cellpadding="3" cellspacing="0">'+chainehtml+'</table>';chainehtml='<tr bgcolor="#FFFFFF">'+'<td width="400" style="border : 1px solid highlight"><div align="center">'+commande+'</div></td>'+'<td width="50" style="border : 1px solid highlight"><div align="center" class="textearti">'+quantite+'&nbsp;'+mesure+'.</div></td>'+'<td width="50" style="border : 1px solid highlight"><div align="center" class="texteartigras">'+prixsession+'&nbsp;€</div></td></tr>';commande='<table width="500" cellpadding="3" cellspacing="0">'+chainehtml+'</table>';};function preparationProduit(type){leproduit='<table width="380" border="0" cellspacing="2" cellpadding="1"><tr><td width="65"><div align="center"><img src="'+vignetteproduit+'"></div></td><td><div align="center"><span class="textearti">'+designationproduit+'</span></div></td> </tr></table>';};function logistique(){poids=poidsunitaire*quantite;lemballage=emballage;};function ajouterPanier(){top.formcommande.document.forms["lacommande"].elements["lignearticle"].value=lignearticle;top.formcommande.document.forms["lacommande"].elements["commande"].value=commande;top.formcommande.document.forms["lacommande"].elements["delaisup"].value=delaisup;top.formcommande.document.forms["lacommande"].elements["poids"].value=poids;top.formcommande.document.forms["lacommande"].elements["emballage"].value=lemballage;top.formcommande.document.forms["lacommande"].elements["prixsession"].value=prixsession;top.formcommande.document.forms["lacommande"].submit();};function goN2(n1,n2,rub,fam){document.location="/autocollants/catalogue.asp?n1="+n1+"&n2="+n2+"&rubrique="+rub+"&famille="+fam;};function go_autocollant(n1,n2,rub,fam,stick,prod){document.location="/autocollants/autocollant.asp?n1="+n1+"&n2="+n2+"&prod="+prod+"&rubrique="+rub+"&famille="+fam+"&sticker="+stick;};function go_letter(webj){document.location="/modul/lettres_autocollantes_dev/lettrage_adhesif.htm?pol="+webj};function go_ui(web,n1,n2,rub,fam,stick,prod,vmin){document.location="/modul/ui/uploader.asp?webfont="+web+"&vmin="+vmin+"&n1="+n1+"&n2="+n2+"&prod="+prod+"&rubrique="+rub+"&famille="+fam+"&sticker="+stick;};function nettoyer_recherche(s){var reg=new RegExp(String.fromCharCode(224),"g");res=s.replace(reg,"a");reg=new RegExp(String.fromCharCode(225),"g");res=res.replace(reg,"a");reg=new RegExp(String.fromCharCode(226),"g");res=res.replace(reg,"a");reg=new RegExp(String.fromCharCode(227),"g");res=res.replace(reg,"a");reg=new RegExp(String.fromCharCode(228),"g");res=res.replace(reg,"a");reg=new RegExp(String.fromCharCode(229),"g");res=res.replace(reg,"a");reg=new RegExp(String.fromCharCode(231),"g");res=res.replace(reg,"c");reg=new RegExp(String.fromCharCode(232),"g");res=res.replace(reg,"e");reg=new RegExp(String.fromCharCode(233),"g");res=res.replace(reg,"e");reg=new RegExp(String.fromCharCode(234),"g");res=res.replace(reg,"e");reg=new RegExp(String.fromCharCode(235),"g");res=res.replace(reg,"e");reg=new RegExp(String.fromCharCode(236),"g");res=res.replace(reg,"i");reg=new RegExp(String.fromCharCode(237),"g");res=res.replace(reg,"i");reg=new RegExp(String.fromCharCode(238),"g");res=res.replace(reg,"i");reg=new RegExp(String.fromCharCode(239),"g");res=res.replace(reg,"i");reg=new RegExp(String.fromCharCode(242),"g");res=res.replace(reg,"o");reg=new RegExp(String.fromCharCode(243),"g");res=res.replace(reg,"o");reg=new RegExp(String.fromCharCode(244),"g");res=res.replace(reg,"o");reg=new RegExp(String.fromCharCode(245),"g");res=res.replace(reg,"o");reg=new RegExp(String.fromCharCode(246),"g");res=res.replace(reg,"o");reg=new RegExp(String.fromCharCode(249),"g");res=res.replace(reg,"u");reg=new RegExp(String.fromCharCode(250),"g");res=res.replace(reg,"u");reg=new RegExp(String.fromCharCode(251),"g");res=res.replace(reg,"u");reg=new RegExp(String.fromCharCode(252),"g");res=res.replace(reg,"u");return res;};

