<!-- Begin

// Calendar v2.0 by madmatt (http://www.madmatt.net)
// Please submit bugs/problems to matt@madmatt.net
// Information can be found at: http://innovations.madmatt.net/hosting/ntfs/tutorials/activedesktop.php
// Copyright 2002, madmatt innovations (http://innovations.madmatt.net)

// DAY/MONTH ARRAYS, you are able to edit these arrays depending on how you want the day/month to display. 
// i.e. var day_of_week = new Array('SU','MO','TU','WE','TH','FR','SA');
// i.e. var month_of_year = new Array('Jan','Feb','Mar','Apr','May','June','July','Aug','Sept','Oct','Nov','Dec');
var day_of_week = new Array('S','M','T','W','T','F','S');
var month_of_year = new Array('January','February','March','April','May','June','July','August','September','October','November','December');

// COLOR VARIABLES
var color_border 	= '#FFFFFF';	// color of the border
var color_headbg	= '#999999';	// color of the header (where month, year appears)
var color_headft	= '#000000';	// color of the header font
var color_tblbg	= '#FFFFFF';	// color of the background for the rest of the calendar
var color_tblft	= '#000000';	// color of the font for the rest of the calendar
var color_curday	= '#CC0000';	// color of the current day

// DO NOT EDIT BELOW UNLESS YOU KNOW WHAT YOU ARE DOING
var Calendar = new Date();

var year = Calendar.getYear();
var month = Calendar.getMonth();
var today = Calendar.getDate();
var weekday = Calendar.getDay();

var DAYS_OF_WEEK = 7;
var DAYS_OF_MONTH = 31;
var cal;

Calendar.setDate(1);
Calendar.setMonth(month);

var TR_start = '<tr>';
var TR_end = '</tr>';
var highlight_start = '<td width="17" align="right" valign="top"><font color="' + color_curday + '"><b>';
var highlight_end   = '</b></font></td>';
var TD_start = '<td width="17" align="right" valign="top"><font color="' + color_tblft + '">';
var TD_end = '</font></td>';

cal =  '<table width="200" border="1" cellspacing="0" cellpadding="3" bordercolor="' + color_border + '">';
cal += '<td bgcolor="' + color_headbg + '" colspan="' + DAYS_OF_WEEK + '"><div align="right"><font color="' + color_headft + '">';
cal += month_of_year[month]  + ',   ' + year + TD_end + TR_end;
cal += '</font></div></table>';
cal += '<table width="200" border="1" cellspacing="0" cellpadding="3" bordercolor="' + color_border + '">' + TR_start;
cal += TR_start;

// LOOPS FOR EACH DAY OF WEEK
for(index=0; index < DAYS_OF_WEEK; index++)
{

// PRINTS DAY
cal += TD_start + day_of_week[index] + TD_end;
}

cal += TD_end + TR_end;
cal += TR_start;

// FILL IN BLANK GAPS UNTIL TODAY'S DAY
for(index=0; index < Calendar.getDay(); index++)
cal += TD_start + '  ' + TD_end;

// 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)
  cal += TR_start;

  if(week_day != DAYS_OF_WEEK)
  {

  // SET VARIABLE INSIDE LOOP FOR INCREMENTING PURPOSES
  var day  = Calendar.getDate();

  // HIGHLIGHT TODAY'S DATE
  if( today==Calendar.getDate() )
  cal += highlight_start + day + highlight_end + TD_end;

  // PRINTS DAY
  else
  cal += TD_start + day + TD_end;
  }

  // END ROW FOR LAST DAY OF WEEK
  if(week_day == DAYS_OF_WEEK)
  cal += TR_end;
  }

  // INCREMENTS UNTIL END OF THE MONTH
  Calendar.setDate(Calendar.getDate()+1);

}

cal += '</td></tr></table>';

//  PRINT CALENDAR
document.write(cal);

//  End -->