	// Variables globales
		var bAfficheVoiture = 0;
		var bAfficheEnfant = 0;
		var Nav;
		var okEnfant;
		var okVoiture;

	function styleCalque(idCalque)
		{
		  if (document.all) {Nav = "All"; calqueStyle = document.all[idCalque].style; return calqueStyle;}
		  if (document.layers) {calqueStyle = document.layers[idCalque]; return calqueStyle;}
		  if (document.getElementById) {Nav = "Get"; calqueStyle = document.getElementById(idCalque).style; return calqueStyle;}
		}
	function plus(texto)
	{
		if (texto == 1) 
		{
			var CS = styleCalque('info'); 
			CS.visibility = "visible";
			CS = styleCalque('texte1'); 
			CS.visibility = "visible";
			CS.height = "240";
			CS = styleCalque('texte2'); 
			CS.visibility = "hidden";
			CS = styleCalque('ferm'); 
			CS.left = "530";
		}
		else
		{
			var CS = styleCalque('info'); 
			CS.visibility = "visible";
			CS = styleCalque('texte2'); 
			CS.visibility = "visible";
			CS = styleCalque('texte1'); 
			CS.visibility = "hidden";
			CS = styleCalque('ferm'); 
			CS.left = "450";
		}
	}
	function fermer()
	{
		var CS = styleCalque('info'); 
		CS.visibility = "hidden";
		CS = styleCalque('texte2'); 
		CS.visibility = "hidden";
		CS = styleCalque('texte1'); 
		CS.visibility = "hidden";	
	}
	
	function ResolutionEcran()
	{
		var H = screen.height;
		var W = screen.width;
		var T = "H : " + H + " x " + "W : " + W;
		eval("document.fInfo.Fo").value = T;
	}	
	function Verif(cForm)
	{
		// Vérifie que les champs obligatoires sont correctement remplis
		var NbCar;
		var Ms;
		var Msg = "Le champ suivant est obligatoire : ";
		var Msg2 = "Veuillez s'il vous plaît le remplir";
		var To;
		var VerifTest;
		var choixList;
		var valCookie="";
		var valTmp;
		switch (cForm)
			{
				case "Prem" :
						To = document.forms[1].elements["CC"]; 
						if ((!To[0].checked) && (!To[1].checked)) 
						{
							alert(Msg + "Choix contact\n" + Msg2);
							return false; 
						}
						else if (!To[0].checked) 
						{
							if (document.Prem.AdresseMail.value =="")  {
							alert(Msg + "Adresse mail\n" + Msg2);
							document.Prem.AdresseMail.focus();
							return false; }
						}
						if (!To[1].checked) {valCookie = "Téléphone,"; } else { valCookie = "Mail," + document.Prem.AdresseMail.value;} 
						//
						if (document.Prem.Adresse.value =="")  {
						alert(Msg + "Adresse\n" + Msg2);
						document.Prem.Adresse.focus();
						return false; }
						//
						if (document.Prem.Ville.value == "") {
							alert(Msg + "Ville\n" + Msg2); 
							document.Prem.Ville.focus();
							return false; }
						//
						if (document.Prem.CP.value == "") {
							alert(Msg + "Code Postal\n" + Msg2); 
							document.Prem.CP.focus();
							return false; }
						//	
						if ((document.Prem.CP.value !="") && (document.Prem.CP.value.length <5)) {
							NbCar = 5 - document.Prem.CP.value.length;
							if (NbCar > 1){
								Ms = " chiffres sont "; }
							else {
								Ms = " chiffre est "; }	
							alert(NbCar + Ms + "requis pour compléter le code postal.");
							document.Prem.CP.focus();
							return false; }	
						//	
						if ((document.Prem.TelDom.value == "") && (document.Prem.TelTrav.value == "") && (document.Prem.TelPort.value == "")) {
							alert("Vous devez indiquer au moins un numéro de téléphone.");
							document.Prem.TelDom.focus();
							return false; }
						
						if (((document.Prem.TelDom.value !="") && (document.Prem.TelDom.value.length <10)) || ((document.Prem.TelTrav.value !="") && (document.Prem.TelTrav.value.length <10)) || ((document.Prem.TelPort.value !="") && (document.Prem.TelPort.value.length <10))) 
						{
							//Vérifie que les n° de téléphone sont au complets
							if ((document.Prem.TelDom.value !="") && (document.Prem.TelDom.value.length <10))
								{
									//Compte le nombre de chiffre manquant et modifie le message en conséquence
									NbCar = 10 - document.Prem.TelDom.value.length;
									if (NbCar > 1) { Ms = " chiffres sont "; } else { Ms = " chiffre est "; }
									alert(NbCar + Ms + " manquant dans le numéro de téléphone du domicile.");
									document.Prem.TelDom.focus();
									return false; 
								}
							else if ((document.Prem.TelTrav.value !="") && (document.Prem.TelTrav.value.length <10))
								{
									//Compte le nombre de chiffre manquant et modifie le message en conséquence
									NbCar = 10 - document.Prem.TelTrav.value.length;
									if (NbCar > 1) { Ms = " chiffres sont "; } else { Ms = " chiffre est "; }
									alert(NbCar + Ms +" manquant dans le numéro de téléphone du travail.") 
									document.Prem.TelTrav.focus();
									return false; 
								}
							else if ((document.Prem.TelPort.value !="") && (document.Prem.TelPort.value.length <10))
								{
									//Compte le nombre de chiffre manquant et modifie le message en conséquence
									NbCar = 10 - document.Prem.TelPort.value.length;
									if (NbCar > 1) { Ms = " chiffres sont "; } else { Ms = " chiffre est "; }
									alert(NbCar + Ms + " manquant dans le numéro de téléphone du portable.");
									document.Prem.TelPort.focus();
									return false;
								}
						}
						// Vérifie que les saisies ne sont pas identiques
						var testTeld = document.Prem.TelDom.value;
						var testTelp = document.Prem.TelPort.value;
						var testTelt = document.Prem.TelTrav.value;
						if (testTeld == testTelp) {testTelp = "";}
						if (testTeld == testTelt) {testTelt = "";}
						if (testTelp == testTelt) {testTelt = "";}
						
						// Enregistrement des données validées dans le cookie
						
						
						valTmp = ""; 
						if (testTeld !="")  {valTmp = testTeld + "-Dom";}  
						if (testTelt !="") {valTmp = valTmp + "/" + testTelt + "-Trav";} else {valTmp = valTmp + "/";}
						if (testTelp !="") {valTmp = valTmp + "/" + testTelp + "-Port";} else {valTmp = valTmp + "/";}
						
						break;
					case "Principal" :
						if ((bAfficheVoiture == 1) || (bAfficheEnfant == 1)) {
							alert("Pour enregistrer les données vous devez ou bien valider\n" + "ou bien annuler la saisie des informations complémentaires.");
							return false;}
						//
						if (document.Principal.Nom.value =="")  {
						alert(Msg + "Nom\n" + Msg2);
						document.Principal.Nom.focus();
						return false; }
						var nom = document.Principal.Nom.value;
						//
						if (document.Principal.Prenom.value =="")  {
						alert(Msg + "Prenom\n" + Msg2);
						document.Principal.Prenom.focus();
						return false; }
						var prenom = document.Principal.Prenom.value;
						//
						To = document.forms[0].elements["Sexe"]; 
						if ((!To[0].checked) && (!To[1].checked)) {
						alert(Msg + "Sexe\n" + Msg2);
						return false; }
						
						if (!To[1].checked) {var sexe = "M"; } else { var sexe = "F";}
						//
						To = document.forms[0].elements["Dtj"].selectedIndex; 
						if ((document.forms[0].elements["Dtj"].options[To].value =="00") || (document.forms[0].elements["Dtj"].options[To].value =="")) {
						alert(Msg + "Date de naissance - Jour\n" + Msg2);
						return false;} 
						var jourN = document.forms[0].elements["Dtj"].options[To].value;
						//
						
						To = document.forms[0].elements["Dtm"].selectedIndex; 
						if ((document.forms[0].elements["Dtm"].options[To].value =="00") || (document.forms[0].elements["Dtm"].options[To].value =="")) {
						alert(Msg + "Date de naissance - Mois\n" + Msg2);
						return false; }
						var moisN = document.forms[0].elements["Dtm"].options[To].value;
						//
						To = document.forms[0].elements["Dta"].selectedIndex; 
						if ((document.forms[0].elements["Dta"].options[To].value =="00") || (document.forms[0].elements["Dta"].options[To].value =="")){
						alert(Msg + "Date de naissance - Année\n" + Msg2);
						return false; }
						var anN = document.forms[0].elements["Dta"].options[To].value;
						
						//
						To = document.forms[0].elements["SF"].selectedIndex; 
						if (document.forms[0].elements["SF"].options[To].value =="")  {
						alert(Msg + "Situation familiale\n" + Msg2);
						return false; }
						var sf = document.forms[0].elements["SF"].options[To].value; 
						//
						if (document.Principal.Profession.value =="")  {
						alert(Msg + "Profession\n" + Msg2);
						document.Principal.Profession.focus();
						return false; }
						var prof = document.Principal.Profession.value; 
						//
						To = document.forms[0].elements["RM"].selectedIndex; 
						if (document.forms[0].elements["RM"].options[To].value =="") {
						alert(Msg + "Revenu Mensuel\n" + Msg2);
						return false; }
						var rm = document.forms[0].elements["RM"].options[To].value; 
						//
						To = document.forms[0].elements["Fumeur"]; 
						if ((!To[0].checked) && (!To[1].checked)) {
						alert(Msg + "Fumeur\n" + Msg2);
						return false; }
						if (!To[1].checked) {var fumeur = "Oui"; } else { var fumeur = "Non";} 
						//
						To = document.forms[0].elements["PV"]; 
						if ((!To[0].checked) && (!To[1].checked)) {
						alert(Msg + "Avez-vous une voiture\n" + Msg2);
						return false; }
						if (!To[1].checked) {var voit = "Oui"; } else { var voit= "Non";} 
						// Création du cookie
						To = document.forms[0].elements["Nbe"].selectedIndex;
						var enfant = document.forms[0].elements["Nbe"].options[To].value;
						
						To = document.forms[0].elements["SA"].selectedIndex;
						var sa = document.forms[0].elements["SA"].options[To].value;
						
						To = document.forms[0].elements["Informatique"].selectedIndex;
						var inform = document.forms[0].elements["Informatique"].options[To].value;
						
						var profC = document.Principal.Pc.value;
						/*var dtN = jourN + "/" + moisN + "/" + anN;
						valCookie = nom + "," + prenom + "," + sexe + "," + dtN + "," + sf + "," + enfant + "," + prof + "," + sa + "," + rm + "," + profC + "," + fumeur + "," + inform + "," + voit;   
						document.cookie = "PCook=" + valCookie + ";expires=";
						*/
						ChangeForm('Calque1','Preliminaire');
						var CS = styleCalque('texte2'); 
						CS.top = "520";
						break;
					case "Voiture" : 
						To = document.forms[0].elements["Marque"].selectedIndex; 
						if (document.forms[0].elements["Marque"].options[To].value =="") {
						alert(Msg + "Marque\n" + Msg2);
						return false; }
						valTmp = document.forms[0].elements["Marque"].options[To].value;
						//
						To = document.forms[0].elements["Type"].selectedIndex; 
						if (document.forms[0].elements["Type"].options[To].value =="") {
						alert(Msg + "Type\n" + Msg2);
						return false; }
						valTmp = valTmp + "/" + document.forms[0].elements["Type"].options[To].value;
						//
						if (document.Principal.Modele.value =="")  {
						alert(Msg + "Modele\n" + Msg2);
						document.Principal.Modele.focus();
						return false; }
						valTmp = valTmp + "/" + document.Principal.Modele.value;
						//
						if (document.Principal.DateAchat.value =="")  {
						alert(Msg + "Date achat\n" + Msg2);
						document.Principal.DateAchat.focus();
						return false; }
						valTmp = valTmp + "/" + document.Principal.DateAchat.value;
						//
						To = document.forms[0].elements["Etat"]; 
						if ((!To[0].checked) && (!To[1].checked)) {
						alert(Msg + "Etat\n" + Msg2);
						return false; }
						if (!To[0].checked) { valTmp = valTmp + "/Occasion";} else { valTmp = valTmp + "/Neuve";}
						valCookie = valTmp;
						valTmp = "";
						// Vérifie que la voiture 2 a bien été renseignée si l'option 2 est validée
						To = document.forms[0].elements["nbv"]; 
						if (!To[0].checked) 
						{
							To = document.forms[0].elements["Marque2"].selectedIndex; 
							if (document.forms[0].elements["Marque2"].options[To].value =="") {
							alert(Msg + "Marque - voiture 2\n" + Msg2);
							return false; }
							valTmp = document.forms[0].elements["Marque2"].options[To].value;
						//
						
							To = document.forms[0].elements["Type2"].selectedIndex; 
							if (document.forms[0].elements["Type2"].options[To].value =="") {
							alert(Msg + "Type - voiture 2\n" + Msg2);
							return false; }
							valTmp = valTmp + "/" + document.forms[0].elements["Type2"].options[To].value;
							//
							if (document.Principal.Modele2.value =="")  {
							alert(Msg + "Modele - voiture 2\n" + Msg2);
							document.Principal.Modele2.focus();
							return false; }
							valTmp = valTmp + "/" + document.Principal.Modele2.value;
							//
							if (document.Principal.DateAchat2.value =="")  {
							alert(Msg + "Date achat - voiture 2\n" + Msg2);
							document.Principal.DateAchat2.focus();
							return false; }
							valTmp = valTmp + "/" + document.Principal.DateAchat2.value;
							//
							To = document.forms[0].elements["Etat2"]; 
							if ((!To[0].checked) && (!To[1].checked)) {
							alert(Msg + "Etat - voiture 2\n" + Msg2);
							return false; }						
							if (!To[0].checked) { valTmp = valTmp + "/Occasion";} else { valTmp = valTmp + "/Neuve";}
						}	
							okVoiture = 1; 
							//document.Principal.Submit.focus(); 
							
							Retour('Voiture');
							break;
					case "Enfant" :
					
							To = document.forms[0].elements["Nbe"].selectedIndex; 
							valTmp = document.forms[0].elements["Nbe"].options[To].value;
							
							switch (valTmp)
							{
								case "1" :
									 if (document.Principal.Age1.value =="")  
										{
											alert(Msg + "L'âge de l'enfant 1 n'a pas été renseigné " + Msg2);
											document.AEnfant.Age1.focus();
											return false; 
										}
									
									break;
								case "2" :
									if ((document.Principal.Age1.value =="") || (document.Principal.Age2.value =="")) 
									{
										alert(Msg + "L'âge des enfants n'a pas été renseigné " + Msg2);
										return false; 
									}
									
									break;
								case "3" :
									if ((document.Principal.Age1.value =="") || (document.Principal.Age2.value =="") || (document.Principal.Age3.value =="")) 
									{
										alert(Msg + "L'âge des enfants n'a pas été renseigné " + Msg2);
										return false; 
									}
									
									break;
								case "4" :
									if ((document.Principal.Age1.value =="") || (document.Principal.Age2.value =="") || (document.Principal.Age3.value =="") || (document.Principal.Age4.value =="")) 
									{
										alert(Msg + "L'âge des enfants n'a pas été renseigné " + Msg2);
										return false; 
									}
									
									break;
							}
							//valCookie = document.AEnfant.Age1.value + "," + document.AEnfant.Age2.value + "," + document.AEnfant.Age3.value + "," + document.AEnfant.Age4.value;
							//document.cookie = "Ecook = " + valCookie + ";expires=";
							okEnfant = 1;
							document.Principal.Profession.focus();
							Retour('Enfant');
						
			}		
	}
		
	function ChangeForm(idCalqueFermer,IdCalqueOuvrir)
		{ 
			CS = styleCalque(idCalqueFermer); 
			CS.visibility = "hidden";
			CS = styleCalque(IdCalqueOuvrir);
			CS.visibility = "visible";
			if (idCalqueFermer == "Preliminaire") {ESMail('Tel');}
		}
	function test()
		{ 
			cstyle = document.getElementById("princip").style;
			cstyle.display = "none";
			
		}
		
	function Initialisation(Champ)
		{
			// Initialise les champs voiture au cas où ceux-ci auraitent été déjà visualiser et partiellement remplis.
			if (Champ == "Voiture") 
			{
				eval("document.Principal.nbv")[0].checked=false
				eval("document.Principal.nbv")[1].checked=false
				eval("document.Principal.Marque").value=""
				eval("document.Principal.Type").value=""
				eval("document.Principal.Etat")[0].checked=false
				eval("document.Principal.Etat")[1].checked=false
				eval("document.Principal.Modele").value=""
				eval("document.Principal.DateAchat").value=""
				// Voiture 2
				eval("document.Principal.Marque2").value=""
				eval("document.Principal.Type2").value=""
				eval("document.Principal.Etat2")[0].checked=false
				eval("document.Principal.Etat2")[1].checked=false
				eval("document.Principal.Modele2").value=""
				eval("document.Principal.DateAchat2").value=""
			}
			else 
			{
				// Initialise les âges enfants
				eval("document.Principal.Age1").value=""
				eval("document.Principal.Age2").value=""
				eval("document.Principal.Age3").value=""
				eval("document.Principal.Age4").value="" 
			}
		}
	function Retour(Sit)
		{
			if (Sit == "Voiture") 
				{
					AfficheVoiture('Non'); 
					if (okVoiture != 1) 
					{ 
						eval("document.Principal.PV")[0].checked=false;
						eval("document.Principal.PV")[1].checked=true; 
					}
					bAfficheVoiture = 0;
				}
			else 
				{ 
					if (okEnfant != 1) { eval("document.Principal.Nbe").value="0"} 	
					AfficheEnfant();
					bAfficheEnfant = 0;
					document.Principal.Profession.focus();
				 }
		}
	function AfficheVoiture(Opt)
		{
			if (Opt == "Oui") {
				if (bAfficheEnfant == 1) 
					{					
						alert("La fenêtre 'âge des enfants' est affichée, veuillez la fermer ou enregistrer votre saisie."); 
						eval("document.Principal.PV")[0].checked=false
						eval("document.Principal.PV")[1].checked=false
						return false;
					}
				if (okVoiture != 1) {Initialisation('Voiture')}
				CS = styleCalque('Vehicule'); 
				CS.visibility = "visible"; 
				CS = styleCalque('Voiture'); 
				CS.visibility = "visible";
				CS = styleCalque('tBouton'); 
				CS.visibility = "visible";
				CS.top = "65px";
				CS.left = "180px";
				bAfficheVoiture = 1;
				document.Principal.nbv.focus();}
			else {
				CS = styleCalque('Vehicule'); 
				CS.visibility = "hidden"; 
				CS = styleCalque('Voiture'); 
				CS.visibility = "hidden"; 
				CS = styleCalque('Voiture1'); 
				CS.visibility = "hidden";
				CS = styleCalque('Voiture2'); 
				CS.visibility = "hidden";
				CS = styleCalque('tBouton'); 
				CS.visibility = "hidden";
				bAfficheVoiture = 0;}
									
		}
	function AfficheEnfant()
		{
			if (bAfficheVoiture == 1) 
				{
					alert("La fenêtre concernant les voitures est affichée. Veuillez fermer cette fenêtre ou enregistrer votre saisie.");
					 eval("document.Principal.Nbe").value=""
					return false;
				}
			
			To = document.forms[0].elements["Nbe"].selectedIndex; 
			Valeur = document.forms[0].elements["Nbe"].options[To].value;
			if (okEnfant == 1) { Valeur = "";} else {Initialisation('Enfant');}
			switch (Valeur) 
			{
				case "" :
					CS = styleCalque('AgeEnfant'); 
					CS.visibility = "hidden";
					CS = styleCalque('TAE1'); 
					CS.visibility = "hidden";
					CS = styleCalque('TAE2'); 
					CS.visibility = "hidden";
					CS = styleCalque('TAE3'); 
					CS.visibility = "hidden";
					CS = styleCalque('TAE4'); 
					CS.visibility = "hidden";
					CS = styleCalque('tBoutonAE');
					CS.visibility = "hidden";
					break;
				case "0" :
					CS = styleCalque('AgeEnfant'); 
					CS.visibility = "hidden";
					CS.width = "250px";
					CS = styleCalque('TAE1'); 
					CS.visibility = "hidden";
					CS = styleCalque('TAE2'); 
					CS.visibility = "hidden";
					CS = styleCalque('TAE3'); 
					CS.visibility = "hidden";
					CS = styleCalque('TAE4'); 
					CS.visibility = "hidden";
					CS = styleCalque('tBoutonAE');
					CS.visibility = "hidden";
					break;
				case "1" :
					CS = styleCalque('AgeEnfant'); 
					CS.visibility = "visible";
					CS = styleCalque('TAE1'); 
					CS.visibility = "visible";
					CS = styleCalque('TAE2'); 
					CS.visibility = "hidden";
					CS = styleCalque('TAE3'); 
					CS.visibility = "hidden";
					CS = styleCalque('TAE4'); 
					CS.visibility = "hidden";
					CS = styleCalque('tBoutonAE');
					CS.visibility = "visible";
					//CS.top = "78px";
					if (Nav == "All") {CS.top = "78px";} else {CS.top = "76px";}
					
					break;
				case "2" :
					CS = styleCalque('AgeEnfant'); 
					CS.visibility = "visible";
					CS = styleCalque('TAE1'); 
					CS.visibility = "visible";
					CS = styleCalque('TAE2'); 
					CS.visibility = "visible";
					CS = styleCalque('TAE3'); 
					CS.visibility = "hidden";
					CS = styleCalque('TAE4'); 
					CS.visibility = "hidden";
					CS = styleCalque('tBoutonAE');
					CS.visibility = "visible";
					//CS.top = "109px";
					if (Nav == "All") {CS.top = "109px";} else {CS.top = "105px";}
					break;
				case "3" :
					CS = styleCalque('AgeEnfant'); 
					CS.visibility = "visible";
					CS = styleCalque('TAE1'); 
					CS.visibility = "visible";
					CS = styleCalque('TAE2'); 
					CS.visibility = "visible";
					CS = styleCalque('TAE3'); 
					CS.visibility = "visible";
					CS = styleCalque('TAE4'); 
					CS.visibility = "hidden";
					CS = styleCalque('tBoutonAE');
					CS.visibility = "visible";
					//CS.top = "136px";
					if (Nav == "All") {CS.top = "136px";} else {CS.top = "132px";}
					break;
				case "4" :
					CS = styleCalque('AgeEnfant'); 
					CS.visibility = "visible";
					CS = styleCalque('TAE1'); 
					CS.visibility = "visible";
					CS = styleCalque('TAE2'); 
					CS.visibility = "visible";
					CS = styleCalque('TAE3'); 
					CS.visibility = "visible";
					CS = styleCalque('TAE4'); 
					CS.visibility = "visible";
					CS = styleCalque('tBoutonAE');
					CS.visibility = "visible";
					//CS.top = "166px";
					if (Nav == "All") {CS.top = "166px"; } else {CS.top = "160px";}
					break;
			}	
			if (Valeur > 0 ) {bAfficheEnfant = 1; document.AEnfant.Age1.focus(); } else {bAfficheEnfant = 0;}							
		}
		
	function Voitures(Opt)
		{
			// Affiche selon s'il y a 1 ou 2 voitures les champs adéquats et bouge le tableau contenant les boutons
			if (Opt == "2") {
				CS = styleCalque('Voiture1'); 
				CS.visibility = "visible"; 
				CS = styleCalque('Voiture2');
				CS.visibility = "visible"; 
				CS = styleCalque('tBouton'); 
				CS.top = "380px";
				CS.left = "180px";
				CS.visibility = "visible";
				CS = styleCalque('Vehicule'); 
				CS.height = "420px";}
			else if (Opt == "1") {
				CS = styleCalque('Voiture1'); 
				CS.visibility = "visible";
				CS = styleCalque('Voiture2'); 
				CS.visibility = "hidden"; 
				CS = styleCalque('tBouton'); 
				CS.top = "218px";
				CS.left = "180px";
				CS.visibility = "visible";
				CS = styleCalque('Vehicule'); 
				CS.height = "15%";}
		}	
	function ChargeSelect()
		{
			var i;
			var Dt;
			DtAnnee = new Date;
			Annee = DtAnnee.getFullYear();
			Dt = Annee;
			for (i = 1;i<=99;i++)
        	{
                nouvel_element = new Option(Dt,Dt);
				Principal.Dta.options[eval("document.Principal.Dta").length] = nouvel_element;
				Dt = Dt -1
        	}
		}
function codeTouche(evenement)
{
        for (prop in evenement)
        {
                if(prop == 'which') return(evenement.which);
        }
        return(evenement.keyCode);
}

function ESMail(Opt)
{
// Masque ou affiche le champ adresse mail selon la coche réalisée par l'utilisateur 
	if (Opt == "Tel") {
		CS = styleCalque("LabAdM"); 
		CS.visibility = "hidden";
		CS = styleCalque("InpAdM"); 
		CS.visibility = "hidden";
		CS = styleCalque("bAdM"); 
		CS.visibility = "hidden"; }
	else {
		CS = styleCalque("LabAdM"); 
		CS.visibility = "visible";
		CS = styleCalque("InpAdM"); 
		CS.visibility = "visible";
		CS = styleCalque("bAdM"); 
		CS.visibility = "visible"; }
		
}	

function scanTouche(evenement)
{
        var reCarSpeciaux = /[\x00\x08\x0D]/;
        var reCarValides = /\d/;

        var codeDecimal  = codeTouche(evenement);
        var car = String.fromCharCode(codeDecimal);
        var autorisation = reCarValides.test(car) || reCarSpeciaux.test(car);
		if (autorisation)
        {
		return autorisation;
		}
		else
		{
		alert("Ce caratère est interdit pour ce champ.");
		return false;
		}
}

function Vcar(Touche, NomChamp)
{
	// Vérifie que les touches frappées sont autorisées
	var Vt = codeTouche(Touche);
	
	if ((Vt > 0 && Vt < 8)  || (Vt > 10 && Vt < 32) || (Vt > 32 && Vt < 48)|| (Vt > 57 && Vt < 63) || (Vt > 64 && Vt < 97) || (Vt > 122 && Vt < 127) || (Vt > 127 && Vt < 256)) 
		{	
			
			if ((NomChamp == "AdresseMail") && ((Vt == 46) || (Vt == 45) || (Vt == 95))) { return Touche;}
			alert("Désolé, cette touche ne peut être utilisée.\n" + "Veuillez saisir vos données uniquement en minuscule, sans accents et sans caractères spéciaux.");
			return false;
		}
	
	else 
		{
			return Touche; 
		}
	
}		

