function getText(selectBox) {
	return selectBox.options[selectBox.selectedIndex].text;
}

function getValue(selectBox) {
	return selectBox.options[selectBox.selectedIndex].value;
}

function emptyBox(theBox) {
	if ((theBox.value == null) || (theBox.value.length == 0))
		return true;
	else
		return false;
}

function dateCheck(monthVal, dayVal, yearVal) {
	if (dayVal > 32) {
		return false;
	}
	
	if ((monthVal == 9 || monthVal == 4 || monthVal == 6 || monthVal == 11) && dayVal > 30) {
		return false;
	}
	
	if ((monthVal == 2 & leapYear(yearVal)) && dayVal > 29) {
		return false;
	}
	
	if ((monthVal == 2 & !leapYear(yearVal)) && dayVal > 28) {
		return false;
	}

	return true;	
}

function leapYear(intYear) {
	if (intYear % 100 == 0) {
		if (intYear % 400 == 0) { 
			return true; 
		}
	} else {
		if ((intYear % 4) == 0) { 
			return true; 
		}
	}
	return false;
}