<!-- hide from old browsers

function ClearFormlbs (form) {
form.MinWt.value="";
form.MaxWt.value="";
form.height.value="";
form.inches.value="";
}


function Optimumlbs(form) {

// Holds whether or not the form is correct
var Correct = true;

// Check for missing fields
	if (form.height.value == null || form.height.value.length == 0 || form.inches.value == null || form.inches.value.length == 0) {
	alert ("\nPlease fill in all of the form elements");
	Correct = false;
	}

// Check that only numbers are in the weight and height fields
	else {

// Holds the floats representing the height input
	var Testheight;
	var Testinches;

// Parse the weight and height values and put in the variables
	Testheight = parseFloat(form.height.value);
	Testinches = parseFloat(form.inches.value);

// Check to see that Testheight is a number
		if (isNaN (Testheight)) {
		alert("\nMake sure to enter the feet \nas a number.");
		Correct = false;
		form.height.value="";
		}

// Check to see that Testinches is a number
		if (isNaN (Testinches)) {
		alert("\nMake sure to enter the inches \nas a number.");
		Correct = false;
		form.inches.value="";
		}

// Check that the Testheight is greater than 0
		if (Testheight <= 0) {
		alert("\nCome on.  Enter a real number of feet.");
		Correct = false;
		form.height.value="";
		}

// Check that the Testinches is greater than 0
		if (Testinches < 0) {
		alert("\nCome on.  Enter a real number of inches.");
		Correct = false;
		form.inches.value="";
		}

// Check that the Testinches is less than 12
		if (Testinches >= 12) {
		alert("\nCome on.  Enter a real number of inches.");
		Correct = false;
		form.inches.value="";
		}

	}

// If the inputs are correct, calculate the bmi
	if (Correct) {

// Hold the calculation numbers
	var MaxWt;
	var MinWt;
	var Height2;
	var Centis;
	Centis = (((Testheight * 12) + Testinches) * 2.54);
	Height2 = (Centis / 100) * (Centis / 100);
	MaxWt = (Math.round(23 * Height2 * 2.2));
	MinWt = (Math.round(19 * Height2 * 2.2));

// Send this number to the screen
	form.MaxWt.value = MaxWt;
	form.MinWt.value = MinWt;

	}

}



function ClearFormkgs (form) {
form.MaxWt.value="";
form.MinWt.value="";
form.height.value="";
}


function Optimumkgs(form) {

// Holds whether or not the form is correct
var Correct = true;

// Check for missing fields
	if (form.height.value == null || form.height.value.length == 0) {
	alert ("\nPlease fill in all of the form elements");
	Correct = false;
	}

// Check that only numbers are in the weight and height fields
	else {

// Holds the floats representing the height input
	var Testheight;

// Parse the weight and height values and put in the variables

	Testheight = parseFloat(form.height.value);

// Check to see that Testheight is a number
		if (isNaN (Testheight)) {
		alert("\nMake sure to enter the height \nas a number.");
		Correct = false;
		form.height.value="";
		}

// Check that the Testheight is greater than 0
		if (Testheight <= 0) {
		alert("\nCome on.  Enter a real height size.");
		Correct = false;
		form.height.value="";	
		}

	}



// If the inputs are correct, calculate the bmi

	if (Correct) {

// Hold the calculation numbers
	var MaxWt;
	var MinWt;
	Height2 = (Testheight/100) * (Testheight/100);
	MaxWt = (Math.round(23 * Height2));
	MinWt = (Math.round(19 * Height2));

// Send this number to the screen
	form.MaxWt.value = MaxWt;
	form.MinWt.value = MinWt;


	}

}

// finish hiding from old browsers -->