<!--
   	
function emailCheck (email) {
	var checkTLD=1;
	var knownDomsPat=/^(com|fr|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum)$/;
	var emailPat=/^(.+)@(.+)$/;
	var specialChars="\\(\\)><@,;:\\\\\\\"\\.\\[\\]";
	var validChars="\[^\\s" + specialChars + "\]";
	var quotedUser="(\"[^\"]*\")";
	var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;
	var atom=validChars + '+';
	var word="(" + atom + "|" + quotedUser + ")";
	var userPat=new RegExp("^" + word + "(\\." + word + ")*$");
	var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$");
		
	var matchArray=email.match(emailPat);
	
	if (matchArray==null) {
		return false;
	}
	
	var user=matchArray[1];
	var domain=matchArray[2];
	
	for (i=0; i<user.length; i++) {
		if (user.charCodeAt(i)>127) {
			return false;
   		}
	}
	
	for (i=0; i<domain.length; i++) {
		if (domain.charCodeAt(i)>127) {
			return false;
	   	}
	}

	if (user.match(userPat)==null) {
		return false;
	}
	
	var IPArray=domain.match(ipDomainPat);
	if (IPArray!=null) {
		for (var i=1;i<=4;i++) {
			if (IPArray[i]>255) {
				return false;
   			}
		}
		return true;
	}

	var atomPat=new RegExp("^" + atom + "$");
	var domArr=domain.split(".");
	var len=domArr.length;
	
	for (i=0;i<len;i++) {
		if (domArr[i].search(atomPat)==-1) {
			return false;
   		}
	}

	if (checkTLD && domArr[domArr.length-1].length!=2 && domArr[domArr.length-1].search(knownDomsPat)==-1) {
		return false;
	}
	
	if (len<2) {
		return false;
	}
	return true;
}

function validerChiffre(champ)
{
	var chiffre = "0123456789()-"
	var ok = "yes";
	var temp;
	
	for (var i=0; i<champ.length; i++) 
	{
		temp = "" + champ.substring(i, i+1);
		if (chiffre.indexOf(temp) == "-1") ok = "no";
	}
	
	if (ok == "no") 
	{
		return false;
	}
	return true;
}

function valid(theform)
{	
	err = true;
        var obj;
        
	if (theform.raison.value == "")
        {   
        	err = false;
		strMessage = "Saississez votre raison sociale !";
            	obj = theform.raison;
        }
        
	else if (theform.nom.value == "")
        {   
        	err = false;
        	strMessage = "Saississez votre nom !";
           	obj = theform.nom;
        }
        
        else if (theform.prenom.value == "")
        {   
        	err = false;
           	strMessage = "Saississez votre prénom !";
            	obj = theform.prenom;
        }
        
        else if (theform.email.value == "")
        {   
        	err = false;
            	strMessage = "Saississez votre email !";
            	obj = theform.email;
        }
        
        else if (emailCheck(theform.email.value) == false)
        {   
        	err = false;
        	strMessage = "Votre email n\'est pas correct !";
            	obj = theform.email;
        }
        
        else if (theform.telephone.value == "")
        {   
        	err = false;
            	strMessage = "Saississez votre téléphone !";
            	obj = theform.telephone;
        }
        
        else if (validerChiffre(theform.telephone.value) == false)
        {   
        	err = false;
            	strMessage = "Votre numéro de téléphone n'est pas correct !";
            	obj = theform.telephone;
        }
        
        else if (theform.fonction.value == "")
        {   
        	err = false;
            	strMessage = "Saississez votre fonction !";
            	obj = theform.fonction;
        }
        
        else if (theform.postal.value == "")
        {   
        	err = false;
            strMessage = "Saississez votre code postal !";
            obj = theform.postal;
        }
        
        else if (validerChiffre(theform.postal.value) == false)
        {   
        	err = false;
            	strMessage = "Votre code postal n'est pas correct !";
            	obj = theform.postal;
        }
        
        
        else if (theform.ville.value == "")
        {   
        	err = false;
            	strMessage = "Saississez votre ville !";
            	obj = theform.ville;
        }
        
	if (!err)
        {   
        	alert(strMessage);
            	obj.focus();
        }
        else 
        {
        	theform.submit();
        }
}

function valid_contact(theform)
{	
	err = true;
      var obj;
        
	if (theform.sujet.value == "")
        {   
        	err = false;
		strMessage = "Saississez le sujet de votre message  !";
            	obj = theform.sujet;
        }
        
	else if (theform.question.value == "")
        {   
        	err = false;
        	strMessage = "Saississez votre question !";
           	obj = theform.question;
        }
    else if (!(document.getElementById('prospecoui').checked || document.getElementById('prospecnon').checked)) {
    	strMessage = "Merci de répondre à la dernière question de ce formulaire";
    	alert(strMessage);
    	return false;
    }
	if (!err)
        {   
        	alert(strMessage);
            	obj.focus();
        }
        else 
        {
        	valid(theform);
        }
}

-->