<html>
<head>
<title>Countdown</title>
<script language="JavaScript">
actionDateTime = new
Date(2006,2,11,19,30,00);
actionText = "Countdown beendet";
function countdown() {
nowDateTime = new Date();
var
timeDifference = Math.floor(actionDateTime.getTime()/1000 -
nowDateTime.getTime()/1000);
if (timeDifference == 0) {
window.document.displayForm.display.value=actionText;
} else {
var
timeLeftDisplay;
var daysLeft = Math.floor(timeDifference / 86400);
timeDifference -= Math.floor(timeDifference / 86400) * 86400;
var
hoursLeft = Math.floor(timeDifference / 3600);
timeDifference -=
Math.floor(timeDifference / 3600) * 3600;
var minLeft =
Math.floor(timeDifference / 60);
timeDifference -= Math.floor(timeDifference
/ 60) * 60;
var secLeft = timeDifference;
if (daysLeft > 0) {
timeLeftDisplay = "Noch " + daysLeft + " Tage, ";
timeLeftDisplay +=
hoursLeft + " Stunden, ";
timeLeftDisplay += minLeft + " Minuten und ";
timeLeftDisplay += secLeft + " Sekunden";
} else {
if (hoursLeft
> 0) {
timeLeftDisplay = "Noch " + hoursLeft + " Stunden, ";
timeLeftDisplay += minLeft + " Minuten und ";
timeLeftDisplay += secLeft
+ " Sekunden";
} else {
if (minLeft > 0) {
timeLeftDisplay =
"Noch " + minLeft + " Minuten und ";
timeLeftDisplay += secLeft + "
Sekunden";
} else {
if (secLeft > 0) {
timeLeftDisplay = "Noch "
+ secLeft + " Sekunden";
}}}}
window.document.displayForm.display.value = timeLeftDisplay;
window.setTimeout('countdown()',1000);
}}
</script>
</head>
<body onLoad="countdown()" bgcolor="#3c5573">
<center>
<form name="displayForm">
<input type="text"
name="display" size="40">
</form>
</center>
</body></html