function format_Date(strIn)
{
	var str_d, str_m, str_y, strDateOut;
	strDateOut = strIn.value;
	Js_FicheModifier = 1;
	if (strDateOut == "")
	{
		strDateOut = "";
	}
	else
	{
		var strTampon = strIn.value;
		var Date_Now = new Date();
		var Day_Now = Date_Now.getDay();
		var Month_Now = Date_Now.getMonth() + 1;
		var Year_Now = Date_Now.getYear();
		
		if(strTampon.length == 1)
		{
			if(strTampon.charAt(0) >= 0 && strTampon.charAt(0) <= 9)
			{
				strTampon = "0" + strTampon;
			}
			strTampon += "/" + Month_Now;
			strTampon += "/" + Year_Now;
		}
		if(strTampon.length == 2)
		{
			strTampon += "/" + Month_Now;
			strTampon += "/" + Year_Now;
		}
		strDateOut = strTampon;
		// Ajouter des '0' si 1 seul chiffre entre 2 séparateurs
		charCode = strDateOut.charCodeAt(1);
		if (charCode >= 45 & charCode <= 47)
		{
			str_d = strDateOut;
			strDateOut = 0 + str_d;
		}
		charCode = strDateOut.charCodeAt(4);
		if (charCode >= 45 & charCode <= 47)
		{
			str_d = strDateOut.substr(0,3);
			str_m = strDateOut.substr(3,8);
			strDateOut = str_d + 0 + str_m;
		}
		
		// Retirer les séparateurs
		charCode = strDateOut.charCodeAt(2);
		if (charCode >= 45 & charCode <= 47)
		{
			str_d = strDateOut.substr(0,2);
			str_m = strDateOut.substr(3,7);
			strDateOut = str_d + str_m;
		}
		charCode = strDateOut.charCodeAt(4);
		if (charCode >= 45 & charCode <= 47)
		{
			str_d = strDateOut.substr(0,4);
			str_m = strDateOut.substr(5,4);
			strDateOut = str_d + str_m;
		}
		
		// Ajouter le siecle
		str_d = strDateOut.substr(0,2);
		str_m = ( strDateOut.substr(2,2) - 1);
		str_y = strDateOut.substr(4,4);
		if (str_y.length == 0)
		{
			str_y = Year_Now;
		}
		if (str_y.length == 1)
		{
			str_y = 0 + str_y;
		}
		if (str_y.length == 2)
		{
			charCode = str_y.charCodeAt(0);
			charCode2 = str_y.charCodeAt(1);
			// La date pivot est 1935
			//	saisi 34 -> 1934
			//	saisi 35 -> 1935
			//	saisi 36 -> 2036
			if (charCode2 <= 52 && charCode <= 51)   // Chiffre 5
			{
			str_y = 20 + str_y;
			}
			else
			{
			str_y = 19 + str_y;
			}
		}
		
		// Construire une variable date, pui extraire Jour, Mois et Annee
		d = new Date(str_y, str_m, str_d);
		str_d = d.getDate();
		str_m = (d.getMonth() + 1);
		str_y = d.getFullYear();
		str_d = str_d.toString();
		str_m = str_m.toString();
		str_y = str_y.toString();
		
		// Ajouter si necessaire un 0 au Jour et au Mois
		if (str_d.length == 1)
		{
			str_d = 0 + str_d;
		}
		if (str_m.length == 1)
		{
			str_m = 0 + str_m;
		}
		
		// Construction de la chaine formattee
		strDateOut  = str_d + "/";
		strDateOut += str_m + "/";
		strDateOut += str_y;
		str_test = strDateOut.substr(0,3);
		if(str_test == "NaN")
		{
			strDateOut = "";
			if(Day_Now < 10)
			{strDateOut = "0" + Day_Now;}
			else
			{strDateOut = Day_Now;}
			
			if(Month_Now < 10)
			{strDateOut = strDateOut + "/0" + Month_Now;}
			else
			{strDateOut = strDateOut + Month_Now;}

			strDateOut = strDateOut + "/" + Year_Now;
	 	}
	}
	<!--- strTampon = strDateOut; --->
	strIn.value = strDateOut;
}
function Controle_Date_Grande_Petite(Grande,Petite)
{
		dateval = Grande;
		pos1 = dateval.indexOf("/");
		s1 = dateval.substring(0,pos1);
		pos2 = dateval.indexOf("/", pos1 + 1);
		s2 = dateval.substring(pos1 +1 ,pos2);
		s3 = dateval.substring(pos2 ,dateval.length);
		retval = s2 + "/" + s1 + s3;
		if(s2.length < 2)
		{s2 = "0"+s2;}
		if(s1.length < 2)
		{s1 = "0"+s1;}
		s3 = s3.substring(1,s3.length);
		datedebut = s3+s2+s1;

		
		dateval = Petite;
		pos1 = dateval.indexOf("/");
		s1 = dateval.substring(0,pos1);
		pos2 = dateval.indexOf("/", pos1 + 1);
		s2 = dateval.substring(pos1 +1 ,pos2);
		s3 = dateval.substring(pos2 ,dateval.length);
		retval = s2 + "/" + s1 + s3;
		s3 = s3.substring(1,s3.length);
		if(s2.length < 2)
		{s2 = "0"+s2;}
		if(s1.length < 2)
		{s1 = "0"+s1;}
		datefin = s3+s2+s1;

		if(parseInt(datefin) < parseInt(datedebut))
		{return false}
		return true;
}