var timerID = null;
var timerRunning = false;
function stopclock (){
if(timerRunning)
clearTimeout(timerID);
timerRunning = false;}
function startclock () {
stopclock();
showtime();}
function showtime () {
var now = new Date();
var hours = now.getHours();
var minutes = now.getMinutes();
var seconds = now.getSeconds();


var thetime = document.all.thetime;
var thetime1 = document.all.thetime1;
if(thetime){
	var timeValue = now.getYear()+"-"+(now.getMonth()+1)+"-"+now.getDate()+" " +((hours >= 12) ? "PM " : "AM " )
	timeValue += ((hours >12) ? hours -12 :hours)
	timeValue += ((minutes < 10) ? ":0" : ":") + minutes
	timeValue += ((seconds < 10) ? ":0" : ":") + seconds
	document.getElementById("thetime").innerText = timeValue;
	
	timerID = setTimeout("showtime()",1000);
}
if(thetime1){
	var timeValue1 = now.getYear()+"-"+(now.getMonth()+1)+"-"+now.getDate()+" " 
	timeValue1 += hours
	timeValue1 += ((minutes < 10) ? ":0" : ":") + minutes
	timeValue1 += ((seconds < 10) ? ":0" : ":") + seconds
	document.getElementById("thetime1").innerText = timeValue1;
	timerID = setTimeout("showtime()",1000);
}

timerRunning = true;}


function startclock2(){
	
	showtime2();
}

function showtime2(){
	var now = new Date();
	var hours = now.getHours();
	var minutes = now.getMinutes();
	var seconds = now.getSeconds();
	var thetime = document.getElementById("thetime");
	if(thetime){
	var timeValue = now.getYear()+"Äê"+(now.getMonth()+1)+"ÔÂ"+now.getDate()+"ÈÕ"
	thetime.innerText = timeValue;
	}

}
