<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
//  SET ARRAYS
var day_of_week = new Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat');
var month_of_year = new Array('January','February','March','April','May','June','July','August','September','October','November','December');

//  DECLARE AND INITIALIZE VARIABLES
var Calendar = new Date();

var year = Calendar.getFullYear();	    // Returns year
var month = Calendar.getMonth();    // Returns month (0-11)
var today = Calendar.getDate();    // Returns day (1-31)
var weekday = Calendar.getDay();    // Returns day (1-31)

var DAYS_OF_WEEK = 7;    // "constant" for number of days in a week
var DAYS_OF_MONTH = 31;    // "constant" for number of days in a month
var cal;    // Used for printing

Calendar.setDate(1);    // Start the calendar day at '1'
Calendar.setMonth(month);    // Start the calendar month at now


/* VARIABLES FOR FORMATTING
NOTE: You can format the 'BORDER', 'BGCOLOR', 'CELLPADDING', 'BORDERCOLOR'
      tags to customize your calendar's look. */

var TR_start = '<TR>';
var TR_end = '</TR>';
var highlight_start = '<TD WIDTH=30><TABLE CELLSPACING=0 BORDER=1 BGCOLOR=DDDDDD BORDERCOLOR=808080><TR><TD WIDTH=20 CLASS="copy"><B><CENTER>';
var highlight_end   = '</CENTER></B></TD></TR></TABLE></TD>';
var TD_start = '<TD WIDTH=30 CLASS="copy"><CENTER>';
var TD_end = '</CENTER></TD>';

/* BEGIN CODE FOR CALENDAR
NOTE: You can format the 'BORDER', 'BGCOLOR', 'CELLPADDING', 'BORDERCOLOR'
tags to customize your calendar's look.*/

cal =  '<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=185>';
cal += '<TR><TD WIDTH="185" BGCOLOR="#000000" HEIGHT="1" COLSPAN="11"><IMG SRC="images/clear.gif" HEIGHT="1" BORDER="0"></TD></TR>'
cal += '<TR><TD WIDTH="1" BGCOLOR="#000000"><IMG SRC="images/clear.gif" WIDTH="1" BORDER="0"></TD><TD WIDTH="193" BGCOLOR="#DDDDDD" HEIGHT="3" COLSPAN="9"><IMG SRC="images/clear.gif" HEIGHT="3" BORDER="0"></TD><TD WIDTH="1" BGCOLOR="#000000"><IMG SRC="images/clear.gif" WIDTH="1" BORDER="0"></TD></TR>'
cal += '<TR><TD WIDTH="1" BGCOLOR="#000000"><IMG SRC="images/clear.gif" WIDTH="1" BORDER="0"></TD><TD WIDTH="193" COLSPAN=9 BGCOLOR=DDDDDD CLASS="title"><IMG SRC="images/clear.gif" WIDTH="5" BORDER="0">' + month_of_year[month]  + '   ' + year + '</TD><TD BGCOLOR="#000000" WIDTH="1"><IMG SRC="images/clear.gif" WIDTH="1" BORDER="0"></TD></TR>';
cal += '<TR><TD BGCOLOR="#000000" WIDTH="1"><IMG SRC="images/clear.gif" WIDTH="1" BORDER="0"></TD><TD WIDTH="193" BGCOLOR="#DDDDDD" HEIGHT="3" COLSPAN="9"><IMG SRC="images/clear.gif" HEIGHT="3" BORDER="0"></TD><TD BGCOLOR="#000000" WIDTH="1"><IMG SRC="images/clear.gif" WIDTH="1" BORDER="0"></TD></TR>'
cal += '<TR><TD WIDTH="185" BGCOLOR="#000000" HEIGHT="1" COLSPAN="11"><IMG SRC="images/clear.gif" HEIGHT="1" BORDER="0"></TD></TR>'
cal += '<TR><TD BGCOLOR="#000000" WIDTH="1"><IMG SRC="images/clear.gif" WIDTH="1" BORDER="0"></TD><TD WIDTH="193" HEIGHT="3" COLSPAN="9"><IMG SRC="images/clear.gif" HEIGHT="3" BORDER="0"></TD><TD BGCOLOR="#000000" WIDTH="1"><IMG SRC="images/clear.gif" WIDTH="1" BORDER="0"></TD></TR>';
cal += '<TR><TD BGCOLOR="#000000" WIDTH="1"><IMG SRC="images/clear.gif" WIDTH="1" BORDER="0"></TD><TD WIDTH="5"><IMG SRC="images/clear.gif" WIDTH="5" BORDER="0"></TD>';

//   DO NOT EDIT BELOW THIS POINT  //

// LOOPS FOR EACH DAY OF WEEK
for(index=0; index < DAYS_OF_WEEK; index++)
{
    cal += '<TD WIDTH="25" CLASS="copy">' + day_of_week[index] + '</TD>';
}

cal += '<TD WIDTH="5"><IMG SRC="images/clear.gif" WIDTH="5" BORDER="0"></TD><TD BGCOLOR="#000000" WIDTH="1"><IMG SRC="images/clear.gif" WIDTH="1" BORDER="0"></TD></TR><TR><TD BGCOLOR="#000000" WIDTH="1"><IMG SRC="images/clear.gif" WIDTH="1" BORDER="0"></TD><TD WIDTH="5"><IMG SRC="images/clear.gif" WIDTH="5" BORDER="0"></TD>';

// FILL IN BLANK GAPS UNTIL TODAY'S DAY
for(index=0; index < Calendar.getDay(); index++)
{
    cal += '<TD WIDTH="25">' + '  ' + '</TD>';
}

// LOOPS FOR EACH DAY IN CALENDAR
for(index=0; index < DAYS_OF_MONTH; index++)
{
    if(Calendar.getDate() > index)
    {
      // RETURNS THE NEXT DAY TO PRINT
        week_day = Calendar.getDay();

      // START NEW ROW FOR FIRST DAY OF WEEK
        if((week_day == 0) && (index > 0))
        {
            cal += '<TR><TD BGCOLOR="#000000" WIDTH="1"><IMG SRC="images/clear.gif" WIDTH="1" BORDER="0"></TD><TD WIDTH="5"><IMG SRC="images/clear.gif" WIDTH="5" BORDER="0"></TD>';
        }

        // SET VARIABLE INSIDE LOOP FOR INCREMENTING PURPOSES
        var day  = Calendar.getDate();

        if(today == Calendar.getDate())
        {
            cal += highlight_start + day + highlight_end;
        }
        else
        {
            cal += '<TD WIDTH="25" ALIGN=CENTER CLASS="copy">' + day + '</TD>';
        }

        // END ROW FOR LAST DAY OF WEEK
        if((week_day == (DAYS_OF_WEEK - 1)) && (day < (DAYS_OF_MONTH - 1)))
        {
            cal += '<TD WIDTH="5"><IMG SRC="images/clear.gif" WIDTH="5" BORDER="0"></TD><TD BGCOLOR="#000000" WIDTH="1"><IMG SRC="images/clear.gif" WIDTH="1" BORDER="0"></TD></TR>';
        }
    }

    // INCREMENTS UNTIL END OF THE MONTH
    Calendar.setDate(Calendar.getDate()+1);
}// end for loop

// FILL IN BLANK GAPS UNTIL LAST COLUMN
for(index=week_day; index < 7; index++){
    if(index == (DAYS_OF_WEEK - 1))
    {
        cal += '<TD WIDTH="5"><IMG SRC="images/clear.gif" WIDTH="5" BORDER="0"></TD><TD BGCOLOR="#000000" WIDTH="1"><IMG SRC="images/clear.gif" WIDTH="1" BORDER="0"></TD></TR>';
    }
    else
    {
        cal += '<TD WIDTH="25">' + '  ' + '</TD>';
    }
}

cal += '<TR><TD BGCOLOR="#000000" WIDTH="1"><IMG SRC="images/clear.gif" WIDTH="1" BORDER="0"></TD><TD WIDTH="193" HEIGHT="3" COLSPAN="9"><IMG SRC="images/clear.gif" HEIGHT="3" BORDER="0"></TD><TD BGCOLOR="#000000" WIDTH="1"><IMG SRC="images/clear.gif" WIDTH="1" BORDER="0"></TD></TR>';
cal += '<TR><TD WIDTH="185" BGCOLOR="#000000" HEIGHT="1" COLSPAN="11"><IMG SRC="images/clear.gif" HEIGHT="1" BORDER="0"></TD></TR>';
cal += '</TD></TR></TABLE>';

//  PRINT CALENDAR
document.write(cal);

//  End -->

