	
<!--
	var dteNow = new Date("10/8/2002");
	var months = new Array();
	var daysInMonth = new Array();
	var daysOfWk = new Array();
		
	months[0] = "Jan";
	months[1] = "Feb";
	months[2] = "Mar";
	months[3] = "Apr";
	months[4] = "May";
	months[5] = "Jun";
	months[6] = "Jul";
	months[7] = "Aug";
	months[8] = "Sep";
	months[9] = "Oct";
	months[10] = "Nov";
	months[11] = "Dec";
	
	daysInMonth[0] = 31;
	daysInMonth[1] = 28;
	daysInMonth[2] = 31;
	daysInMonth[3] = 30;
	daysInMonth[4] = 31;
	daysInMonth[5] = 30;
	daysInMonth[6] = 31;
	daysInMonth[7] = 31;
	daysInMonth[8] = 30;
	daysInMonth[9] = 31;
	daysInMonth[10] = 30;
	daysInMonth[11] = 31;
	
	daysOfWk[0] = "Sun";
	daysOfWk[1] = "Mon";
	daysOfWk[2] = "Tue";
	daysOfWk[3] = "Wed";
	daysOfWk[4] = "Thu";
	daysOfWk[5] = "Fri";
	daysOfWk[6] = "Sat";

	//returns the days for the month and year specified
	function getDays(intMonth, intYear){
		intYear = setYear(intYear);
		
		// Test for leap year when February is selected.
		if (intMonth == 1)
			return ((0 == intYear % 4) && (0 != (intYear % 100))) ||
	              (0 == intYear % 400) ? 29 : 28;
	    else
	        return daysInMonth[intMonth];
	}
		
	function setYear(strYear){
		/*this is used to make sure that the year is in a valid
		four number format.  This function is really only neede
		to make sure that the date is set correctly in older browsers.*/
		
		if(strYear < 10){
			strYear = eval(strYear) + 2000;
		}
		else if(strYear < 1000){
			strYear = eval(strYear) + 1900;
		}
		return strYear;
	}
	
	function BuildDate(intMonth, intDay, intYear){
			return months[intMonth] + " " + intDay + ", " + setYear(intYear);
		}
		
	function CalcYear(intMonth, intDay){
		var intYear = dteNow.getYear();
		
		if(eval(intMonth) < eval(dteNow.getMonth())){
			intYear = eval(intYear + 1);
		}
	//	else if(intMonth == 11 && dteNow.getMonth() == 0){
	//		intYear = eval(intYear - 1);
	//	}
		return setYear(intYear);
	}
		
	function AddToDate(dteTemp, intAdd, strType){
		var dteNow = new Date();
		
		if(strType == "D"){	//add to the day
			dteTemp = new Date(dteTemp.getYear(), dteTemp.getMonth(), eval(dteTemp.getDate()) + eval(intAdd));
		}
		else{	//add to the month
			dteTemp = new Date(dteTemp.getYear(), eval(dteTemp.getMonth()) + eval(intAdd), dteTemp.getDate());
		}
		
		//make sure the year is adjusted accordingly for NS 3
		dteTemp = new Date(CalcYear(dteTemp.getMonth(), dteTemp.getDate()), dteTemp.getMonth(), dteTemp.getDate());
			
		return dteTemp;
	}
	
	function OpenCalendar(strFieldName, strFormName, strOtherDate){
		
		var strURL = "/includes/calendar/Calendar.asp?ODate=" + strOtherDate + "&Control=" + strFieldName + "&Form=" + strFormName + "&SID=FE80CC72925F40E38BCCAC6F8C22CB51";
		window.open(strURL, "Calendar", "toolbar=0,status=0,menubar=0,location=0,scrollbars=0,resizable=1,width=300,height=300,top=50,left=50");
	}
	
	function ParseDate(strDate, intMonth, intDay, intYear){
		var strSeparator = "";
		if (strDate.indexOf('/') != -1) strSeparator = "/"; 
		else if (strDate.indexOf('-') != -1) strSeparator = "-";

		var arrDate = splitString(strDate, strSeparator, "");
		var arrRetValue = new Array(2);
		
		if (arrDate.length == 4){
			intMonth = parseInt(arrDate[1], 10);
			intDay = parseInt(arrDate[2], 10);
			intYear = parseInt(arrDate[3], 10);
		}
		else if(arrDate.length == 3){
			intMonth = parseInt(arrDate[1], 10);
			intDay = parseInt(arrDate[2], 10);
			intYear = CalcYear(intMonth, intDay);
		}
		arrRetValue[0] = intMonth;
		arrRetValue[1] = intDay;
		arrRetValue[2] = intYear;
		
		return arrRetValue;
	}
	
	function splitString(strCheck, strSep, strReturn){
		var arryReturn = new Array();
		var arryIndex = 1;
		var strTemp = "";
		
		for (var i = 0; i < strCheck.length; i++){
			if (strCheck.charAt(i) != strSep){
				strTemp = strTemp + strCheck.charAt(i);
			}
			else {
				arryReturn[arryIndex] = strTemp;
				strTemp = "";
				arryIndex = arryIndex + 1;
			}
		}
		if (strTemp != ""){
			arryReturn[arryIndex] = strTemp;
		}
		arryReturn[0] = strReturn;
		return arryReturn;	
	}
//-->