var arrayMonth = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December") 
var arrayDay = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")
var isBrowserNew = document.getElementById ? true: false;
var htmlTagsPre = "";
var htmlTagsPost = "";
if(isBrowserNew) document.write('<span id="clock"></span>');
function funcDateTime()
	{
	var nowDateTime = new Date();
	var iMonth = nowDateTime.getMonth();
	var iDayOfWeek = nowDateTime.getDay();
	var iDay = nowDateTime.getDate();
	var iYear = nowDateTime.getFullYear();
	var iHour = nowDateTime.getHours();
	var iMinute = nowDateTime.getMinutes();
	var iSecond = nowDateTime.getSeconds();
	var sSuffix = "AM";
	if (iHour >= 12)
		{
		sSuffix = "PM";
		iHour = iHour - 12;
		}
	if (iHour == 0) iHour = 12;
	if (iMinute <= 9) iMinute = "0" + iMinute;
	if (iSecond <= 9) iSecond = "0" + iSecond;
	movingtime = arrayDay[iDayOfWeek] + ", " + arrayMonth[iMonth] + " " + iDay + ", " + iYear + ", " + iHour + ":" + iMinute + ":" + iSecond + " " + sSuffix;
	movingtime_HTML =  htmlTagsPre +  movingtime + htmlTagsPost;
	if(isBrowserNew)
		{
		document.getElementById("clock").innerHTML = movingtime_HTML;
		}
	}
setInterval("funcDateTime()",0);
