// JavaScript Document

// script for CALORIE CALCULATOR
var myWeight;
var myDistance;

function HowMany(form)
{
var difference;
difference = (myDistance * myWeight) * .653;
form.Fdiff.value = difference;

if (difference < 100) {
form.comment.value="It's time to really push yourself.";
}
if (difference > 101 && difference < 200) {
form.comment.value="Nice run, but you can still reach higher.";
}
if (difference > 201 && difference < 300) {
form.comment.value="Getting there. Push above 300 next time.";
}
if (difference > 301 && difference < 500) {
form.comment.value="Great! You're a runner.....keep it up!";
}
if (difference > 501 && difference < 700) {
form.comment.value="Carl Lewis watch out!";
}
if (difference > 701) {
form.comment.value="You're my hero! You deserve a jelly doughnut."; 
}

}

function SetMyWeight(weight)
{
myWeight = weight.value;
}

function SetmyDistance(dis)
{
myDistance = dis.value;
}

function ClearForm(form){

form.myWeight.value = "";
form.myDistance.value = "";
form.Fdiff.value = "";
form.comment.value = "";

}
// -->
