<!-- Begin

var strResultsURL = 'http:\/\/65.38.171.80/cgi-bin/users/truevine/calendar.pl'; 

var strCityName = 'ALL';

var strCalendarTitle = ''; 
var intWeeksToShow = 5; //number of weeks to display

var intOutsideBorder = 1;
var intOutsideBorderColor = "#999966";
var intOutsideCellSpacing = 0;
var intOutsideCellPadding = 0;
var intInsideBorder = 0;
var intInsideBorderColor = "#cccccc";
var intInsideBorderColor = 0;
var intInsideCellSpacing = 0;
var intInsideCellPadding = 2;
var strTitleTDSetting = '';
var strDayHeadingTDSetting = 'id="evhead"';
var strDayHeadingFontSetting = 'class="ap"';
var strBlankDayTDSetting = 'class="tdwhite"';
var strRegularDayTDSetting = 'id="evday"';
var strRegularDayFontSetting = 'class="ap"';
var strTodayOutsideTDSetting = 'class="tdlightgray"';
var strTodayInsideTDSetting = 'class="tdsecond"';
var strTodayFontSetting = 'class="ap"';
var intTodayCellPadding = 0;
var intTodayBorder = 1;

//  DECLARE AND INITIALIZE CALENDAR VARIABLES
var now = new Date();
var today = now.getDate();
var month = now.getMonth();
var Calendar = now;
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');
var cal;    // Used for printing

// START CALENDAR ON TODAY
Calendar.setDate(now.getDate());

// SET START MONTH
var strStartMonth = month_of_year[Calendar.getMonth()]

//FIND AND SET END MONTH
for(index=0; index < ((intWeeksToShow*7)-now.getDay()); index++)
	Calendar.setDate(Calendar.getDate()+1);
	var strEndMonth = month_of_year[Calendar.getMonth()]

if (strStartMonth == strEndMonth)
	var strSubTitle = strStartMonth;
else
	var strSubTitle = strStartMonth + ' - ' + strEndMonth;
	
// FOUR DIGIT FUNTION Add this function to the code.....

function fourdigits(number)	{
  return (number < 1000) ? number + 1900 : number;
}	

// RESTART CALENDAR ON TODAY
now = new Date();
Calendar = now;
Calendar.setDate(now.getDate());

cal =  '<TABLE BORDER=' + intOutsideBorder + ' CELLSPACING=' + intOutsideCellSpacing + ' CELLPADDING=' + intOutsideCellPadding + ' BORDERCOLOR=' + intOutsideBorderColor + '><TR><TD>';
cal += '<TABLE BORDER=' + intInsideBorder + ' CELLSPACING=' + intInsideCellSpacing + ' CELLPADDING=' + intInsideCellPadding + ' BORDERCOLOR=' + intInsideBorderColor + '><TR>';
cal += '<TD COLSPAN="' + 7 + '" ' + strTitleTDSetting + ' VALIGN="TOP"><CENTER>';
cal += strCalendarTitle + strSubTitle  +  '</TD></TR>';
cal += '<TR>';

// LOOPS FOR EACH DAY OF WEEK
for(index=0; index < 7; index++) {
	// BOLD TODAY'S DAY OF WEEK
	if(Calendar.getDay() == index)
		cal += '<TD WIDTH="27" ' + strDayHeadingTDSetting + ' VALIGN="TOP"><CENTER>' + day_of_week[index] + '</CENTER></TD>';
	// PRINTS DAY
	else
		cal += '<TD ' + strDayHeadingTDSetting + ' VALIGN="TOP"><CENTER>' + day_of_week[index] + '</CENTER></TD>';
}
cal += '</CENTER></TR>';
cal += '<TR valign=middle>';

// FILL IN BLANK GAPS PAST DAYS
for(index=0; index < now.getDay(); index++)
	cal += '<TD WIDTH="27" ' + strBlankDayTDSetting + ' VALIGN="TOP"></CENTER></TD>';
	
var i = index; //used to count the number of days to subtract from the total days shown
	
for(index=0; index < ((intWeeksToShow*7)-i); index++) {
	if (Calendar.getDay() == 0) {
			cal += '<TR>';
	}

	// HIGHLIGHT TODAY'S DATE
	if((Calendar.getDate() == today) && (Calendar.getMonth() == month))
	cal += '<TD WIDTH="27" ' + strTodayOutsideTDSetting + '><TABLE CELLSPACING=' + intTodayCellPadding + ' BORDER=' + intTodayBorder + '><TR><TD WIDTH=20 ' + strTodayInsideTDSetting + ' VALIGN="TOP"><B><CENTER><font ' + strTodayFontSetting + '><A HREF="' + strResultsURL + '?' + 'Month=' + (Calendar.getMonth()+1) + '&Day=' + Calendar.getDate() + '&Year=' + fourdigits(Calendar.getYear()) +  '">' + Calendar.getDate() + '</a></FONT></CENTER></TD></TR></TABLE></B></CENTER></TD>';

	// PRINTS DAY
	else
	cal += '<TD WIDTH="27" ' + strRegularDayTDSetting + ' VALIGN="TOP"><CENTER><font ' + strRegularDayFontSetting + '><A HREF="' + strResultsURL + '?' + 'Month=' + (Calendar.getMonth()+1) + '&Day=' + Calendar.getDate() + '&Year=' + fourdigits(Calendar.getYear()) +'">' + Calendar.getDate() + '</a></FONT></CENTER></TD>';

	if (Calendar.getDay() == 7) {
			cal += '</TR>';
	}
	Calendar.setDate(Calendar.getDate()+1);
}

cal += '</TABLE></TD></TR></TABLE>';

document.write(cal);
//  End -->
