months = new Array(12)
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";
today = new Date(); 
var month = months[today.getMonth() + 1]
date = today.getDate()
year = today.getYear()

/* YSK fix for JavaScript bug in browsers
that incorrectly display dates after 1999 */

if (year < 2000) {
year = year + 1900
}

var now = new Date();
var hours = now.getHours();
hours=((hours<1) ? hours+12:hours);
var minutes = now.getMinutes();
var timeValue = "" + ((hours >12) ? hours -12 :hours);
timeValue += ((minutes < 10) ? ":0" : ":") + minutes;
timeValue += (hours >= 12) ? " p.m." : " a.m.";