function checkForm(){
	var theForm = document.ajout_message;

	if (theForm.nom.value=="") {
		alert("Veuillez remplir le champ 'Nom'");
		theForm.nom.focus();
		return;
	}
	if (theForm.mail.value!=""){
		var exclude=/[^@\-\.\w]|^[_@\.\-]|[\._\-]{2}|[@\.]{2}|(@)[^@]*\1/;
		var check=/@[\w\-]+\./;
		var checkend=/\.[a-zA-Z]{2,3}$/;
		var bEmailCheck = true ;
		if(((theForm.mail.value.search(exclude) != -1)||(theForm.mail.value.search(check)) == -1)||(theForm.mail.value.search(checkend) == -1)){
			alert("L'adresse \'E-mail\' est incorrecte !");
			theForm.mail.focus();
			return;
		}
	} else {
		alert("Veuillez remplir le champ 'e-mail'");
		theForm.mail.focus();
		return;
	}
	if (theForm.dest.value!=""){
		var exclude=/[^@\-\.\w]|^[_@\.\-]|[\._\-]{2}|[@\.]{2}|(@)[^@]*\1/;
		var check=/@[\w\-]+\./;
		var checkend=/\.[a-zA-Z]{2,3}$/;
		var bEmailCheck = true ;
		if(((theForm.dest.value.search(exclude) != -1)||(theForm.dest.value.search(check)) == -1)||(theForm.dest.value.search(checkend) == -1)){
			alert("L'adresse \'Destinataire\' est incorrecte !");
			theForm.dest.focus();
			return;
		}
	} else {
		alert("Veuillez remplir le champ 'Destinataire'");
		theForm.dest.focus();
		return;
	}
	if (theForm.mail.value==theForm.dest.value){
		alert("Le champ 'e-mail' et le champ 'Destinataire' sont identiques!");
		theForm.dest.focus();
		return;
	}
	if (theForm.message.value=="") {
		alert("Veuillez remplir votre 'Message'");
		theForm.message.focus();
		return;
	}

	theForm.action="decouvrir_cette_fragrance.php";
	theForm.submit();
}
