var soci;var sociLiv;var user_email="";var conn='<form id="form1" name="form1" method="post" action="javascript:champConn();" style="margin: 0;"> <label> Login (email) :<br> <input name="email" type="text" id="login" size="20" /> </label><br><br><label> Mot de passe :<br> <input name="password" type="password" id="passe" size="20" /> </label><br><br><label> <input type="submit" name="Submit" value="Connexion" /></label><br><br><input type="checkbox" id="nwc2" name="nwc2" value="1" style="vertical-align:bottom;">&nbsp;<label for="nwc2">Rester connecté</label></form><br><a href="javascript:finscr();">S\'inscrire</a><br><br><a href="javascript:fMdpRecup();">Mot de passe oublié</a><br><br><a href="javascript:flinkFbSess();" id="fbhref"><img src="'+sdistant+'facebook-connect-logo.jpg" width="100" height="23" title="Se connecter avec Facebook"/></a>';var selLang="";selLang+='<select size="1" name="SLang" id="SLang" DISABLED>';for(i=0; i<tLang.length; i++) {	if(tLang[i] == lc) selLang+='<option value="'+tLang[i]+'" selected>'+tLangD[i]+'</option>';		else selLang+='<option value="'+tLang[i]+'">'+tLangD[i]+'</option>';}selLang+='</select>';var nouv='<form name="form1" method="post" action="javascript:champVerifNouv(\'nouv.php\', 0)" style="margin: 0;display: inline;"><font color="#FF0000">* Champs obligatoires</font><br><br>Email (sert de login) :<br /><label><nobr><input name="email" type="text" id="email" size="40"/> <font color="#FF0000">*</font></nobr></label><br><br>Mot de passe :<br /><label><nobr><input name="password" type="password" size="40"/> <font color="#FF0000">*</font></nobr></label><br><br>Confirmer votre mot de passe :<br /><label><nobr><input name="passwordVerify" type="password" size="40"/> <font color="#FF0000">*</font></nobr></label><br><br>Pseudo :<br /><label><nobr><input name="pseudo" type="text" size="40" value=""/> <font color="#FF0000">*</font></nobr></label><br><br>Langue :<br />'+selLang+'<br><br>Civilité :<br><input type="radio" value="Mr" id="R1a" checked name="R1" onClick="radio()"><label for="R1a">Mr</label>&nbsp;&nbsp;<input type="radio" value="Mme" id="R1b" name="R1" onClick="radio()"><label for="R1b">Mme</label>&nbsp;&nbsp;<input type="radio" value="Melle" id="R1c" name="R1" onClick="radio()"><label for="R1c">Mlle</label>&nbsp;&nbsp;<input type="radio" value="Société" id="R1d" name="R1" onClick="radio()"><label for="R1d">Société</label>&nbsp;&nbsp;<div align="left" id="soc"><br>Nom :<br /><label><nobr><input name="lastname" type="text" size="40"/> <font color="#FF0000">*</font></nobr></label><br><br>Prénom :<br /><label><nobr><input name="firstname" type="text" size="40"/> <font color="#FF0000">*</font></nobr></label></div><br>Adresse :<br /><label><nobr><input name="adresse" type="text" size="40"/> <font color="#FF0000">*</font></nobr><br><font size="1">&nbsp;</font><br><input name="adresse2" type="text" size="40"/></label><br><br>Code postal :<br /><label><nobr><input name="cp" type="text" size="20"/> <font color="#FF0000">*</font></nobr></label><br><br>Ville :<br /><label><nobr><input name="ville" type="text" size="40"/> <font color="#FF0000">*</font></nobr></label><br><br>Pays :<br /><label><nobr><input name="pays" type="text" size="40" value="France"/> <font color="#FF0000">*</font></nobr></label><br><br />Téléphone :<br /><label><input name="tel" type="text" size="40"/></label><br /><br /><div id="idAssoc" style="display: inline;"></div><label><input type="submit" value="Envoyer"></label></form><br><br><a id="idrepConn" href="javascript:repl(conn);">Retour à la page de connexion</a>';var mdpRecup='<form name="form1" method="post" action="javascript:mdpOb()" style="margin: 0;display: inline;"><font color="#FF0000">* Champs obligatoires</font><br><br>Email :<br /><label><nobr><input name="email" type="text" id="email" size="40"/> <font color="#FF0000">*</font></nobr></label><br><br>Pseudo :<br /><label><nobr><input name="pseudo" type="text" size="40" value=""/> <font color="#FF0000">*</font></nobr></label><br /><br /><label><input type="submit" value="Envoyer"></label></form><br><br><a href="javascript:repl(conn);">Retour à la page de connexion</a>';var bienv1='Bienvenue&nbsp;:&nbsp;<b>';var bienv2='</b><br><br><a href="javascript:confirmation()">Déconnexion</a><br><br><a href="javascript:DOMImplementation(\'modif.php\', getData);">Modifier&nbsp;mon&nbsp;compte</a>';var patient='<nobr><img src="'+sdistant+'charg.gif" width="16" height="16" /> Patientez...</nobr>';var connBB1='<form id="form1" name="form1" method="post" action="javascript:fConnBB();" style="margin: 0;"><nobr>Login (email) : <b>';var connBB2='</b></nobr><br><br><label> Mot de passe :<br> <input name="password" type="password" id="passe" size="20" /> </label><br><br><label> Mot de passe :<br> <input name="passwordVerify" type="password" id="passe" size="20" /> </label><br><br><label> <input type="submit" name="Submit" value="Connexion" /></label></form><br><nobr><a href="javascript:repl(conn);">Retour à la page de connexion</a></nobr>';function fConnBB() {	if(session_autologin == "1") {		var rconn=1;	}		else rconn=0;	if(document.form1.password.value != "" && document.form1.passwordVerify.value != "") {		if(document.form1.password.value.length >= 6 && document.form1.password.value.length <= 30) { 			if(document.form1.password.value == document.form1.passwordVerify.value) DOMImplementation('conn.php', getData, "email="+echapXML(user_email)+"&password="+encrypt(echapXML(document.form1.password.value))+"&rd="+rconn+"&bbr=1");				else alert('Les deux champs "mot de passe" ne correspondent pas');		}			else alert('Le mot de passe doit être compris entre 6 et 30 caractères');	}		else alert('merci de remplir les champs "email" et "mot de passe"');}function echapXML(chaine) {	return chaine.split("&amp;").join("&").split("&").join("etamp;");}function rechapXML(chaine) {	return chaine.split("&amp;apos;").join("'").split("&apos;").join("'");}function rechapXML2(chaine) {	return chaine.split("&amp;apos;").join('\\\'').split("&apos;").join("\\\'");}function repl(html) {	document.getElementById("iden").innerHTML = html;}function replComm(html) {	document.getElementById("liste_commande").innerHTML = html;}function replPharm(html) {	document.getElementById("dipharm").innerHTML = html;}function radio(val) {	if(val == undefined) val=document.form1.lastname.value;	for (i=0; i<document.forms.form1.R1.length; i++) {		if (document.forms.form1.R1[i].checked==true && i == 3) {			document.getElementById("soc").innerHTML = '<br>Société :<br /><label><nobr><input name="lastname" value="'+val+'" type="text" size="40"/> <font color="#FF0000">*</font></nobr></label>';			soci=1;		}		if (document.forms.form1.R1[i].checked==true && (i >= 0 && i <= 2) && soci == 1) {			val=document.form1.lastname.value;			document.getElementById("soc").innerHTML = '<br>Nom :<br /><label><nobr><input name="lastname" value="'+val+'" type="text" size="40"/> <font color="#FF0000">*</font></nobr></label><br><br>Prénom :<br /><label><nobr><input name="firstname" type="text" size="40"/> <font color="#FF0000">*</font></nobr></label>';			soci=null;		}	}}function radioLiv(val) {	if(val == undefined) val=document.form1.lastnameLiv.value;	for (i=0; i<document.forms.form1.R1Liv.length; i++) {		if (document.forms.form1.R1Liv[i].checked==true && i == 3) {			document.getElementById("socLiv").innerHTML = '<br>Société :<br /><label><nobr><input name="lastnameLiv" value="'+val+'" type="text" size="40"/> <font color="#FF0000">*</font></nobr></label>';			sociLiv=1;		}		if (document.forms.form1.R1Liv[i].checked==true && (i >= 0 && i <= 2) && sociLiv == 1) {			val=document.form1.lastnameLiv.value;			document.getElementById("socLiv").innerHTML = '<br>Nom :<br /><label><nobr><input name="lastnameLiv" value="'+val+'" type="text" size="40"/> <font color="#FF0000">*</font></nobr></label><br><br>Prénom :<br /><label><nobr><input name="firstnameLiv" type="text" size="40"/> <font color="#FF0000">*</font></nobr></label>';			sociLiv=null;		}	}}function DOMImplementation(sUrl, fCallback, envoi) {	//var dom;	if(window.ActiveXObject) {		/*dom = new ActiveXObject("Microsoft.XMLDOM");		dom.onreadystatechange = function() {			if(dom.readyState == 4) {				fCallback(dom);			}		};*/		var xmlHTTP = new ActiveXObject('Microsoft.XMLHTTP');	}	else if(document.implementation && document.implementation.createDocument) {		/*dom = document.implementation.createDocument("", "", null);		dom.onload = function() {			alert("a");			fCallback(dom);		}*/		var xmlHTTP = new XMLHttpRequest();	}		else {		alert("Votre navigateur ne gère pas l'importation de fichiers XML");		return;	} 	//dom.load(sUrl);	if(async) {		xmlHTTP.onreadystatechange = function ( ) { 			if (xmlHTTP. readyState == 4) {				if(tt == null) fCallback(xmlHTTP.responseXML);					else fCallback(xmlHTTP.responseText);			}		}	}	xmlHTTP.open('POST', sUrl, async);	xmlHTTP.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");	//envoi="login="+echapXML(document.form1.login.value)+"&mdp="+echapXML(document.form1.passe.value);	if(envoi == undefined) envoi="";  	xmlHTTP.send(envoi);	if(tt == null) {		if(! async) fCallback(xmlHTTP.responseXML);	}		else if(! async) fCallback(xmlHTTP.responseText);}var tt;var cmdd=true;function getData(oData) {		if(tt == 1) alert(oData);        /*var author  = oData.getElementsByTagName('author')[0].firstChild.data;        var country = oData.getElementsByTagName('country')[0].firstChild.data;        var lang    = oData.getElementsByTagName('lang')[0].firstChild.data;*/        //alert(oData.firstChild.firstChild.nodeValue+" "+oData.firstChild.getAttribute("mdp"));        if(oData.firstChild.getAttribute("rep") == "chargement") replPanier("");		if(oData.firstChild.getAttribute("rep") == "suff") {			if(panHtml == null) panHtml="<nobr>Panier vide</nobr>";			replPanier(panHtml);		}		if(oData.firstChild.getAttribute("rep") != "Bienvenue" && oData.firstChild.firstChild.nodeValue != "Déconnexion" && oData.firstChild.firstChild.nodeValue != "Déconnexion2" && oData.firstChild.getAttribute("rep") != "Modification" && oData.firstChild.getAttribute("rep") != "panier" && oData.firstChild.firstChild.nodeValue != "Panier vide" && oData.firstChild.getAttribute("rep") != "comment" && oData.firstChild.getAttribute("rep") != "commander" && oData.firstChild.getAttribute("rep") != "modifMC" && oData.firstChild.getAttribute("rep") != "modifMC2" && oData.firstChild.firstChild.nodeValue != "modifMCRelo" && oData.firstChild.getAttribute("rep") != "cmd" && oData.firstChild.firstChild.nodeValue != "Vous n'êtes plus connecté" && oData.firstChild.firstChild.nodeValue != "Vous n'êtes pas connecté" && oData.firstChild.firstChild.nodeValue != "Veuillez vous inscrire" && oData.firstChild.firstChild.nodeValue != "Vider" && oData.firstChild.getAttribute("rep") != "pharm" && oData.firstChild.getAttribute("rep") != "cont" && oData.firstChild.getAttribute("rep") != "lep" && oData.firstChild.firstChild.nodeValue != "Sauver" && oData.firstChild.getAttribute("rep") != "DeconnFb" && oData.firstChild.getAttribute("rep") != "LinkFb" && oData.firstChild.firstChild.nodeValue != "fbOk" && oData.firstChild.firstChild.nodeValue != "fbRelance")  alert(oData.firstChild.firstChild.nodeValue.split("<br />").join("\n"));		if(oData.firstChild.getAttribute("mess") == "Modification effectuée" || oData.firstChild.getAttribute("mess") == "Vous avez modifié le compte Facebook associé")  alert(oData.firstChild.getAttribute("mess"));		if(oData.firstChild.getAttribute("rep") == "Email envoye pour activer compte" || oData.firstChild.firstChild.nodeValue == "Déconnexion" || oData.firstChild.firstChild.nodeValue == "Déconnexion2" || oData.firstChild.getAttribute("bbr") == "1") {			repl(conn);			replComm("");			if(urlPage == "commandes") document.location.href=urlPage+".php"+langUrl;		}		if(oData.firstChild.firstChild.nodeValue == "Sauver") {			if(urlPage != "index") {				if(urlGetPage == "") document.location.href=urlPage+".php"+langUrl;					else document.location.href=urlGetPage+".php?"+urlPage.split(" ").join("-")+langUrl3;			}				else document.location.href="./"+langUrl;		}		if(oData.firstChild.firstChild.nodeValue == "Déconnexion" || oData.firstChild.firstChild.nodeValue == "Vider") replPanier("<nobr>Panier vide</nobr>");		if(oData.firstChild.getAttribute("rep") == "Bienvenue") {			if(oData.firstChild.getAttribute("lang") != lc && oData.firstChild.getAttribute("lang") != null) {				if(urlPage != "index") {					if(urlGetPage == "") document.location.href=urlPage+".php"+oData.firstChild.getAttribute("langUrl");						else document.location.href=urlGetPage+".php?"+urlPage.split(" ").join("-")+"&"+oData.firstChild.getAttribute("langUrl").substring(1);				}						else document.location.href="./"+oData.firstChild.getAttribute("langUrl");			}				else {					if(oData.firstChild.getAttribute("log") != "" && tLogComm.length > 0) {						for(i=0; i<tLogComm.length; i++) {							if(oData.firstChild.getAttribute("log") == tLogComm[i]) {								/*var debAnn=String(new Date().getFullYear()).substring(0, 2);								var dat=tDatComm[i].split("/").join(", ").split(":").join(", ");								dat=dat.split(", ");								dat=new Date(Number(debAnn+dat[2]), Number(dat[1])-1, Number(dat[0]), Number(dat[3]), Number(dat[4]), 0, 0).getTime()/1000;*/								if(Number(tDatComm[i])+5*60 > Number(oData.firstChild.getAttribute("time"))) DOMImplementation("resComment.php", getData, "produit="+echapXML(cip2));							}						}					}					repl(bienv1+oData.firstChild.firstChild.firstChild.nodeValue+bienv2);					if(oData.firstChild.childNodes[1] != undefined) {						if(oData.firstChild.childNodes[1].firstChild.nodeValue != "") replComm('<br><table border="0" cellpadding="0" cellspacing="0" width="1"><tr><td><div class="raised"><b class="top"><b class="b1"></b><b class="b2"></b><b class="b3"></b><b class="b4"></b></b><div class="boxcontent">'+oData.firstChild.childNodes[1].firstChild.nodeValue+'</div><b class="bottom"><b class="b4b"></b><b class="b3b"></b><b class="b2b"></b><b class="b1b"></b></b></div></td></tr></table>');					}					if(urlPage == "commandes") document.location.href=urlPage+".php"+langUrl;				}		}		if(oData.firstChild.getAttribute("mess") == "Modification effectuée") {			if(oData.firstChild.getAttribute("lang") != lc) {				if(urlPage != "index") {					if(urlGetPage == "") document.location.href=urlPage+".php"+oData.firstChild.getAttribute("langUrl");						else document.location.href=urlGetPage+".php?"+urlPage.split(" ").join("-")+"&"+oData.firstChild.getAttribute("langUrl").substring(1);				}						else document.location.href="./"+oData.firstChild.getAttribute("langUrl");			}		}		if(oData.firstChild.getAttribute("rep") == "Modification") remplirChamps(oData);		if(oData.firstChild.getAttribute("rep") == "comment") replMess(oData);		if((oData.firstChild.firstChild.nodeValue == "Vous n'êtes plus connecté" || oData.firstChild.firstChild.nodeValue == "Vous n'êtes pas connecté" || oData.firstChild.firstChild.nodeValue == "Le délai de 5 minutes pour modifier le message a expiré" || oData.firstChild.firstChild.nodeValue == "Vous avez déjà laissé un message" || oData.firstChild.firstChild.nodeValue == "Déconnexion" || oData.firstChild.firstChild.nodeValue == "Déconnexion2") && modComm == 1) DOMImplementation("resComment.php", getData, "produit="+echapXML(cip2));		if(oData.firstChild.getAttribute("rep") == "panier" || oData.firstChild.firstChild.nodeValue == "Panier vide") recupPanier(oData);		if(oData.firstChild.firstChild.nodeValue == "Vous n'êtes plus connecté" || oData.firstChild.firstChild.nodeValue == "Vous n'êtes pas connecté") {			repl(conn);			replComm("");			//replPanier("");			cmdd=false;			if(! alert(oData.firstChild.firstChild.nodeValue)) document.getElementById("login").focus();			if(urlPage == "commandes") document.location.href=urlPage+".php"+langUrl;		}		if(oData.firstChild.getAttribute("rep") == "suffCom") cmdd=false;		if(oData.firstChild.firstChild.nodeValue == "Veuillez vous inscrire") {			//if(oData.firstChild.getAttribute("rep") != "vvi") {				var logIns=document.getElementById("login").value;				repl(nouv);				document.getElementById("email").value=logIns;				if(! alert(oData.firstChild.firstChild.nodeValue)) {					//document.getElementById("email").focus();					document.getElementById("email").select();				}			//}				/*else {					//var logIns=document.getElementById("login").value;					repl(nouv);					assocInn(oData.firstChild.getAttribute("email"));					document.form1.email.value=oData.firstChild.getAttribute("mailReel");					document.form1.pseudo.value=oData.firstChild.getAttribute("username");					document.form1.lastname.value=oData.firstChild.getAttribute("last_name");					document.form1.firstname.value=oData.firstChild.getAttribute("first_name");					if(oData.firstChild.getAttribute("gender") == "female") document.forms.form1.R1[1].checked=true;					//document.getElementById("email").value=logIns;					if(! alert(oData.firstChild.firstChild.nodeValue)) {						//document.getElementById("email").focus();						document.getElementById("email").select();					}				}*/		}		if(oData.firstChild.getAttribute("rep") == "commander") {			retourCommande(oData);			if(async) {				if(first == 1) {					document.getElementById("bt_commande").innerHTML = patient;					document.formComm.submit();				}					else {						if(document.getElementById("retComm"+btCmd) != null) document.getElementById("retComm"+btCmd).innerHTML="";						dispBt(patient);						document.getElementById("cb2Comm"+btCmd).submit();					}			}				else cmdd=true;			first=null;		}		if(oData.firstChild.getAttribute("rep") == "modifMC") modifMC(oData, oData.firstChild.getAttribute("cmd"));		if(oData.firstChild.getAttribute("rep") == "modifMC2") modifMC2(oData, oData.firstChild.getAttribute("cmd"));		if(oData.firstChild.firstChild.nodeValue == "modifMCRelo" || oData.firstChild.getAttribute("rep") == "expir") {			if(urlPage != "index") {				if(urlGetPage == "") document.location.href=urlPage+".php"+langUrl;					else document.location.href=urlGetPage+".php?"+urlPage.split(" ").join("-")+langUrl3;			}					else document.location.href="./"+langUrl;		}		if(oData.firstChild.getAttribute("rep") == "cmd") alert(oData.firstChild.firstChild.nodeValue.split("%80").join("€").split("&amp;apos;").join("'"));		if(oData.firstChild.getAttribute("rep") == "pharm") {			replPharm('<br><table border="0" cellpadding="0" cellspacing="0" width="1"><tr><td><div class="raised"><b class="top"><b class="b1"></b><b class="b2"></b><b class="b3"></b><b class="b4"></b></b><div class="boxcontent"><nobr>Si vous souffrez d\'une maladie chronique ou passagère et/ou</nobr><br><nobr>suivez un traitement actuellement, notez-les ici :</nobr><br>(pour '+rechapXML(oData.firstChild.firstChild.nodeValue)+')<form name="fpharm" method="POST" action="javascript:envPharm();"><textarea name="tpharm" id="tpharm" rows="4" name="S1" cols="30"></textarea><br><input type="submit" value="Valider" name="B1"></form></div><b class="bottom"><b class="b4b"></b><b class="b3b"></b><b class="b2b"></b><b class="b1b"></b></b></div></td></tr></table>');			cmdd=false;			setTimeout(function(){document.getElementById('tpharm').focus();} ,100);		}		if(oData.firstChild.getAttribute("rep") == "cont") {			alert(oData.firstChild.childNodes[0].firstChild.nodeValue);			if(oData.firstChild.childNodes[1] != undefined) {				if(oData.firstChild.childNodes[1].firstChild.nodeValue != "") replComm('<br><table border="0" cellpadding="0" cellspacing="0" width="1"><tr><td><div class="raised"><b class="top"><b class="b1"></b><b class="b2"></b><b class="b3"></b><b class="b4"></b></b><div class="boxcontent">'+oData.firstChild.childNodes[1].firstChild.nodeValue+'</div><b class="bottom"><b class="b4b"></b><b class="b3b"></b><b class="b2b"></b><b class="b1b"></b></b></div></td></tr></table>');			}		}		if(oData.firstChild.getAttribute("rep") == "lep") {			user_email='"'+oData.firstChild.firstChild.nodeValue+'"';			var session_autologin="1";			repl(connBB1+user_email+connBB2);			replComm("");		}		if(oData.firstChild.getAttribute("rep") == "DeconnFb") {			repl(conn);			loginUrl=oData.firstChild.firstChild.nodeValue;			document.getElementById("fbhref").href=loginUrl;		}		if(oData.firstChild.getAttribute("mess") == "panConnexion") replConn();		if(oData.firstChild.firstChild.nodeValue == "fbOk") {			var link=loginUrl;			if(document.getElementById("nwc2").checked == true) link+="&autologin=1";			document.location.href=link;		}		if(oData.firstChild.firstChild.nodeValue == "fbRelance") flinkFb();		if(oData.firstChild.getAttribute("rep") == "LinkFb") {			loginUrl=oData.firstChild.firstChild.nodeValue;			var link=loginUrl;			if(document.getElementById("nwc2").checked == true) link+="&autologin=1";			document.location.href=link;		}}function jsHref(url, fct) {	DOMImplementation(url, fct, "login="+echapXML(document.form1.login.value));}function champVerifNouv(url, modif) {	//tt = 1;	for (i=0; i<document.forms.form1.R1.length; i++) {		if (document.forms.form1.R1[i].checked==true) var radioVal=document.forms.form1.R1[i].value;	}	if(radioVal == "Société") var firstname="";		else var firstname="&firstname="+echapXML(document.form1.firstname.value);	if(modif==1 && ! document.getElementById("nwcLiv").checked) {		for (i=0; i<document.forms.form1.R1Liv.length; i++) {			if (document.forms.form1.R1Liv[i].checked==true) var radioValLiv=document.forms.form1.R1Liv[i].value;		}		if(radioValLiv == "Société") var firstnameLiv="";			else var firstnameLiv="&firstnameLiv="+echapXML(document.form1.firstnameLiv.value);		if(document.form1.lastnameLiv.value != "" && document.form1.adresseLiv.value != "" && document.form1.cpLiv.value != "" && document.form1.villeLiv.value != "" && document.form1.paysLiv.value != "" && document.form1.paysLiv.value != "") {			var livrais="&liv=1&radioLiv="+echapXML(radioValLiv)+"&lastnameLiv="+echapXML(document.form1.lastnameLiv.value)+firstnameLiv+"&adresseLiv="+echapXML(document.form1.adresseLiv.value)+"&adresse2Liv="+echapXML(document.form1.adresse2Liv.value)+"&cpLiv="+echapXML(document.form1.cpLiv.value)+"&villeLiv="+echapXML(document.form1.villeLiv.value)+"&paysLiv="+echapXML(document.form1.paysLiv.value)+"&telLiv="+echapXML(document.form1.telLiv.value);		}			else {				alert("merci de remplir tous les champs marqués d'une *");				var alertRempl=1;			}	}		else var livrais="";	if(modif==1 && document.form1.actu.value == "") {		alert("merci de remplir tous les champs marqués d'une *");		var alertRempl=1;	}	if(modif==1 && document.getElementById("nwcFb")) {		if(document.getElementById("nwcFb").checked) var dissocFb="&dissocFb=1";			else var dissocFb="&dissocFb=0";	}		else var dissocFb="";	if(alertRempl != 1) {		if(modif==1) var actuel="&actu="+encrypt(echapXML(document.form1.actu.value));			else var actuel="";		if(modif==0 || (document.getElementById("nwc").checked == true && crypt != 1)) {			if(document.form1.email.value != "" && document.form1.pseudo.value != ""  && document.form1.password.value != "" && document.form1.passwordVerify.value != "" && document.form1.lastname.value != "" && document.form1.adresse.value != "" && document.form1.cp.value != "" && document.form1.ville.value != "" && document.form1.pays.value != "" && document.form1.pays.value != "") {				if(modif==0 && document.form1.pseudo.value.indexOf("@") != -1) alert("Le pseudo ne doit pas contenir d' \"@\"");					else {						if(document.form1.password.value.length >= 6 && document.form1.password.value.length <= 30) {							var rconn="";							var fbIdEmail="";							if(document.forms.form1.R1Fb) {								var radioValFb;								for (i=0; i<document.forms.form1.R1Fb.length; i++) {									if (document.forms.form1.R1Fb[i].checked==true) radioValFb=document.forms.form1.R1Fb[i].value;								}								if(radioValFb == "oui") {									url="nouvFb.php";									var fbIdEmail="&fbId="+document.form1.fbId.value+"&fbEmail="+document.form1.fbEmail.value;								}								if(rconnFb == "1") rconn="&rd=1";									else rconn="&rd=0";							}							if(document.form1.password.value == document.form1.passwordVerify.value) DOMImplementation(url, getData, "email="+echapXML(document.form1.email.value)+"&pseudo="+echapXML(document.form1.pseudo.value)+"&password="+encrypt(echapXML(document.form1.password.value))+actuel+"&radio="+echapXML(radioVal)+"&lastname="+echapXML(document.form1.lastname.value)+firstname+"&adresse="+echapXML(document.form1.adresse.value)+"&adresse2="+echapXML(document.form1.adresse2.value)+"&cp="+echapXML(document.form1.cp.value)+"&ville="+echapXML(document.form1.ville.value)+"&pays="+echapXML(document.form1.pays.value)+"&tel="+echapXML(document.form1.tel.value)+livrais+"&lang="+document.form1.SLang.options[document.form1.SLang.selectedIndex].value+rconn+dissocFb+fbIdEmail);								else alert('Les deux champs "mot de passe" ne correspondent pas');						}							else alert('Le mot de passe doit être compris entre 6 et 30 caractères');					}			}				else alert("merci de remplir tous les champs marqués d'une *");		}			else {				if(document.getElementById("nwc").checked == true) {					if(document.form1.email.value != "" && document.form1.pseudo.value != ""  && document.form1.password.value != "" && document.form1.passwordVerify.value != "" && document.form1.lastname.value != "" && document.form1.adresse.value != "" && document.form1.cp.value != "" && document.form1.ville.value != "" && document.form1.pays.value != "" && document.form1.pays.value != "") {						if(document.form1.password.value.length >= 6 && document.form1.password.value.length <= 30) {							if(document.form1.password.value == document.form1.passwordVerify.value) {								if(confirm("Etes-vous sûr de vouloir modifier votre mot de passe ?")) DOMImplementation(url, getData, "email="+echapXML(document.form1.email.value)+"&pseudo="+echapXML(document.form1.pseudo.value)+"&password="+encrypt(echapXML(document.form1.password.value))+actuel+"&radio="+echapXML(radioVal)+"&lastname="+echapXML(document.form1.lastname.value)+firstname+"&adresse="+echapXML(document.form1.adresse.value)+"&adresse2="+echapXML(document.form1.adresse2.value)+"&cp="+echapXML(document.form1.cp.value)+"&ville="+echapXML(document.form1.ville.value)+"&pays="+echapXML(document.form1.pays.value)+"&tel="+echapXML(document.form1.tel.value)+livrais+"&lang="+document.form1.SLang.options[document.form1.SLang.selectedIndex].value+dissocFb);							}								else alert('Les deux champs "mot de passe" ne correspondent pas');						}							else alert('Le mot de passe doit être compris entre 6 et 30 caractères');					}						else alert("merci de remplir tous les champs marqués d'une *");						}					else {						if(document.form1.email.value != "" && document.form1.pseudo.value != ""  && document.form1.lastname.value != "" && document.form1.adresse.value != "" && document.form1.cp.value != "" && document.form1.ville.value != "" && document.form1.pays.value != "" && document.form1.pays.value != "") {							DOMImplementation(url, getData, "email="+echapXML(document.form1.email.value)+"&pseudo="+echapXML(document.form1.pseudo.value)+actuel+actuel+"&radio="+echapXML(radioVal)+"&lastname="+echapXML(document.form1.lastname.value)+firstname+"&adresse="+echapXML(document.form1.adresse.value)+"&adresse2="+echapXML(document.form1.adresse2.value)+"&cp="+echapXML(document.form1.cp.value)+"&ville="+echapXML(document.form1.ville.value)+"&pays="+echapXML(document.form1.pays.value)+"&tel="+echapXML(document.form1.tel.value)+livrais+"&lang="+document.form1.SLang.options[document.form1.SLang.selectedIndex].value+dissocFb);						}							else alert("merci de remplir tous les champs marqués d'une *");					}			}	}}function fMdpRecup() {	var logIns=document.getElementById("login").value;	repl(mdpRecup);	document.getElementById("email").value=logIns;	setTimeout(function(){document.getElementById('email').select();} ,100);}function mdpOb() {	if(document.form1.email.value != "" && document.form1.pseudo.value != "") {		DOMImplementation('mdpOb.php', getData, "email="+echapXML(document.form1.email.value)+"&login="+echapXML(document.form1.pseudo.value));		}		else alert('merci de remplir les champs "email" et "mot de passe"');}var rd;function champConn() {	if(document.getElementById("nwc2").checked == true) {		var rconn=1;	}		else rconn=0;	if(document.form1.email.value != "" && document.form1.password.value != "") {		DOMImplementation('conn.php', getData, "email="+echapXML(document.form1.email.value)+"&password="+encrypt(echapXML(document.form1.password.value))+"&rd="+rconn);		}		else alert('merci de remplir les champs "email" et "mot de passe"');}function remplirChamps(oData) {	//alert(oData.firstChild.childNodes[2].firstChild.nodeValue);	var nv= new Array();	for(var i=0; i<oData.firstChild.childNodes.length; i++) {		if(! oData.firstChild.childNodes[i].hasChildNodes()) nv[i]="";			else nv[i]=rechapXML(oData.firstChild.childNodes[i].firstChild.nodeValue);	}	if(nv[4] == "Mr") var radioSelect='<input type="radio" value="Mr" id="R1a" checked name="R1" onClick="radio()"><label for="R1a">Mr</label>&nbsp;&nbsp;<input type="radio" value="Mme" id="R1b" name="R1" onClick="radio()"><label for="R1b">Mme</label>&nbsp;&nbsp;<input type="radio" value="Melle" id="R1c" name="R1" onClick="radio()"><label for="R1c">Mlle</label>&nbsp;&nbsp;<input type="radio" value="Société" id="R1d" name="R1" onClick="radio()">';	if(nv[4] == "Mme") var radioSelect='<input type="radio" value="Mr" id="R1a" name="R1" onClick="radio()"><label for="R1a">Mr</label>&nbsp;&nbsp;<input type="radio" value="Mme" id="R1b" checked name="R1" onClick="radio()"><label for="R1b">Mme</label>&nbsp;&nbsp;<input type="radio" value="Melle" id="R1c" name="R1" onClick="radio()"><label for="R1c">Mlle</label>&nbsp;&nbsp;<input type="radio" value="Société" id="R1d" name="R1" onClick="radio()">';	if(nv[4] == "Melle") var radioSelect='<input type="radio" value="Mr" id="R1a" name="R1" onClick="radio()"><label for="R1a">Mr</label>&nbsp;&nbsp;<input type="radio" value="Mme" id="R1b" name="R1" onClick="radio()"><label for="R1b">Mme</label>&nbsp;&nbsp;<input type="radio" value="Melle" id="R1c" checked name="R1" onClick="radio()"><label for="R1c">Mlle</label>&nbsp;&nbsp;<input type="radio" value="Société" id="R1d" name="R1" onClick="radio()">';	if(nv[4] == "Société") var radioSelect='<input type="radio" value="Mr" id="R1a" name="R1" onClick="radio()"><label for="R1a">Mr</label>&nbsp;&nbsp;<input type="radio" value="Mme" id="R1b" name="R1" onClick="radio()"><label for="R1b">Mme</label>&nbsp;&nbsp;<input type="radio" value="Melle" id="R1c" name="R1" onClick="radio()"><label for="R1c">Mlle</label>&nbsp;&nbsp;<input type="radio" value="Société" id="R1d" checked name="R1" onClick="radio()">';	if(nv[13] == "1") {		if(nv[14] == "Mr") var radioSelectLiv='<input type="radio" value="Mr" id="R1aLiv" checked name="R1Liv" onClick="radioLiv()""><label for="R1aLiv">Mr</label>&nbsp;&nbsp;<input type="radio" value="Mme" id="R1bLiv" name="R1Liv" onClick="radioLiv()""><label for="R1bLiv">Mme</label>&nbsp;&nbsp;<input type="radio" value="Melle" id="R1cLiv" name="R1Liv" onClick="radioLiv()""><label for="R1cLiv">Mlle</label>&nbsp;&nbsp;<input type="radio" value="Société" id="R1dLiv" name="R1Liv" onClick="radioLiv()"">';		if(nv[14] == "Mme") var radioSelectLiv='<input type="radio" value="Mr" id="R1aLiv" name="R1Liv" onClick="radioLiv()""><label for="R1aLiv">Mr</label>&nbsp;&nbsp;<input type="radio" value="Mme" id="R1bLiv" checked name="R1Liv" onClick="radioLiv()""><label for="R1bLiv">Mme</label>&nbsp;&nbsp;<input type="radio" value="Melle" id="R1cLiv" name="R1Liv" onClick="radioLiv()""><label for="R1cLiv">Mlle</label>&nbsp;&nbsp;<input type="radio" value="Société" id="R1dLiv" name="R1Liv" onClick="radioLiv()"">';		if(nv[14] == "Melle") var radioSelectLiv='<input type="radio" value="Mr" id="R1aLiv" name="R1Liv" onClick="radioLiv()""><label for="R1aLiv">Mr</label>&nbsp;&nbsp;<input type="radio" value="Mme" id="R1bLiv" name="R1Liv" onClick="radioLiv()""><label for="R1bLiv">Mme</label>&nbsp;&nbsp;<input type="radio" value="Melle" id="R1cLiv" checked name="R1Liv" onClick="radioLiv()""><label for="R1cLiv">Mlle</label>&nbsp;&nbsp;<input type="radio" value="Société" id="R1dLiv" name="R1Liv" onClick="radioLiv()"">';		if(nv[14] == "Société") var radioSelectLiv='<input type="radio" value="Mr" id="R1aLiv" name="R1Liv" onClick="radioLiv()""><label for="R1aLiv">Mr</label>&nbsp;&nbsp;<input type="radio" value="Mme" id="R1bLiv" name="R1Liv" onClick="radioLiv()""><label for="R1bLiv">Mme</label>&nbsp;&nbsp;<input type="radio" value="Melle" id="R1cLiv" name="R1Liv" onClick="radioLiv()""><label for="R1cLiv">Mlle</label>&nbsp;&nbsp;<input type="radio" value="Société" id="R1dLiv" checked name="R1Liv" onClick="radioLiv()"">';		radioSelectLiv='<br><i>Adresse de livraison :</i><br><br>Civilité :<br>'+radioSelectLiv+'<label for="R1dLiv">Société</label>&nbsp;&nbsp;<div align="left" id="socLiv"><br>Nom :<br /><label><nobr><input name="lastnameLiv" type="text" size="40" value="'+nv[15]+'"/> <font color="#FF0000">*</font></nobr></label><br><br>Prénom :<br /><label><nobr><input name="firstnameLiv" type="text" size="40" value="'+nv[16]+'"/> <font color="#FF0000">*</font></nobr></label></div><br>Adresse :<br /><label><nobr><input name="adresseLiv" type="text" size="40" value="'+nv[17]+'"/> <font color="#FF0000">*</font><br><font size="1">&nbsp;</font></nobr><br><input name="adresse2Liv" type="text" size="40" value="'+nv[18]+'"/></label><br><br>Code postal :<br /><label><nobr><input name="cpLiv" type="text" size="20" value="'+nv[19]+'"/> <font color="#FF0000">*</font></nobr></label><br><br>Ville :<br /><label><nobr><input name="villeLiv" value="'+nv[20]+'" type="text" size="40"/> <font color="#FF0000">*</font></nobr></label><br><br>Pays :<br /><label><nobr><input name="paysLiv" type="text" size="40" value="'+nv[21]+'"/> <font color="#FF0000">*</font></nobr></label><br><br />Téléphone :<br /><label><nobr><input name="telLiv" type="text" size="40" value="'+nv[22]+'"/></nobr></label><br />';		var checLiv="";	}		else {			var radioSelectLiv="";			var checLiv=" checked";		}	var selLang="";	selLang+='<select size="1" name="SLang" id="SLang" DISABLED>';	for(i=0; i<tLang.length; i++) {		if(tLang[i] == nv[3]) selLang+='<option value="'+tLang[i]+'" selected>'+tLangD[i]+'</option>';			else selLang+='<option value="'+tLang[i]+'">'+tLangD[i]+'</option>';	}	selLang+='</select>';	if(nv[23] != "") var checFb='<br><br><input type="checkbox" id="nwcFb" name="nwcFb" value="1" style="vertical-align:bottom;">&nbsp;<label for="nwcFb">Dissocier le compte Facebook</label>';		else var checFb="";	var modif='<form name="form1" method="post" action="javascript:champVerifNouv(\'modifNouv.php\', 1);" style="margin: 0;display: inline;"><font color="#FF0000">* Champs obligatoires</font><br><br>Email (sert de login) :<br /><label><nobr><input name="email" type="text" size="40" value="'+nv[0]+'"/> <font color="#FF0000">*</font></nobr></label><br><br>Mot de passe actuel :<br /><label><nobr><input id="actu" name="actu" type="password" size="40" value=""/> <font color="#FF0000">*</font></nobr></label><br><br><input type="checkbox" id="nwc" name="nwc" onClick="ckb(this)" value="1" style="vertical-align:bottom;">&nbsp;<label for="nwc">Modifier le mot de passe</label><br><div id="cac" style="display: inline;"></div><br>Pseudo :<br /><label><input name="pseudo" type="text" size="40" value="'+nv[2]+'" disabled/><br><br>Langue :<br />'+selLang+'<br><br>Civilité :<br>'+radioSelect+'<label for="R1d">Société</label>&nbsp;&nbsp;<div align="left" id="soc"><br>Nom :<br /><label><nobr><input name="lastname" type="text" size="40" value="'+nv[5]+'"/> <font color="#FF0000">*</font></nobr></label><br><br>Prénom :<br /><label><nobr><input name="firstname" type="text" size="40" value="'+nv[6]+'"/> <font color="#FF0000">*</font></nobr></label></div><br>Adresse :<br /><label><nobr><input name="adresse" type="text" size="40" value="'+nv[7]+'"/> <font color="#FF0000">*</font><br><font size="1">&nbsp;</font></nobr><br><input name="adresse2" type="text" size="40" value="'+nv[8]+'"/></label><br><br>Code postal :<br /><label><nobr><input name="cp" type="text" size="20" value="'+nv[9]+'"/> <font color="#FF0000">*</font></nobr></label><br><br>Ville :<br /><label><nobr><input name="ville" value="'+nv[10]+'" type="text" size="40"/> <font color="#FF0000">*</font></nobr></label><br><br>Pays :<br /><label><nobr><input name="pays" type="text" size="40" value="'+nv[11]+'"/> <font color="#FF0000">*</font></nobr></label><br><br />Téléphone :<br /><label><nobr><input name="tel" type="text" size="40" value="'+nv[12]+'"/></nobr></label>'+checFb+'<br><br><input type="checkbox" id="nwcLiv" name="nwcLiv" onClick="ckbLiv(this)" value="1" style="vertical-align:bottom;"'+checLiv+'>&nbsp;<label for="nwcLiv">Utiliser comme adresse de livraison</label><br><div id="cacLiv" style="display: inline;">'+radioSelectLiv+'</div><br /><label><input type="submit" value="Envoyer"></label></form><br><br><a href="javascript:DOMImplementation(\'connecte.php\', getData);">Retour à la page de connexion</a>';	repl(modif);	radio(nv[4]);	if(nv[13] == "1") radioLiv(nv[14]);}function confirmation() {	if(document.getElementById("produit0") != undefined) {		if (confirm("Voulez-vous conserver votre panier ?")) {			DOMImplementation('deconn2.php', getData);		}			else {				DOMImplementation('deconn.php', getData);			}	}		else DOMImplementation('deconn.php', getData);}/*function xmlFromString(body) { 	// code for IE 	if (window.ActiveXObject) { 		var doc=new ActiveXObject("Microsoft.XMLDOM"); 		doc.async="false"; 		doc.loadXML(body); 	} 		// code for Mozilla, Firefox, Opera, etc. 		else { 			var parser=new DOMParser(); 			var doc=parser.parseFromString(body,"text/xml"); 		}	return doc;     }*/function stringFromXml(node) {    //if (node == null || typeof node != 'object') {return node};    if (window.ActiveXObject) {        //pour IE         return node.xml;    }    	else if (window.XMLSerializer) {      		//pour FF        		return new XMLSerializer().serializeToString(node);    	}    		else {       			//pour les autres         		//return TaFonctionManuelle(node);    		}}function textOnChange(QTE) {	if(isNaN(document.getElementById(QTE).value) || Number(document.getElementById(QTE).value) < 1 || Number(document.getElementById(QTE).value) > 999 || document.getElementById(QTE).value.indexOf(".") != -1) {		alert("La case quantité doit contenir un chiffre de 1 à 999 sans virgule !");		document.getElementById(QTE).value=1;		return false;	}		else return true;}function textOnChange2(url, prix, calibre, tva, i, med) {	if(isNaN(document.getElementById("produit"+i).value) || Number(document.getElementById("produit"+i).value) < 1 || Number(document.getElementById("produit"+i).value) > 999 || document.getElementById("produit"+i).value.indexOf(".") != -1) {		alert("La case quantité doit contenir un chiffre de 1 à 999 sans virgule !");		document.getElementById("produit"+i).value=vqte[i];		//return false;	}		else ajoutPanier2(url, prix, calibre, tva, i, med);}function ajoutPanier(url, prix, calibre, tva, QTE, med) {	replPanier(patient);	replPharm("");	DOMImplementation("modifPanier.php", getData, "QTE="+echapXML(document.getElementById(QTE).value)+"&cip="+echapXML(url)+"&prix="+echapXML(prix)+"&calibre="+echapXML(calibre)+"&tva="+echapXML(tva)+"&med="+echapXML(String(med))+"&ajout=1");}function ajoutPanier2(url, prix, calibre, tva, i, med) {	var qte=document.getElementById("produit"+i).value;	replPanier(patient);	replPharm("");	DOMImplementation("modifPanier.php", getData, "QTE="+echapXML(qte)+"&cip="+echapXML(url)+"&prix="+echapXML(prix)+"&calibre="+echapXML(calibre)+"&tva="+echapXML(tva)+"&med="+echapXML(String(med)));}function ajoutPanier3(url, prix, calibre, tva, QTE, med, group) {	replPanier(patient);	replPharm("");	DOMImplementation("modifPanier.php", getData, "QTE="+echapXML(document.getElementById(QTE).value)+"&cip="+echapXML(url)+"&prix="+echapXML(prix)+"&calibre="+echapXML(calibre)+"&tva="+echapXML(tva)+"&med="+echapXML(String(med))+"&group=1"+"&rem="+echapXML(group));}var panHtml;function replPanier(html) {	document.getElementById("panier").innerHTML = html;}function arrondir(num) {	if(num == 0) return "0,00";		else return Math.round(num*100).toString().substring(0 , Math.round(num*100).toString().length-2)+","+Math.round(num*100).toString().substring(Math.round(num*100).toString().length-2 , Math.round(num*100).toString().length);}var numFP;var vqte= new Array();function recupPanier(oData) {	var num=0;	var numRem=0;	var numRemGlob=0;	numFP=0;	if(oData.firstChild.firstChild.nodeValue != "Panier vide") {		var html='<table width="1" border="0" cellspacing="0" cellpadding="0">';		for(var i=0; i<oData.firstChild.childNodes.length; i++) {			vqte[i]=oData.firstChild.childNodes[i].getAttribute("QTE");			if(oData.firstChild.childNodes[i].getAttribute("foto") == "1") var urlImg=sdistant+'3d/'+oData.firstChild.childNodes[i].getAttribute("cip")+'/f1.jpg';				else var urlImg=sdistant+'vide.jpg';			html+='<tr><td height="31" style="PADDING-RIGHT: 15px;"><label><input type="text" id="produit'+i+'" name="produit'+i+'" value="'+oData.firstChild.childNodes[i].getAttribute("QTE")+'" size="3" onChange="textOnChange2(\''+oData.firstChild.childNodes[i].getAttribute("cip")+'\', \''+oData.firstChild.childNodes[i].getAttribute("prix")+'\', \''+oData.firstChild.childNodes[i].getAttribute("calibre")+'\', \''+oData.firstChild.childNodes[i].getAttribute("tva")+'\', '+i+') "/></label></td><td height="31" style="PADDING-RIGHT: 15px;"><nobr><a href="'+oData.firstChild.childNodes[i].getAttribute("url")+'.php'+langUrl+'">'+rechapXML(oData.firstChild.childNodes[i].getAttribute("produit"))+'</a></nobr></td><td height="31" width="30" style="PADDING-RIGHT: 15px;"><table width="30" border="0" cellspacing="0" cellpadding="0"><tr><td align="center"><a href="'+rechapXML(oData.firstChild.childNodes[i].getAttribute("url"))+'.php'+langUrl+'"><img src="'+urlImg+'" border="0" id="imgRedim'+i+'" onload="redim2(30, '+i+');" style="display : none;"/></a></td></tr></table></td><td height="31" width="1" style="PADDING-RIGHT: 15px;"><label><input type="text" name="multi'+i+'" size="10" value="'+arrondir(Number(oData.firstChild.childNodes[i].getAttribute("QTE"))*Number(oData.firstChild.childNodes[i].getAttribute("prix"))*Number(oData.firstChild.childNodes[i].getAttribute("remise")))+'" onFocus="blur()"></label></td><td height="31" style="PADDING-RIGHT: 2px;"><a href="javascript:retire(\''+rechapXML2(oData.firstChild.childNodes[i].getAttribute("cip"))+'\')"><img border="0" src="'+sdistant+'corb.gif" width="11" height="13" title="supprimer"></a></td></tr>';			num+=Number(oData.firstChild.childNodes[i].getAttribute("QTE"))*Number(oData.firstChild.childNodes[i].getAttribute("prix"))*Number(oData.firstChild.childNodes[i].getAttribute("remise"));			if(! oData.firstChild.childNodes[i].getAttribute("group")) numRem+=Number(oData.firstChild.childNodes[i].getAttribute("QTE"))*Number(oData.firstChild.childNodes[i].getAttribute("prix"))*(1-Number(oData.firstChild.childNodes[i].getAttribute("remise")));			numRemGlob+=Number(oData.firstChild.childNodes[i].getAttribute("QTE"))*Number(oData.firstChild.childNodes[i].getAttribute("prix"))*(1-Number(oData.firstChild.childNodes[i].getAttribute("remise")));			numFP+=Number(oData.firstChild.childNodes[i].getAttribute("QTE"))*Number(oData.firstChild.childNodes[i].getAttribute("calibre"));			//if(i < oData.firstChild.childNodes.length-1) html+="<br><br>";		}		html+='</table>';		if(num >= offertFp) numFP=0;		html+='<br>Frais de port <a href="javascript:fp();"><img src="'+sdistant+'fp.gif" width="16" height="16" border="0" align="absbottom"/></a> : '+arrondir(Math.ceil(numFP/100)*fpo);		if(oData.firstChild.getAttribute("codeR") == "" && ! oData.firstChild.getAttribute("remSpec")) html+='<br><br>Code de réduction :<br /><form id="formRed" name="formRed" method="post" action="javascript:fReduc();" style="margin: 0;display: inline;"><input type="text" name="reduc" id="reduc" size="15" /><input type="submit" name="Submit" value="Ok" /></form><br>';			else {				if(oData.firstChild.getAttribute("codeR") != "") var codePara=oData.firstChild.getAttribute("codeR");					else var codePara=oData.firstChild.getAttribute("remSpec");				html+='<br><br>Réduction "'+codePara+'" de '+arrondir(numRem)+'&nbsp;&nbsp;&nbsp;<a href="javascript:fSuppReduc(0);"><img border="0" src="'+sdistant+'corb.gif" width="11" height="13" title="Supprimer la réduction"></a><br>';			}		if(numRemGlob != 0 && numRem != numRemGlob) html+='Réduction globale de '+arrondir(numRemGlob)+'&nbsp;&nbsp;&nbsp;<a href="javascript:fSuppReduc(1);"><img border="0" src="'+sdistant+'corb.gif" width="11" height="13" title="Supprimer la réduction"></a><br>';		html+='<br>Total : <input type="text" name="total" size="10" value="'+arrondir((num+(Math.ceil(numFP/100)*fpo)))+'" onFocus="blur()">&nbsp;&nbsp;<a href="javascript:sauvegarder();"><img src="'+sdistant+'sauve.png " width="13" height="13" title="Sauvegarder la commande"></a>&nbsp;&nbsp;<a href="javascript:fvider();"><img border="0" src="'+sdistant+'corb.gif" width="11" height="13" title="Vider le panier"></a>';		html+='<br><br><form id="formComm" name="formComm" method="post" action="https://www.paypal.com/cgi-bin/webscr" onSubmit="return commander()" style="margin: 0;"><nobr><input type="checkbox" id="cgv" name="cgv" value="1" style="vertical-align:bottom;">&nbsp;<label for="cgv">J\'accepte les </label><a class="menu" href="'+langUrl.substring(6)+'conditions-generales-de-vente.php'+langUrl+'">conditions générales de vente</a></nobr><br><div id="bt_commande" style="display: inline;"><label><input type="submit" name="Submit" value="Commander"/></label></div><div id="commande" style="display: inline;"></div></form>';		panHtml=html;		replPanier(html);		if(cgvR) setTimeout(function(){document.getElementById("cgv").checked=true;cgvR=false;} ,100);	}		else {			panHtml="<nobr>Panier vide</nobr>";			replPanier(panHtml);		}}function retire(url) {	replPanier(patient);	replPharm("");	DOMImplementation("retire.php", getData, "url="+echapXML(url));}function MM_jumpMenu(){	for (i=0; i<document.forms.rg3d.R2.length; i++) {		if (document.forms.rg3d.R2[i].checked==true) document.rectangle_3d.envoi(document.forms.rg3d.R2[i].value);	}	document.getElementById("rectangle_3d").focus();}function MM_jumpMenu2(){	document.rectangle_3d.envoi2();	document.getElementById("rectangle_3d").focus();}function MM_jumpMenuTouche(i){	document.forms.rg3d.R2[Number(i)].checked=true;}/*function exemple() {	var nav = "videos/"+document.form1.menu1.value;	return nav;}*/function barre3D(num) {	var tchecked = new Array("", "", "", "", "", "");	tchecked[num]=" checked";	document.getElementById("bar3D").innerHTML = '<table border="0" cellpadding="0" cellspacing="0" width="1"><tr><td width="1" style="background : url(\''+sdistant+'descrCar.gif\') repeat-x; padding-left: 8px; padding-right: 3px; padding-top: 4px; padding-bottom: 4px;"><nobr>Navigation 3D</nobr></td><td width="5" style="background : url(\''+sdistant+'descrArr.gif\') no-repeat; padding-top: 4px; padding-bottom: 4px;">&nbsp;</td></tr></table><table width="560" border="0" cellspacing="0" cellpadding="0"><tr><td style="background : url(\''+sdistant+'boxAccDr560.png\') no-repeat; padding-top: 5px; padding-left: 8px;""><nobr><form name="rg3d" method="post" action="javascript:MM_jumpMenu2()" style="margin: 0;">Axe de rotation : <input type="radio" value="X" id="R2a" name="R2" onClick="MM_jumpMenu()"'+tchecked[0]+'><label for="R2a">X</label>&nbsp;<input type="radio" value="Y" id="R2b" name="R2" onClick="MM_jumpMenu()"'+tchecked[1]+'><label for="R2b">Y</label>&nbsp;<input type="radio" value="Z" id="R2c" name="R2" onClick="MM_jumpMenu()"'+tchecked[2]+'><label for="R2c">Z</label>&nbsp;<input type="radio" value="XY" id="R2d" name="R2" onClick="MM_jumpMenu()"'+tchecked[3]+'><label for="R2d">X+Y</label>&nbsp;&nbsp;&nbsp;<input type="radio" value="Zo" id="R2e" name="R2" onClick="MM_jumpMenu()"'+tchecked[4]+'><label for="R2e">Zoom</label>&nbsp;&nbsp;&nbsp;<input type="radio" value="Dpc" id="R2f" name="R2" onClick="MM_jumpMenu()"'+tchecked[5]+'><label for="R2f">Déplacer</label>&nbsp;&nbsp;&nbsp;<input type="submit" value="Réinitialiser" name="RI" class="reini"></form></nobr></td></tr><tr><td style="background : url(\''+sdistant+'boxAccDown560.png\') no-repeat; font-size: 9px;" colspan="2">&nbsp;</td></tr></table>';}function ajoutMess() {	document.getElementById("ajMessage").innerHTML = '<br><table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="10" style="display: inline;"><tr><td width="0%" nowrap><nobr><form method="POST" action="" name="noteC" style="margin: 0;">note : <input type="radio" value="0" name="R3" id="R3a"><label for="R3a">0</label>&nbsp;&nbsp;&nbsp;<input type="radio" value="1" name="R3" id="R3b"><label for="R3b">1</label>&nbsp;&nbsp;&nbsp;<input type="radio" value="2" name="R3" id="R3c"><label for="R3c">2</label>&nbsp;&nbsp;&nbsp;<input type="radio" value="3" name="R3" id="R3d" checked><label for="R3d">3</label>&nbsp;&nbsp;&nbsp;<input type="radio" value="4" name="R3" id="R3e"><label for="R3e">4</label>&nbsp;&nbsp;&nbsp;<input type="radio" value="5" name="R3" id="R3f"><label for="R3f">5</label></form></nobr></td><td width="100%" align="right" nowrap><a href="javascript:ajoutMess2()"><img border="0" src="'+sdistant+'fermer.jpg" width="12" height="12" title="Fermer"></a></td></tr><tr><td width="100%" colspan="2">&nbsp;</td></tr><tr><td width="100%" colspan="2"><form method="POST" action="javascript:ajEnvMess(0)" name="messa" style="margin: 0;"><textarea rows="5" name="Smess" cols="50"></textarea><br><input type="submit" value="Envoyer" name="B1"></form></td></tr></table><br>';}function ajoutMess2() {	document.getElementById("ajMessage").innerHTML = '<a href="javascript:ajoutMess()">ajouter un commentaire</a><br><br>';}function ajEnvMess(dati) {	for(var i = 0; i < document.noteC.R3.length; i++ ) {		if(document.noteC.R3[i].checked == true) var note=document.noteC.R3[i].value;	}	if(document.messa.Smess.value != "") DOMImplementation("comment.php", getData, "produit="+echapXML(cip2)+"&message="+echapXML(document.messa.Smess.value)+"&note="+echapXML(note)+"&dati="+dati);		else alert("Le champ commentaire est vide");}function etoil(note) {	if(noFla == " checked") strRet="note : "+note;		else strRet='<object type="application/x-shockwave-flash" data="'+sdistant+'note.swf" width="70" height="13.4" title="'+note.split(",").join(".")+'"><param name="movie" value="'+sdistant+'note.swf" /><param name="wmode" value="transparent" /><param name="quality" value="high" /><param name="FlashVars" value="note='+note.split(",").join(".")+'" /><p>Image ou texte alternatif</p></object>';}function arrondir1(num) {	if(num == 0) return "0,00";		else return Math.round(num*10).toString().substring(0 , Math.round(num*10).toString().length-1)+","+Math.round(num*10).toString().substring(Math.round(num*10).toString().length-1 , Math.round(num*10).toString().length);}function replMess(oData) {	modComm=null;	tLogComm = new Array();	tDatComm = new Array();	var comment="";	var messLen=oData.firstChild.firstChild.childNodes.length;	var note=0;	for (var i = oData.firstChild.firstChild.childNodes.length-1; i >= 0 ; i--) {		if(oData.firstChild.getAttribute("log") == oData.firstChild.firstChild.childNodes[i].getAttribute("login") && Number(oData.firstChild.firstChild.childNodes[i].getAttribute("time"))+5*60 > Number(oData.firstChild.getAttribute("time"))) {			modComm=1;			var ed='<a href="javascript:modMess(\''+rechapXML(oData.firstChild.firstChild.childNodes[i].firstChild.nodeValue)+'\')"><img src="'+sdistant+'comment_edit.png" border="0" width="16" height="16" title="Modifier" /></a>';		}			else var ed="";		tLogComm.push(oData.firstChild.firstChild.childNodes[i].getAttribute("login"));		tDatComm.push(oData.firstChild.firstChild.childNodes[i].getAttribute("time"));		note+=Number(oData.firstChild.firstChild.childNodes[i].getAttribute("note"));		etoil(oData.firstChild.firstChild.childNodes[i].getAttribute("note"));		comment+='<table width="560" border="0" cellspacing="0" cellpadding="0"><tr><td width="120" style="border:solid 1.0pt;border-right:none;background:#A0D3A7;">'+oData.firstChild.firstChild.childNodes[i].getAttribute("login").split("&apos;").join("'")+'</td><td style="border:solid 1.0pt;border-left:none;border-right:none;background:#A0D3A7;">'+oData.firstChild.firstChild.childNodes[i].getAttribute("date")+'</td><td align="right" style="border:solid 1.0pt;border-left:none;background:#A0D3A7;">'+ed+'&nbsp;'+strRet+'</td></tr><tr><td colspan="3" style="border:solid 1.0pt;border-top:none;">'+rechapXML(oData.firstChild.firstChild.childNodes[i].firstChild.nodeValue)+'</td></tr></table><br>';	}	etoil(arrondir1(note/messLen).split(",0").join(""));	if(messLen < 2) var comts=" commentaire";		else var comts=" commentaires";	document.getElementById("message").innerHTML = ''+messLen+comts+'&nbsp;&nbsp;&nbsp;&nbsp;'+strRet+'<div align="left" id="ajMessage"><a href="javascript:ajoutMess()">ajouter un commentaire</a><br><br></div>'+comment;	if(noFla == " checked") strRet="<nobr>"+strRet+"/5</nobr>";	document.getElementById("divNote").innerHTML = strRet;	strRet=null;}function modMess(mess) {	document.getElementById("ajMessage").innerHTML = '<br><table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="10" style="display: inline;"><tr><td width="0%" nowrap><nobr><form method="POST" action="" name="noteC" style="margin: 0;">note : <input type="radio" value="0" name="R3" id="R3a"><label for="R3a">0</label>&nbsp;&nbsp;&nbsp;<input type="radio" value="1" name="R3" id="R3b"><label for="R3b">1</label>&nbsp;&nbsp;&nbsp;<input type="radio" value="2" name="R3" id="R3c"><label for="R3c">2</label>&nbsp;&nbsp;&nbsp;<input type="radio" value="3" name="R3" id="R3d" checked><label for="R3d">3</label>&nbsp;&nbsp;&nbsp;<input type="radio" value="4" name="R3" id="R3e"><label for="R3e">4</label>&nbsp;&nbsp;&nbsp;<input type="radio" value="5" name="R3" id="R3f"><label for="R3f">5</label></form></nobr></td><td width="100%" align="right" nowrap><a href="javascript:ajoutMess2()"><img border="0" src="'+sdistant+'fermer.jpg" width="12" height="12" title="Fermer"></a></td></tr><tr><td width="100%" colspan="2">&nbsp;</td></tr><tr><td width="100%" colspan="2"><form method="POST" action="javascript:ajEnvMess(1)" name="messa" style="margin: 0;"><textarea rows="5" name="Smess" cols="50">'+mess.split("<br>").join("\r")+'</textarea><br><input type="submit" value="Envoyer" name="B1"></form></td></tr></table><br>';	setTimeout(function(){document.messa.Smess.select();} ,100);}//var vr=0;var first;function commander() {	if(document.getElementById("cgv").checked == true) {		replPharm("");		//nombreProduits=0;		//while(document.getElementById("produit"+nombreProduits) != null) nombreProduits++;		first=1;		DOMImplementation("commander.php", getData, "fpo="+fpo+"&offertFp="+offertFp+"&lc="+lc);		//if(vr ==1) alert(nombreProduits);		//return false;		if(async) cmdd=false;		if(cmdd) document.getElementById("bt_commande").innerHTML = patient;		return cmdd;	}		else {			alert("Vous n'avez pas accepter les conditions générales de vente");			return false;		}}function sauvegarder() {	if(document.getElementById("cgv").checked == true) {		replPharm("");		//nombreProduits=0;		//while(document.getElementById("produit"+nombreProduits) != null) nombreProduits++;		first=1;		DOMImplementation("sauvegarder.php", getData, "fpo="+fpo+"&offertFp="+offertFp+"&lc="+lc);		//if(vr ==1) alert(nombreProduits);		//return false;		if(async) cmdd=false;		if(cmdd) document.getElementById("bt_commande").innerHTML = patient;		return cmdd;	}		else {			alert("Vous n'avez pas accepter les conditions générales de vente");			return false;		}}var btCmd="";var nombreProduits;function commander2(cmd, j) {	btCmd=j;	//nombreProduits=0;	//while(document.getElementById("produit"+nombreProduits) != null) nombreProduits++;	DOMImplementation("commander2.php", getData, "cmd="+cmd);	//if(vr ==1) alert(nombreProduits);	//return false;	if(async) cmdd=false;	if(cmdd) {		if(document.getElementById("retComm"+btCmd) != null) document.getElementById("retComm"+btCmd).innerHTML="";		dispBt(patient);	}	return cmdd;}function dispBt(pat1) {	var nombreProduits=0;	//alert(document.getElementById("bt_commande"+3));	while(document.getElementById("D2Comm"+nombreProduits) != null) nombreProduits++;	for(var i=0; i<nombreProduits; i++) {			if(btCmd == i) document.getElementById("idD2Comm"+i).innerHTML = pat1;				else document.getElementById("D2Comm"+i).disabled = true;	}}function modifCommander(cmd, j) {	btCmd=j;	//nombreProduits=0;	//while(document.getElementById("produit"+nombreProduits) != null) nombreProduits++;	DOMImplementation("modifMC.php", getData, "cmd="+cmd);	//if(vr ==1) alert(nombreProduits);	//return false;}function dupliquer(cmd, j) {	btCmd=j;	//nombreProduits=0;	//while(document.getElementById("produit"+nombreProduits) != null) nombreProduits++;	DOMImplementation("modifMC2.php", getData, "cmd="+cmd);	//if(vr ==1) alert(nombreProduits);	//return false;}function modifMC(oData, cmd) {	if(oData.firstChild.firstChild.nodeValue == 2) {		if (confirm("Votre panier actuel va être effacer et votre commande va disparaître de l'historique ?")) {			dispBt(patient);			DOMImplementation("modifCommander.php", getData, "cmd="+cmd);		}	}		else {			if (confirm("Votre commande va disparaître de l'historique ?")) {				dispBt(patient);				DOMImplementation("modifCommander.php", getData, "cmd="+cmd);			}		}}function modifMC2(oData, cmd) {	if(oData.firstChild.firstChild.nodeValue == 2) {		if (confirm("Votre panier actuel va être effacer ?")) {			//dispBt(patient);			DOMImplementation("dupliquer.php", getData, "cmd="+cmd);		}	}		else {			//dispBt(patient);			DOMImplementation("dupliquer.php", getData, "cmd="+cmd);		}}function retourCommande(oData) {	//vr=1;	var html="";	num=0;	numFP=0;	//alert(oData.firstChild.firstChild.getAttribute("prix"));	html+='<input type="hidden" name="charset" value="UTF-8">';	html+='<input type="hidden" name="lc" value="'+lc.toUpperCase()+'" />';	html+='<input type="hidden" name="rm" value="2" />';	html+='<input type="hidden" name="cmd" value="'+oData.firstChild.getAttribute("cmd")+'" />';	html+='<input type="hidden" name="upload" value="'+oData.firstChild.getAttribute("upload")+'" />';	html+='<input type="hidden" name="business" value="'+oData.firstChild.getAttribute("business")+'" />';	html+='<input type="hidden" name="currency_code" value="'+oData.firstChild.getAttribute("currency_code")+'" />';	html+='<input type="hidden" name="return" value="'+oData.firstChild.getAttribute("return")+'" />';	html+='<input type="hidden" name="cancel_return" value="'+oData.firstChild.getAttribute("cancel_return")+'" />';	html+='<input type="hidden" name="invoice" value="'+oData.firstChild.getAttribute("invoice")+'" />';	for (var i = 0; i < oData.firstChild.childNodes.length; i++) {		num+=Number(oData.firstChild.childNodes[i].getAttribute("QTE"))*Number(oData.firstChild.childNodes[i].getAttribute("prix"))*Number(oData.firstChild.childNodes[i].getAttribute("remise"));		numFP+=Number(oData.firstChild.childNodes[i].getAttribute("QTE"))*Number(oData.firstChild.childNodes[i].getAttribute("calibre"));	}	for (var i = 0; i < oData.firstChild.childNodes.length; i++) {		html+='<input type="hidden" name="item_name_'+(i+1)+'" value="'+rechapXML(oData.firstChild.childNodes[i].getAttribute("produit"))+'" />';		html+='<input type="hidden" name="quantity_'+(i+1)+'" value="'+oData.firstChild.childNodes[i].getAttribute("QTE")+'" />';		html+='<input type="hidden" name="amount_'+(i+1)+'" value="'+arrondir(Number(oData.firstChild.childNodes[i].getAttribute("prix"))*Number(oData.firstChild.childNodes[i].getAttribute("remise"))).split(",").join(".")+'" />';		//html+='<input type="hidden" name="handling_'+(i+1)+'" value="'+(Number(oData.firstChild.childNodes[i].getAttribute("prix"))*0.04)+'" />';		if(num >= Number(oData.firstChild.getAttribute("offertFp"))) numFP=0;		if(i==0) html+='<input type="hidden" name="shipping_'+(i+1)+'" value="'+(Math.ceil(numFP/100)*Number(oData.firstChild.getAttribute("fpo")))+'" />';			else html+='<input type="hidden" name="shipping_'+(i+1)+'" value="0" />';	}	document.getElementById("commande"+btCmd).innerHTML=html;}function livr() {	if (confirm("Avez-vous reçu votre commande ?")) return true;		else return false;}function utf8_decode(str_data) {    var tmp_arr = [], i = 0, ac = 0, c1 = 0, c2 = 0, c3 = 0;        str_data += '';        while ( i < str_data.length ) {        c1 = str_data.charCodeAt(i);        if (c1 < 128) {            tmp_arr[ac++] = String.fromCharCode(c1);            i++;        } else if ((c1 > 191) && (c1 < 224)) {            c2 = str_data.charCodeAt(i+1);            tmp_arr[ac++] = String.fromCharCode(((c1 & 31) << 6) | (c2 & 63));            i += 2;        } else {            c2 = str_data.charCodeAt(i+1);            c3 = str_data.charCodeAt(i+2);            tmp_arr[ac++] = String.fromCharCode(((c1 & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));            i += 3;        }    }    return tmp_arr.join('');}function insertHtml() {	if(formCont.textfield2.value == "" || formCont.textfield3.value == "" || formCont.textarea1.value == "") {		alert("Merci de remplir tous les champs");		return false;	}		else if (formCont.textfield3.value.split("@").length == 1) {			alert("L'adresse email n'est pas valide");			return false;		}			else return true;	}function fImg(html) {	document.getElementById("img2").innerHTML = html;}function ckb(cb){	if(cb.checked == true) document.getElementById("cac").innerHTML = '<br>Mot de passe :<br /><label><nobr><input id="password" name="password" type="password" size="40" value=""/> <font color="#FF0000">*</font></nobr></label><br><br>Confirmer votre mot de passe :<br /><label><nobr><input id="passwordVerify" name="passwordVerify" type="password" size="40" value=""/> <font color="#FF0000">*</font></nobr></label><br>';		else document.getElementById("cac").innerHTML = "";}function ckbLiv(cb){	if(cb.checked == true) document.getElementById("cacLiv").innerHTML = "";		else document.getElementById("cacLiv").innerHTML = '<br><i>Adresse de livraison :</i><br><br>Civilité :<br><input type="radio" value="Mr" id="R1aLiv" checked name="R1Liv" onClick="radioLiv()""><label for="R1aLiv">Mr</label>&nbsp;&nbsp;<input type="radio" value="Mme" id="R1bLiv" name="R1Liv" onClick="radioLiv()""><label for="R1bLiv">Mme</label>&nbsp;&nbsp;<input type="radio" value="Melle" id="R1cLiv" name="R1Liv" onClick="radioLiv()""><label for="R1cLiv">Mlle</label>&nbsp;&nbsp;<input type="radio" value="Société" id="R1dLiv" name="R1Liv" onClick="radioLiv()""><label for="R1dLiv">Société</label>&nbsp;&nbsp;<div align="left" id="socLiv"><br>Nom :<br /><label><nobr><input name="lastnameLiv" type="text" size="40" value=""/> <font color="#FF0000">*</font></nobr></label><br><br>Prénom :<br /><label><nobr><input name="firstnameLiv" type="text" size="40" value=""/> <font color="#FF0000">*</font></nobr></label></div><br>Adresse :<br /><label><nobr><input name="adresseLiv" type="text" size="40" value=""/> <font color="#FF0000">*</font><br><font size="1">&nbsp;</font></nobr><br><input name="adresse2Liv" type="text" size="40" value=""/></label><br><br>Code postal :<br /><label><nobr><input name="cpLiv" type="text" size="20" value=""/> <font color="#FF0000">*</font></nobr></label><br><br>Ville :<br /><label><nobr><input name="villeLiv" value="" type="text" size="40"/> <font color="#FF0000">*</font></nobr></label><br><br>Pays :<br /><label><nobr><input name="paysLiv" type="text" size="40" value="FRANCE"/> <font color="#FF0000">*</font></nobr></label><br><br />Téléphone :<br /><label><nobr><input name="telLiv" type="text" size="40" value=""/></nobr></label><br />';}function fcmd(cmd){	DOMImplementation("cmd.php", getData, "cmd="+cmd+"&lang="+lc);}function fp(){	alert("Frais de port offerts à partir de "+offertFp+" euros");}function dateLimit(){	alert("Les commandes qui datent de plus d'un an ne sont pas visibles.");}function encrypt(code_str) {    if(crypt == 1) return encryptedString(public_key, code_str);		else return code_str;}function fsha1(code_str) {    if(vsha1 == 1) return hex_sha1(code_str);		else return code_str;} function Premiere(chaine){	//return chaine.substr(0,1).toUpperCase()+chaine.substr(1,chaine.length).toLowerCase();	return chaine.substr(0,1).toUpperCase()+chaine.substr(1,chaine.length);}function setCookie(nom, contenu, duree) {	var expdate = new Date ();	expdate.setTime(expdate.getTime() + duree*1000);	document.cookie = nom + "=" + contenu + "; expires=" + expdate.toGMTString();}function getCookie(nom) {	deb = document.cookie.indexOf(nom + "=")	if(deb >= 0) {		deb += nom.length + 1		fin = document.cookie.indexOf(";",deb)		if (fin < 0) fin = document.cookie.length		return unescape(document.cookie.substring(deb,fin))	}	return ""}function finscr() {	var logIns=document.getElementById("login").value;	repl(nouv);	document.getElementById("email").value=logIns;	setTimeout(function(){document.getElementById('email').select();} ,100);}function fFlaCK(){	if(! document.getElementById("flaCKB").checked) document.getElementById("flaCK").value = "oui";		else document.getElementById("flaCK").value = "non";	return true;}function onfFlaCK(cb){	if(document.formFlaCK.onsubmit()) document.formFlaCK.submit();}function fMobCK(){	if(! document.getElementById("mobCKB").checked) document.getElementById("mobCK").value = "non";		else document.getElementById("mobCK").value = "oui";	return true;}function onfMobCK(cb){	if(document.formMobCK.onsubmit()) document.formMobCK.submit();}function favoris() {	if ( navigator.appName != 'Microsoft Internet Explorer' ){		window.sidebar.addPanel("Parapharmacie Center","http://www.parapharmaciecenter.com/","");	}		else {			window.external.AddFavorite("http://www.parapharmaciecenter.com/","Parapharmacie Center");		}}function foption() {	if(urlPage != "index") {		if(urlGetPage == "") var urlFla=urlPage+".php"+langUrl;			else var urlFla=urlGetPage+".php?"+urlPage.split(" ").join("-")+langUrl3;	}		else var urlFla="./"+langUrl;	if(mobile != "") var sautMob="<tr><td>&nbsp;</td></tr>";		else var sautMob="";	if(voption != null) document.getElementById("optionIH").innerHTML = '<a href="javascript:foption2();"><img src="'+sdistant+'moins.jpg" border="0" width="12" height="12" title="Masquer les options" /></a><nobr>&nbsp;<a href="javascript:foption2();">Masquer les options</a></nobr><br><table style="margin-left:3em;" border="0" cellpadding="0" cellspacing="0" bordercolor="#111111" width="1"><tr><td width="1" align="center"><a href="javascript:void(favoris());"><img border="0" src="'+sdistant+'ajout.png" border="0" width="12" height="12" title="Ajouter aux favoris"></a></td><td width="1" valign="bottom"><nobr><a href="javascript:void(favoris());" class="menu">Ajouter aux favoris</a></nobr></td></tr><tr><td width="1" align="center"><form name="formFlaCK" method="POST" action="'+urlFla+'" onsubmit="return fFlaCK()" style="display: inline;"><input type="checkbox" name="flaCKB" id="flaCKB" onClick="onfFlaCK()"'+noFla+' ><input type="hidden" value="" name="flaCK" id="flaCK"><input type="hidden" value="'+langUrl.substring(6)+'" name="lang"></form></td><td width="1" valign="bottom"><nobr><label for="flaCKB">Version sans Flash</label></nobr></td></tr><tr><td width="1" align="center"><form name="formMobCK" method="POST" action="'+urlFla+'" onsubmit="return fMobCK()" style="display: inline;"><input type="checkbox" name="mobCKB" id="mobCKB" onClick="onfMobCK()"'+mobile+' ><input type="hidden" value="" name="mobCK" id="mobCK"><input type="hidden" value="'+langUrl.substring(6)+'" name="lang"></form></td><td width="1" valign="bottom"><nobr><label for="mobCKB">Version mobile</label></nobr></td></tr>'+sautMob+'</table>';		else document.getElementById("optionIH").innerHTML = '<a href="javascript:foption2();"><img src="'+sdistant+'moins.jpg" border="0" width="12" height="12" title="Masquer les options" /></a><nobr>&nbsp;<a href="javascript:foption2();">Masquer les options</a></nobr><br><table style="margin-left:3em;" border="0" cellpadding="0" cellspacing="0" bordercolor="#111111" width="1"><tr><td width="1" align="center"><form name="formFlaCK" method="POST" action="'+urlFla+'" onsubmit="return fFlaCK()" style="display: inline;"><input type="checkbox" name="flaCKB" id="flaCKB" onClick="onfFlaCK()"'+noFla+' ><input type="hidden" value="" name="flaCK" id="flaCK"><input type="hidden" value="'+langUrl.substring(6)+'" name="lang"></form></td><td width="1" valign="bottom"><nobr><label for="flaCKB">Version sans Flash</label></nobr></td></tr><tr><td width="1" align="center"><form name="formMobCK" method="POST" action="'+urlFla+'" onsubmit="return fMobCK()" style="display: inline;"><input type="checkbox" name="mobCKB" id="mobCKB" onClick="onfMobCK()"'+mobile+' ><input type="hidden" value="" name="mobCK" id="mobCK"><input type="hidden" value="'+langUrl.substring(6)+'" name="lang"></form></td><td width="1" valign="bottom"><nobr><label for="mobCKB">Version mobile</label></nobr></td></tr>'+sautMob+'</table>';}function foption2() {	document.getElementById("optionIH").innerHTML = '<a href="javascript:foption();"><img src="'+sdistant+'plus.jpg" width="12" height="12" border="0" title="Afficher les options..." /></a><nobr>&nbsp;<a href="javascript:foption();">Afficher les options...</a></nobr><br>&nbsp;';}function fvider() {	if (confirm("Voulez-vous vider votre panier ?")) {		replPanier(patient);		replPharm("");		DOMImplementation('vider.php', getData);	}}function redim2(base, i) {	document.getElementById("imgRedim"+i).style.display = 'inline';	var tailleW=document.getElementById("imgRedim"+i).width;	var tailleH=document.getElementById("imgRedim"+i).height;	if(tailleW >= tailleH) {		tailleH=base*tailleH/tailleW;		tailleW=base;	}		else {			tailleW=base*tailleW/tailleH;			tailleH=base;		}	document.getElementById("imgRedim"+i).width=tailleW;	document.getElementById("imgRedim"+i).height=tailleH;}function ffxml(nomAffich, nom, prix, prixCat, calibre, tva) {	if(prixCat != "") prixA='<span style="font-size:12px; color:#A0D3A7;text-decoration:line-through;">'+prixCat+' €</span><br><span style="font-size:14px; color:#FF0000;">'+prix+' €</span>';		else prixA='<span style="font-size:14px; color:#FF0000;">'+prix+' €</span>';	nomAffichA=nomAffich.substring(0, 1).toUpperCase()+nomAffich.substring(1);	document.getElementById("ffxmlId").innerHTML = '<a href="'+nom+'.php'+langUrl+'" class="lien">'+nomAffichA+'</a><br><br>'+prixA+'<br><br><form id="formAP" name="formAP" method="POST" action="javascript:ajoutPanier(\''+nomAffich.split("'").join("\\\'")+'\', \''+nom+'\', \''+prix+'\', \''+calibre+'\', \''+tva+'\', \'QTE\')" onSubmit="return textOnChange(\'QTE\')" style="display: inline;"><input type="text" value="1" id="QTE" name="QTE" size="3">&nbsp;<input type="submit" value="Ajouter au panier" name="ajPan"></form>';}function envPharm() {	if(document.getElementById("cgv").checked == true) {		if(document.fpharm.tpharm.value == "") var tpharm="Aucune pathologie et/ou médicament.";			else var tpharm=document.fpharm.tpharm.value;		DOMImplementation('commander3.php', getData, "pharm="+echapXML(tpharm)+"&fpo="+fpo+"&offertFp="+offertFp+"&lc="+lc);		replPharm("");	}		else {			alert("Vous n'avez pas accepter les conditions générales de vente");		}}function renvPharm(cmd) {	if(confirm("Si vous n'avez pas obtenu de réponse de la part de notre pharmacien dans un délai raisonnable, vous pouvez lui renvoyer la demande de validation.")) {		DOMImplementation('renvMailPharm.php', getData, "cmd="+echapXML(cmd));	}}var cgvR=false;function fReduc() {	if(document.formRed.reduc.value != "") {		cgvR=document.getElementById("cgv").checked;		DOMImplementation("reduc.php", getData, "reduc="+echapXML(document.formRed.reduc.value));	}		else alert("Veuillez entrer un code de réduction");}function fSuppReduc(glob) {	cgvR=document.getElementById("cgv").checked;	DOMImplementation("suppReduc.php", getData, "glob="+echapXML(String(glob)));}function fcDes(val) {	if(val == "2a" || val == "2b") {		if(val == "2a") {			var valDes="1a";			var tdes='Composition';		}			else {				var valDes="1b";				var tdes='Utilisation';			}		document.getElementById("idDes").innerHTML = '<table style="width: 1px; border-width: 0px;"><tr><td style="width: 1px; background : url(\''+sdistant+'descrCarFond.png\') no-repeat; padding-left: 8px; padding-right: 3px; padding-top: 4px; padding-bottom: 4px;"><a class="menu" href="javascript:fcDes(\''+valDes+'\');">Description</a></td><td style="width: 1px; background : url(\''+sdistant+'descrCar.gif\') no-repeat; padding-left: 8px; padding-right: 3px; padding-top: 4px; padding-bottom: 4px;"><span class="menuV">'+tdes+'</span></td><td style="width: 5px; background : url(\''+sdistant+'descrArr.gif\') no-repeat; padding-top: 4px; padding-bottom: 4px;">&nbsp;</td></tr></table>';	}	if(val == "1a" || val == "1b") {		if(val == "1a") var tdes='<a class="menu" href="javascript:fcDes(\'2a\');">Composition</a>';			else var tdes='<a class="menu" href="javascript:fcDes(\'2b\');">Utilisation</a>';		document.getElementById("idDes").innerHTML = '<table style="width: 1px; border-width: 0px;"><tr><td style="width: 1px; background : url(\''+sdistant+'descrCar.gif\') no-repeat; padding-left: 8px; padding-right: 3px; padding-top: 4px; padding-bottom: 4px;"><span class="menuV">Description</span></td><td style="width: 1px; background : url(\''+sdistant+'descrArrSur.png\') no-repeat; padding-left: 8px; padding-right: 3px; padding-top: 4px; padding-bottom: 4px;">'+tdes+'</td><td style="width: 5px; background : url(\''+sdistant+'descrArrFonDeg.png\') no-repeat; padding-top: 4px; padding-bottom: 4px;">&nbsp;</td></tr></table>';	}	if(val == "1") {		document.getElementById("idDes").innerHTML = '<table style="width: 1px; border-width: 0px;"><tr><td style="width: 1px; background : url(\''+sdistant+'descrCar.gif\') no-repeat; padding-left: 8px; padding-right: 3px; padding-top: 4px; padding-bottom: 4px;"><span class="menuV">Description</span></td><td style="width: 1px; background : url(\''+sdistant+'descrArrSur.png\') no-repeat; padding-left: 8px; padding-right: 3px; padding-top: 4px; padding-bottom: 4px;"><a class="menu" href="javascript:fcDes(\'2\');">Composition</a></td><td style="width: 1px; background : url(\''+sdistant+'descrArrSurDeg.png\') no-repeat; padding-left: 8px; padding-right: 3px; padding-top: 4px; padding-bottom: 4px;"><a class="menu" href="javascript:fcDes(\'3\');">Utilisation</a></td><td style="width: 5px; background : url(\''+sdistant+'descrArrFonDeg.png\') no-repeat; padding-top: 4px; padding-bottom: 4px;">&nbsp;</td></tr></table>';	}	if(val == "2") {		document.getElementById("idDes").innerHTML = '<table style="width: 1px; border-width: 0px;"><tr><td style="width: 1px; background : url(\''+sdistant+'descrCarFond.png\') no-repeat; padding-left: 8px; padding-right: 3px; padding-top: 4px; padding-bottom: 4px;"><a class="menu" href="javascript:fcDes(\'1\');">Description</a></td><td style="width: 1px; background : url(\''+sdistant+'descrCar.gif\') no-repeat; padding-left: 8px; padding-right: 3px; padding-top: 4px; padding-bottom: 4px;"><span class="menuV">Composition</span></td><td style="width: 1px; background : url(\''+sdistant+'descrArrSur.png\') no-repeat; padding-left: 8px; padding-right: 3px; padding-top: 4px; padding-bottom: 4px;"><a class="menu" href="javascript:fcDes(\'3\');">Utilisation</a></td><td style="width: 5px; background : url(\''+sdistant+'descrArrFonDeg.png\') no-repeat; padding-top: 4px; padding-bottom: 4px;">&nbsp;</td></tr></table>';	}	if(val == "3") {		document.getElementById("idDes").innerHTML = '<table style="width: 1px; border-width: 0px;"><tr><td style="width: 1px; background : url(\''+sdistant+'descrCarFond.png\') no-repeat; padding-left: 8px; padding-right: 3px; padding-top: 4px; padding-bottom: 4px;"><a class="menu" href="javascript:fcDes(\'1\');">Description</a></td><td style="width: 1px; background : url(\''+sdistant+'descrArrSurDeg.png\') no-repeat; padding-left: 8px; padding-right: 3px; padding-top: 4px; padding-bottom: 4px;"><a class="menu" href="javascript:fcDes(\'2\');">Composition</a></td><td style="width: 1px; background : url(\''+sdistant+'descrCar.gif\') no-repeat; padding-left: 8px; padding-right: 3px; padding-top: 4px; padding-bottom: 4px;"><span class="menuV">Utilisation</span></td><td style="width: 5px; background : url(\''+sdistant+'descrArr.gif\') no-repeat; padding-top: 4px; padding-bottom: 4px;">&nbsp;</td></tr></table>';	}	if(val == "1a" || val == "1b" || val == "1") document.getElementById("idDes2").innerHTML = comm;	if(val == "2a" || val == "2") document.getElementById("idDes2").innerHTML = compos;	if(val == "2b" || val == "3") document.getElementById("idDes2").innerHTML = util;	}var timer= new Array();var timeDeb= new Array();var timeDuree= new Array();var diffTime= new Array();function replTime(i) {	var dateG = new Date();	var timeReste=timeDeb[i]+timeDuree[i]-(new Date().getTime()+diffTime[i]);	if(timeReste >= 0) {		dateG.setTime(timeReste-3600*1000);		document.getElementById("hoursLeft").innerHTML = Math.floor(timeReste/(3600*1000));		var m=dateG.getMinutes();		if (m<10) {m = "0" + m}		document.getElementById("minutesLeft").innerHTML = m;		var s=dateG.getSeconds();		if (s<10) {s = "0" + s}		document.getElementById("secondsLeft").innerHTML = s;	}		else {			clearInterval(timer[i]);			if(urlPage != "index") document.location.href=urlGetPage+".php?"+urlPage.split(" ").join("-")+"&"+langUrl.substring(1);				else document.location.href="./"+langUrl;		}}/*function onfbget() {	if(document.getElementById("nwc2").checked == true) document.getElementById("fbhref").href+="&autologin=1";		else document.getElementById("fbhref").href=document.getElementById("fbhref").href.substring(0, document.getElementById("fbhref").href.indexOf("&autologin=1"));}*/function champConnFb(rconn, id, email) {	if(rconn == "") rconn=0;	if(document.form1.email.value != "" && document.form1.password.value != "") {		DOMImplementation('connFb.php', getData, "email="+echapXML(document.form1.email.value)+"&password="+encrypt(echapXML(document.form1.password.value))+"&rd="+rconn+"&fbId="+id+"&fbEmail="+email);		}		else alert('merci de remplir les champs "email" et "mot de passe"');}function assocInn(email, id) {	document.getElementById("idAssoc").innerHTML = 'Associer au compte Facebook '+email+' ?<br><input type="radio" value="oui" id="R1aFb" checked name="R1Fb"><label for="R1aFb">oui</label>&nbsp;&nbsp;<input type="radio" value="non" id="R1bFb" name="R1Fb"><label for="R1bFb">non</label><input type="hidden" value="'+email+'" id="fbEmail" name="fbEmail"><input type="hidden" value="'+id+'" id="fbId" name="fbId"><br><br>';	document.getElementById("idrepConn").href="javascript:replConn();";}function replConn() {	DOMImplementation("deconnFb.php", getData, "urlCompl="+urlCompl);}function flinkFbSess() {	DOMImplementation("linkFbSess.php", getData, "urlCompl="+urlCompl);}function flinkFb() {	DOMImplementation("linkFb.php", getData, "urlCompl="+urlCompl);}
