/*              at the location to be displayed insert form to display the countdown 

     <FORM NAME=clock> <INPUT NAME=face  disabled value=
"0 days, 0 hours, 0 minutes, 0 seconds" size=80 style=font-size:110%;color:black;background-color:paleGreen;text-align:center >
<span style=font-size:90%;> </FORM>
      <SCRIPT LANGUAGE="JavaScript">  startclock()</SCRIPT> 
      *//* Javascript Countdown Timer (version 1.0) Copyright (C) 1997 Andrew Turi  All Rights Reserved.
      [E-mail: andrew&#x40;2-cool.com] */ 

var timeUp = "Registrations are closed!"  
var timeUp = "We're Racing!"    
count = new Date("August 20, 2011 09:00");  // date to count down to (use the format: "August 20, 2011 09:00"

var timerID; var timerRunning = false;
var secPerDay=0, minPerDay=0; hourPerDay=0, secsLeft=0, secsRound=0, secsRemain=0;
var minLeft=0, minRound=0, dayRemain=0, minRemain=0, timeRemain=0;
var Expire = 0; 
var time = "0 days, 0 hours, 0 minutes, 0 seconds" //do not modify this text

function showtime () {                          //  count.setYear(today.getYear()); // why??
secsPerDay = 1000 ; minPerDay = 60*1000 ; hoursPerDay = 60*60*1000; PerDay = 24*60*60*1000;
today = new Date(); 
Expire = (count.getTime() - today.getTime())

secsLeft = (count.getTime() - today.getTime()) / minPerDay; secsRound = Math.round(secsLeft); 
secsRemain = secsLeft - secsRound; 
secsRemain = (secsRemain < 0) ? secsRemain = 60 - ((secsRound - secsLeft) * 60) : secsRemain = (secsLeft - secsRound) * 60; 
secsRemain = Math.round(secsRemain); 
minLeft = ((count.getTime() - today.getTime()) / hoursPerDay); minRound = Math.round(minLeft); 
minRemain = minLeft - minRound; 
minRemain = (minRemain     < 0) ? minRemain=   60-((minRound-minLeft)   *60) :  minRemain  =((minLeft - minRound)*60);
minRemain = Math.round(minRemain - 0.495);
hoursLeft = ((count.getTime() - today.getTime()) / PerDay); hoursRound = Math.round(hoursLeft); 
hoursRemain = hoursLeft - hoursRound; 
hoursRemain = (hoursRemain < 0) ? hoursRemain= 24-((hoursRound-hoursLeft)*24) :  hoursRemain=((hoursLeft-hoursRound)*24);
hoursRemain = Math.round(hoursRemain - 0.5); 
daysLeft = ((count.getTime() - today.getTime()) / PerDay); 
daysLeft = (daysLeft); daysRound = Math.round(daysLeft); 
daysRemain = daysRound; 
/*Fixe(s)*/ 
if (daysRemain == 0)  daysRemain="";
if (daysRemain == 1)  daysRemain=daysRemain+ " day,  ";else daysRemain=daysRemain+ " days,  "; 
if (daysRound  <  1)  daysRemain = " ";
if (minRemain  < 10 ) minRemain  = "0" + minRemain;
if (secsRemain < 10 ) secsRemain = "0" + secsRemain;
timeRemain= daysRemain + hoursRemain+ " hours, "  + minRemain + " minutes, " + secsRemain + " seconds until "+
    "racing begins!";     
// "registration closes!";
document.clock.face.value = timeRemain;
timerID = setTimeout("showtime()",1000);
timerRunning = true;
if (Expire <= 0){ document.clock.face.value = timeUp;  stopclock()     } 
}
function startclock () { stopclock(); showtime(); } 
function stopclock  () { if(timerRunning) clearTimeout(timerID); timerRunning = false; } 




var debug= false;



//  ex:  showUntil ("06/13/04",


function showUntil ( sdate , string ) {     //  if string continues on the next line use   "+ 
date   = new Date(sdate);            //  a meaningful date value might not include ccyy 
   var yy= date.getFullYear();  if ( yy  < 2003 ) date.setFullYear(yy+100)
today = new Date();  

if(debug){
        if ( today < date ){ 
         document.write( "<b><font color=green>&gt;"+date+"&lt;</font></b><br> &gt;&gt;" ); 
      document.write( string ); 
         document.write( "<b><font color=green>&lt;&lt;</font></b>" );  }
      if ( today > date )  {alert(date + " :: " + string); // show expired ones
         document.write( "<b><font color=red>&gt;"+date+"&gt;</font></b><br> &gt;&gt;" ); 
      document.write( string ); 
      document.write( "<b><font color=red>&lt;&lt;</font> </b>");  }
     } // debug
if ( today < date && !debug) document.write( string ); 
}  


