" & vbNewLine & _
" " & vbNewline & _
" " & vbNewline & _
" " & vbNewLine
dim iWeekDayName
for iWeekDayName = 1 to 7
Response.Write " | " & WeekDayName(iWeekDayName, True) & " | " & vbNewLine
next
Response.Write " " & vbNewLine
strReturnFuncEmpty = "returnDate(' '); "
Rem -Write spacer cells at beginning of first row if month doesn't start on a Sunday.
if iDOW <> 1 then
iPosition = iDOW
Response.Write " " & vbNewLine & _
"
| " & vbNewLine
end if
Rem -Write days of month in proper day slots
Dim strReturnFunc, dCell, strClass, blnOnClick
iCurrent = 1
iPosition = iDOW
'dDate = DateValue(dDate)
do while iCurrent <= iDIM
Rem -If we're at the begginning of a row then write tr
Rem -If we're at the endof a row then write /tr
if iPosition > 7 then
Response.Write " " & vbNewLine
iPosition = 1
end if
if iPosition = 1 then
Response.Write " " & vbNewLine
end if
dCell = DateSerial(Year(dDate), Month(dDate), iCurrent)
Rem -Get the current date in string Format (YYYYMMDD)
strReturnFunc = "returnDate('" & Year(dDate) & doublenum(Month(dDate)) & doublenum(iCurrent) & "');"
Rem -if Cell contains todays Date then highlight
if dCell = dDate then 'and dDate < strForumTimeAdjust then
strClass = ""
blnOnClick = true
Rem -if we are in the past then if history is 'off' the show cell disabled
elseif dCell <= strForumTimeAdjust then
if Request("History") = "on" then
strClass = ""
blnOnClick = false
else
strClass = "spnMessageText"
blnOnClick = true
end if
Rem -else must be in the future
else
strClass = ""
blnOnClick = false
end if
Call WriteDayOfMonth(strReturnFunc, strClass, iCurrent, blnOnClick)
Rem -Increment variables
iCurrent = iCurrent + 1
iPosition = iPosition + 1
loop
Rem -Write spacer cells at end of last row if month doesn't end on a Saturday.
iPosition = iPosition - 1
if iPosition < 7 then
Response.Write "
| " & vbNewLine & _
" " & vbNewLine
end if
Response.Write " " & vbNewLine & _
" " & vbNewLine & _
" | " & vbNewLine & _
"
" & vbNewLine & _
"