dayName = new Array ("Sunday","Monday","Tuesday","Wednesday","Thursday",
                     "Friday","Saturday")
monName = new Array ("January", "February", "March", "April", "May", 
                     "June", "July", "August", "September", "October", 
                     "November", "December")
function showHr(h) { 
     if (h == 0) { 
        return (12) 
     } if (h < 13) { 
        return (h)  
     } return (h-12) 
 }
function fillZer(v) { 
     if (v > 9) { 
       return ":" + v 
     } return ":0" + v 
}
function amPm(t) { 
       if (t < 12) { 
          return (" AM") 
       } return (" PM") 
}
function showYr(yr) { 
       if (yr < 1900) { 
           yr += 1900 
       } return yr 
}
now = new Date
function printTheTime() {
   document.write (showHr(now.getHours()) 
    + fillZer(now.getMinutes()) 
	+ fillZer(now.getSeconds()) 
	+ amPm(now.getHours()) + ", " 
	+ dayName[now.getDay()] + ", " 
	+ monName[now.getMonth()] 
	+ " " + now.getDate() + ", " 
	+ showYr(now.getYear()))
}