///////////////////////////////////////////////////////////
// Did on 5-Sep-2004
// Display of day, date and time on top of the page
// ========================================================

function time1() {

var today = new Date();
var hrs = today.getHours();
var min = today.getMinutes();
var secs = today.getSeconds();
var alsohrs = today.getHours();
var dayNumber = today.getDate();
var year = today.getFullYear();
var ampm="";
var zero="0";
var month = today.getMonth() +1;
var weekday = today.getDay();
var wdn = new Array(7)
wdn[0] = "Sunday";
wdn[1] = "Monday";
wdn[2] = "Tuesday";
wdn[3] = "Wednesday";
wdn[4] = "Thursday";
wdn[5] = "Friday";
wdn[6] = "Saturday";

var mon = new Array(12)
mon[0] = "Jan";
mon[1] = "Feb";
mon[2] = "Mar";
mon[3] = "Apr";
mon[4] = "May";
mon[5] = "Jun";
mon[6] = "Jul";
mon[7] = "Aug";
mon[8] = "Sep";
mon[9] = "Oct";
mon[10] = "Nov";
mon[11] = "Dec";

//Statement that puts '0's in front of single minutes or seconds.
if (min<10)
{
min=zero+min;
}
if (secs<10)
{
secs=zero+secs;
}
//Statement that eliminates Metric Time
if (hrs>12)
{
hrs=eval(hrs - 12);
}
if (hrs>=0 && hrs<1)
{
hrs=12
}
//P.M. Statement
if (alsohrs>=12 && alsohrs<24)
{
ampm="P.M.";
}
//A.M. Statement
if (alsohrs<12 && alsohrs>=0)
{
ampm="A.M.";
}


tmp='<table width="70%" class="TextDate" align=right ><tr>';
tmp+='<td align=center>'+dayNumber+'-'+mon[month-1]+'-'+year+'&nbsp; &nbsp; </td></tr>';
tmp+='<tr><td height=12></td></tr>';
tmp+='<tr><td align=center>'+wdn[weekday]+' &nbsp; &nbsp;';
tmp+=hrs+'<span id="blinker">:</span>'+min+' '+ampm;
tmp+= '</td></tr></table>';



document.getElementById("clockgoeshere").innerHTML=tmp;
clocktime=setTimeout("time1()","1000");
}
function blink() {
//alert("CAlled Blink");
var obj = document.getElementById("blinker");
if (obj.style.visibility == "visible") {
obj.style.visibility="hidden";
}
else {
obj.style.visibility="visible";
}
eachsecond=setTimeout("blink()","500");
}