function getmonth(themonth0, themonth1, themonth2, themonth3, themonth4, themonth5, themonth6, themonth7, themonth8, themonth9, themonth10, themonth11)
{
this[0] = themonth0; this[1] = themonth1; this[2] = themonth2;
this[3] = themonth3; this[4] = themonth4; this[5] = themonth5;
this[6] = themonth6; this[7] = themonth7; this[8] = themonth8;
this[9] = themonth9; this[10] = themonth10; this[11] = themonth11;
}
function makecalendar(mox,yrx,flag)
{
var wanted = mox+'/1/'+yrx
var whatIsIt = "JanFebMarAprMayJunJulAugSepOctNovDec";
var today = new Date(); var thisDay; var mo = 0; var da = 0;
var monthDays = new getmonth(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
year=today.getFullYear(); thisDay = today.getDate();
if (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0))
monthDays[1] = 29; nDays = monthDays[today.getMonth()];
IsitNow = today; IsitNow.setDate(1); FindOut = IsitNow.getDate();
if (FindOut == 2) IsitNow.setDate(0); startDay = IsitNow.getDay();
var mo = whatIsIt.substring(today.getMonth() * 3, (today.getMonth() + 1) * 3);
var da = thisDay;
var yr = year
var whatIsIt = "JanFebMarAprMayJunJulAugSepOctNovDec";
var today = new Date(wanted); var thisDay;
var monthDays = new getmonth(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
year=today.getFullYear(); thisDay = today.getDate();
if (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0))
monthDays[1] = 29; nDays = monthDays[today.getMonth()];
IsitNow = today; IsitNow.setDate(1); FindOut = IsitNow.getDate();
if (FindOut == 2) IsitNow.setDate(0); startDay = IsitNow.getDay();
var mo1 = whatIsIt.substring(today.getMonth() * 3, (today.getMonth() + 1) * 3);
var mclr = "white";
if (flag) mclr="yellow"
document.write("<table border=0 cellpadding=1 align=center valign=top width=125 bgcolor=#B1B6BF>");
document.write("<tr><td colspan=7 align=center><font face=arial color= size=1><b>");
document.write(whatIsIt.substring(today.getMonth() * 3, (today.getMonth() + 1) * 3));
document.write(" "); document.write(year);
document.write("</b></font></td></tr><tr><td align=center><font face=arial color=#333333 size=1><b>S</b></font></td><td align=center><font face=arial color=333333 size=1><b>M</b></font></td><td align=center><font face=arial color=333333 size=1><b>T</b></font></td><td align=center><font face=arial color=333333 size=1><b>W</b></font></td><td align=center><font face=arial color=333333 size=1><b>T</b></font></td><td align=center><font face=arial color=333333 size=1><b>F</b></font></td><td align=center><font face=arial color=333333 size=1><b>S</b></font></td></tr>");
document.write("<tr>");
column = 0; for (i=0; i<startDay; i++) {
document.write("<td width=25 bgcolor=#DDDDDD>&nbsp</td>");
column++;
}
for (i=1; i<=nDays; i++) {
  if ((i==1) && (column==0) && (nDays==28)) {
    for (ii=1; ii<8; ii++) {
      document.write("<td width=25 bgcolor=#DDDDDD>&nbsp</td>");
    }
    document.write("</tr>");
  }
document.write("</td><td width=25 bgcolor=#EEEEEE align=right><b><font face=arial color=#666666 size=1>");
if ((i == da) && (mo == mo1) && (yr == year))
document.write("<font face=arial color=\"red\"><b>")
document.write(i + "&nbsp;");
if ((i == da) && (mo == mo1) && (yr == year))
document.write("</b></font>")
column++;
if (column == 7) {
document.write("</td></tr><tr>"); 
column = 0;
}
}
if (column && column < 7) {
for (ii=column; ii<7; ii++) {
document.write("<td width=25 bgcolor=#DDDDDD>&nbsp</td>");
}
}
document.write("</tr></table>");
}

