today=new Date();
var hours = today.getHours();
var minutes = today.getMinutes();
var seconds = today.getSeconds();
var timeValue = "<FONT COLOR=#333333>" + ((hours >12) ? hours -12 :hours); timeValue += ((minutes < 10) ? "<BLINK><FONT COLOR=#333333>:</FONT></BLINK>0" : "<BLINK><FONT COLOR=#333333>:</FONT></BLINK>") + minutes+"</FONT></FONT>";
timeValue += (hours >= 12) ? "<FONT COLOR=#333333>PM</FONT>" : "<FONT COLOR=#333333>AM</FONT>";

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("<font color=#333333>星期日","<font color=#333333>星期一","<font color=#333333>星期二","<font color=#333333>星期三","<font color=#333333>星期四","<font color=#333333>星期五","<font color=#333333 >星期六"); 


var clockID = 0;

function UpdateClock() {
   if(clockID) {
      clearTimeout(clockID);
      clockID  = 0;
   }

   var today = new Date();
   today.getDate
   document.write(today.getHours(),"：",today.getMinutes(),"：",today.getSeconds());
   clockID = setTimeout("UpdateClock()", 1000);
}
function StartClock() {
   clockID = setTimeout("UpdateClock()", 500);
}

function KillClock() {
   if(clockID) {
      clearTimeout(clockID);
      clockID  = 0;
   }
}

document.write("<font color=#333333><font color=#333333 class=pe12>",today.getYear(),"<font color=#333333>年","<font color=#333333 class=pe12>",today.getMonth()+1,"<font color=#333333>月","<font color=#333333 class=pe12>",today.getDate(),"<font color=#333333>日 </FONT>",d[today.getDay()+1]);  