function Year_Month_Day(){ 
    var now = new Date(); 
	var yy= now.getFullYear(); //注意：这里若用getYear()的话，在FireFox中就无法正确显示
    var mm = now.getMonth()+1;
	var dd = now.getDate();
	if (mm < 10) mm='0'+mm;
	if (dd < 10) dd='0'+dd;
    //return('<font color="#000000">' +  yy + '-' + mm + '-<b>'+  dd + '</b></font>');
    return('<font color="#000000">' + now + '</font>'); 
}

function Day_of_Today(){ 
    var day = new Array(); 
    day[0] = "Sunday"; 
    day[1] = "Monday"; 
    day[2] = "Tuesday"; 
    day[3] = "Wednesday"; 
    day[4] = "Thursday"; 
    day[5] = "Friday"; 
    day[6] = "Saturday"; 
    var now = new Date(); 
    return('<font color="#000000">'+  day[now.getDay()] + '</font>'); 
} 

function CurentTime(){ 
    var now = new Date(); 
    var hh = now.getHours(); 
    var mm = now.getMinutes(); 
    var ss = now.getTime() % 60000; 
    ss = (ss - (ss % 1000)) / 1000; 
    var clock = hh+':'; 
    if (mm < 10) clock += '0'; 
    clock += mm+':'; 
    if (ss < 10) clock += '0'; 
    clock += ss; 
    return(clock); 
} 

function refreshCalendarClock(){ 
    document.getElementById("calendarClock1").innerHTML = Year_Month_Day();
    //document.getElementById("calendarClock2").innerHTML = "&nbsp;<font color=blue>"+CurentTime()+"</font>"; 
    //document.getElementById("calendarClock3").innerHTML = "&nbsp;"+Day_of_Today();
} 

//（背景设置为透明 bgcolor="transparent"）
//document.write('<table border="0" cellpadding="0" cellspacing="0" width="300" height="23">');
//document.write('<tr><td valign="center" width="100%" height="100%">');
document.write('<font id="calendarClock1" style="font-family:宋体;font-size:10pt;"> </font>&nbsp;');
//document.write('<font id="calendarClock2" style="font-family:宋体;font-size:10pt;"> </font>&nbsp;');
//document.write('<font id="calendarClock3" style="color:#000000;font-family:Verdana;font-size:10pt;"><b> </b></font>');
//document.write('</td></tr></table>');

setInterval('refreshCalendarClock()',1000);
