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="Jan";break;
case 1:month="Feb";break;
case 2:month="Mar";break;
case 3:month="Apr";break;
case 4:month="May";break;
case 5:month="June";break;
case 6:month="July";break;
case 7:month="Aug";break;
case 8:month="Sept";break;
case 9:month="Oct";break;
case 10:month="Nov";break;
case 11:month="Dec";break;
}

switch(weekday){
case 0: weekday="Sun"; break;
case 1: weekday="Mon"; break;
case 2: weekday="Tues"; break;
case 3: weekday="Wed"; break;
case 4: weekday="Thur"; break;
case 5: weekday="Fri"; break;
case 6: weekday="Sat"; 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("<span class=\"P_Clock_Top\">"+weekday+" "+month+" "+date+"</span><span class=\"P_Clock_Time\">, "+hours+":"+minutes+":"+seconds+"</span>");
t=setTimeout('showClock()',1000);
/* setTimeout() JavaScript method is used to call showClock() every 1000 milliseconds (that means exactly 1 second) */
}
