date())
end if
''上一年、下一年赋值
Previous_year=Year_var-1
Next_year=Year_var+1
''月份处理,默认值为服务器当前月份
if request.querystring("Month")<>"" then
Month_var=cint(request.querystring("Month"))
else
Month_var=month(date())
end if
''上一月、下一月赋值
if Month_var<=1 then
Next_month=Month_var+1
Previous_month=1
else
if Month_var>=12 then
Next_month=12
Previous_month=Month_var-1
else
Next_month=Month_var+1
Previous_month=Month_var-1
end if
end if
''当前天数定位计算
First_day=DateSerial(Year_var,Month_var,1)
Current_day=First_day-weekday(First_day)+2
%>
<html>
<head>
<title>Calendar</title>
<Script Language="JavaScript">
//前端日期选择函数
function pick(v) {
window.opener.document.<%=request.querystring("form")%>.<%=request.qu
erystring("field")%>.value=v;
window.close();
return false;
}
</Script>
<style>
<!--
.page { text-decoration: none; color: #CAE3FF; font-size:9pt;
font-family:Webdings }
.dayTable { border: 1px dotted #E6E6E6; padding-left: 4;
padding-right: 4; padding-top: 1; padding-bottom: 1}
.day { font-family: Arial; font-size: 9pt; text-decoration:
underline; color: #000000 }
:hover.day { font-family: Arial; font-size: 9pt; text-decoration:
none; color: #FF0000 }
.title { font-family: Arial; font-size: 9pt; color: #FFFFFF;
font-weight: bold }
:hover.page { text-decoration: underline; color: #FFFFFF;
font-family:Webdings; font-size:9pt }
-->
</style>
</head>
<body topmargin="0" leftmargin="0" onLoad="window.focus();">
<div align="center">
<center>
<table border="0" cellspacing="0" style="border-collapse: collapse"
width="100%" id="AutoNumber1" cellpadding="0">
<tr>
<td width="100%" bgcolor="#003063">
<%
''日历表头显示
%>
<div align="center">
<center>
<table border="0" cellspacing="0" style="border-collapse:
collapse" width="100%" id="AutoNumber3" cellpadding="2">
<tr>
<td width="20%" align="center">
<a
href="calendar.asp?year=<%=Previous_year%>&month=<%=Month_var%>&form=
<%=request.querystring("form")%>&field=<%=request.querystring("field"
)%>" title="Previous Year" class="page">7</a>
<a
href="calendar.asp?year=<%=Year_var%>&month=<%=Previous_month%>&form=
<%=request.querystring("form")%>&field=<%=request.querystring("field"
)%>" title="Previous Month" class="page">3</a></td>
<td width="60%" align="center"
class="title"><%response.write Month_Name(Month_var) & " " &
Year_var%></td>
<td width="20%" align=