function setcountup(theyear,themonth,theday,theheur,themin,thesec){
	yr=theyear;mo=themonth;da=theday;he=theheur;mi=themin;sec=thesec;
}
setcountup(2001,2,22,14,20,10)
var displaymessage="Tu as perdu quelque chose ?"
var countupwidth='95%'
var countupheight='20px'
var countupbgcolor=''
var opentags=''
var closetags=''

var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
var crosscount=''

function start_countup(){
	if (document.layers)
	document.countupnsmain.visibility="show"
	else if (document.all||document.getElementById)
	crosscount=document.getElementById&&!document.all?document.getElementById("countupie") : countupie
	countup()
}

if (document.all||document.getElementById)
document.write('<span id="countupie" style="width:'+countupwidth+'; background-color:'+countupbgcolor+'"></span>')

window.onload=start_countup


function countup()
{
	var today=new Date()
	var todayy=today.getYear()
	if (todayy < 1000)
	todayy+=1900
	var todaym=today.getMonth()
	var todayd=today.getDate()
	var todayh=today.getHours()
	var todaymin=today.getMinutes()
	var todaysec=today.getSeconds()
	var todaystring=montharray[todaym]+" "+todayd+", "+todayy+" "+todayh+":"+todaymin+":"+todaysec
	paststring=montharray[mo-1]+" "+da+", "+yr+", "+he+":"+mi+":"+sec
	dd=Date.parse(todaystring)-Date.parse(paststring)
	dan=Math.floor(dd/(365.25 * 24 * 60 * 60 * 1000)*1)
	dmois=Math.floor((dd%(365.25 * 24 * 60 * 60 * 1000))/(31 * 24 * 60 * 60 * 1000)*1)
	dday=Math.floor(((dd%(365.25 * 24 * 60 * 60 * 1000))%(31 * 24 * 60 * 60 * 1000))/(60*60*1000*24)*1)
	dhour=Math.floor((((dd%(365.25 * 24 * 60 * 60 * 1000))%(31 * 24 * 60 * 60 * 1000))%(60*60*1000*24))/(60*60*1000)*1)
	dmin=Math.floor(((((dd%(365.25 * 24 * 60 * 60 * 1000))%(31 * 24 * 60 * 60 * 1000))%(60*60*1000*24))%(60*60*1000))/(60*1000)*1)
	dsec=Math.floor((((((dd%(365.25 * 24 * 60 * 60 * 1000))%(31 * 24 * 60 * 60 * 1000))%(60*60*1000*24))%(60*60*1000))%(60*1000))/1000*1)
	an(dan)
	mois(dmois)
	jours(dday)
	heures(dhour)
	minutes(dmin)
	if (dsec<2) { secaff = " seconde" } else { secaff = " secondes" }
	secaff1 = "que tu es parti rejoindre le paradis des toutous."
	if (document.layers)
	{
		document.countupnsmain.document.countupnssub.document.write(opentags+"D&eacute;j&agrave; "+ annees +nbmois+nbjours+nbheures+nbminutes+dsec+secaff+"<br>"+secaff1+closetags)
		document.countupnsmain.document.countupnssub.document.close()

	}
	else if (document.all||document.getElementById)
	crosscount.innerHTML=opentags+"D&eacute;j&agrave; "+annees+nbmois+nbjours+nbheures+nbminutes+dsec+secaff+"<br>"+secaff1+closetags

	setTimeout("countup()",1000)
}

function minutes(dmin)
{
	if (dmin<2)
	{
		minaff = " minute ";
		nbminutes = dmin + minaff;
	}
	else
	{
		minaff = " minutes " ;
		nbminutes = dmin + minaff;

	}
	if (dmin<1)
	{
		nbminutes = "";
	}
	return nbminutes;
}

function heures(dhour)
{
	if (dhour<2)
	{
		haff = " heure ";
		nbheures = dhour + haff;
	}
	else
	{
		haff = " heures " ;
		nbheures = dhour + haff;

	}
	if (dhour<1)
	{
		nbheures = "";
	}
	return nbheures;
}

function jours(dday)
{
	if (dday<2)
	{
		jaff = " jour ";
		nbjours = dday + jaff;
	}
	else
	{
		jaff = " jours " ;
		nbjours = dday + jaff;

	}
	if (dday<1)
	{
		nbjours = "";
	}
	return nbjours;
}

function mois(dmois)
{
	if (dmois<1)
	{
		nbmois = "";
	}
	else
	{
		moiaff = " mois ";
		nbmois = dmois + moiaff;
	}
	return nbmois;
}

function an(dan)
{
	if (dan<2)
	{
		anaff = " an ";
		annees = dan + anaff;
	}
	else
	{
		anaff = " ans " ;
		annees = dan + anaff;

	}
	if (dan<1)
	{
		annees = "";
	}
	return annees;
}
