<!--
function writeTime() {
  // May 18 8:00
  // get a date object
  var today = new Date();

  // ask the object for some information
  var month = today.getMonth();
  var days = today.getDate();
  var hours = today.getHours();
  var minutes = today.getMinutes();
  var seconds = today.getSeconds();
  
  //an array for holding the names of the images in our clock
  var imgNames = new Array(document.h1.src,"d2","d3","h1","h2","m1","m2","s1","s2");  
  //an array for holding the digit of each value
  var imgValues = new Array();
  
  //measure how many days we have left, based on the month and day
  //a variable for holding how many days we have left based on the month
  var daysOff = 0;
  //january is month 0, feb 1, ... , dec 11
  if (month == 11) {
  	daysOff = 31+31+28+31+30+16;
  } else if (month == 0) {
  	daysOff = 31+28+31+30+16;
  } else if (month == 1) {
  	daysOff = 28+31+30+16;
  } else if (month == 2) {
  	daysOff = 31+30+16;
  } else if (month == 3) {
  	daysOff = 30+16;
  } else if (month == 4) {
  	daysOff = 16;
  } else {
  	daysOff = -1;
  }
  
  
  //now take off the current day of the month from the total based on the
  //beginning of the month
  days = daysOff - days;
  if (days < 10) {
  	daysStr = "00" + days;
  } else if (days < 100) {
  	daysStr = "0" + days;
  } else {
  	daysStr = "" + days;
  }
  
  //if the race has already happened, set everything to zero
if (daysOff < 1 || (daysOff == 16 && hours > 7)) {
  imgValues[0] = 0;
  imgValues[1] = 0;
  imgValues[2] = 0;
  imgValues[3] = 0;
  imgValues[4] = 0;
  imgValues[5] = 0;
  imgValues[6] = 0;
  imgValues[7] = 0;
  imgValues[8] = 0;
  
} else {
  //otherwise set the digits
  if (hours > 7) {
  	hours = 31 - hours;
  } else {
  	hours = 7 - hours;
  }
  minutes = 59 - minutes;
  seconds = 59 - seconds;
  
  hrStr = fixTime(hours);
  minStr = fixTime(minutes);
  secStr = fixTime(seconds);

  imgValues[0] = daysStr.substring(0, 1);
  imgValues[1] = daysStr.substring(1, 2);
  imgValues[2] = daysStr.substring(2, 3);
  imgValues[3] = hrStr.substring(0, 1);
  imgValues[4] = hrStr.substring(1, 2);
  imgValues[5] = minStr.substring(0, 1);
  imgValues[6] = minStr.substring(1, 2);
  imgValues[7] = secStr.substring(0, 1);
  imgValues[8] = secStr.substring(1, 2);
}
  
  //set the clock
  document.d1.src ='images/nav/'+imgValues[0]+'.gif';
  document.d2.src ='images/nav/'+imgValues[1]+'.gif';
  document.d3.src ='images/nav/'+imgValues[2]+'.gif';
  document.h1.src ='images/nav/'+imgValues[3]+'.gif';
  document.h2.src ='images/nav/'+imgValues[4]+'.gif';
  document.m1.src ='images/nav/'+imgValues[5]+'.gif';
  document.m2.src ='images/nav/'+imgValues[6]+'.gif';
  document.s1.src ='images/nav/'+imgValues[7]+'.gif';
  document.s2.src ='images/nav/'+imgValues[8]+'.gif';
  // put together the time string and write it out
  //var the_time = hours + ":" + minutes + ":" + seconds;
  //window.document.the_form.the_text.value = the_time;

  // run this function again in half a second
  the_timeout= setTimeout('writeTime();',500);
  
}

function fixTime(the_time) {
	if (the_time <10) {
		newTime = "0" + the_time;
	} else {
		newTime = "" + the_time;
	}
	return newTime;
}

//-->
