<!-- hide from old browsers


function ClearForm (form) {

	form.myweight.value="";

	form.distancerun.value="";

	form.burnedoff.value="";

	form.comment.value="";

}


function VerifyForm(form) {

	

	// Holds whether or not the form is correct

	var Correct = true;



	// Check for missing fields

	if (form.myweight.value == null || form.myweight.value.length == 0 ||

	form.distancerun.value == null || form.distancerun.value.length == 0) {

		alert ("\nPlease fill in all of the form elements");

		Correct = false;

	}



	// Check that only numbers are in the myweight and distancerun fields

	else {

		// Holds the floats representing the myweight and distancerun

		var Testmyweight;

		var Testdistancerun;



		// Parse the myweight and distancerun values and put in the variables

		Testmyweight = parseFloat(form.myweight.value);

		Testdistancerun = parseFloat(form.distancerun.value);



		// Check to see that Testmyweight is a number

		if (isNaN (Testmyweight)) {

			alert("\nMake sure to enter your weight\nas a number.");

			Correct = false;

			form.myweight.value="";

		}



		// Check to see that Testdistancerun is a number

		if (isNaN (Testdistancerun)) {

			alert("\nPlease make sure the distance\nis a number.");

			Correct = false;

			form.distancerun.value="";

		}



		// Check that the Testmyweight is greater than 0

		if (Testmyweight <= 0) {

			alert("\nWhat???  Please enter a real weight.");

			Correct = false;

			form.myweight.value="";

		}



		// Check that the Testdistancerun is greater than 0

		if (Testdistancerun <= 0) {

			alert("\nNo Way!  Enter a real distance.");

			Correct = false;

			form.distancerun.value="";

		}


	}



	// If the inputs are correct, calculate the burnedoff percent

	if (Correct) {

		

		// Holds the burnedoff number 

		var burnedoff;

		burnedoff = (Testdistancerun * Testmyweight) * .653;

		burnedoff = (Math.round(burnedoff));

		// Send this number to the screen

		form.burnedoff.value = burnedoff;

if (burnedoff < 100) {
form.comment.value="You better do it again!";
}
if (burnedoff > 101 && burnedoff < 200) {
form.comment.value="Not bad, but you can do better!";
}
if (burnedoff > 201 && burnedoff < 300) {
form.comment.value="Impressive! Push a little harder!";
}
if (burnedoff > 301 && burnedoff < 500) {
form.comment.value="Excellent! Keep up the good work!";
}
if (burnedoff > 501 && burnedoff < 700) {
form.comment.value="You are ready for the Boston Marathon - Good Job!";
}
if (burnedoff > 701) {
form.comment.value="See you at the next Olympics!"; 
}

	}

}



// finish hiding from old browsers -->