function calcEnglish(form, feet, inches, pounds) {
    var ids = new Array('bmi_1a', 'bmi_1b','bmi_2a', 'bmi_2b','bmi_3a', 'bmi_3b','bmi_4a', 'bmi_4b');
	var ids_ct = ids.length;
	for(i=0; i < ids_ct; i++){
		$(ids[i]).removeClassName('highlight')
	}
	
	var error = false;
	var emessage = "The Following errors were found in this form.\n";
	
	emessage += "Please correct them before trying to calculate again.\n";
	emessage += "-------------------------------------\n";
	if(pounds=="") {
		emessage += "Weight - please enter your weight in pounds\n";
		error = true;
	}
	if(feet=="") {
		emessage += "Feet - please enter feet for your height\n";
		error = true;
	}
	if(inches=="") {
		emessage += "Inches - please enter inches for your height\n";
		error = true;
	}
	if(error) {
		alert(emessage);
		return !error;
	}

   if ((! inches) || isNaN(inches))
     inches = 0
   TotalInches = eval(feet*12) + eval(inches)
   var bmi = Math.round(pounds * 703 * 10 / TotalInches /
   TotalInches) / 10
   var outputStr = "At " + feet + "'" +inches + "\" tall and " + pounds + "lbs your BMI is: <strong>" + bmi + "</strong>";
   // output the string above into the p with the id of BMIoutput
   document.getElementById('BMIoutput').innerHTML=outputStr;  
   
   if(bmi < 18.5){
		$('bmi_1a').addClassName('highlight')
		$('bmi_1b').addClassName('highlight')
	} else if (bmi < 24.9){
		$('bmi_2a').addClassName('highlight')
		$('bmi_2b').addClassName('highlight')
	} else if (bmi < 29.9){
		$('bmi_3a').addClassName('highlight')
		$('bmi_3b').addClassName('highlight')
	} else {
		$('bmi_4a').addClassName('highlight')
		$('bmi_4b').addClassName('highlight')
	}  
      
}

// <!-- Keeps it a number -->
// <!-- copyright 1999 Idocs, Inc. http://www.idocs.com  -->
// <!-- Distribute this script freely but keep this notice in place  -->

function numbersonly(myfield, e, dec)
{
var key;
var keychar;

if (window.event)
   key = window.event.keyCode;
else if (e)
   key = e.which;
else
   return true;
keychar = String.fromCharCode(key);

// control keys
if ((key==null) || (key==0) || (key==8) || 
    (key==9) || (key==27) )
   return true;

// numbers
else if ((("0123456789.").indexOf(keychar) > -1))
   return true;

else
   return false;

}



