function tick() {
var hours, minutes, seconds, xfile;
var intHours, intMinutes, intSeconds;
var today;
today = new Date();
intHours = today.getHours();
intMinutes = today.getMinutes();
intSeconds = today.getSeconds();
var time=today.getHours()
if (intHours == 0) {
hours = "12:";
xfile = "AM ";
} else if (intHours < 12) { 
hours = intHours+":";
xfile = "AM ";
} else if (intHours == 12) {
hours = "12:";
xfile = "PM ";
} else {
intHours = intHours - 12
hours = intHours + ":";
xfile = "PM ";
}
if (intMinutes < 10) {
minutes = "0"+intMinutes+":";
} else {
minutes = intMinutes+":";
}
if (intSeconds < 10) {
seconds = "0"+intSeconds+" ";
} else {
seconds = intSeconds+" ";
} 
timeString =xfile+hours+minutes+seconds;
Clock.innerHTML = timeString;
window.setTimeout("tick();", 100);
}
window.onload = tick;

var today;
today = new Date();
var year=today.getYear()
var month=today.getMonth()+1;
var date=today.getDate()
var time=today.getHours()
if(today.getDay()==0) day = "&nbsp;&nbsp;&nbsp;星期日&nbsp;&nbsp;&nbsp;"
if(today.getDay()==1) day = "&nbsp;&nbsp;&nbsp;星期一&nbsp;&nbsp;&nbsp;"
if(today.getDay()==2) day = "&nbsp;&nbsp;&nbsp;星期二&nbsp;&nbsp;&nbsp;"
if(today.getDay()==3) day = "&nbsp;&nbsp;&nbsp;星期三&nbsp;&nbsp;&nbsp;"
if(today.getDay()==4) day = "&nbsp;&nbsp;&nbsp;星期四&nbsp;&nbsp;&nbsp;"
if(today.getDay()==5) day = "&nbsp;&nbsp;&nbsp;星期五&nbsp;&nbsp;&nbsp;"
if(today.getDay()==6) day = "&nbsp;&nbsp;&nbsp;星期六&nbsp;&nbsp;&nbsp;"
theday=year+"年"+month+"月"+date+"日"
