function verif_formulaire_new()
{
 if(document.formulaire.nom.value == "")  {
   alert("Veuillez entrer votre nom!");
   document.formulaire.nom.focus();
   return false;
  }
  if(document.formulaire.tel.value == "") {
   alert("Veuillez entrer votre numero de telephone!");
   document.formulaire.tel.focus();
   return false;
  }
  if(document.formulaire.DPT.value == "none") {
   alert("Veuillez choisir un departement !");
   document.formulaire.DPT.focus();
   return false;
  }
  if(document.formulaire.delai.value == "") {
   alert("Veuillez nous faire part de votre souhait de delai !");
   document.formulaire.delai.focus();
   return false;
  }
  
 var chkZ = 1;
 for(i=0;i<document.formulaire.tel.value.length;++i)
   if(document.formulaire.tel.value.charAt(i) < "0"
   || document.formulaire.tel.value.charAt(i) > "9")
     chkZ = -1;
 if(chkZ == -1) {
   alert("Ceci n'est pas numero de telephone valide !");
   document.formulaire.tel.focus();
   return false;
  }
}

function verif_formulaire_land_perso()
{
 if(document.formulaire.nom.value == "")  {
   alert("Veuillez entrer votre nom!");
   document.formulaire.nom.focus();
   return false;
  }
  if(document.formulaire.tel.value == "") {
   alert("Veuillez entrer votre numero de telephone!");
   document.formulaire.tel.focus();
   return false;
  }
  if(document.formulaire.delai.value == "") {
   alert("Veuillez nous faire part de votre souhait de delai !");
   document.formulaire.delai.focus();
   return false;
  }
  
 var chkZ = 1;
 for(i=0;i<document.formulaire.tel.value.length;++i)
   if(document.formulaire.tel.value.charAt(i) < "0"
   || document.formulaire.tel.value.charAt(i) > "9")
     chkZ = -1;
 if(chkZ == -1) {
   alert("Ceci n'est pas numero de telephone valide !");
   document.formulaire.tel.focus();
   return false;
  }
}




function verif_formulaire()
{
 if(document.formulaire.nom.value == "")  {
   alert("Veuillez entrer votre nom!");
   document.formulaire.nom.focus();
   return false;
  }
  if(document.formulaire.tel.value == "") {
   alert("Veuillez entrer votre numero de telephone !");
   document.formulaire.tel.focus();
   return false;
  }
 var chkZ = 1;
 for(i=0;i<document.formulaire.tel.value.length;++i)
   if(document.formulaire.tel.value.charAt(i) < "0"
   || document.formulaire.tel.value.charAt(i) > "9")
     chkZ = -1;
 if(chkZ == -1) {
   alert("Ceci n'est pas numero de telephone valide !");
   document.formulaire.tel.focus();
   return false;
  }
  if(document.formulaire.email.value == "") {
   alert("Veuillez entrer votre adresse électronique !");
   document.formulaire.email.focus();
   return false;
  }
  if(document.formulaire.email.value.indexOf('@') == -1) {
   alert("Ce n'est pas une adresse électronique !");
   document.formulaire.email.focus();
   return false;
  }
}


<!-- 
 function calcul_aggir(aggir){
	if (document.aggir.coherence[0].checked){coh1= "A"};
	if (document.aggir.coherence[1].checked){coh1= "B"};
	if (document.aggir.coherence[2].checked){coh1= "C"};
	//
	if (document.aggir.orientation[0].checked){ori2= "A"};
	if (document.aggir.orientation[1].checked){ori2= "B"};
	if (document.aggir.orientation[2].checked){ori2= "C"};
	//
	if (document.aggir.toilette[0].checked){toi3= "A"};
	if (document.aggir.toilette[1].checked){toi3= "B"};
	if (document.aggir.toilette[2].checked){toi3= "C"};
	//
	if (document.aggir.habillage[0].checked){hab4= "A"};
	if (document.aggir.habillage[1].checked){hab4= "B"};
	if (document.aggir.habillage[2].checked){hab4= "C"};
	//
	if (document.aggir.alimentation[0].checked){ali5= "A"};
	if (document.aggir.alimentation[1].checked){ali5= "B"};
	if (document.aggir.alimentation[2].checked){ali5= "C"};
	//
	if (document.aggir.elimination[0].checked){eli6= "A"};
	if (document.aggir.elimination[1].checked){eli6= "B"};
	if (document.aggir.elimination[2].checked){eli6= "C"};
	//
	if (document.aggir.transferts[0].checked){tra7= "A"};
	if (document.aggir.transferts[1].checked){tra7= "B"};
	if (document.aggir.transferts[2].checked){tra7= "C"};
	//
	if (document.aggir.deplacements[0].checked){dep8= "A"};
	if (document.aggir.deplacements[1].checked){dep8= "B"};
	if (document.aggir.deplacements[2].checked){dep8= "C"};
	
	rang=0 ;
	
	// Groupe A 
    if (rang == 0) {
		groupe=0 ;
		if (coh1 == "C") {groupe += 2000 };
		if (ori2 == "C") {groupe += 1200 };
		if (toi3 == "C") {groupe += 40 };
		if (hab4 == "C") {groupe += 40 };
		if (ali5 == "C") {groupe += 60 };
		if (eli6 == "C") {groupe += 100 };
		if (tra7 == "C") {groupe += 800 };
		if (dep8 == "C") {groupe += 200 };
		//
		if (toi3 == "B") {groupe += 16 };
		if (hab4 == "B") {groupe += 16 };
		if (ali5 == "B") {groupe += 20 };
		if (eli6 == "B") {groupe += 16 };
		if (tra7 == "B") {groupe += 120 };
		if (dep8 == "B") {groupe += 32 };
		//
		if (groupe >= 3390 ) {rang = 3 };
		if (groupe >= 4140 ) {rang = 2 };
		if (groupe >= 4380 ) {rang = 1 };
		}
	
 	// Groupe B
    if (rang == 0) {
		groupe = 0 ;
		if (coh1 == "C") {groupe += 1500 };
	    if (ori2 == "C") {groupe += 1200 };
    	if (toi3 == "C") {groupe += 40 };
	    if (hab4 == "C") {groupe += 40 };
    	if (ali5 == "C") {groupe += 60 };
    	if (eli6 == "C") {groupe += 100 };
	    if (tra7 == "C") {groupe += 800 };
    	if (dep8 == "C") {groupe += -80 };
    	//
    	if (coh1 == "B") {groupe += 320 };
	    if (ori2 == "B") {groupe += 120 };
    	if (toi3 == "B") {groupe += 16 };
    	if (hab4 == "B") {groupe += 16 };
	    if (ali5 == "B") {groupe += 0 };
    	if (eli6 == "B") {groupe += 16 };
    	if (tra7 == "B") {groupe += 120 };
	    if (dep8 == "B") {groupe += -40 };
		//
    	if (groupe >= 2016) {rang = 4};			
		}

    	//Groupe C
	if (rang == 0) {
		groupe=0;    		
    	if (toi3 == "C") {groupe += 40 };
	    if (hab4 == "C") {groupe += 40 };
    	if (ali5 == "C") {groupe += 60 };
    	if (eli6 == "C") {groupe += 160 };
	    if (tra7 == "C") {groupe += 1000 };
    	if (dep8 == "C") {groupe += 400 };
		//
	    if (toi3 == "B") {groupe += 16 };
    	if (hab4 == "B") {groupe += 16 };
	    if (ali5 == "B") {groupe += 20 };
    	if (eli6 == "B") {groupe += 20 };
    	if (tra7 == "B") {groupe += 200 };
	    if (dep8 == "B") {groupe += 40 };
    	//
		if (groupe >= 1432) {rang = 6};
    	if (groupe >= 1700) {rang = 5};
		}

		//Groupe D
		if (rang == 0) {
   			groupe=0;
	    	if (ali5 == "C") {groupe += 2000 };
    		if (eli6 == "C") {groupe += 400 };
    		if (tra7 == "C") {groupe += 2000 };
	    	if (dep8 == "C") {groupe += 200 };
			// 
    		if (ali5 == "B") {groupe += 200 };
    		if (eli6 == "B") {groupe += 200 };
	    	if (tra7 == "B") {groupe += 200 };
    		//
    		if (groupe >= 2400) {rang = 7};
			}

		//Groupe E
		if (rang == 0) {
			groupe=0;
	    	if (coh1 == "C") {groupe += 400 };
    		if (ori2 == "C") {groupe += 400 };
   			if (toi3 == "C") {groupe += 400 };
	    	if (hab4 == "C") {groupe += 400 };
    		if (ali5 == "C") {groupe += 400 };
    		if (eli6 == "C") {groupe += 800 };
	    	if (tra7 == "C") {groupe += 800 };
    		if (dep8 == "C") {groupe += 200 };
			//
	    	if (toi3 == "B") {groupe += 100 };
    		if (hab4 == "B") {groupe += 100 };
    		if (ali5 == "B") {groupe += 100 };
	    	if (eli6 == "B") {groupe += 100 };
    		if (tra7 == "B") {groupe += 100 };
			//
	    	if (groupe >= 1200) {rang = 8};
			}

		//Groupe F
		if (rang == 0) {
			groupe=0;
	    	if (coh1 == "C") {groupe += 200 };
    		if (ori2 == "C") {groupe += 200 };
    		if (toi3 == "C") {groupe += 500 };
	    	if (hab4 == "C") {groupe += 500 };
    		if (ali5 == "C") {groupe += 500 };
    		if (eli6 == "C") {groupe += 500 };
	    	if (tra7 == "C") {groupe += 500 };
    		if (dep8 == "C") {groupe += 200 };
	    	//
    		if (coh1 == "B") {groupe += 100 };
	    	if (ori2 == "B") {groupe += 100 };
    		if (toi3 == "B") {groupe += 100 };
    		if (hab4 == "B") {groupe += 100 };
	    	if (ali5 == "B") {groupe += 100 };
    		if (eli6 == "B") {groupe += 100 };
    		if (tra7 == "B") {groupe += 100 };
    		//
	    	if (groupe >= 800) {rang = 9};
			}

		//Groupe G
		if (rang == 0) {
			groupe=0;
	    	if (coh1 == "C") {groupe += 150 };
    		if (ori2 == "C") {groupe += 150 };
    		if (toi3 == "C") {groupe += 300 };
	    	if (hab4 == "C") {groupe += 300 };
    		if (ali5 == "C") {groupe += 500 };
    		if (eli6 == "C") {groupe += 500 };
	    	if (tra7 == "C") {groupe += 400 };
    		if (dep8 == "C") {groupe += 200 };
			//
    		if (toi3 == "B") {groupe += 200 };
	    	if (hab4 == "B") {groupe += 200 };
    		if (ali5 == "B") {groupe += 200 };
    		if (eli6 == "B") {groupe += 200 };
	    	if (tra7 == "B") {groupe += 200 };
    		if (dep8 == "B") {groupe += 100 };
    		//
    		if (groupe >= 650) {rang = 10};
			}

		//Groupe H
		if (rang == 0) {
			groupe=0;
    		if (toi3 == "C") {groupe += 3000 };
    		if (hab4 == "C") {groupe += 3000 };
	    	if (ali5 == "C") {groupe += 3000 };
    		if (eli6 == "C") {groupe += 3000 };
    		if (tra7 == "C") {groupe += 1000 };
	    	if (dep8 == "C") {groupe += 1000 };
			//
    		if (toi3 == "B") {groupe += 2000 };
    		if (hab4 == "B") {groupe += 2000 };
	    	if (ali5 == "B") {groupe += 2000 };
    		if (eli6 == "B") {groupe += 2000 };
    		if (tra7 == "B") {groupe += 2000 };
	    	if (dep8 == "B") {groupe += 1000 };
			//
    		if (groupe < 2000)  {rang = 13} ;
    		if (groupe >= 2000) {rang = 12} ;
        	if (groupe >= 4000) {rang = 11} ;
  			}
		
		//Détermination du Gir 
		if (rang == 13 ) {GIR = 6};
		if (rang == 12 ) {GIR = 5};
		if (rang == 11 ) {GIR = 4};
		if (rang == 10 ) {GIR = 4};
		if (rang == 9  ) {GIR = 3};
		if (rang == 8  ) {GIR = 3};
		if (rang == 7  ) {GIR = 2};
		if (rang == 6  ) {GIR = 2};
		if (rang == 5  ) {GIR = 2};
		if (rang == 4  ) {GIR = 2};
		if (rang == 3  ) {GIR = 2};
		if (rang == 2  ) {GIR = 2};
		if (rang == 1  ) {GIR = 1};

		// Affichage du GIR
		document.aggir.Gir_calcule.value = GIR  ;
		// Fin Calcul GIR
		// Fin Fonction
}
//-->

function writediv(texte)
{
document.getElementById('emailbox').innerHTML = texte;
document.getElementById('emailbox1').innerHTML = '';
}

function writediv2(texte)
{
document.getElementById('emailbox').innerHTML = texte;
}

function verifPseudo(email)
{
	var mail = document.formulaire.email.value;
	var id_maison = document.formulaire.id_maison.value;
	if(mail.length == 0)
	{
		texte = '<span style="color:#cc0000"><center>Merci de saisi une adresse email</center></span><br>';
		writediv2(texte);
	}
	else(texte = file('send_email.php?idmdr='+id_maison+'&email='+mail+''))
	{
		if(texte == 1)
			writediv('<span style="color:#cc0000"><center>Email envoyé à '+mail+'</center></span><br>');
	}
}


function writesms(texte)
{
document.getElementById('smsbox').innerHTML = texte;
document.getElementById('smsbox1').innerHTML = '';
}

function writesms2(texte)
{
document.getElementById('smsbox').innerHTML = texte;
}

function verifsms(port)
{
	var gsm = document.formsms.port.value;
	var id_maison = document.formsms.id_maison.value;
	if(gsm.length == 0)
	{
		texte = '<span style="color:#cc0000"><center>Merci de saisi un numéro de Portable</center></span><br>';
		writesms2(texte);
	}
	else(texte = file('send_sms.php?idmdr='+id_maison+'&port='+gsm+''))
	{
		if(texte == 1)
			writesms('<span style="color:#cc0000"><center>SMS envoyé à '+gsm+'</center></span><br>');
	}
}


function file(fichier)
{
if(window.XMLHttpRequest) // FIREFOX
xhr_object = new XMLHttpRequest();
else if(window.ActiveXObject) // IE
xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
else
return(false);
xhr_object.open("GET", fichier, false);
xhr_object.send(null);
if(xhr_object.readyState == 4) return(xhr_object.responseText);
else return(false);
}

function ChangeUrl(formulaire)
	{
	if (formulaire.ListeUrl.selectedIndex != 0)
		{
		location.href = formulaire.ListeUrl.options[formulaire.ListeUrl.selectedIndex].value;
	 	}
	else 
		{
		alert('Veuillez choisir une destination.');
		}
	}
