<!-- Begin
window.onload=function() {
  document.bmi.reset();
}
function mod(div,base) {
return Math.round(div - (Math.floor(div/base)*base));
}
function calcBmi() {
var w = document.bmi.weight.value * 1;
var HeightInches = document.bmi.height.value * 1;
h = HeightInches;
displaybmi = (Math.round((w * 703) / (h * h)));
var rvalue = true;
if ( (w <= 35) || (w >= 500)  || (h <= 57) || (h >= 85) ) {
alert ("Invalid data.  Please check and re-enter!");
rvalue = false;
}
if (rvalue) {
if (displaybmi <40) {
document.bmi.comment.value = "Yes";
document.bmi.comment.style.backgroundImage = "url(images/template/bkgrd_bmi_result_yes.gif)";
//document.bmi.comment.style.border = "1 solid #59b200";
}
if (displaybmi >=40) {
document.bmi.comment.value = "No";
document.bmi.comment.style.backgroundImage = "url(images/template/bkgrd_bmi_result_no.gif)";
}
 }
return rvalue;
}
//  End -->