// JavaScript Document
function CheckMail()
  {
	    if (document.mailform.produit.value == "nc")
		{
		alert ("S.V.P. Précisez le Produit qui vous intéresse");
		document.mailform.produit.focus()
		return false;	
		}
		if (document.mailform.email.value == "")
		{
		alert ("S.V.P. remplissez le champ e-mail");
		document.mailform.email.focus()
		return false;	
		}

		if (document.mailform.email.value.indexOf ('@', 0) == -1  ||
		document.mailform.email.value.indexOf ('.', 0) == -1 )
		{
		alert ("S.V.P. corrigez le champ e-mail");
		document.mailform.email.focus()
		return false;
		}
		
		if (document.mailform.nom.value == "")
		{
		alert ("S.V.P. Indiquez votre Nom");
		document.mailform.nom.focus()
		return false;	
		}
		
		if (document.mailform.adresse.value == "")
		{
		alert ("S.V.P. Indiquez votre Adresse");
		document.mailform.adresse.focus()
		return false;	
		}

		if (document.mailform.cp.value == "")
		{
		alert ("S.V.P. remplissez le champ Code Postal");
		document.mailform.cp.focus()
		return false;	
		}

		if (document.mailform.ville.value == "")
		{
		alert ("S.V.P. remplissez le champ Ville");
		document.mailform.ville.focus()
		return false;	
		}

		if (document.mailform.tel.value == "")
		{
		alert ("S.V.P. Indiquez au moins un numero de telephone");
		document.mailform.tel.focus()
		return false;	
		}
		if (document.mailform.datechantier.value == "")
		{
		alert ("S.V.P. Indiquez une date de chantier prevue");
		document.mailform.datechantier.focus()
		return false;	
		}
		if (document.mailform.refautre.value == "")
		{
		alert ("S.V.P. Indiquez la Ref du produit qui vous interesse");
		document.mailform.refautre.focus()
		return false;	
		}


		else{
		clicsimple();
		}
}
function clicsimple(){
	if (document.forms['mailform'].envoyer.value!= "Veuillez patienter..."){
	document.forms['mailform'].envoyer.style.border = "none"
	document.forms['mailform'].envoyer.style.background = "#3E562E"
	document.forms['mailform'].envoyer.style.color = "#FFFFFF"
	document.forms['mailform'].envoyer.value = "Veuillez patienter..."
	document.forms['mailform'].submit()
	}
}
//-->
