function displayDate()
	{
    var this_month = new Array(12);
    var this_wday = new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat");
    this_month[0]  = "January";
    this_month[1]  = "February";
    this_month[2]  = "March";
    this_month[3]  = "April";
    this_month[4]  = "May";
    this_month[5]  = "June";
    this_month[6]  = "July";
    this_month[7]  = "August";
    this_month[8]  = "September";
    this_month[9]  = "October";
    this_month[10] = "November";
    this_month[11] = "December";
    var today = new Date();
    var wday = today.getDay();
    var day   = today.getDate();
    var month = today.getMonth();
    var year  = today.getYear();
    if (year < 1900)
		{
        year += 1900;
		}
    return(this_wday[wday]+", "+this_month[month]+" "+day+", "+year+".");
	}
	
	
function formatTime() {
  now = new Date();
  hour = now.getHours();
  min = now.getMinutes();
  sec = now.getSeconds();

 if (min <= 9) {
      min = "0" + min;
    }
    if (sec <= 9) {
      sec = "0" + sec;
    }
    if (hour > 12) {
      hour = hour - 12;
      add = " p.m.";
    } else {
      hour = hour;
      add = " a.m.";
    }
    if (hour == 12) {
      add = " p.m.";
    }
    if (hour == 00) {
      hour = "12";
    }

	var present_time =  ((hour<=9) ? "0" + hour : hour) + ":" + min + add;
	document.getElementById('time').innerHTML=present_time;
    setTimeout("formatTime()", 1000);
}

