// JavaScript Document

var car_datelimite;

function InitCompteARebours(a, m, j, el)
{
	car_datelimite = new Date(a, m-1, j+1);
	var n = computeCompteARebours();
	displayCompteARebours(n, el);
}

function computeCompteARebours()
{
	var d = new Date();
	var dt = car_datelimite.getTime() - d.getTime(); // time in milliseconds
	return Math.round( dt / (1000 * 60 * 60 * 24) );
}

function displayCompteARebours(n, element)
{
	element.src = 'http://www.pratis.com/shared/skins/images/CAR/' + n +'.jpg';
}

