var vn="Microsoft Internet Explorer";
var some;
if(navigator.appName!=vn)
some=1900;
else
some=0;
function montharr(m0, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11){
this[0] = m0;
this[1] = m1;
this[2] = m2;
this[3] = m3;
this[4] = m4;
this[5] = m5;
this[6] = m6;
this[7] = m7;
this[8] = m8;
this[9] = m9;
this[10] = m10;
this[11] = m11;
}
function calendar(){
var monthNames = "JanFebMarAprMayJunJulAugSepOctNovDec";
var today = new Date();
var thisDay;
var monthDays = new montharr(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
year = today.getYear();
thisDay = today.getDate();
if (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0)) monthDays[1] = 29;
nDays = monthDays[today.getMonth()];
firstDay = today;
firstDay.setDate(1); // works fine for most systems
testMe = firstDay.getDate();
if (testMe == 2) firstDay.setDate(0);
startDay = firstDay.getDay();
document.write('<table border="0" cellspacing="0" cellpadding="0" align="CENTER" bgcolor="#EEEEEE"><TR><TD><table width="140px" height="120px" border="0" cellspacing="1" cellpadding="0" bgcolor="Silver">');
document.write('<TR><TH colspan="7" bgcolor="#666666">');
var dayNames=new Array("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat")
var monthNames = new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
var now = new Date();
document.write("<font style=font-size:9pt;font-family:Arial;color:#FFFFFF>" , " " , now.getYear() + some , " " , monthNames[now.getMonth()] , " ( " , dayNames[now.getDay()] , " ) " , "</FONT>");
document.writeln('</TH></TR><TR>');
document.writeln('<TH bgcolor="#FFFFFF"><a title="星期日" href="javascript:location.reload();"><font style="font-size:8pt;font-family:Arial;color:#990000">S</FONT></a></TH>');
document.writeln('<TH bgcolor="#FFFFFF"><a title="星期一" href="javascript:location.reload();"><font style="font-size:8pt;font-family:Arial;color:#666666">M</FONT></a></TH>');
document.writeln('<TH bgcolor="#FFFFFF"><a title="星期二" href="javascript:location.reload();"><font style="font-size:8pt;font-family:Arial;color:#666666">T</FONT></a></TH>');
document.writeln('<TH bgcolor="#FFFFFF"><a title="星期三" href="javascript:location.reload();"><font style="font-size:8pt;font-family:Arial;color:#666666">W</FONT></a></TH>');
document.writeln('<TH bgcolor="#FFFFFF"><a title="星期四" href="javascript:location.reload();"><font style="font-size:8pt;font-family:Arial;color:#666666">T</FONT></a></TH>');
document.writeln('<TH bgcolor="#FFFFFF"><a title="星期五" href="javascript:location.reload();"><font style="font-size:8pt;font-family:Arial;color:#666666">F</FONT></a></TH>');
document.writeln('<TH bgcolor="#FFFFFF"><a title="星期六" href="javascript:location.reload();"><font style="font-size:8pt;font-family:Arial;color:#900000">S</FONT></a></TH>');
document.writeln("</TR><TR>");
column = 0;
for (i=0; i<startDay; i++)
{
document.writeln("\n<TD><FONT style=font-size:9pt;font-family:Arial> </FONT></TD>");
column++;
}
for (i=1; i<=nDays; i++)
{
if (i == thisDay)
{
document.writeln('</TD><TD align="CENTER" bgcolor="#DDDDDD"><a title="今天" href="web_new1.htm"><FONT style=font-size:9pt;font-family:Arial;color:blue><b>');
}
else
{
document.writeln('</TD><TD bgcolor="#FFFFFF" align="CENTER"><FONT style=font-size:9pt;font-family:Arial;color:#666666>');
}
document.writeln(i);
if (i == thisDay) document.writeln("</b></a></FONT></TD>")
column++;
if (column == 7)
{
document.writeln("<TR>"); 
column = 0;
}
}
// <TR><td colspan="7" align="CENTER" valign="TOP"></TD></TR>
document.writeln('</TABLE></TD></TR></TABLE></FORM>');
}
var timerID = null;
var timerRunning = false;
function stopclock()
{
if(timerRunning)
clearTimeout(timerID);
timerRunning = false;
}
function startclock()
{
stopclock();
}
