//时钟
function showClock() {
}

var timerID = null
var timerRunning = false

function stopClock() {
if(timerRunning)
clearTimeout(timerID);
timerRunning = false
document.clock.face.value = "";
}


function showTime(){
date=new Date();

day=date.getDate();

year=date.getYear();
 hours = date.getHours();
 mins = date.getMinutes();
 var secs = date.getSeconds();
d=new Array("星期天","星期一","星期二","星期三","星期四","星期五","星期六");
m=new Array("1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月");
if (year < 2000) 
  {year=year+1900;}
  TodaysDate="";
  rs="";
   TodaysDate=year+"年"+""+m[date.getMonth()]+day+"日"+""+d[date.getDay()]   ;
   TodaysDate+=+hours;
    TodaysDate+=((mins < 10) ? ":0" : ":") + mins;
 TodaysDate+=((secs <= 10) ? ":0" : ":") + secs;
 TodaysDate+=((hours < 12) ? "AM" : "PM");

 // alert(document);
 document.clock.face.value =  TodaysDate;
 rs=TodaysDate;
 timerID = setTimeout("showTime()", 1000);
 timerRunning = true;
 }
 function startClock() {
stopClock();
showTime();
}

//页面弹出
function newpage(htmlurl) {
var newwin=window.open(htmlurl,"newWin","toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,top=20,left=200,width=800,height=600");
newwin.focus();
return false;
}


