// JavaScript Document
<!-- Begin
function startclock() {
stopclock();
showtime();
}
var timerID = null;
var timerRunning = false;
function stopclock (){
if(timerRunning)
clearTimeout(timerID);
timerRunning = false;
}
function showtime () {
var now = new Date();
var hours = now.getHours();
var minutes = now.getMinutes();
var seconds = now.getSeconds();
var hours = "" + ((hours >12) ? hours -12 :hours);
if (hours == "0") timeValue = 12;
minutes = ((minutes < 10) ? ":0" : ":") + minutes;
seconds = ((seconds < 10) ? ":0" : ":") + seconds;
var x = (hours >= 12) ? " P.M." : " A.M.";
document.getElementById('clock').innerHTML=hours+minutes+seconds+x; 
timerID = setTimeout("showtime()",1000);
timerRunning = true;
}

// End -->


