the_clock_date = new Date();
day_names = new Array(7)
day_names[0] = "Sunday"
day_names[1] = "Monday"
day_names[2] = "Tuesday"
day_names[3] = "Wednesday"
day_names[4] = "Thursday"
day_names[5] = "Friday"
day_names[6] = "Saturday"

month_names = new Array(12)
month_names[0] = "January"
month_names[1] = "February"
month_names[2] = "March"
month_names[3] = "April"
month_names[4] = "May"
month_names[5] = "June"
month_names[6] = "July"
month_names[7] = "August"
month_names[8] = "September"
month_names[9] = "October"
month_names[10] = "November"
month_names[11] = "December"

function its_time()
{
the_seconds = the_clock_date.getSeconds();
the_clock_date.setSeconds(the_seconds + 1);

the_dayof_week = the_clock_date.getDay();
the_dayof_week = day_names[the_dayof_week];
the_monthof_year = the_clock_date.getMonth();
the_monthof_year = month_names[the_monthof_year];
if(the_clock_date.getHours() > 12)
{ 
the_hours = the_clock_date.getHours() - 12;
} else { 
the_hours = the_clock_date.getHours();
}
if(the_clock_date.getMinutes() < 10)
{
the_minutes = "0" + the_clock_date.getMinutes();
} else {
the_minutes = the_clock_date.getMinutes();
}
if(the_clock_date.getSeconds() < 10)
{
the_seconds = "0" + the_clock_date.getSeconds();
} else {
the_seconds = the_clock_date.getSeconds();
}
if(the_clock_date.getHours() > 11)
{
the_am = "PM";
} else {
the_am = "AM";
}

the_clock.innerHTML=the_dayof_week + " " + the_monthof_year + " " + the_clock_date.getDate() + ", 2007" + " " + the_hours + ":" + the_minutes + ":" + the_seconds + " " + the_am;
}
setInterval('its_time()',1000);