
function JSClock() {
var time = new Date();
var time1 = new Date();
var hour = time.getHours();
var minute = time.getMinutes();
var second = time.getSeconds();

var dd=time1.getDate();
var mm=time1.getMonth()+1;
var yy=time1.getYear();

var temp = "" + ((hour > 12) ? hour - 12 : hour);
temp += ((minute < 10) ? ":0" : ":") + minute;
temp += ((second < 10) ? ":0" : ":") + second;
temp += (hour >= 12) ? " PM" : " AM";

var temp1 = dd+"/"+mm+"/"+yy;

//document.clockForm.digits.value = temp
var a=document.getElementById("digits");
a.value = temp;
var a1=document.getElementById("digits1");
a1.value = temp1;
id = setTimeout("JSClock()",1000)};
window.onload = JSClock;


