function verif_formulaire_sourat() { if(document.myFormComment.firstnameComment.value == ""){ window.alert('Please enter your first name'); document.myFormComment.firstnameComment.focus(); return false; } if(document.myFormComment.lastnameComment.value == ""){ window.alert('Please enter your last name'); document.myFormComment.lastnameComment.focus(); return false; } if(document.myFormComment.emailComment.value == ""){ window.alert('Please enter your Email'); document.myFormComment.emailComment.focus(); return false; } adresse = document.myFormComment.emailComment.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.myFormComment.emailComment.focus(); return false; } if(document.myFormComment.commentComment.value == ""){ window.alert('Your comment must be 100 characters at least'); document.myFormComment.commentComment.focus(); return false; } if(document.myFormComment.commentComment.value.length < 100) { window.alert('Your comment must be 100 characters at least'); document.myFormComment.commentComment.focus(); return false; } if(document.myFormComment.langueComment.checked == false) { window.alert('Please write your comment in English'); document.myFormComment.langueComment.focus(); return false; } else { formObjComment.submit();cacheId('addcomments');cacheId('ajouteruncom'); } }