
function openCopyright() {
	window.open('/copyright.asp','Copyright','width=400,height=320,toolbar=no,location=no,directories=no,status=no,menubar=yes,copyhistory=no,resizable=yes,scrollbars=yes');
}

function checkData_enews() {
	var correct = true;
	var error_msg = "Please correct the following errors and try again:" + '\n' + '\n';
	if (document.enews.email.value == "") {correct = false;error_msg = error_msg + "\"Your Email Address\" field is blank." + '\n';}
	else {if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.enews.email.value)) {
		} else {correct = false;error_msg = error_msg + "\"Your Email Address\" is invalid." + '\n';}
	}
	if (document.enews.email2.value == "") {correct = false;error_msg = error_msg + "\"Confirm Your Email Address\" field is blank." + '\n';}
	else {if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.enews.email2.value)) {
		} else {correct = false;error_msg = error_msg + "\"Confirm Your Email Address\" is invalid." + '\n';}
	}
	if (document.enews.email.value != document.enews.email2.value) {
		correct = false;error_msg = error_msg + "Email Addresses do not match. Please check for typos." + '\n';
	}
	if (document.enews.format.value == "") {correct = false;error_msg = error_msg + "\"Preferred Format\" field not specified." + '\n';}
	if (correct) { } else {alert(error_msg)}
	return correct
}

function checkData_email() {
	var correct = true;
	var error_msg = "Please correct the following errors and try again:" + '\n' + '\n';
	if (document.emailForm.name.value == "") {
		correct = false;error_msg = error_msg + "\"Full Name\" is blank." + '\n';
	}
	if ((document.emailForm.email.value == "") || (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.emailForm.email.value))) {
	} else {
		correct = false;error_msg = error_msg + "\"Email Address\" is invalid." + '\n';
	}
	if ((document.emailForm.email2.value == "") || (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.emailForm.email2.value))) {
	} else {
		correct = false;error_msg = error_msg + "\"Confirm Email Address\" is invalid." + '\n';
	}
	if (document.emailForm.email.value != document.emailForm.email2.value) {
		correct = false;error_msg = error_msg + "Email Addresses do not match. Please check for typos." + '\n';
	}
	if ((document.emailForm.daytimePhone1.value == "") || (document.emailForm.daytimePhone2.value == "") || (document.emailForm.daytimePhone3.value == "") || (document.emailForm.daytimePhone1.value.length < 3) || (document.emailForm.daytimePhone2.value.length < 3) || (document.emailForm.daytimePhone3.value.length < 4) || isNaN(document.emailForm.daytimePhone1.value) || isNaN(document.emailForm.daytimePhone2.value) || isNaN(document.emailForm.daytimePhone3.value)) {
		correct = false;error_msg = error_msg + "\"Daytime Phone Number\" is invalid." + '\n';
	}
	if ((document.emailForm.eveningPhone1.value == "") || (document.emailForm.eveningPhone2.value == "") || (document.emailForm.eveningPhone3.value == "") || (document.emailForm.eveningPhone1.value.length < 3) || (document.emailForm.eveningPhone2.value.length < 3) || (document.emailForm.eveningPhone3.value.length < 4) || isNaN(document.emailForm.eveningPhone1.value) || isNaN(document.emailForm.eveningPhone2.value) || isNaN(document.emailForm.eveningPhone3.value)) {
		correct = false;error_msg = error_msg + "\"Evening Phone Number\" is invalid." + '\n';
	}
	if (document.emailForm.address.value == "") {
		correct = false;error_msg = error_msg + "\"Street Address\" is blank." + '\n';
	}
	if (document.emailForm.city.value == "") {
		correct = false;error_msg = error_msg + "\"City\" is blank." + '\n';
	}
	if (document.emailForm.zip.value == "") {
		correct = false;error_msg = error_msg + "\"Zip Code\" is blank." + '\n';
	} else {
		if (isNaN(document.emailForm.zip.value)) {
			correct = false;error_msg = error_msg + "\"Zip Code\" is invalid." + '\n';
		}
	}
	if (document.emailForm.comments.value == "") {
		correct = false;error_msg = error_msg + "Required field is blank." + '\n';
	}
	if (correct) { } else {alert(error_msg)}
	return correct
}

function checkData_facility() {
	var correct = true;
	var error_msg = "Please correct the following errors and try again:" + '\n' + '\n';
	if (document.emailForm.applicantName.value == "") {
		correct = false;error_msg = error_msg + "\"Full Name of Applicant\" is blank." + '\n';
	}
	if ((document.emailForm.email.value == "") || (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.emailForm.email.value))) {
	} else {
		correct = false;error_msg = error_msg + "\"Email Address\" is invalid." + '\n';
	}
	if ((document.emailForm.email2.value == "") || (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.emailForm.email2.value))) {
	} else {
		correct = false;error_msg = error_msg + "\"Confirm Email Address\" is invalid." + '\n';
	}
	if (document.emailForm.email.value != document.emailForm.email2.value) {
		correct = false;error_msg = error_msg + "Email Addresses do not match. Please check for typos." + '\n';
	}
	if ((document.emailForm.phone1.value == "") || (document.emailForm.phone2.value == "") || (document.emailForm.phone3.value == "") || (document.emailForm.daytimePhone1.value.length < 3) || (document.emailForm.daytimePhone2.value.length < 3) || (document.emailForm.daytimePhone3.value.length < 4) || isNaN(document.emailForm.daytimePhone1.value) || isNaN(document.emailForm.daytimePhone2.value) || isNaN(document.emailForm.phone3.value)) {
		correct = false;error_msg = error_msg + "\"Phone Number\" is invalid." + '\n';
	}
	if (document.emailForm.dates.value == "") {
		correct = false;error_msg = error_msg + "\"Date(s) Requested\" is blank." + '\n';
	}
	if (document.emailForm.timeStart.value == "") {
		correct = false;error_msg = error_msg + "\"Time Start\" is blank." + '\n';
	}
	if (document.emailForm.timeEnd.value == "") {
		correct = false;error_msg = error_msg + "\"Time End\" is blank." + '\n';
	}
	if (document.emailForm.purpose.value == "") {
		correct = false;error_msg = error_msg + "\"Purpose\" is blank." + '\n';
	}
	if (document.emailForm.lstCaptcha.value == "select") {
		correct = false;error_msg = error_msg + "\"Photo ID\" is blank." + '\n';
	}
	if (correct) { } else {alert(error_msg)}
	return correct
}

<!-- BMI Calculator -->
<!-- Original:  Marat Rikelman (rikelman(at)bellsouth.net) -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Modified: Robin Ekeland (rjones(at)bryanisd.org) -->
function mod(div,base) {
return Math.round(div - (Math.floor(div/base)*base));
}
function calcBmi() {
	var w = document.bmi.weight.value * 1;
	var HeightFeetInt = document.bmi.htf.value * 1;
	var HeightInchesInt = document.bmi.hti.value * 1;
	HeightFeetConvert = HeightFeetInt * 12;
	h = HeightFeetConvert + HeightInchesInt;
	displaybmi = (Math.round((w * 703) / (h * h)));
	var rvalue = true;
//	if ( (w <= 35) || (w >= 500)  || (h <= 48) || (h >= 120) ) {
//		alert ("Invalid data.  Please check and re-enter!");
//		rvalue = false;
//	}
	if (rvalue) {
		if (HeightInchesInt > 11) {
			reminderinches = mod(HeightInchesInt,12);
			document.bmi.hti.value = reminderinches;
			document.bmi.htf.value = HeightFeetInt + ((HeightInchesInt - reminderinches)/12);
			document.bmi.answer.value = displaybmi;
		}
		if (document.bmi.age.value <= 20) {
			document.bmi.comment.value = "Please see BMI-for-Age charts below...";
		} else {
			if (displaybmi <19) 
				document.bmi.comment.value = "Underweight";
			if (displaybmi >=19 && displaybmi <=25) 
				document.bmi.comment.value = "Normal";
			if (displaybmi >=26 && displaybmi <=29) 
				document.bmi.comment.value = "Overweight";
			if (displaybmi >=30 && displaybmi <=40) 
				document.bmi.comment.value = "Obese";
			if (displaybmi >40) 
				document.bmi.comment.value = "Extremely obese";
		}
		document.bmi.answer.value = displaybmi;
	}
	return rvalue;
}
function clearBmi() {
	document.bmi.age.value = "";
	document.bmi.weight.value = "";
	document.bmi.htf.value = "";
	document.bmi.hti.value = "";
	document.bmi.answer.value = "";
	document.bmi.comment.value = "";
}