function showClock(){
var clock=new Date();
var hours, minutes, seconds, month, date;
hours=clock.getHours();
minutes=clock.getMinutes();
seconds=clock.getSeconds();
weekday=clock.getDay();
date=clock.getDate();
month=clock.getMonth()+1;
year=clock.getFullYear();

switch(clock.getMonth()){
case 0:month="January";break;
case 1:month="February";break;
case 2:month="March";break;
case 3:month="April";break;
case 4:month="May";break;
case 5:month="June";break;
case 6:month="July";break;
case 7:month="August";break;
case 8:month="September";break;
case 9:month="October";break;
case 10:month="November";break;
case 11:month="December";break;
}

switch(weekday){
case 0: weekday="Sunday"; break;
case 1: weekday="Monday"; break;
case 2: weekday="Tuesday"; break;
case 3: weekday="Wednesday"; break;
case 4: weekday="Thursday"; break;
case 5: weekday="Friday"; break;
case 6: weekday="Saturday"; break;
}
// for a nice disply we'll add a zero before the numbers between 0 and 9
if (hours<10){
hours="0" + hours;
}
if (minutes<10){
minutes="0" + minutes;
}
if (seconds<10){
seconds="0" + seconds;
}
$("#showText").html("<p class=\"P_Clock_Top\">"+weekday+" "+month+" "+date+" "+year+"</p><p class=\"P_Clock_Time\">"+hours+":"+minutes+":"+seconds+"</p>");
t=setTimeout('showClock()',1000);
/* setTimeout() JavaScript method is used to call showClock() every 1000 milliseconds (that means exactly 1 second) */
}