function WriteDate()
{
 var months=new Array(13);
     months[1]="January";
     months[2]="February";
     months[3]="March";
     months[4]="April";
     months[5]="May";
     months[6]="June";
     months[7]="July";
     months[8]="August";
     months[9]="September";
     months[10]="October";
     months[11]="November";
     months[12]="December";
 var time=new Date();
 var newTime;
 newtime=time.getTime();
 time.setTime(newtime);
 var lmonth=months[time.getMonth() + 1];
 var date=time.getDate();
 var year=time.getYear();
 if (year < 2000)
  year = year + 1900;
 var finalresult = lmonth + " " + date + " " + year
 return finalresult;
}

function funClock()
{
 if (!document.layers && !document.all)
  return;
 var runTime = new Date();
 var newTime;
 newtime=runTime.getTime();
 runTime.setTime(newtime);
 var hours = runTime.getHours();
 var minutes = runTime.getMinutes();
 var seconds = runTime.getSeconds();
 if (hours <= 9)
 {
   hours = "0" + hours;
 }
 if (hours >= 12) ampm = "pm"; else ampm = "am";
 if (hours > 12)
 {
   hours = hours - 12;
 }
 if (minutes <= 9)
 {
   minutes = "0" + minutes;
 }
 if (seconds <= 9)
 {
   seconds = "0" + seconds;
 }
 today = WriteDate();
 movingtime = "&nbsp;&nbsp;&nbsp;&nbsp;" + today + "&nbsp;&nbsp;" + hours + ":" + minutes + ":" + seconds + " " + ampm;
 if (document.layers)
 {
   document.layers.clock.document.write(movingtime);
   document.layers.clock.document.close();
 }
 else if (document.all)
 {
   clock.innerHTML = movingtime;
 }
 setTimeout("funClock()", 1000)
}
