var max=499;
function compter(f) {
	var txt=f.Message.value;
	var nb=txt.length;
	if (nb>max) { 
	    alert("Pas plus de 500 caractères dans ce champ");
		f.Message.value=txt.substring(0,max);
		nb=max;
	}
	f.nbcar.value=max - nb;
}


function check() {
	var msg = "";

		if (document.formulaire.Email.value != "")	{
		indexAroba = document.formulaire.Email.value.indexOf("@");
		indexPoint = document.formulaire.Email.value.indexOf(".");
		if ((indexAroba < 0) || (indexPoint < 0))		{
			msg += "Votre email est incorrect.\n";
		}
	}
	else	{
		msg += "Veuillez saisir votre email.\n";
	}



if (document.formulaire.Message.value == "")	{
		msg += "Veuillez saisir votre message.\n";
	}

if (document.formulaire.code.value == "")	{
		msg += "Veuillez saisir le code de protection anti-spam.\n";
	}

	if (msg == "") return(true);
	else	{
		alert(msg);
		return(false);
	}
}
