function day_title(day_name) {
document.write("<TD class=caldate ALIGN=center WIDTH=35>"+day_name+"</TD>");
}
function hilite_today(day,mm) {
if  ((this_day == day) && (this_month == mm)) {
document.write("<FONT COLOR=\"#000000\"><b>");
}
else if ((mm==6) && (day==28)) {
document.write("<FONT COLOR=\"#FF6600\"><b>");
}
}
function makeArray(n) {
this.length=n;
for (var i = 1; i <= n; i++)
this[i] = 0
return this
}
function fill_table(m_name,m_length,mm) {
day=1
document.write("<center><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=1><TR>")
document.write("<TD COLSPAN=7 ALIGN=center><B>"+m_name+"   "+this_year+"</B><TR>")
day_title("Su")
day_title("Mo")
day_title("Tu")
day_title("We")
day_title("Th")
day_title("Fr")
day_title("Sa")

document.write("</TR><TR>")

for (var i=1;i<start_day;i++) {
document.write("<TD>")
}
for (var i=start_day;i<8;i++) {
document.write("<TD class=calstyle ALIGN=center>");
hilite_today(day,mm)
document.write(day+"</TD><FONT COLOR='#000000'>")
day++
}
document.write("<TR>")
while (day <= m_length) {
for (var i=1;i<=7 && day<=m_length;i++) {
document.write("<TD class=calstyle ALIGN=center>")
hilite_today(day,mm)
document.write(day+"</TD><FONT COLOR='#000000'>")
day++
}
document.write("</TR><TR>")
}
document.write("</TR></TABLE></center><BR>")
start_day = i
}