<SCRIPT LANGUAGE="JavaScript">
<!--
/* This JavaScript was composed by Kristin J. Johnson.
*The Wererat's Lair: https://wererat.net */
// Array of month names
monthnames = new
Array("January","February","March","April","May","June","July","August","September","October","November","December");
function cal(month, day) {
var entry = new Array(3);
entry[0] = month;
entry[1] = day;
}
Array.calendar = cal;
mydays = new Array();
monthdays = new Array(12);
monthdays[0]=31;
monthdays[1]=28;
monthdays[2]=31;
monthdays[3]=30;
monthdays[4]=31;
monthdays[5]=30;
monthdays[6]=31;
monthdays[7]=31;
monthdays[8]=30;
monthdays[9]=31;
monthdays[10]=30;
monthdays[11]=31;
todayDate=new Date();
thisday=todayDate.getDay();
thismonth=todayDate.getMonth();
thisdate=todayDate.getDate();
thisyear=todayDate.getFullYear();
if (((thisyear % 4 == 0)
&& !(thisyear % 100 == 0))
||(thisyear % 400 == 0)) monthdays[1]++;
spaces=thisdate;
while (spaces > 7) spaces-=7;
spaces = thisday - spaces + 1;
if (spaces < 0) spaces+=7;
document.write("<TABLE BORDER=2 BGCOLOR='#FFFFFF' BORDERCOLOR='#000000'> ");
document.write("<TR><TD COLSPAN=7><CENTER><B>"
+ monthnames[thismonth] + " " + thisyear
+ "</B></CENTER></TD></TR>");
document.write("<TR>");
document.write("<TD ALIGN=center>Su</TD>");
document.write("<TD ALIGN=center>M</TD>");
document.write("<TD ALIGN=center>Tu</TD>");
document.write("<TD ALIGN=center>W</TD>");
document.write("<TD ALIGN=center>Th</TD>");
document.write("<TD ALIGN=center>F</TD>");
document.write("<TD ALIGN=center>Sa</TD>");
document.write("</TR>");
document.write("<TR>");
for (s=0;s<spaces;s++) {
document.write("<TD> </TD>");
}
count=1;
while (count <= monthdays[thismonth]) {
for (b = spaces;b<7;b++) {
document.write("<TD ALIGN=right>");
for (c=0;c<mydays.length;c++) {
if (mydays[c] != null) {
}
}
if (count==thisdate) {
document.write("<FONT COLOR='#FF0000'><B>");
}
if (count <= monthdays[thismonth]) {
document.write(count);
}
else {
document.write(" ");
}
if (count==thisdate) {
document.write("</B></FONT>");
}
document.write("</TD>");
count++;
}
document.write("</TR>");
spaces=0;
}
document.write("</TABLE>");
//-->
</SCRIPT>
|