<!--
function getEvent(intYear, strMonth, intDay) {
	events = new Array(100);
	var intWidth = 640;
	var intHeight = 640;
	var strURL;
	var strDisplayText;
	var strEvent = "&nbsp;";

	// June 2007 events

	strURL = "http://www.southernoaksfarm.com/SummerCampRegistration.asp?Session=1";
	strDisplayText = "Session 1";

	events["2008_5_9"] = "<a href='javascript:void(0)' class='smallLink' onClick='openRequestedSite(\"";
	events["2008_5_9"] += strURL;
	events["2008_5_9"] += "\", ";
	events["2008_5_9"] += intWidth;
	events["2008_5_9"] += ", ";
	events["2008_5_9"] += intHeight;
	events["2008_5_9"] += ")'>";
	events["2008_5_9"] += strDisplayText;
	events["2008_5_9"] += "</a>";

	events["2008_5_10"] = events["2008_5_9"];
	events["2008_5_11"] = events["2008_5_9"];
	events["2008_5_12"] = events["2008_5_9"];
	events["2008_5_13"] = events["2008_5_9"];

	strURL = "http://www.southernoaksfarm.com/SummerCampRegistration.asp?Session=2";
	strDisplayText = "Session 2";

	events["2008_5_24"] = "<a href='javascript:void(0)' class='smallLink' onClick='openRequestedSite(\"";
	events["2008_5_24"] += strURL;
	events["2008_5_24"] += "\", ";
	events["2008_5_24"] += intWidth;
	events["2008_5_24"] += ", ";
	events["2008_5_24"] += intHeight;
	events["2008_5_24"] += ")'>";
	events["2008_5_24"] += strDisplayText;
	events["2008_5_24"] += "</a>";

	events["2008_5_25"] = events["2008_5_24"];
	events["2008_5_26"] = events["2008_5_24"];
	events["2008_5_27"] = events["2008_5_24"];

	// August 2007 events

	strURL = "http://www.southernoaksfarm.com/SummerCampRegistration.asp?Session=3";
	strDisplayText = "Session 3";

	events["2008_7_11"] = "<a href='javascript:void(0)' class='smallLink' onClick='openRequestedSite(\"";
	events["2008_7_11"] += strURL;
	events["2008_7_11"] += "\", ";
	events["2008_7_11"] += intWidth;
	events["2008_7_11"] += ", ";
	events["2008_7_11"] += intHeight;
	events["2008_7_11"] += ")'>";
	events["2008_7_11"] += strDisplayText;
	events["2008_7_11"] += "</a>";

	events["2008_7_12"] = events["2008_7_11"];
	events["2008_7_13"] = events["2008_7_11"];
	events["2008_7_14"] = events["2008_7_11"];
	events["2008_7_15"] = events["2008_7_11"];

	strEvent = events[intYear + "_" + strMonth + "_" + intDay];
	if (strEvent == null) {
		strEvent = ""
	}

	return strEvent;
}

function buildCalendar(right_year, month_num, thedate) {

	var strTemp;

	if (right_year == "") {

		// Set varible to the current date
		var right_now = new Date();

		// Create a varible right_year with the current year
		var right_year = right_now.getYear();

		// Set variable to current month number (0-11)
		var month_num = right_now.getMonth();

		// Set variable to the current day value (1-31)
		var thedate = right_now.getDate();

	}

	// Create an array for the month name
	var month_name = new Array (
	"January",
	"February",
	"March",
	"April",
	"May",
	"June",
	"July",
	"August",
	"September",
	"October",
	"November",
	"December"
	);

	if (right_year < 2000)    
		right_year = right_year + 1900; 

	// create a varible to specify what the
	// last day for the current month is
	var theday = 0;

	if (
		month_num == 0 || 
		month_num == 2 || 
		month_num == 4 || 
		month_num == 6 || 
		month_num == 7 || 
		month_num == 9 || 
		month_num == 11
	) {
		endofmonth = 31;
	}

	if (
		month_num == 3 || 
		month_num == 5 || 
		month_num == 8 || 
		month_num == 10
	) {
		endofmonth = 30;
	}

	if (month_num == 1) {
		// This will check for a leap year
		// If the year is evenly divisible by four
		// or in the case of a new century evenly divisible
		// by 400 then the end of the February month should be the 29th
	
		right_year_divided = right_year/4;
		right_year_divided_string = new String(right_year_divided);
		var is_decimal = right_year_divided_string.indexOf('.');
	
		if (is_decimal != -1) {
			endofmonth = 28;
		} else {
			endofmonth = 29;
		}

		right_year_string = new String(right_year);
		var the_century = new String(right_year_string.charAt(2))  
		the_century = the_century + new String(right_year_string.charAt(3));

		if (the_century == "00") {
			right_year_divided=right_year/400;
			right_year_divided_string= new String(right_year_divided);
			var is_decimal = right_year_divided_string.indexOf('.');

			if (is_decimal != -1) {
				endofmonth = 28;
			} else {
				endofmonth = 29;
			}
		}
	}

	// Create anchor
	document.write("<a name='" + month_name[month_num] + "_" + right_year + "'></a>");

	// Building the table
	document.write("<table cellpadding='0' cellspacing='1' border='0' bgcolor='#000099' width='100%'");
	document.write("<tr><td>");
	document.write("<table cellpadding='5' cellspacing='1' border='0' width='100%'");

	// Place a caption with the month name and year
	document.write("<tr><td align='center' bgcolor='#000099' class='reverseHeading2' colspan='7'>");

	document.write(month_name[month_num]);
	document.write(" ");
	document.write(right_year);
	document.write("</td></tr>");

	// Write the table header row
	document.write("<tr bgcolor='#CCCCCC'><th width='14%'>Sun</th><th width='14%'>Mon</th><th width='14%'>Tue</th><th width='14%'>Wed</th>");
	document.write("<th width='14%'>Thu</th><th width='14%'>Fri</th><th width='14%'>Sat</th></tr><tr>");

	// Figure out which day of the week the 1st of the 
	// current month belongs to
	first_day = new Date(right_year, month_num, 1);

	// Write the first row in the calendar with dates
	// Check which date of the month is the first to
	// fill it into the appropriate day of the week
	for (counter = 0; counter < 7; counter++) {

		// Check the counter aganst the first day of the month value (0 - 6)

		if (counter >= first_day.getDay()) {

			// Start counter for the calendar days
			theday = theday + 1;

			document.write("<td bgcolor='#FFFFFF' class='boldBodyText' valign='top'>" + theday + "<br>");
			document.write("<span class='bodytext'>");
			strTemp = getEvent(right_year, month_num, theday);
			if (strTemp == "undefined" || strTemp == "") {
				strTemp = "&nbsp;";
			}
			document.write(strTemp);
			document.write("</span>");
			document.write("</td>");

		} else {
			// If there is no day yet, output an empty cell
			document.write("<td bgcolor='#EEEEEE'>&nbsp;</td>");
		}
	}

	// End row for the first week of the month
	document.write("</tr>"); 

	// Loop for the rest of the weeks in the month  
	for (weeks = 0; weeks < 5; weeks++) {
		document.write("<tr>"); 
		// loop for the days with the remaining weeks
		for (week = 0; week < 7; week++) {
			// counter for the day of the month
			theday = theday + 1;

			// If the counter is higher then than the number of days
			// in the month, then display a blank cell
			if (theday > endofmonth) {
				document.write("<td bgcolor='#EEEEEE'>&nbsp;</td>");
			} else {
				// If it's not the current day, display the date with bold type
				document.write("<td bgcolor='#FFFFFF' class='boldBodyText' valign='top'>" + theday + "<br>");
				document.write("<span class='bodytext'>");
				strTemp = getEvent(right_year, month_num, theday);
				if (strTemp == "undefined" || strTemp == "") {
					strTemp = "&nbsp;";
				}
				document.write(strTemp);
				document.write("</span>");
				document.write("</td>");
			}
		}
		document.write("</tr>");
	}
	document.write("</table>");
	document.write("</td></tr></table><br>");
}
//-->