body fat formula
<p>I am trying to make a body fat percentage calculator i used firebug and it says "bodyfat function not found" can you explain what that means?</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
&lt;title&gt; BodyFat Formula &lt;/title&gt;
&lt;script type="text/javascript"&gt;
function bodyfat(weight, waist, bodyfat){

var weight = document.getElementById("weightBox").value, 10); 
var waist = document.getElementById("waistBox").value, 10);
var bodyfat = document.getElementById("bodyfatBox").value, 10);

weight = Math.round(weightBox * 1.082) + (94.42);
 waist = Math.round(waistBox * 4.15);
bodyfat = Math.round(weight - waist * 100) / weightBox );

var str1="Your Body Fat Percentage is ";
document.getElementById('outputDiv').innerHTML= str1.concat(weight);
}
&lt;/script&gt;
 &lt;/head&gt;
&lt;body&gt;
 &lt;h2&gt;BodyFat Formula&lt;/h2&gt;
  &lt;p&gt;
  Weight: &lt;input type="text" id="weightBox" size="4" value = "150"&gt; pounds &lt;br&gt;
  Waist measurement: &lt;input type="text" id="waistBox" size=4 value="32"&gt; inches&lt;br&gt;
  BodyFat: &lt;input type="text" id="bodyfatBox" size=4 value="0"&gt; percent
  &lt;/p&gt;
  &lt;input type="button" value="Calculate body fat" onclick="bodyfat();"&gt;
  &lt;hr&gt;
  &lt;div id="outputDiv"&gt;&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
