function runClock() { today = new Date(); hours = today.getHours(); minutes = today.getMinutes(); seconds = today.getSeconds(); timeValue = hours; timeValue += ((minutes < 10) ? ":0" : ":") + minutes; timeValue += ((seconds < 10) ? ":0" : ":") + seconds; document.clock.time.value = timeValue; timerID = setTimeout("runClock()",1000); timerRunning = true; }