var calctitle = "Calorie Calculator";
var quotemark = '"'

var boxcolor = "#336666";
var boxwidth = "240";
var boxheight = "100";
var liblink = "http://www.healthcareserve.com/healthlib/";

var contents = "<center>Your Weight:<br><INPUT TYPE=text NAME=myWeight SIZE=4 ONCHANGE=" + quotemark + "SetMyWeight(this)" + quotemark + "><br>Miles Run:<br><INPUT TYPE=text NAME=myDistance SIZE=4 ONCHANGE=" + quotemark + "SetmyDistance(this)" + quotemark + "><br>Calories Burned:<br><INPUT TYPE=text NAME=Fdiff SIZE=6><p><INPUT TYPE=BUTTON VALUE=Reset onClick=" + quotemark + "ClearForm(this.form)" + quotemark + "> <INPUT TYPE=BUTTON ONCLICK=" + quotemark + "HowMany(this.form)" + quotemark + " VALUE=Calculate><p>Comments<br><INPUT TYPE=text NAME=comment size=24></center>";

var topleft = "http://www.macvillage.com/health_tip/images/top_left.gif";
var topright = "http://www.macvillage.com/health_tip/images/top_right.gif";
var botright = "http://www.macvillage.com/health_tip/images/bottom_right.gif";
var botleft = "http://www.macvillage.com/health_tip/images/bottom_left.gif";

document.write('<form><table width=' + boxwidth + ' height=' + boxheight + ' align=center border=0 cellPadding=0 cellSpacing=0><tr bgColor=' + boxcolor + '><td vAlign=top><IMG alt= border=0 height=23 src=' + topleft + ' width=11></TD><td align=middle><b><font color=#ffffff face=ARIAL size=-1>' + calctitle + '</FONT></B></TD><td vAlign=top><IMG alt= border=0 height=23 src=' + topright + ' width=11></TD></TR><tr><td bgColor=' + boxcolor + '><br></TD><td bgColor=#ffffcc><table border=0 cellPadding=5 cellSpacing=0 width=99%><tr><td colSpan=2><font face=arial size=-1>' + contents + '</TD></TR></TABLE></TD><td bgColor=' + boxcolor + '><br></TD></TR> <tr><td bgColor=' + boxcolor + '><IMG alt= border=0 height=27 src=' + botleft + ' width=11></TD><td align=middle bgColor=' + boxcolor + '><A HREF=' + liblink + '><font color=#ffffff face=ARIAL size=-1>More Health Info</font></A></TD><td bgColor=' + boxcolor + '><IMG alt= border=0 height=27 src=' + botright + ' width=11 ></TD></TR></FORM></TABLE>');


<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
var myWeight;
var myDistance;
function HowMany(form) {
var difference;
difference = (myDistance * myWeight) * .653;
form.Fdiff.value = difference;
    
if (difference < 100) {
form.comment.value="You better start working!";
}
if (difference >  101 && difference < 200) {
form.comment.value="Nice run, but you can do better.";
}
if (difference >  201 && difference < 300) {
form.comment.value="Very good!  Push above 300 next time.";
}
if (difference >  301 && difference < 500) {
form.comment.value="Great!  Your a runner.....keep it up!";
}
if (difference >  501 && difference < 700) {
form.comment.value="Bill Rogers move over!";
}
if (difference > 701) {
form.comment.value="Your my hero!  Have 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 = "";
}

