// show date and time and refresh every second
// copyright 2002 BackGrounD Software Inc.

var Nav = ((navigator.appName == "Netscape"))
var IE = ((navigator.userAgent.indexOf("MSIE") != -1))

Tdate = new Date();
Tyear = Tdate.getYear();
if (Nav) { Tyear = Tyear+1900; }
Tmonth = Tdate.getMonth()+1;
if (Tmonth < 10) { Tmonth = "0"+Tmonth; }
Tdate = Tdate.getDate();
if (Tdate < 10) { Tdate = "0"+Tdate; }
if (!Nav) { document.write("<FONT CLASS='TBarely'>Date: </FONT><SPAN ID='XDateLayer'>"+Tyear+"/"+Tmonth+"/"+Tdate+"</SPAN>"); }
else { document.write("<FONT CLASS='TBarely'>Date: </FONT><LAYER ID='XDateLayer'>"+Tyear+"/"+Tmonth+"/"+Tdate+"</LAYER>"); }

Tdate = new Date();
Thours = Tdate.getHours();
if (Thours < 10) { Thours = "0"+Thours; }
Tminutes = Tdate.getMinutes();
if (Tminutes < 10) { Tminutes = "0"+Tminutes; }
if (!Nav) { document.write("<FONT CLASS='TBarely'> Time: </FONT><SPAN ID='XTimeLayer'>"+Thours+":"+Tminutes+" EST</SPAN>"); }
else { document.write("<FONT CLASS='TBarely'> Time: </FONT><LAYER ID='XTimeLayer'>"+Thours+":"+Tminutes+" EST</LAYER>"); }

function refreshTime()  {
with (Math) {
   newDate = new Date();
   newHours = newDate.getHours();
   newMinutes = newDate.getMinutes();
   newSeconds = newDate.getSeconds();
   newYear = newDate.getFullYear();
   newMonth = newDate.getMonth()+1; 
   newDay = newDate.getDate();
   if (newMonth*1 < 10) { newMonth="0"+newMonth; }
   if (newDay*1 < 10) { newDay="0"+newDay; }
   newDateL = newYear+"/"+newMonth+"/"+newDay;
   tmp = newSeconds - (floor(newSeconds / 2) * 2);
   if (tmp == 0) { tmp = "white"; }
   else { tmp = "red"; }
   if (newHours < 10) { newHours="0"+newHours; }
   if (newMinutes < 10) { newMinutes="0"+newMinutes; }
   if (newSeconds < 10) { newSeconds="0"+newSeconds; }
   newTime = newHours+":"+newMinutes+":"+newSeconds;
   if (Nav) { XTimeLayer = document.getElementById("XTimeLayer"); XDateLayer = document.getElementById("XDateLayer");}
   XTimeLayer.innerHTML = "<FONT CLASS='TBarely'>"+newTime+" EST <FONT COLOR='"+tmp+"'> * </FONT></FONT>"; 
   XDateLayer.innerHTML = "<FONT CLASS='TBarely'>"+newDateL+"</FONT>";  
   setTimeout("refreshTime()",1000); 
}
}
refreshTime();
