function afficheId(baliseId) { if (document.getElementById && document.getElementById(baliseId) != null) { document.getElementById(baliseId).style.visibility='visible'; document.getElementById(baliseId).style.display='block'; } } function cacheId(baliseId) { if (document.getElementById && document.getElementById(baliseId) != null) { document.getElementById(baliseId).style.visibility='hidden'; document.getElementById(baliseId).style.display='none'; } } function verif_formulaire() { if(document.myForm.firstname.value == ""){ window.alert('Please enter your first name'); document.myForm.firstname.focus(); return false; } if(document.myForm.lastname.value == ""){ window.alert('Please enter your last name'); document.myForm.lastname.focus(); return false; } if(document.myForm.email.value == ""){ window.alert('Please enter your Email'); document.myForm.email.focus(); return false; } adresse = document.myForm.email.value; var place = adresse.indexOf("@",1); var point = adresse.indexOf(".",place+1); if ((place > -1)&&(adresse.length >2)&&(point > 1)) { } else { window.alert("The address you entered is not correct"); document.myForm.email.focus(); return false; } if(document.myForm.email2.value == ""){ window.alert('Please enter his Email'); document.myForm.email2.focus(); return false; } adresse2 = document.myForm.email2.value; var place2 = adresse2.indexOf("@",1); var point2 = adresse2.indexOf(".",place+1); if ((place2 > -1)&&(adresse2.length >2)&&(point2 > 1)) { formObj.submit();cacheId('reco'); document.getElementById('ajoutereco').removeAttribute("href"); document.getElementById('ajoutereco2').removeAttribute("href"); document.getElementById('reco').innerHtml=''; } else { window.alert("The address you entered is not correct"); document.myForm.email2.focus(); return false; } }