<!--				
function BeginLTEend(BeginMonth,BeginDay,BeginYear,EndMonth,EndDay,EndYear)
{
	var msg = "";
	if (BeginYear < EndYear)
	{	return "";	}
	else if (BeginYear == EndYear)
	{
		if (BeginMonth < EndMonth)
		{	return "";	}
		else if (BeginMonth == EndMonth)
		{
			if (BeginDay <= EndDay)
				return "";
			else
				return "The beginning date cannot occur after the ending date.\n"
		}
		else
			return "The beginning date cannot occur after the ending date.\n"
	}
	else
		return "The beginning date cannot occur after the ending date.\n"
}

function DayOfMonthOK(Month,Day,Year, BeginOrEnd)
{
	if (Month == "04" || Month == "06" || Month == "09" || Month == "11")
	{
		if (Day == "31")
		{
			return "There is no 31st day of the " + Month + "th month  (see " + BeginOrEnd + " date).\n"
		}
		else
			return ""
	}
	else if (Month == "02")
	{
		if (Day == "30")
		{
			return "There is no 30th day of the 2nd month  (see " + BeginOrEnd + " date).\n"
		}
		else if (Day == "31")
		{
			return "There is no 31st day of the 2nd month  (see " + BeginOrEnd + " date).\n"
		}
		else if (Day == "29")
		{
			if ( ((Year % 4 == 0) && (Year % 100 != 0)) || (Year % 1000 == 0) )
				return ""
			else
				return "There is no 29th of February in " + Year + ".\n"
		}
		else
			return "";
	}
	else
		return "";
}

function IsDateInFuture(Month, Year, thisMonth, thisYear)
{
	var today = new Date(thisYear, thisMonth, 1, 0, 0, 0);
	var userDate = new Date(Year, Month, 1, 0, 0, 0);
	var todaySecs = 0;
	var userDateSecs = 0;
	todaySecs = today.getTime();
	userDateSecs = userDate.getTime();
	//alert("user month is " + Month + " user year is " + Year + " user secs is " + userDateSecs);
	//alert("month is " + thisMonth + " year is " + thisYear + " todaySecs is " + todaySecs);
	if (userDateSecs > todaySecs)
	{
		//alert("userDateSecs > todaySecs");
		return "You may not choose a date that is in the future.";
	}
	else
		return "";
}
	
function CheckDates(EndMonth,EndDay,EndYear,TodayMonth,TodayYear)
{
	//alert(BeginMonth + "; " + BeginDay + "; " + BeginYear + "; " + EndMonth + "; " + EndDay + "; " + EndYear);
	var msg = "";
	//msg = BeginLTEend(BeginMonth,BeginDay,BeginYear,EndMonth,EndDay,EndYear);
	//msg = msg + DayOfMonthOK(BeginMonth,BeginDay,BeginYear, "beginning")
	//msg = DayOfMonthOK(EndMonth,EndDay,EndYear,"ending");
	msg = msg + IsDateInFuture(EndMonth,EndYear,TodayMonth,TodayYear);
	//alert (TodayMonth);
	//alert (TodayYear);
	//alert ("*" + msg + "*");
	if (msg == "")
		return true
	else
	{
		alert ("Please check the dates you tried to enter.\n" + msg);
		return false;
	}
}
//-->
