function ababa() { var assertiona = document.form1.username.value; var assertion = document.form1.hide.value; var resultat = assertion.search(';' + document.form1.username.value + ';'); var resultatdeux = assertiona.search(' '); if(resultat != -1 && document.form1.username.value !== '') { alert('Désolé mais le pseudo ' + document.form1.username.value + ' existe déja !'); document.form1.username.id="incorrect"; } else if (document.form1.username.value == '') { document.form1.username.id="incorrect"; } else if (resultatdeux != -1) { alert('Le pseudo ne doit comporter aucun espace !'); document.form1.username.id="incorrect"; } else if (document.form1.username.value.length<4) { alert('Le pseudo doit comporter au minimum 4 caractères !'); document.form1.username.id="incorrect"; } else { document.form1.username.id="correct"; document.form1.username.value = assertiona; } } /** * * @access public * @return void **/ function verif_nom(){ if (document.form1.nom.value.length<2) { document.form1.nom.id="incorrect"; } else { document.form1.nom.id="correct"; } } /** * * @access public * @return void **/ function verif_prenom(){ if (document.form1.prenom.value.length<2) { document.form1.prenom.id="incorrect"; } else { document.form1.prenom.id="correct"; } } /** * * @access public * @return void **/ function verif_site(){ var assertionb = document.form1.site.value; var assertion = document.form1.hide2.value; var resultatsite = assertion.search(';' + document.form1.site.value + ';'); var resultatdeuxsite = assertionb.search(' '); if (document.form1.site.value.length<8) { document.form1.site.id="incorrect"; } else if(resultatsite != -1 && document.form1.site.value !== ''){ alert("Désolé, mais le site "+ document.form1.site.value +" est déjà inscrit à nos services."); document.form1.site.id="incorrect"; } else { document.form1.site.id="correct"; } } /** * * @access public * @return void **/ function verif_mail(){ if (document.form1.mail.value.length<6) { document.form1.mail.id="incorrect"; } else { document.form1.mail.id="correct"; } } /** * * @access public * @return void **/ function verif_mail2(){ if (document.form1.mail2.value.length<6) { document.form1.mail2.id="incorrect"; } else { document.form1.mail2.id="correct"; } } /** * * @access public * @return void **/ function verif_pass(){ if (document.form1.pass.value.length<6) { document.form1.pass.id="incorrect"; } else { document.form1.pass.id="correct"; } } /** * * @access public * @return void **/ function verif_pass2(){ if (document.form1.pass2.value.length<6) { document.form1.pass2.id="incorrect"; } else { document.form1.pass2.id="correct"; } } /** * * @access public * @return void **/ function verif_crypto(){ if(document.form1.crypto.value == "28fb5") { document.form1.crypto.id="incorrect"; } else { document.form1.crypto.id="correct"; } }