ie4 = document.all ?1:0;
ns4 = document.layers ?1:0;
ns6 = document.getElementById && !document.all ?1:0;
opening_htm = "<small><nobr>";
closing_htm = "</nobr></small>";

function setClock() {
	now = new Date()
	now = new Date(now.getTime() - difference);
	var myclock = ""
	if (now.getDay() == 0) week = "日"
	if (now.getDay() == 1) week = "一"
	if (now.getDay() == 2) week = "二"
	if (now.getDay() == 3) week = "三"
	if (now.getDay() == 4) week = "四"
	if (now.getDay() == 5) week = "五"
	if (now.getDay() == 6) week = "六"
	Year = now.getFullYear() % 100
	if (Year < 10)
		Year = "0" + Year
	else
		Year = "" + Year
	CurHour = now.getHours()
	CurMinute = now.getMinutes()
	CurSecond = now.getSeconds()
	if (CurHour >= 12) {
		CurHour = CurHour - 12
		Ampm = "pm"
	} else
		Ampm = "am"
	if (CurHour == 0)
		CurHour = "12"
	CurHour = "" + CurHour
	if (CurMinute < 10)
		CurMinute = "0" + CurMinute
	else
		CurMinute = "" + CurMinute
	if (CurSecond < 10)
		CurSecond = "0" + CurSecond
	else
		CurSecond = "" + CurSecond

	if(now.getTime()>=0)
		myclock += '<NOBR>' + Year + '年' + (1+now.getMonth()) + '月' + (now.getDate()) + '日</NOBR> <NOBR>星期' + week + '</NOBR> ' + CurHour + ':' + CurMinute + ':' + CurSecond + ' ' + Ampm
	else
		myclock += 'Error'

	if (ns4) {
//		document.dclock.document.write('opening_htm + myclock + closing_htm)
//		document.dclock.document.close()
		liveclock = document.ClockPosNS.document.dclock;
		liveclock.document.write(opening_htm + myclock + closing_htm);
		liveclock.document.close();
	}
	else if (ie4) {
		dclock.innerHTML = opening_htm + myclock + closing_htm;
	}
	else if (ns6) {
		document.getElementById("dclock").innerHTML = opening_htm + myclock + closing_htm;
	}
	else {
		dclock = opening_htm + myclock + closing_htm;
	}
	setTimeout("setClock()",250)
}