b24Hours = false;

var month = new Array("??","??","??","??","??","??","??","??","??","??","???","???");

function showMilitaryTime()
{	
	return b24Hours;
}
function showTheHours(theHour)
{
	if (showMilitaryTime() || (theHour > 0 && theHour < 13))
	{
		if (theHour == "0") theHour = 12;
		return (theHour);
	}
	if (theHour == 0)
	{
		return (12);
	}
	return (theHour-12);
}
function showZeroFilled(inValue)
{
	if (inValue > 9)
	{
		return "" + inValue;
	}
	return "0" + inValue;
}
function showAmPm()
{
	if (showMilitaryTime())
	{
		return ("");
	}
	if (now.getHours() < 12)
	{
		return (" AM");
	}
	return (" PM");
}

function showDate(obj,locale)
{	
/*
	if(locale=="en")
    	return month[obj.getMonth()]+"."+obj.getDate()+","+(""+obj.getYear()).substr(2,2)+" ";
    else if(locale=="tw")
    	return obj.getYear()+"¦~"+(obj.getMonth()+1)+"¤ë"+obj.getDate()+"¤é";
    else*/
    	return obj.getYear()+"Äê"+(obj.getMonth()+1)+"ÔÂ"+obj.getDate()+"ÈÕ";

	// return month[obj.getMonth()]+" "+obj.getDate()+", "+(""+obj.getYear())+" ";
}

function showTheTime()
{
	now = new Date
	showTime.innerHTML = showTheHours(now.getHours()) + ":" + showZeroFilled(now.getMinutes()) + ":" + showZeroFilled(now.getSeconds()) + showAmPm()
	setTimeout("showTheTime()",2000)
}
function showTheDateTime()
{
	now = new Date
	showTime.innerHTML = showDate(now) + "&nbsp;&nbsp;" + showTheHours(now.getHours()) + ":" + showZeroFilled(now.getMinutes()) + ":" + showZeroFilled(now.getSeconds()) + showAmPm()
	setTimeout("showTheDateTime()",2000)
}
document.onload=showTheDateTime();