var timerID = null;
var timerRunning = false;
var ie = (document.all)? true:false;

/*************** show the current time *****************************************/
function showtime(){
var now = new Date();
var year = now.getYear();
var month = now.getMonth() + 1;
var date = now.getDate();
var hours = now.getHours();
var mins = now.getMinutes();
var secs = now.getSeconds();
var timeVal = "Local Time: ";
timeVal += ((month < 10) ? " 0" : " on ") + month + "-";
timeVal += date + "-" + year+"  ";
timeVal += ((hours <= 12) ? hours : hours - 12);
timeVal += ((mins < 10) ? ":0" : ":") + mins;
timeVal += ((secs < 10) ? ":0" : ":") + secs;
timeVal += ((hours < 12) ? "AM" : "PM");

document.all("time").innerText = timeVal;
timerID = setTimeout("showtime()", 1000);
timerRunning = true;
}

function startClock() {
stopClock();
showtime();
window.close();
}

function stopClock() {
if(timerRunning)
clearTimeout(timerID);
timerRunning = false;
document.all("time").innerText="";
}
/*******************************************************************************/
function StartSearch(){document.InputForm.submit();}