function verifSelection() {if (mail_form.champ1.value == "") {
alert("Champs vide")
return false
} if (mail_form.champ2.value == "") {
alert("Champs vide")
return false
} if (mail_form.zone_email.value == "") {
alert("champs mal remplit")
return false
}

invalidChars = " /:,;'"

for (i=0; i<invalidChars.length; i++) { // does it contain any invalid characters?
badChar = invalidChars.charAt(i)

if (mail_form.zone_email.value.indexOf(badChar,0) > -1) {
alert("Votre adresse e-mail contient des caractères invalides. Veuillez vérifier.")
mail_form.zone_email.focus()
return false
}
}

atPos = mail_form.zone_email.value.indexOf("@",1) // there must be one "@" symbol
if (atPos == -1) {
alert('Votre adresse e-mail ne contient pas le signe "@". Veuillez vérifier.')
mail_form.zone_email.focus()
return false
}

if (mail_form.zone_email.value.indexOf("@",atPos+1) != -1) { // and only one "@" symbol
alert('Il ne doit y avoir qu\'un signe "@". Veuillez vérifier.')
mail_form.zone_email.focus()
return false
}

periodPos = mail_form.zone_email.value.indexOf(".",atPos)

if (periodPos == -1) { // and at least one "." after the "@"
alert('Vous avez oublié le point "." après le signe "@". Veuillez vérifier.')
mail_form.zone_email.focus()
return false
}

if (periodPos+3 > mail_form.zone_email.value.length) { // must be at least 2 characters after the
alert('Il doit y avoir au moins deux caractères après le signe ".". Veuillez vérifier.')
mail_form.zone_email.focus()
return false
}if (mail_form.zone_texte.value == "") {
alert("message vide")
return false
} } // Fin de la fonction