
function check1()
{    with(document.demande) 
    {
	  var Prenom = prenom.value.length;
	  var Nom = nom.value.length;
	  var Commune = commune.value.length;
	  var Codepostal = codepostal.value.length;
	  var Userdigit = userdigit.value.length;
	  var Rue = rue.value.length;
	  var Numero = numero.value.length;
	  var Telephone = telephone.value.length;
	  var Email = email.value.length;
	  		
	  if (Prenom < 1 )
	     {	
	     prenom.style.backgroundColor="#B6928F";
		 alert ("Votre prénom?");
		 prenom.focus();
		 return false;
	     }
	   if (Nom < 1 )
	     {	
	     nom.style.backgroundColor="#B6928F";
		 alert ("nom? ");
		 name.focus();
		 return false;
	     } 	  
	   if (Commune < 1 )
	     {	
	     commune.style.backgroundColor="#B6928F";
		 alert ("votre commune? ");
		 commune.focus();
		 return false;
	     } 	
		if (Codepostal < 4 )
	     {	
	     codepostal.style.backgroundColor="#B6928F";
		 alert ("votre code postal? ");
		 codepostal.focus();
		 return false;
	     } 	   
		 
		 
		 
		 
		   
	   if (Rue < 1 )
	    {	
	     rue.style.backgroundColor="#B6928F";
		 alert ("votre rue?");
		 rue.focus();
		 return false;
	     } 	  
	   if (Numero< 1 )
	    {	
	     numero.style.backgroundColor="#B6928F";
		 alert ("votre n° de rue?");
		 numero.focus();
		 return false;
	     } 	  
	    if (Telephone< 9 )
	    {	
	     telephone.style.backgroundColor="#B6928F";
		 alert ("votre n° de téléphone?");
		 telephone.focus();
		 return false;
	     } 	  
		
		
		
      email.style.backgroundColor="#b6928f";
	  var positionat = email.value.indexOf("@");
	  var positionat2 = email.value.lastIndexOf("@");
	  var positionpoint = email.value.lastIndexOf(".");
	  var longu = email.value.length;
	   if (positionat == -1 || 
	    positionpoint == -1 || 
		positionpoint == 0 ||
		positionat > positionpoint || 
		positionpoint-positionat < 3 || 
		longu < 7 || 
		longu-positionpoint < 3 ||
		positionat != positionat2)
	    {	
	     email.style.backgroundColor="#B6928F";
		 alert ("email incorrect?");
		 email.focus();
		 return false;
	    }
		if (Userdigit< 5 )
	    {	
	     userdigit.style.backgroundColor="#B6928F";
		 alert ("code de sécurité? ");
		 userdigit.focus();
		 return false;
	     } 	   	 		
	}
	return true;
}  
 
function check2()
{    with(document.emploi) 
    {
	  
	  var Prenom = prenom.value.length;
	  var Nom = nom.value.length;
	  var Commune = commune.value.length;
	  var Codepostal = codepostal.value.length;
	  var Userdigit = userdigit.value.length;
	  var Rue = rue.value.length;
	  var Numero = numero.value.length;
	  var Telephone = telephone.value.length;
	 
	  		
	  if (Prenom < 1 )
	     {	
	     prenom.style.backgroundColor="#B6928F";
		 alert ("Votre prénom?");
		 prenom.focus();
		 return false;
	     }
	   if (Nom < 1 )
	     {	
	     nom.style.backgroundColor="#B6928F";
		 alert ("nom? ");
		 name.focus();
		 return false;
	     } 	  
	   if (Commune < 1 )
	     {	
	     commune.style.backgroundColor="#B6928F";
		 alert ("votre commune? ");
		 commune.focus();
		 return false;
	     } 	
		if (Codepostal < 4 )
	     {	
	     codepostal.style.backgroundColor="#B6928F";
		 alert ("votre code postal? ");
		 codepostal.focus();
		 return false;
	     } 	   
		 
		 
		 
		 
		   
	   if (Rue < 1 )
	    {	
	     rue.style.backgroundColor="#B6928F";
		 alert ("votre rue?");
		 rue.focus();
		 return false;
	     } 	  
	   if (Numero< 1 )
	    {	
	     numero.style.backgroundColor="#B6928F";
		 alert ("votre n° de rue?");
		 numero.focus();
		 return false;
	     } 	  
	    if (Telephone< 9 )
	    {	
	     telephone.style.backgroundColor="#B6928F";
		 alert ("votre n° de téléphone?");
		 telephone.focus();
		 return false;
	     } 	  
		
		
		
      
		if (Userdigit< 5 )
	    {	
	     userdigit.style.backgroundColor="#B6928F";
		 alert ("code de sécurité? ");
		 userdigit.focus();
		 return false;
	     } 	   	 
		
	}
	return true;
}   

