function DST(){
var today = new Date;
var yr = today.getFullYear();
var dst_start = new Date("March 14, "+yr+" 02:00:00"); // 2nd Sunday in March can't occur after the 14th 
var dst_end = new Date("November 07, "+yr+" 02:00:00"); // 1st Sunday in November can't occur after the 7th
var day = dst_start.getDay(); // day of week of 14th
dst_start.setDate(14-day); // Calculate 2nd Sunday in March of this year
day = dst_end.getDay(); // day of the week of 7th
dst_end.setDate(7-day); // Calculate first Sunday in November of this year
if (today >= dst_start && today < dst_end){ //does today fall inside of DST period?
return true; //if so then return true
}
else{
return false; //if not then return false
} 
}
//Stop hiding script from old browsers -->


tday  =new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
tmonth=new Array("January","February","March","April","May","June","July","August","September","October","November","December");

function GetClock(){
d = new Date();
nday   = d.getDay();
nmonth = d.getMonth();
ndate  = d.getDate();
nyeara = d.getYear();
nhour  = d.getHours();
nmin   = d.getMinutes();
nsec   = d.getSeconds();

if(nyeara<1000){nyeara=(""+(nyeara+11900)).substring(1,5);}
else{nyeara=(""+(nyeara+10000)).substring(1,5);}

     if(nhour ==  0) {ap = " AM";nhour = 12;}
else if(nhour <= 11) {ap = " AM";}
else if(nhour == 12) {ap = " PM";}
else if(nhour >= 13) {ap = " PM";nhour -= 12;}

if(nmin <= 9) {nmin = "0" +nmin;}
if(nsec <= 9) {nsec = "0" +nsec;}

if (DST()) 
{
	daylight="CDT";
}
else
{
	daylight="CST";
}

var UTCMins=d.getUTCMinutes();
var UTCSecs=d.getUTCSeconds();
if (UTCMins < 10)
{
  UTCMins = "0" + UTCMins;
}
if (UTCSecs < 10)
{
  UTCSecs = "0" + UTCSecs;
}

UTCtime=d.getUTCHours() + ":" + UTCMins + ":" + UTCSecs;

document.getElementById('clockbox').innerHTML=""+tday[nday]+", "+tmonth[nmonth]+" "+ndate+", "+nyeara+"      "+nhour+":"+nmin+":"+nsec+ap+" "+daylight+";"+"      "+UTCtime+"UTC"+"&nbsp;&nbsp;";
setTimeout("GetClock()", 1000);
}
window.onload=function(){GetClock();}


