// JavaScript Document

function Verif_Mail(valeur_mail)
{
	var allValid = true;
	if (valeur_mail.value.indexOf("@") == -1) allValid = false;
	return allValid;
}

function Alerte (valeur_champ,nom_champ)
{
	alert("Veuillez renseigner le champ : \""+nom_champ+"\".");
	valeur_champ.focus();
	return false;
}

function Valid_Contact(theForm)
{
	if (theForm.nom.value == "") return (Alerte(theForm.nom,'Nom / Prénom'));
	if (theForm.ville.value == "") return (Alerte(theForm.ville,'Ville'));
	if (theForm.tel.value == "") return (Alerte(theForm.tel,'Téléphone'));
	if ((theForm.mail.value == "") || (!Verif_Mail(theForm.mail))) return (Alerte(theForm.mail,'Mail'));
	if (theForm.question.value == "") return (Alerte(theForm.question,'Votre question'));
	if (!(confirm('Confirmer l\'envoi de votre question ?'))) return false;
}
