 <META content="text/html; charset=gb2312" http-equiv=Content-Type>
 
 
 get=function (id){return document.getElementById(id)}
 if(document.all){
     window.XMLHttpRequest=function(){
         var get=['Microsoft.XMLHTTP','Msxml2.XMLHTTP'];
   for(var i=0;i<get.length;i++){try{return new ActiveXObject(get[i])}catch(e){}};
     };
 }
 webDate=function(fn){
  var Htime=new XMLHttpRequest();
  Htime.onreadystatechange=function(){Htime.readyState==4&&(fn(new Date(Htime.getResponseHeader('Date'))))};
  Htime.open('HEAD', '/?_='+(-new Date));
  Htime.send(null);
 }
 window.time=new Date();
 targetTime=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(
"星期日",
"星期一",
"星期二",
"星期三",
"星期四",
"星期五",
"星期六");
 time2String=function (t){
   with(t)return [getFullYear(),'年'
    ,('0'+(getMonth()+1)).slice(-2),'月'
    ,('0'+getDate()).slice(-2),'日 '
    ,(d[window.time.getDay()+1]),' '
    ,('0'+getHours()).slice(-2),':'
    ,('0'+getMinutes()).slice(-2),':'
    ,('0'+getSeconds()).slice(-2)].join('')
 }
 int2time=function (m){
  m-=(D=parseInt(m/86400000))*86400000;
  m-=(H=parseInt(m/3600000))*3600000;
  S=parseInt((m-=(M=parseInt(m/60000))*60000)/1000);
  return D+'天'+H+'小时'+M+'分'+S+'秒'
 }
 setInterval(function (){
  webDate(function (webTime){
   get('web').innerHTML=time2String(time=webTime);
  })
 },1000)

