// version : 13/05/2007 //====================== // Validation //------------ function validation(){ var x=1; var y=""; var z=""; // lgt - Login //------------- if (document.frm.lgt.value == "" && x==1){ x=0; document.frm.lgt.focus(); alert (txjs[0]); return false; } if (document.frm.lgt.value.length > 20 && x==1){ x=0; document.frm.lgt.focus(); alert (txjs[3]); return false; } if (x==1){ z = sys5+sys6; for (i=0;i "+y); return false; } } } if (document.frm.lgt.value.indexOf(" ")>0 && x==1){ x=0; document.frm.lgt.focus(); alert (txjs[5]); return false; } // pwt - Mot de passe //-------------------- if (document.frm.pwt.value.length > 10 && x==1){ x=0; document.frm.pwt.focus(); alert (txjs[6]); document.frm.pwt.value = ""; document.frm.pwt2.value = ""; return false; } if (document.frm.pwt.value == "" && x==1){ x=0; document.frm.pwt.focus(); alert (txjs[1]); return false; } if (document.frm.pwt.value.length < 3 && x==1){ x=0; document.frm.pwt.focus(); alert (txjs[7]); document.frm.pwt.value = ""; document.frm.pwt2.value = ""; return false; } for (i=0;i "+y); document.frm.pwt.value = ""; document.frm.pwt2.value = ""; return false; } } if (document.frm.pwt2.value == "" && x==1){ x=0; document.frm.pwt2.focus(); alert (txjs[9]); return false; } if (document.frm.pwt.value != document.frm.pwt2.value && x==1){ x=0; document.frm.pwt.focus(); alert (txjs[10]); document.frm.pwt.value = ""; document.frm.pwt2.value = ""; return false; } // aem - Adresse email //--------------------- if (document.frm.aem.value == "" && x==1 && use_c02>1){ x=0; document.frm.aem.focus(); alert (txjs[11]); return false; } if(document.frm.aem.value.length>50 && x==1){ x=0; document.frm.aem.focus(); alert (txjs[12]); return false; } if(document.frm.aem.value!=""){ document.frm.aem.value = document.frm.aem.value.toLowerCase(); var z = "-_.@0123456789abcdefghijklmnopqrstuvwxyz"; var y = ""; for (i=0;i "+y); return false; } } var erreurma = 0; var positio1 = document.frm.aem.value.indexOf("@"); var positio2 = document.frm.aem.value.indexOf(".",positio1); if(positio1>0 && positio2>(positio1+1) && positio20){ x=0; document.frm.aem.focus(); alert (txjs[14]); return false; } } // Infos personnelles //-------------------- if(use_c06==3){ // nom - Nom et prénom //--------------------- if(document.frm.nom.value=="" && x==1){ x=0; document.frm.nom.focus(); alert (txjs[15]); return false; } // adr - Adresse //--------------- if(document.frm.adr.value=="" && x==1){ x=0; document.frm.adr.focus(); alert (txjs[16]); return false; } // cpo - Code postale //-------------------- if(document.frm.cpo.value=="" && x==1){ x=0; document.frm.cpo.focus(); alert (txjs[17]); return false; } // vil - Ville //------------- if(document.frm.vil.value=="" && x==1){ x=0; document.frm.vil.focus(); alert (txjs[18]); return false; } // pay - Pays //------------ if(document.frm.pay.value=="" && x==1){ x=0; document.frm.pay.focus(); alert (txjs[19]); return false; } } // Formulaire OK //--------------- if(x==1){ SetCookie("c0","",exp); SetCookie("c1","",exp); document.frm.ok.value = txjs[2]; document.frm.ok.disabled = true; document.frm.submit(); } } // Fin de chargement //------------------- function onl(){ sca(); } // Scan du formulaire //-------------------- function sca(){ document.frm.lgts.value = document.frm.lgt.value.length+" / 20"; document.frm.pwts.value = document.frm.pwt.value.length+" / 10"; setTimeout("sca()",500); }