window.onload = init;

function init() 
{
	global_init();
	if (document.getElementById) showTime();
}

function showTime() 
{
	var now = new Date();
	var hours = now.getHours();
	var minutes = now.getMinutes();
	var seconds = now.getSeconds();

	if (seconds<=9) seconds = "0" + seconds;
	var t = "" + ((hours >12) ? hours -12 :hours);
	if (t == "0") timeValue = 12;
	t += ((minutes < 10) ? ":0" : ":") + minutes + ":" + seconds;
	t += (hours >= 12) ? " P.M." : " A.M.";

	var y = new Date().getYear(); if (y < 2000) y += 1900;
	var m = new Date().getMonth() + 1;
	var d = new Date().getDate();

	//document.getElementById('clock').innerHTML = m + "/" + d + "/" + y + " " + t;
	document.getElementById('clock').innerHTML = m + "/" + d + "/" + y ;

	/*
	if (document.all)
	{
		//Internet Explorer refreshes each second
		setTimeout("showTime()", 1000);
	}
	else
	{
		//Netscape should not refresh the clock as fast, because it's choppy
		setTimeout("showTime()", 5000);
	}
	*/
}
