// JavaScript Document pour le contrôle des champs 
  function valider_form(theForm) 
  {  
		if (theForm.pChamp13.value.length == 0)
		{
			//alert("Les champs marque * sont obligatoires!");
			$('divpChamp13').innerHTML = "Les champs marque * sont obligatoires!";
			theForm.pChamp13.style.backgroundColor = "#ff0000"; 
			theForm.pChamp13.focus();
			return false;
		}
		else
		{
			$('divpChamp13').innerHTML = "";
			theForm.pChamp13.style.backgroundColor = "#ffffff"; 
		}
		
		if (theForm.pChamp14.value.length == 0)
		{
			//alert("Les champs marque * sont obligatoires!");
			$('divpChamp14').innerHTML = "Les champs marque * sont obligatoires!";
			theForm.pChamp14.style.backgroundColor = "#ff0000"; 
			theForm.pChamp14.focus();
			return false;
		}
		else
		{
			$('divpChamp14').innerHTML = "";
			theForm.pChamp14.style.backgroundColor = "#ffffff"; 
		}
		
		if (theForm.pChamp14.value != theForm.pChamp142.value)
		{
			//alert("Mot de Passe and Confirmer M.Passe have to be identical!");
			$('divpChamp14').innerHTML = "Mot de Passe and Confirmer M.Passe have to be identical!";
			theForm.pChamp14.style.backgroundColor = "#ff0000"; 
			theForm.pChamp14.focus();
			return false;
		}
		else
		{
			$('divpChamp14').innerHTML = "";
			theForm.pChamp14.style.backgroundColor = "#ffffff"; 
		}
		
		if (theForm.pChamp1.value.length == 0)
		{
			//alert("Les champs marque * sont obligatoires!");
			$('divpChamp1').innerHTML = "Les champs marque * sont obligatoires!";
			theForm.pChamp1.style.backgroundColor = "#ff0000"; 
			theForm.pChamp1.focus();
			return false;
		}
		else
		{
			$('divpChamp1').innerHTML = "";
			theForm.pChamp1.style.backgroundColor = "#ffffff"; 
		}
			
		if (theForm.pChamp2.value.length == 0)
		{
			//alert("Les champs marque * sont obligatoires!");
			$('divpChamp2').innerHTML = "Les champs marque * sont obligatoires!";
			theForm.pChamp2.style.backgroundColor = "#ff0000"; 
			theForm.pChamp2.focus();
			return false;
		}
		else
		{
			$('divpChamp2').innerHTML = "";
			theForm.pChamp2.style.backgroundColor = "#ffffff"; 
		}
		
		if (theForm.pChamp3.value.length == 0)
		{
			//alert("Les champs marque * sont obligatoires!");
			$('divpChamp3').innerHTML = "Les champs marque * sont obligatoires!";
			theForm.pChamp3.style.backgroundColor = "#ff0000"; 
			theForm.pChamp3.focus();
			return false;
		}
		else
		{
			$('divpChamp3').innerHTML = "";
			theForm.pChamp3.style.backgroundColor = "#ffffff"; 
		}
		
		if (theForm.pChamp5.value.length == 0)
		{
			//alert("Les champs marque * sont obligatoires!");
			$('divpChamp5').innerHTML = "Les champs marque * sont obligatoires!";
			theForm.pChamp5.style.backgroundColor = "#ff0000"; 
			theForm.pChamp5.focus();
			return false;
		}
		else
		{
			$('divpChamp5').innerHTML = "";
			theForm.pChamp5.style.backgroundColor = "#ffffff"; 
		}
		
		if (theForm.pChamp4.value.length == 0)
		{
			//alert("Les champs marque * sont obligatoires!");
			$('divpChamp4').innerHTML = "Les champs marque * sont obligatoires!";
			theForm.pChamp4.style.backgroundColor = "#ff0000"; 
			theForm.pChamp4.focus();
			return false;
		}
		else
		{
			$('divpChamp4').innerHTML = "";
			theForm.pChamp4.style.backgroundColor = "#ffffff"; 
		}
		
		if (theForm.pChamp10.value.length == 0)
		{
			//alert("Les champs marque * sont obligatoires!");
			$('divpChamp10').innerHTML = "Les champs marque * sont obligatoires!";
			theForm.pChamp10.style.backgroundColor = "#ff0000"; 
			theForm.pChamp10.focus();
			return false;
		}
		else
		{
			$('divpChamp10').innerHTML = "";
			theForm.pChamp10.style.backgroundColor = "#ffffff"; 
		}
		
		if (!isValidMail(theForm.pChamp10.value))
		{
			//alert("Format mail invalide!");
			$('divpChamp10').innerHTML = "Format mail invalide!";
			theForm.pChamp10.style.backgroundColor = "#ff0000"; 
			theForm.pChamp10.focus();
			return false;
		}
		else
		{
			$('divpChamp10').innerHTML = "";
			theForm.pChamp10.style.backgroundColor = "#ffffff"; 
		}

    return true;
  }
  
  function $(id)
  {
	  return document.getElementById(id);
  }
