// <!-- Quick! Hide the java!
 
// Speaking of Java, this particular script is (C) Copyright 2002 Jim Tucek
// If you wish to use my CountDown script, these comments must be left
// alone!  That is all.
 
// Visit www.jracademy.com/~jtucek/ for script information and a bit of help
// setting it up, or www.jracademy.com/~jtucek/email.html for contact
// information.
 
 
var myTimer = "";
 
function start()
{
  // Event-Datum im folgenden Format Eintragen: July 21, 2004 07:00:00
  setup("October 17, 2010 09:00:00");
  repeat()
}
 
 
function repeat()
{
  down("form1");
  setTimeout("repeat()",1000);
}
 
function setup(day)
{
  today = (new Date()).getTime();
  the_day = (new Date(day)).getTime();
  time = (the_day - today);
  myTimer = time;
}
 
function down(box)
{
  // Berechnung
  myTimer = myTimer - 1000;
  time = myTimer;
  days = (time - (time % 86400000)) / 86400000;
  time = time - (days * 86400000);
  hours = (time - (time % 3600000)) / 3600000;
  time = time - (hours * 3600000);
  mins = (time - (time % 60000)) / 60000;
  time = time - (mins * 60000);
  secs = (time - (time % 1000)) / 1000;
  if(days==1) out = "1 day, ";
  else out = days+" days, ";
  if(hours < 10) out = out+"0";
  out = out+hours+" hours ";
  if(mins < 10) out = out+"0";
  out = out+mins+" mins ";
  if(secs < 10) out = out+"0";
  out = "  " +out+secs+" secs "; 
  
  //  Alte Ausgabe auf eine Zeile
  //  out = " Race Countdown: " +out+secs+" secs "; 
 
  // Alte Ausgabe auf eine Zeile
  //document.getElementById("countdown").firstChild.nodeValue = out;
 
  if (the_day > today) {
          document.getElementById("countdown_days").firstChild.nodeValue = days;
          document.getElementById("countdown_hours").firstChild.nodeValue = hours;
          document.getElementById("countdown_min").firstChild.nodeValue = mins;
          document.getElementById("countdown_sec").firstChild.nodeValue = secs; 
  } 
  else {
          document.getElementById("countdown_days").firstChild.nodeValue = 0;
          document.getElementById("countdown_hours").firstChild.nodeValue = 0;
          document.getElementById("countdown_min").firstChild.nodeValue = 0;
          document.getElementById("countdown_sec").firstChild.nodeValue = 0; 
 
  }
 
 
  
}
 
//-->
