function calwhr2(form) {



formwvalue = form.formw.value;



formhvalue = form.formh.value;



waistvalue       = form.waist.value/formwvalue;



hipvalue    = form.hip.value/formhvalue;



form.whr.value = waistvalue/hipvalue;







// document.getElementById("result").innerHTML = "<font size=2><b>Please check your waist to hip ratio result<br>with the above table.</b></font>"







if (form.whr.value > 0.9) {



                document.getElementById("result").innerHTML = "Based on your waist to hip ratio, you are at a greater risk for developing health complications and diseases as hypertension, diabetes and heart diseases.<p><a href='javascript:location.reload(true)'>Start Over</a></p>"



		} else



if (form.whr.value <= 0.9) {



                document.getElementById("result").innerHTML = "Based on your waist to hip ratio, you are at low risk for developing obesity related conditions.<p><a href='javascript:location.reload(true)'>Start Over</a></p>"



			//msgText = "You have an increasing risk for health problems associated with being overweight. Read the lower portion of this page for more information."



		}



}











function calwhr(form) {



formwvalue = form.formw.value;



formhvalue = form.formh.value;



waistvalue       = form.waist.value/formwvalue;



hipvalue    = form.hip.value/formhvalue;



form.whr.value = waistvalue/hipvalue;







// document.getElementById("result").innerHTML = "<font size=2><b>Please check your waist to hip ratio result<br>with the above table.</b></font>"







if (form.whr.value > 0.8) {



                document.getElementById("result").innerHTML = "<b>Based on your waist to hip ratio, <font color=red>you are at a greater risk for developing obesity health complications and diseases.</font></b><p><a href='javascript:location.reload(true)'>Start Over</a></p>"



		} else



if (form.whr.value <= 0.8) {



                document.getElementById("result").innerHTML = "<b>Based on your waist to hip ratio, you are at low risk for developing obesity related conditions.</b><p><a href='javascript:location.reload(true)'>Start Over</a></p>"



			//msgText = "You have an increasing risk for health problems associated with being overweight. Read the lower portion of this page for more information."



		}



}




function checkFields() {
missinginfo = "";

if (document.check.waist.value == "") {
missinginfo += "\n     -  Waist Measurement";
}
if (document.check.hip.value == "") {
missinginfo += "\n     -  Hip Measurement";
}
if (missinginfo != "") {
missinginfo ="_____________________________\n" +
"You failed to fill in your:\n" +
missinginfo + "\n_____________________________" +
"\nPlease re-enter and submit again!";
alert(missinginfo);
return false;
}
else return true;
}


