

function startclock()
{
var thetime=new Date();

var nhours=thetime.getHours();
var nmins=thetime.getMinutes();
var nsecn=thetime.getSeconds();
var nday=thetime.getDay();
var nmonth=thetime.getMonth();
var ntoday=thetime.getDate();
var nyear=thetime.getYear();
var AorP=" ";

if (nhours>=12)
    AorP="P.M.";
else
    AorP="A.M.";

if (nhours>=13)
    nhours-=12;

if (nhours==0)
   nhours=12;

if (nsecn<10)
 nsecn="0"+nsecn;

if (nmins<10)
 nmins="0"+nmins;

if (nday==0)
  nday="Sun";
if (nday==1)
  nday="Mon";
if (nday==2)
  nday="Tue";
if (nday==3)
  nday="Wed";
if (nday==4)
  nday="Thu";
if (nday==5)
  nday="Fri";
if (nday==6)
  nday="Sat";

nmonth+=1;

if (nyear<=99)
  nyear= "19"+nyear;

if ((nyear>99) && (nyear<2000))
 nyear+=1900;


 var this_month = new Array(12);
    this_month[0]  = "Jan";
    this_month[1]  = "Feb";
    this_month[2]  = "Mar";
    this_month[3]  = "Apr";
    this_month[4]  = "May";
    this_month[5]  = "Jun";
    this_month[6]  = "Jul";
    this_month[7]  = "Aug";
    this_month[8]  = "Sep";
    this_month[9]  = "Oct";
    this_month[10] = "Nov";
    this_month[11] = "Dec";

    var today = new Date();
    var day   = today.getDate();
    var month = today.getMonth();


document.clockform.clockspot.value=nhours+": "+nmins+": "+nsecn+" "+AorP+" "+nday+", "+ntoday+" - "+this_month[month]+" - "+nyear;

setTimeout('startclock()',1000);

} 



