

function fin_concours(tps){

	tmp=tps;

	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 date_forme=j+" jours "+h+" heures "+m+" minutes et "+s+" secondes";

	

	if(j<1 && h<1 && m<1 & s<1){

		document.getElementById('RESTE').innerHTML="CONCOURS TERMINE ! ";

	}else{

		document.getElementById('RESTE').innerHTML=date_forme;

	}

	

	tmp--; // on enlève 1 sec a chaque fois

	

	setTimeout(function() { fin_concours(tmp); }, 1000);

	

}
