
boolDOCPHYSTHER = false;
boolMSADOCCUTHER = false;
boolMSADPHYSASST = false;
boolPHYS_LIC = false;
boolNCBOT = false;
boolNCCPA = false;

function toggleContent(elem)
{
	boolDOCPHYSTHER = false;
	boolMSADOCCUTHER = false;
	boolMSADPHYSASST = false;
	boolPHYS_LIC = false;
	boolNCBOT = false;
	boolNCCPA = false;
	
	//brings in a select box and displays/hides divs based on chosen value
	
	var elemval = elem[elem.selectedIndex].value;
	if (document.getElementById("defaultLeftContent") != null)
	{
	document.getElementById("defaultLeftContent").style.display = "none";	
	var div1 = document.getElementById("DOCHEALTHED");
	var div2 = document.getElementById("DOCPHYSTHER");
	var div3 = document.getElementById("MSGERIHEALTH");
	var div4 = document.getElementById("MSPUBLICHEALTH");
	var div5 = document.getElementById("MSADOCCUTHER");
	var div6 = document.getElementById("MSADPHYSASST");
	var div7 = document.getElementById("MSHEALTHAD");
	var div8 = document.getElementById("MSHEALTHED");
	var div9 = document.getElementById("MSHUMANMOOVEMENT");
	var div13 = document.getElementById("MASPUBHTHMPH");
	var div14 = document.getElementById("DOCHTHSCSSHS");
	}
	var div10 = document.getElementById("NCCPA");
	var div11 = document.getElementById("NCBOT");
	var div12 = document.getElementById("PHYS_LIC");	
	if (document.getElementById)
	{
		switch (elemval)
		{
		case '29,62|Master of Public Health with Dental Emphasis':
									 if (document.getElementById("defaultLeftContent") != null)
									 {
									 div1.style.display = "none";
									 div2.style.display = "none";
									 div3.style.display = "none";
									 div4.style.display = "none";
									 div5.style.display = "none";
									 div6.style.display = "none";
									 div7.style.display = "none";
									 div8.style.display = "none";
									 div9.style.display = "none";
									 div13.style.display = "block";
									 div14.style.display = "none";
									 }
									 div10.style.display = "none";
									 div11.style.display = "none";
									 div12.style.display = "none";
									 break;								 

		case '29,63|Doctor of Health Science':		 
									 if (document.getElementById("defaultLeftContent") != null)
									 {
									 div1.style.display = "none";
									 div2.style.display = "none";
									 div3.style.display = "none";
									 div4.style.display = "none";
									 div5.style.display = "none";
									 div6.style.display = "none";
									 div7.style.display = "none";
									 div8.style.display = "none";
									 div9.style.display = "none";
									 div13.style.display = "none";
									 div14.style.display = "block";
									 }
									 div10.style.display = "none";
									 div11.style.display = "none";
									 div12.style.display = "none";
									 break;								 
									 
		case '29|Doctor of Health Education':		 
									 if (document.getElementById("defaultLeftContent") != null)
									 {
									 div1.style.display = "block";
									 div2.style.display = "none";
									 div3.style.display = "none";
									 div4.style.display = "none";
									 div5.style.display = "none";
									 div6.style.display = "none";
									 div7.style.display = "none";
									 div8.style.display = "none";
									 div9.style.display = "none";
									 div13.style.display = "none";
									 div14.style.display = "none";
									 }
									 div10.style.display = "none";
									 div11.style.display = "none";
									 div12.style.display = "none";									 
									 break;								 

		case '55|Transitional Doctorate in Physical Therapy':	     
									 if (document.getElementById("defaultLeftContent") != null)
									 {
									 div1.style.display = "none";
									 div2.style.display = "block";
									 div3.style.display = "none";
									 div4.style.display = "none";
									 div5.style.display = "none";
									 div6.style.display = "none";
									 div7.style.display = "none";
									 div8.style.display = "none";
									 div9.style.display = "none";
									 div13.style.display = "none";
									 div14.style.display = "none";								 
									 }
									 boolDOCPHYSTHER = true;
									 boolPHYS_LIC = true;										 
									 div10.style.display = "none";
									 div11.style.display = "none";
									 div12.style.display = "block";
									 break;

		case '29,61|Master of Geriatric Health':	     
									 if (document.getElementById("defaultLeftContent") != null)
									 {
									 div1.style.display = "none";
									 div2.style.display = "none";
									 div3.style.display = "block";
									 div4.style.display = "none";
									 div5.style.display = "none";
									 div6.style.display = "none";
									 div7.style.display = "none";
									 div8.style.display = "none";
									 div9.style.display = "none";
									 div13.style.display = "none";
									 div14.style.display = "none";
									 }
									 div10.style.display = "none";
									 div11.style.display = "none";
									 div12.style.display = "none";									 
									 break;

		case '29,61|Master of Public Health':	 
									 if (document.getElementById("defaultLeftContent") != null)
									 {
									 div1.style.display = "none";
									 div2.style.display = "none";
									 div3.style.display = "none";
									 div4.style.display = "block";
									 div5.style.display = "none";
									 div6.style.display = "none";
									 div7.style.display = "none";
									 div8.style.display = "none";
									 div9.style.display = "none";
									 div13.style.display = "none";
									 div14.style.display = "none";
									 }
									 div10.style.display = "none";
									 div11.style.display = "none";
									 div12.style.display = "none";									 
									 break;

		case '29,61|Advanced Occupational Therapy MS':	     
									 if (document.getElementById("defaultLeftContent") != null)
									 {
									 div1.style.display = "none";
									 div2.style.display = "none";
									 div3.style.display = "none";
									 div4.style.display = "none";
									 div5.style.display = "block";
									 div6.style.display = "none";
									 div7.style.display = "none";
									 div8.style.display = "none";
									 div9.style.display = "none";
									 div13.style.display = "none";
									 div14.style.display = "none";							 
									 }
									 boolMSADOCCUTHER = true;
									 boolNCBOT = true;											 
									 div10.style.display = "none";
									 div11.style.display = "block";
									 div12.style.display = "none";									 
									 break;

		case '29,61,68|Advanced Masters in Physician Assistant Studies':
									 if (document.getElementById("defaultLeftContent") != null)
									 {
									 div1.style.display = "none";
									 div2.style.display = "none";
									 div3.style.display = "none";
									 div4.style.display = "none";
									 div5.style.display = "none";
									 div6.style.display = "block";
									 div7.style.display = "none";
									 div8.style.display = "none";
									 div9.style.display = "none";
									 div13.style.display = "none";
									 div14.style.display = "none";								 									 
									 }
									 boolMSADPHYSASST = true;
									 boolNCCPA = true;										 
									 div10.style.display = "block";
									 div11.style.display = "none";
									 div12.style.display = "none";									 
									 break;

		case '29,61,64,67|Master of Health Administration':	     
									 if (document.getElementById("defaultLeftContent") != null)
									 {
									 div1.style.display = "none";
									 div2.style.display = "none";
									 div3.style.display = "none";
									 div4.style.display = "none";
									 div5.style.display = "none";
									 div6.style.display = "none";
									 div7.style.display = "block";
									 div8.style.display = "none";
									 div9.style.display = "none";
									 div13.style.display = "none";
									 div14.style.display = "none";
									 }
									 div10.style.display = "none";
									 div11.style.display = "none";
									 div12.style.display = "none";									 
									 break;

		case '29,61,64|Master of Health Education':	     
									 if (document.getElementById("defaultLeftContent") != null)
									 {
									 div1.style.display = "none";
									 div2.style.display = "none";
									 div3.style.display = "none";
									 div4.style.display = "none";
									 div5.style.display = "none";
									 div6.style.display = "none";
									 div7.style.display = "none";
									 div8.style.display = "block";
									 div9.style.display = "none";
									 div13.style.display = "none";
									 div14.style.display = "none";
									 }
									 div10.style.display = "none";
									 div11.style.display = "none";
									 div12.style.display = "none";									 
									 break;
									 							 
		case '61|Master of Science in Human Movement':	   
									 if (document.getElementById("defaultLeftContent") != null)
									 {		  
									 div1.style.display = "none";
									 div2.style.display = "none";
									 div3.style.display = "none";
									 div4.style.display = "none";
									 div5.style.display = "none";
									 div6.style.display = "none";
									 div7.style.display = "none";
									 div8.style.display = "none";
									 div9.style.display = "block";
									 div13.style.display = "none";
									 div14.style.display = "none";
									 }
									 div10.style.display = "none";
									 div11.style.display = "none";
									 div12.style.display = "none";									 
									 break;					 

		default:					 
									 if (document.getElementById("defaultLeftContent") != null)
									 {
									 div1.style.display = "none";
									 div2.style.display = "none";
									 div3.style.display = "none";
									 div4.style.display = "none";
									 div5.style.display = "none";
									 div6.style.display = "none";
									 div7.style.display = "none";
									 div8.style.display = "none";
									 div9.style.display = "none";
									 div13.style.display = "none";
									 div14.style.display = "none";
									 document.getElementById("defaultLeftContent").style.display = "block";
									 }
									 div10.style.display = "none";
									 div11.style.display = "none";
									 div12.style.display = "none";									 
									 break;
		}
	}	
}
function isValidEmail(mail1)
{
	var re = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");

	if(!re.test(mail1))
	{
		return false;
	} 
	else
	{ return true;}
}


function isDate(dateStr) {
var datePat = /^(\d{1,2})(\/|-)(\d{1,2})(\/|-)(\d{4})$/;
var matchArray = dateStr.match(datePat); //check format
if (matchArray == null) return false;
var iMonth = matchArray[1]; // parse date into variables
var iDay = matchArray[3];
var iYear = matchArray[5];
if (iMonth < 1 || iMonth > 12) return false;
if (iDay < 1 || iDay > 31) return false;
if ((iMonth==4 || iMonth==6 || iMonth==9 || iMonth==11) && iDay==31) return false;
if (iMonth == 2) { // check for february 29th
var isleap = (iYear % 4 == 0 && (iYear % 100 != 0 || iYear % 400 == 0));
if (iDay > 29 || (iDay == 29 && !isleap)) return false;
}
return true;
}
function FixDate(oMonth, oDay, oYear) {
var iMonth = parseInt(oMonth[oMonth.selectedIndex].value);
var iDay = parseInt(oDay[oDay.selectedIndex].value);
var iYear = parseInt(oYear[oYear.selectedIndex].value);
var iMax = 31;
if (iMonth == 2) {
if ((((iYear % 4) == 0) && ((iYear % 100) != 0)) || ((iYear % 400) == 0)) {
iMax = 29;
}
else {
iMax = 28;
}
}
else if ((iMonth == 4) || (iMonth == 6) || (iMonth == 9) || (iMonth == 11)) {
iMax = 30;
}
oDay.length = iMax;
for (var i=iMax; i > 28; i--) {
oDay[i - 1].text = i;
oDay[i - 1].value = i;
}
if (iDay > iMax)
oDay.selectedIndex = (iMax - 1);
}
function phoneIsValid(Obj,sLabel) {
var sPhone = Obj.value;
var sPhoneTemp = sPhone;
sPhone = '';
var sNumbers = '1234567890';
for (var i=0;i<sPhoneTemp.length;i++) {
if (sNumbers.indexOf(sPhoneTemp.charAt(i)) > -1) {
sPhone += sPhoneTemp.charAt(i);
}
}
if (sPhone.charAt(0) == '1' || sPhone.charAt(0) == 1) {
sPhone = sPhone.substring(1,(sPhone.length));
}
if (sPhone.length != 10) {
return sLabel + ' must be a 10 digit number\n';
}
else { 
Obj.value = sPhone;
}
var sAreaCode = sPhone.substring(0,3);
var sPrefix = sPhone.substring(3,6);
var sNumber = sPhone.substring(6,10);
ary7NotAllowed = new Array('1234567','4567890','0000000','1111111','2222222','3333333','4444444','5555555','6666666','7777777','8888888','9999999','3456789','4567890')
ary3NotAllowed = new Array('000','911','555','012','123');
for (var i=0;i<ary7NotAllowed.length;i++) {
if (sPrefix.toString() + sNumber.toString() == ary7NotAllowed[i])  {
return sLabel + ' must be a valid phone number\n';
}
}
for (var i=0;i<ary3NotAllowed.length;i++) {
if (sPrefix.toString() == ary3NotAllowed[i].toString()) {
return sLabel + ' must be a valid phone number\n';
}
}
return '';
}
function ValidateData(oPrmForm) { 
var bBrowserGood = false;
var bBrowserDrawsBordersCorrectly = false;
var sBrowser = "Unknown";
if (navigator.appName == "Netscape") {
sBrowser = "Netscape";
if (parseFloat(navigator.appVersion) >= 5) {
bBrowserGood = true;
bBrowserDrawsBordersCorrectly = true;
}
}
else if (navigator.appName == "Microsoft Internet Explorer") {
sBrowser = "IE";
if (parseFloat(navigator.appVersion) >= 4) {
bBrowserGood = true;
}
}
var bReturn = true;
var bFieldGood = true;var sErrors = '';
bFieldGood = true;
if (oPrmForm.firstname.value.length > 0) {
}
else {
sErrors = sErrors + 'First Name missing\n';
bFieldGood = false;
}
if (bBrowserGood) {
if (bFieldGood) {
oPrmForm.firstname.style.borderLeftColor = 'buttonface';
oPrmForm.firstname.style.borderTopColor = 'buttonface';
oPrmForm.firstname.style.borderRightColor = 'buttonface';
oPrmForm.firstname.style.borderBottomColor = 'buttonface';
}
else {
oPrmForm.firstname.style.borderLeftColor = 'tomato';
oPrmForm.firstname.style.borderTopColor = 'tomato';
oPrmForm.firstname.style.borderRightColor = 'tomato';
oPrmForm.firstname.style.borderBottomColor = 'tomato';
}
}
bFieldGood = true;
if (oPrmForm.lastname.value.length > 0) {
}
else {
sErrors = sErrors + 'Last Name missing\n';
bFieldGood = false;
}
if (bBrowserGood) {
if (bFieldGood) {
oPrmForm.lastname.style.borderLeftColor = 'buttonface';
oPrmForm.lastname.style.borderTopColor = 'buttonface';
oPrmForm.lastname.style.borderRightColor = 'buttonface';
oPrmForm.lastname.style.borderBottomColor = 'buttonface';
}
else {
oPrmForm.lastname.style.borderLeftColor = 'tomato';
oPrmForm.lastname.style.borderTopColor = 'tomato';
oPrmForm.lastname.style.borderRightColor = 'tomato';
oPrmForm.lastname.style.borderBottomColor = 'tomato';
}
}
bFieldGood = true;
if (oPrmForm.dayphone.value.length > 0) {
}
else {
sErrors = sErrors + 'Daytime Phone missing\n';
bFieldGood = false;
}
if (bBrowserGood) {
if (bFieldGood) {
oPrmForm.dayphone.style.borderLeftColor = 'buttonface';
oPrmForm.dayphone.style.borderTopColor = 'buttonface';
oPrmForm.dayphone.style.borderRightColor = 'buttonface';
oPrmForm.dayphone.style.borderBottomColor = 'buttonface';
}
else {
oPrmForm.dayphone.style.borderLeftColor = 'tomato';
oPrmForm.dayphone.style.borderTopColor = 'tomato';
oPrmForm.dayphone.style.borderRightColor = 'tomato';
oPrmForm.dayphone.style.borderBottomColor = 'tomato';
}
}
//Eve phone validation
bFieldGood = true;
if (oPrmForm.evephone.value.length > 0) {
}
else {
sErrors = sErrors + 'Evening Phone missing\n';
bFieldGood = false;
}
if (bBrowserGood) {
if (bFieldGood) {
oPrmForm.evephone.style.borderLeftColor = 'buttonface';
oPrmForm.evephone.style.borderTopColor = 'buttonface';
oPrmForm.evephone.style.borderRightColor = 'buttonface';
oPrmForm.evephone.style.borderBottomColor = 'buttonface';
}
else {
oPrmForm.evephone.style.borderLeftColor = 'tomato';
oPrmForm.evephone.style.borderTopColor = 'tomato';
oPrmForm.evephone.style.borderRightColor = 'tomato';
oPrmForm.evephone.style.borderBottomColor = 'tomato';
}
}

bFieldGood = true;
if (oPrmForm.email.value.length > 0) {
}
else {
sErrors = sErrors + 'E-mail Address missing\n';
bFieldGood = false;
}
if (bBrowserGood) {
if (bFieldGood) {
oPrmForm.email.style.borderLeftColor = 'buttonface';
oPrmForm.email.style.borderTopColor = 'buttonface';
oPrmForm.email.style.borderRightColor = 'buttonface';
oPrmForm.email.style.borderBottomColor = 'buttonface';
}
else {
oPrmForm.email.style.borderLeftColor = 'tomato';
oPrmForm.email.style.borderTopColor = 'tomato';
oPrmForm.email.style.borderRightColor = 'tomato';
oPrmForm.email.style.borderBottomColor = 'tomato';
}
}
bFieldGood = true;
if (oPrmForm.address.value.length > 0) {
}
else {
sErrors = sErrors + 'Street Address missing\n';
bFieldGood = false;
}
if (bBrowserGood) {
if (bFieldGood) {
oPrmForm.address.style.borderLeftColor = 'buttonface';
oPrmForm.address.style.borderTopColor = 'buttonface';
oPrmForm.address.style.borderRightColor = 'buttonface';
oPrmForm.address.style.borderBottomColor = 'buttonface';
}
else {
oPrmForm.address.style.borderLeftColor = 'tomato';
oPrmForm.address.style.borderTopColor = 'tomato';
oPrmForm.address.style.borderRightColor = 'tomato';
oPrmForm.address.style.borderBottomColor = 'tomato';
}
}
bFieldGood = true;
if (oPrmForm.city.value.length > 0) {
}
else {
sErrors = sErrors + 'City missing\n';
bFieldGood = false;
}
if (bBrowserGood) {
if (bFieldGood) {
oPrmForm.city.style.borderLeftColor = 'buttonface';
oPrmForm.city.style.borderTopColor = 'buttonface';
oPrmForm.city.style.borderRightColor = 'buttonface';
oPrmForm.city.style.borderBottomColor = 'buttonface';
}
else {
oPrmForm.city.style.borderLeftColor = 'tomato';
oPrmForm.city.style.borderTopColor = 'tomato';
oPrmForm.city.style.borderRightColor = 'tomato';
oPrmForm.city.style.borderBottomColor = 'tomato';
}
}
bFieldGood = true;
if (oPrmForm.state.selectedIndex > 0) {
}
else {
sErrors = sErrors + 'State missing\n';
bFieldGood = false;
}
if (bBrowserGood) {
if (bFieldGood) {
oPrmForm.state.style.backgroundColor = '#FFFFFF';
}
else {
oPrmForm.state.style.backgroundColor = 'tomato';
}
}
bFieldGood = true;
if (oPrmForm.zip.value.length > 0) {
}
else {
sErrors = sErrors + 'Zip Code missing\n';
bFieldGood = false;
}
if (bBrowserGood) {
if (bFieldGood) {
oPrmForm.zip.style.borderLeftColor = 'buttonface';
oPrmForm.zip.style.borderTopColor = 'buttonface';
oPrmForm.zip.style.borderRightColor = 'buttonface';
oPrmForm.zip.style.borderBottomColor = 'buttonface';
}
else {
oPrmForm.zip.style.borderLeftColor = 'tomato';
oPrmForm.zip.style.borderTopColor = 'tomato';
oPrmForm.zip.style.borderRightColor = 'tomato';
oPrmForm.zip.style.borderBottomColor = 'tomato';
}
}
bFieldGood = true;
if (oPrmForm.country.value.length > 0) {
}
else {
sErrors = sErrors + 'Country missing\n';
bFieldGood = false;
}
if (bBrowserGood) {
if (bFieldGood) {
oPrmForm.country.style.borderLeftColor = 'buttonface';
oPrmForm.country.style.borderTopColor = 'buttonface';
oPrmForm.country.style.borderRightColor = 'buttonface';
oPrmForm.country.style.borderBottomColor = 'buttonface';
}
else {
oPrmForm.country.style.borderLeftColor = 'tomato';
oPrmForm.country.style.borderTopColor = 'tomato';
oPrmForm.country.style.borderRightColor = 'tomato';
oPrmForm.country.style.borderBottomColor = 'tomato';
}
}
bFieldGood = true;
if (oPrmForm.program.selectedIndex > 0 && oPrmForm.program.options[oPrmForm.program.selectedIndex].value != '0' && oPrmForm.program.options[oPrmForm.program.selectedIndex].value != '' ) {
}
else {
sErrors = sErrors + 'Program of Interest missing\n';
bFieldGood = false;
}
if (bBrowserGood) {
if (bFieldGood) {
oPrmForm.program.style.backgroundColor = '#FFFFFF';
}
else {
oPrmForm.program.style.backgroundColor = 'tomato';
}
}

bFieldGood = true;
if (boolDOCPHYSTHER == true){

if (oPrmForm.Phys_License.selectedIndex > 0) { 
			if (oPrmForm.Phys_License.selectedIndex != 1){
			alert('You do not meet our requirements at this time.');
			return false;
			}
}
else {
sErrors = sErrors + 'Are you currently a licensed physical therapist? missing\n';
bFieldGood = false;
}
if (bBrowserGood) {
if (bFieldGood) {
oPrmForm.Phys_License.style.backgroundColor = '#FFFFFF';
}
else {
oPrmForm.Phys_License.style.backgroundColor = 'tomato';
}
}
}

bFieldGood = true;
if (boolMSADPHYSASST == true){

if (oPrmForm.NCCPA_License.selectedIndex > 0) {
			if (oPrmForm.NCCPA_License.selectedIndex != 1 ) {
			alert('You do not meet our requirements at this time.');
			return false;
			}
}
else {
sErrors = sErrors + 'Do you currently have a NCCPA license? missing\n';
bFieldGood = false;
}
if (bBrowserGood) {
if (bFieldGood) {
oPrmForm.NCCPA_License.style.backgroundColor = '#FFFFFF';
}
else {
oPrmForm.NCCPA_License.style.backgroundColor = 'tomato';
}
}
}

bFieldGood = true;
if (boolMSADOCCUTHER == true){

if (oPrmForm.NCBOT_License.selectedIndex > 0) {
			if (oPrmForm.NCBOT_License.selectedIndex != 1){
			alert('You do not meet our requirements at this time.');
			return false;
			}
}
else {
sErrors = sErrors + 'Do you currently have a NCBOT license? missing\n';
bFieldGood = false;
}
if (bBrowserGood) {
if (bFieldGood) {
oPrmForm.NCBOT_License.style.backgroundColor = '#FFFFFF';
}
else {
oPrmForm.NCBOT_License.style.backgroundColor = 'tomato';
}
}
}

//bFieldGood = true;
//if (oPrmForm.gradyear.selectedIndex > 0) {
//}
//else {
//sErrors = sErrors + 'High School Graduation Year missing\n';
//bFieldGood = false;
//}
//if (bBrowserGood) {
//if (bFieldGood) {
//oPrmForm.gradyear.style.backgroundColor = '#FFFFFF';
//}
//else {
//oPrmForm.gradyear.style.backgroundColor = 'tomato';
//}
//}
bFieldGood = true;
if (oPrmForm.leveleducation.selectedIndex > 0) {
	if (oPrmForm.leveleducation.selectedIndex < 5)
		{
				alert('Sorry, you do not meet the current requirements');
				return false;
		}
		else{
		if(oPrmForm.leveleducation.selectedIndex == 5)
		{
		if(oPrmForm.program.selectedIndex == 3 || oPrmForm.program.selectedIndex == 4)
			{
		alert('Sorry, you do not meet the current requirements');
		return false;
			}
		}
	}
	/*if (oPrmForm.program.selectedIndex < 4) {
		if( oPrmForm.leveleducation.selectedIndex < 5 ) {
			alert('You must have at least a Masters degree in order to apply for your current selection.');
			return false;
		}
	}else{
		if( oPrmForm.leveleducation.selectedIndex < 4 ) {
			alert ('You must have at least a Bachelors degree in order to apply for your current selection.');
			return false;
		}
	}
	*/
}
else {
sErrors = sErrors + 'Highest level of education missing\n';
bFieldGood = false;
}
if (bBrowserGood) {
if (bFieldGood) {
oPrmForm.leveleducation.style.backgroundColor = '#FFFFFF';
}
else {
oPrmForm.leveleducation.style.backgroundColor = 'tomato';
}
}

bFieldGood = true;
if ( oPrmForm.contact[0].checked == true || oPrmForm.contact[1].checked == true || oPrmForm.contact[2].checked == true ) {
}
else {
sErrors = sErrors + 'Preferred Contact Method missing\n';
bFieldGood = false;
}
if (bBrowserGood) {
if (bFieldGood) {
oPrmForm.contact[0].style.backgroundColor = '#FFFFFF';
oPrmForm.contact[1].style.backgroundColor = '#FFFFFF';
oPrmForm.contact[2].style.backgroundColor = '#FFFFFF';
}
else {
oPrmForm.contact[0].style.backgroundColor = 'tomato';
oPrmForm.contact[1].style.backgroundColor = 'tomato';
oPrmForm.contact[2].style.backgroundColor = 'tomato';
}
}

bFieldGood = true;
if (oPrmForm.age.selectedIndex > 0) {
if (oPrmForm.age.selectedIndex == 1)
	{
		alert('Sorry, you do not meet the current requirements');
		return false;
	}

}
else {
sErrors = sErrors + 'Age missing\n';
bFieldGood = false;
}
if (bBrowserGood) {
if (bFieldGood) {
oPrmForm.age.style.backgroundColor = '#FFFFFF';
}
else {
oPrmForm.age.style.backgroundColor = 'tomato';
}
}

bFieldGood = true;
if (oPrmForm.gpa.selectedIndex > 0) {
	if (oPrmForm.program.selectedIndex == 4 && oPrmForm.gpa.selectedIndex < 30)
	{
		sErrors = sErrors + 'Sorry, you do not meet the current requirements\n';
		bFieldGood = false;
	}
	else if (oPrmForm.program.selectedIndex == 9 || oPrmForm.program.selectedIndex == 2 || oPrmForm.program.selectedIndex == 1)
		{
			if(oPrmForm.gpa.selectedIndex < 25)
			{
				sErrors = sErrors + 'Sorry, you do not meet the current requirements\n';
				bFieldGood = false;
			}
		}
		
}
else {
sErrors = sErrors + 'GPA missing\n';
bFieldGood = false;
}
if (bBrowserGood) {
if (bFieldGood) {
oPrmForm.gpa.style.backgroundColor = '#FFFFFF';
}
else {
oPrmForm.gpa.style.backgroundColor = 'tomato';
}
}

if (sErrors.length > 0) {
bReturn = false;
alert('The following errors occurred:\n' + sErrors);
}
return bReturn;
}
