var timerID=null;
var timerRunning = false;
function stopclock () {
      if(timerRunning)
      clearTimeout(timerID);
      timerRunning = false;
}

function showtime(n, tz) {    				
		var now=new Date();
        var hours=parseFloat(now.getUTCHours()+tz);
		if(hours > 24) hours = parseInt(hours-24);				
 		if(hours < 0) hours += 24;
        var minutes=now.getMinutes();
        var seconds=now.getSeconds();				
	    var timeValue=((hours<10) ? "0" : "")+hours;
        timeValue+=((minutes<10) ? ":0" : ":")+minutes;
        timeValue+=((seconds<10) ? ":0" : ":")+seconds;				
        document.all["clockbox"+n].value = timeValue;
        timerID=setTimeout("showtime("+n+","+tz+")",1000);
        timerRunning=true;
}