// JavaScript Document

function tick(){
var xfile,intHours,intYear,intMonth,intDate,intWeek,today;

today = new Date();
intHours = today.getHours();
intYear = today.getYear();
intMonth = today.getMonth()+1;
intDate = today.getDate();

if(intHours == 0){
xfile = "Hi,午夜好!";
} else if (intHours < 12){
xfile = "Hi,上午好!";
} else if (intHours == 12){
xfile = "Hi,正午好!";
} else {
intHoursintHours = intHours - 12
xfile = "Hi,下午好!";
}
var d = new Array(
"星期日",
"星期一",
"星期二",
"星期三",
"星期四",
"星期五",
"星期六");

intWeek = d[today.getDay()];

timeString = xfile+"今天是 "+intYear+"."+intMonth+"."+intDate+" "+intWeek;
Clock.innerHTML = timeString;
}
window.onload = tick;

