<!-- Begin
function calcBmi() {
	if (document.bmiForm.w_unit[0].checked) var wu = document.bmiForm.w_unit[0].value;
	if (document.bmiForm.w_unit[1].checked) var wu = document.bmiForm.w_unit[1].value;
	var w = document.bmiForm.weight.value * wu;
	var hf = document.bmiForm.htf.value * 12;
	var hi = document.bmiForm.hti.value * 1;
	var h = (hf + hi) * .0254;
	if (hf || hi) document.bmiForm.htcm.value="";
	if (document.bmiForm.htcm.value) h = document.bmiForm.htcm.value / 100;
	displaybmi = Math.round( w/(h*h) );
	var rvalue = true;
	if ( (w < 20) || (w > 180)  || (h < 1) || (h > 2.5) ) {
		alert ("Invalid data.  Please check and re-enter!");
		rvalue = false;
	}
	if (rvalue) {
		if (displaybmi <19) document.bmiForm.comment.value = "Underweight";
		if (displaybmi >=19 && displaybmi <=25) document.bmiForm.comment.value = "Normal";
		if (displaybmi >=26 && displaybmi <=29) document.bmiForm.comment.value = "Overweight";
		if (displaybmi >=30 && displaybmi <=40) document.bmiForm.comment.value = "Obese";
		if (displaybmi >40) document.bmiForm.comment.value = "Extremely obese";
		document.bmiForm.answer.value = displaybmi;
	}
	return rvalue;
}
//  End -->


