document.writeln("<span id=\"clock\" style=\"margin:0 25px;color:#369;\"><\/span>");

function tickTime() {
	var hours, minutes, seconds, hello, wel;
	var intHours, intMinutes, intSeconds;
	var today, theday;
	today = new Date();
	function initArray(){
		this.length=initArray.arguments.length
		for(var i=0;i<this.length;i++)
		this[i+1]=initArray.arguments[i];
	}
	var d=new initArray("星期日","星期一","星期二","星期三","星期四","星期五","星期六");
	theday = [today.getMonth()+1]+"月"+today.getDate()+"日 "+d[today.getDay()+1];
	intHours = today.getHours();
	intMinutes = today.getMinutes();
	intSeconds = today.getSeconds();
	if (intHours < 10) {
		hours= "0"+intHours+":";
	} else {
		hours= intHours+":";
	}
	if (intMinutes < 10) {
		minutes = "0"+intMinutes+":";
	} else {
		minutes = intMinutes+":";
	}
	if (intSeconds < 10) {
		seconds = "0"+intSeconds+" ";
	} else {
		seconds = intSeconds+" ";
	}
	if(intHours< 4)hello='您好啊，夜猫子';else if(intHours< 6)hello='凌晨好';else if(intHours< 9)hello='真早啊，早上好';else if(intHours< 12)hello='Hi!~ 上午好';else if(intHours< 14)hello='中午好哦';else if(intHours< 17)hello='嘿嘿，下午好';else if(intHours< 19)hello='老兄，傍晚好';else if(intHours< 22)hello='晚上好，还在忙啊';else if(intHours< 23)hello='夜晚好哦~';else {hello='朋友，该休息了!';}
	if(intHours<1)wel='子时';else if(intHours<3)wel='丑时';else if(intHours<5)wel='寅时';else if(intHours<7)wel='卯时';else if(intHours<9)wel='辰时';else if(intHours<11)wel='巳时';else if(intHours<13)wel='午时';else if(intHours<15)wel='未时';else if(intHours<17)wel='申时';else if(intHours<19)wel='酉时';else if(intHours<21)wel='戌时';else if(intHours<23)wel='亥时';else {wel='子时';}
	timeString = "" + hello + " " + theday + " " +  hours+minutes+seconds  + "（" + wel + "）";
	$("clock").innerHTML = timeString;
	window.setTimeout("tickTime();", 1000);
}

tickTime();
