function VerificationEmail(elm)
{var reg_mail=new RegExp('^[a-z0-9]+([_|\.|-]{1}[a-z0-9]+)*@[a-z0-9]+([_|\.|-]­{1}[a-z0-9]+)*[\.]{1}[a-z]{2,6}$','i');if(!(reg_mail.test(elm.value)))
{return false;}
else
{return true;}}
function VerificationFormulaire()
{if(VerificationEmail(document.getElementById('email'))==false)
{alert("Email non Valide.");document.getElementById('email').focus();return false;}
return true;}
function gopanier(nbpdt){if(this.nbpdt>0)
{if(confirm(msg))
{Lien();}
else
{document.getElementById('changepays').selectedIndex=0;}}
if(this.nbpdt==0)
{Lien();}}
function goport(){var xhr=getXhr();xhr.onreadystatechange=function(){if(xhr.readyState==4&&xhr.status==200){rep=xhr.responseText;alert(rep);document.getElementById('total').innerHTML=rep;}}
xhr.open("POST","panier.php",true);xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');leport=document.port.valeur;for(var i=0;i<leport.length;i++){if(leport[i].checked){port=leport[i].value;document.getElementById('portvalue').innerHTML=leport[i].value;}}
xhr.send("port="+port);}
function go(){nom=document.getElementById('nom');if(nom.value!="")
{nom.style.background="lightgreen";}
else
{nom.style.background="white";}
nom=nom.value;prenom=document.getElementById('prenom');if(prenom.value!="")
{prenom.style.background="lightgreen";}
else
{prenom.style.background="white";}
prenom=prenom.value;email=document.getElementById('email');if(email.value!="")
{email.style.background="lightgreen";}
else
{email.style.background="white";}
email=email.value;objet=document.getElementById('objet');if(objet.value!="")
{objet.style.background="lightgreen";}
else
{objet.style.background="white";}
objet=objet.value;message=document.getElementById('message');message=message.value;$.post("rep.php",{nom:nom,prenom:prenom,email:email,objet:objet,message:message},function(data){rep=data;if(rep=="true")
{document.getElementById('btenvoi').disabled=false;};if(rep=="false")
{document.getElementById('btenvoi').disabled=true;};});}
function send_alert(){$.ajax({url:"alert.php",type:"POST",contentType:"application/x-www-form-urlencoded",data:"email="+url_encode($('#alert_email').val())+"&uri="+url_encode($('#alert_url').val())+"&msg="+url_encode($('#alert_msg').val())+"&uploaded_files="+url_encode($("#upload_response_alert").text()),success:function(html)
{alert(msg_alert);}});}
function send_ami(msg_envoi_ami){$.ajax({url:"alert.php",type:"POST",contentType:"application/x-www-form-urlencoded",data:"ami=1&uri="+url_encode($('#envoi_ami_page').val())+"&nom="+url_encode($('#envoi_ami_nom').val())+"&prenom="+url_encode($('#envoi_ami_prenom').val())+"&email_src="+url_encode($('#envoi_ami_mail_src').val())+"&email_dest="+url_encode($('#envoi_ami_mail_dest').val())+"&msg="+url_encode($('#envoi_ami_msg').val()),success:function(html)
{alert(msg_envoi_ami);}});}
function send_news(){var xhr=getXhr();xhr.onreadystatechange=function(){if(xhr.readyState==4&&xhr.status==200){rep=xhr.responseText;alert(rep);}}
xhr.open("POST","newsletter.php",true);xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');email=document.getElementById('email_news').value;xhr.send("email_news="+email);}
Array.prototype.in_array=function(p_val){for(var i=0,l=this.length;i<l;i++){if(this[i]==p_val){return true;}}
return false;}