// JavaScript Document
function couleur(obj) {
     obj.style.backgroundColor = "#dbdada";
}
function couleur(obj) {
     obj.style.backgroundColor = "#dbdada";
}
function couleur(obj) {
     obj.style.backgroundColor = "#dbdada";
}

function check() {
	var msg = "";

		if (document.form1.email.value != "")	{
		indexAroba = document.form1.email.value.indexOf('@');
		indexPoint = document.form1.email.value.indexOf('.');
		if ((indexAroba < 0) || (indexPoint < 0))		{
		document.form1.email.style.backgroundColor = "#dbdada";
			msg += "The email is incorrect\n";
		}
	}
	else	
	
	{
		document.form1.email.style.backgroundColor = "#dbdada";
		msg += "Please seize your email\n";
	}

if (document.form1.nom_complet.value == "")	{
		msg += "Please seize your name\n";
		document.form1.nom_complet.style.backgroundColor = "#dbdada";
	}
	if (document.form1.company.value == "")	{
		msg += "Please seize your company name\n";
		document.form1.nom_complet.style.backgroundColor = "#dbdada";
	}

if (document.form1.tel.value == "")	{
		msg += "Please seize your Phone\n";
		document.form1.tel.style.backgroundColor = "#dbdada";
	}
	
	if (document.form1.message.value == "")	{
		msg += "Please seize your Message\n";
		document.form1.message.style.backgroundColor = "#dbdada";
	}
	if (document.form1.pays.value == "")	{
		msg += "Please seize your Country\n";
		document.form1.pays.style.backgroundColor = "#dbdada";
	}
if (document.form1.ville.value == "")	{
		msg += "Please seize your City\n";
		document.form1.ville.style.backgroundColor = "#dbdada";
	}
if (document.form1.fax.value == "")	{
		//msg += "Veuillez saisir votre Fax\n";
		document.form1.fax.style.backgroundColor = "#dbdada";
	}

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





function verif_nombre(champ)
{
var chiffres = new RegExp("[0-9\. ()]"); 
var verif;
var points = 0; 

for(x = 0; x < champ.value.length; x++)
{
verif = chiffres.test(champ.value.charAt(x));
if(champ.value.charAt(x) == "."){points++;} 
if(points > 1){verif = false; points = 1;} 
if(verif == false){champ.value = champ.value.substr(0,x) + champ.value.substr(x+1,champ.value.length-x+1); x--;}
}

}

        
        function validation() 
        { 
            var email     = document.form1.email.value; 
              
			   var verif     = /^([a-zA-Z0-9_-])+([.]?[a-zA-Z0-9_-]{1,})*@([a-zA-Z0-9-_]{2,}[.])+[a-zA-Z]{2,4}$/
               if (verif.exec(email) == null) 
            { 
                alert("Votre email est incorrecte"); 
                return false; 
            } 
           
  
        } 

