<html><head>
<script language="JavaScript">
var DT_msPerDay, DT_msPerHour, DT_msPerMinute, DT_msPerSecond; var DT_TimerOn, DT_TimerId; function DT_showCount(dateBegin, dateEnd, boxB) {var timeDiff=dateEnd.getTime()-dateBegin.getTime();
if (timeDiff<=0)
{boxB.value="Endlich erreicht!";
return(false);}else{ var dd=Math.floor(timeDiff/DT_msPerDay);
timeDiff=timeDiff-dd*DT_msPerDay;
var hh=Math.floor(timeDiff/DT_msPerHour);
timeDiff=timeDiff-hh*DT_msPerHour;
var mm=Math.floor(timeDiff/DT_msPerMinute);
timeDiff=timeDiff-mm*DT_msPerMinute;
var ss=Math.floor(timeDiff/DT_msPerSecond);
hh=(hh>=10?hh:"0"+hh);
mm=(mm>=10?mm:"0"+mm);
ss=(ss>=10?ss:"0"+ss);
if (dd <= 1) boxB.value=dd+" Tag "+hh+" Stunde(n) "+mm+" Minute(n) "+ss+" Sekunde(n)";
else boxB.value=dd+" Tage, "+hh+" Stunde(n) "+mm+" Minute(n) "+ss+" Sekunde(n)"; if (dd == 0) boxB.value=dd+" Tage, "+hh+" Stunde(n) "+mm+" Minute(n) "+ss+" Sekunde(n)"; return(true);}} function DT_showDate(dateD, boxB){ var y=dateD.getYear(); var m=dateD.getMonth()+1; var d=dateD.getDate(); var hh=dateD.getHours(); var mm=dateD.getMinutes(); var ss=dateD.getSeconds();
m=(m>=10?m:"0"+m);
d=(d>=10?d:"0"+d);
hh=(hh>=10?hh:"0"+hh);
mm=(mm>=10?mm:"0"+mm);
ss=(ss>=10?ss:"0"+ss);
boxB.value=d+"."+m+"."+y+" "+hh+" Stunde(n) "+mm+" Minute(n) "+ss+" Sekunde(n)";} function DT_stopTimer(){ if (DT_TimerOn){
clearTimeout(DT_TimerId);
DT_TimerOn=false;}}
function DT_startTimer(){
var dateNow=new Date();
var dateEOT=new Date(countdown_datum);
var On=DT_showCount(dateNow, dateEOT, document.Ausgabe.Rest); if (On){ DT_TimerId=setTimeout("DT_startTimer()", 1000); DT_TimerOn=true;} else DT_stopTimer();} function DT_initTimer(){
DT_msPerDay=24*60*60*1000;
DT_msPerHour=60*60*1000;
DT_msPerMinute=60*1000;
DT_msPerSecond=1000;
DT_TimerOn=false;
DT_TimerId=null;
DT_stopTimer();
DT_startTimer();}
function countdown()
{DT_initTimer();}
var countdown_datum="December 31, 2004 0:00:00";
</script>
</head>
<body OnLoad="countdown();">
<b>Java Script Countdown<b>
<form name="Ausgabe">
<input size="53" name="Rest"
value="berechne die Restzeit, bitte
warten..." style="text-align: center">
</form>
</font></body></html>