function verif_formulaire_sourat() { if(document.myFormComment.firstnameComment.value == ""){ window.alert('Veuillez entrer votre prénom'); document.myFormComment.firstnameComment.focus(); return false; } if(document.myFormComment.lastnameComment.value == ""){ window.alert('Veuillez entrer votre nom'); document.myFormComment.lastnameComment.focus(); return false; } if(document.myFormComment.emailComment.value == ""){ window.alert('Veuillez entrer votre adresse mail'); 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("Ce n'est pas une adresse électronique"); document.myFormComment.emailComment.focus(); return false; } if(document.myFormComment.commentComment.value == ""){ window.alert('Votre commentaire doit dépasser 100 caractères'); document.myFormComment.commentComment.focus(); return false; } if(document.myFormComment.commentComment.value.length < 100) { window.alert('Votre commentaire doit dépasser 100 caractères'); document.myFormComment.commentComment.focus(); return false; } if(document.myFormComment.langueComment.checked == false) { window.alert('Veuillez rédiger un commentaire en français'); document.myFormComment.langueComment.focus(); return false; } else { formObjComment.submit();cacheId('addcomments');cacheId('ajouteruncom'); } }