function countDown(id, dateFuture, type)
{
	dateFuture = new Date(dateFuture);
	dateNow = new Date();
	
	amount = dateFuture.getTime() - dateNow.getTime()
	delete dateNow;

	if(amount < 0)
	{
        document.getElementById('countbox').innerHTML="Jetzt!";
	}
	else
	{
		days=0; hours=0; mins=0; secs=0; out="";
		amount = Math.floor(amount/1000);
		days=Math.floor(amount/86400);
        amount=amount%86400;
        hours=Math.floor(amount/3600);
        amount=amount%3600;
        mins=Math.floor(amount/60);
        amount=amount%60;
        secs=Math.floor(amount);

        if(type == 1)
        {
	        // HTML:start
	        if(days != 0){	out += days +" Tag"+((days!=1)?"e":"")+", "; }
	        if(days != 0 || hours != 0){out += hours +" Std"+((hours!=1)?"":"")+", ";}
	        if(days != 0 || hours != 0 || mins != 0){out += mins +" Min"+((mins!=1)?"":"")+", ";}
	        out += secs +" Sek";
	        // HTML:end
        }
        
        document.getElementById(id).innerHTML=out;
        setTimeout("countDown('"+id+"','"+dateFuture+"', "+type+")", 1000);
	}
}
