function disp_delai(){
	document.getElementById("reste").innerHTML =delai (2012,02,03,14,0);
	setTimeout("disp_delai()",1000);
	}
	
function delai(annee,mois,jour,heure,min)
	{var date_fin=new Date(annee,mois-1,jour,heure,min)
	var date_jour=new Date();
	var tps=(date_fin.getTime()-date_jour.getTime())/1000;
	var j=Math.floor(tps/3600/24);     	// récupere le nb de jour
	tps=tps % (3600*24);
	var h=Math.floor(tps / 3600);		// recupère le nb d'heure
	tps=tps % 3600;
	var m=Math.floor(tps/60);		// récupère le nb minute
	tps=tps % 60
	var s=Math.floor(tps);
	var jj =   j + "";
	var hh =   h + "";
	var mm =   m + "";
	var ss =   s + "";
	
	var txt= '';
	if(jj.length > 1){ txt += '<img src="images/countdown/h'+ jj.charAt(0) +'.gif"><img src="images/countdown/h'+ jj.charAt(1) +'.gif">';}else{txt += '<img src="images/countdown/h0.gif"><img src="images/countdown/h'+ jj.charAt(0) +'.gif">';}
	txt += '<img src="images/countdown/ht.gif">';
	if(hh.length > 1){ txt += '<img src="images/countdown/h'+ hh.charAt(0) +'.gif"><img src="images/countdown/h'+ hh.charAt(1) +'.gif">';}else{txt += '<img src="images/countdown/h0.gif"><img src="images/countdown/h'+ hh.charAt(0) +'.gif">';}
	txt += '<img src="images/countdown/hh.gif">';
	if(mm.length > 1){ txt += '<img src="images/countdown/h'+ mm.charAt(0) +'.gif"><img src="images/countdown/h'+ mm.charAt(1) +'.gif">';}else{txt += '<img src="images/countdown/h0.gif"><img src="images/countdown/h'+ mm.charAt(0) +'.gif">';}
	txt += '<img src="images/countdown/hm.gif">';
	if(ss.length > 1){ txt += '<img src="images/countdown/h'+ ss.charAt(0) +'.gif"><img src="images/countdown/h'+ ss.charAt(1) +'.gif">';}else{txt += '<img src="images/countdown/h0.gif"><img src="images/countdown/h'+ ss.charAt(0) +'.gif">';}
	txt += '<img src="images/countdown/hs.gif">';

	
	
	
	//txt += j +'j' + h+' h '+m+' min et '+s+' sec';
	date_fin=don_date(date_fin);
	return txt;}

function don_date_jour()
	{var date_jour=new Date();
	date_jour=don_date(date_jour);
	return date_jour;}

function don_date(une_date)
	{var la_date;
	var months=new Array(12);
	months[1]="Janvier";
	months[2]="Février";
	months[3]="Mars";
	months[4]="Avril";
	months[5]="Mai";
	months[6]="Juin";
	months[7]="Juillet";
	months[8]="Aout";
	months[9]="Septembre";
	months[10]="Octobre";
	months[11]="Novembre";
	months[12]="Décembre";

	var days=new Array(7);
	days[1]="Lundi";
	days[2]="Mardi";
	days[3]="Mercredi";
	days[4]="Jeudi";
	days[5]="Vendredi";
	days[6]="Samedi";
	days[7]="Dimanche";

	var month=months[une_date.getMonth() + 1];
	var day=days[une_date.getDay()];
	var date=une_date.getDate();
	var year=une_date.getYear();
}
