<!--
function CalcBMI()
	{
	var severe = document.getElementById("severe");
	severe.style.color="";
	var moderate = document.getElementById("moderate");
	moderate.style.color="";
	var mild = document.getElementById("mild");
	mild.style.color="";
	var normal = document.getElementById("normal");
	normal.style.color="";
	var pre = document.getElementById("pre");
	pre.style.color="";
	var one = document.getElementById("one");
	one.style.color="";
	var two = document.getElementById("two");
	two.style.color="";
	var three = document.getElementById("three");
	three.style.color="";
	var theFeet = document.getElementById("feet");
	if(theFeet.value == "") {Feet = 0;} else {Feet = parseInt(theFeet.value);}
	var theInches = document.getElementById("inches");
	if(theInches.value == "") {Inches = 0;} else {Inches = parseInt(theInches.value);}
	var theStones = document.getElementById("stones");
	if(theStones.value == "") {Stones = 0;} else {Stones = parseInt(theStones.value);}
	var thePounds = document.getElementById("pounds");
	if(thePounds.value == "") {Pounds = 0;} else {Pounds = parseInt(thePounds.value);}
	var theBMI = document.getElementById("bmi");
	var height = Feet * 12 + Inches;
	var weight = Stones * 14 + Pounds;
	var myBMI = 703 * weight / height / height; 
	  myBMI = Math.round(myBMI*10)/10;
	var theResult = document.getElementById("result");
	if(myBMI < 16)
	{	severe.style.color="red";
	theResult.firstChild.nodeValue = "With this BMI score you are classed as Severely Underweight for your height.";} 
	else if(myBMI < 17){	moderate.style.color="red";	theResult.firstChild.nodeValue = "With this BMI score you are classed as Moderatly Underweight for your height.";} 
	else if(myBMI < 18.5)	{mild.style.color="red";	theResult.firstChild.nodeValue = "With this BMI score you are classed as Mildly Underweight for your height.";} 
	else if(myBMI < 25){normal.style.color="red";	theResult.firstChild.nodeValue = "You are within the normal weight range for your height.";} 
	else if(myBMI < 30){pre.style.color="red";theResult.firstChild.nodeValue = "With this BMI score you are classed as Overweight for your height.";} 
	else if(myBMI < 35){one.style.color="red";theResult.firstChild.nodeValue = "With this BMI score you are classed as being Obese.";} 
	else if(myBMI < 40){two.style.color="red";theResult.firstChild.nodeValue = "With this BMI score you are classed as being Clinically Obese.";} 
	else{three.style.color="red";theResult.firstChild.nodeValue = "With this BMI score you are classed as being Morbidly Obese.";}
	if (document.getElementById("bmi").firstChild != null)
		{
		document.getElementById("bmi").removeChild(bmi.firstChild)
	//	document.getElementById("bmi").firstChild.value == "";
		}
	document.getElementById("bmi").appendChild(document.createTextNode(myBMI));
	theResult.style.visibility = "visible";
	return false;
	}
-->
