<!-- function sf(){ovalpond.radiusa.focus();} // This sets the initial cursor focus to the input tag named 'radiusa'
function computeB()
{
var g = document.ovalpond; // This is the name of the form we'll we working with turned into the variable g.
// line 4, radiusa to use in the pond calculation
var radiusa = (g.radiusa.value);
if (isNaN(radiusa)) radiusa = 0; g.radiusa.value = "0";
g.radiusa.value = Math.abs(radiusa);
// line 5, radiusb to use in the pond calculation
var radiusb = (g.radiusb.value);
if (isNaN(radiusb)) radiusb = 0; g.radiusb.value = "0";
g.radiusb.value = Math.abs(radiusb);
// line 6, average depth to use in the pond calculation
var averagedepth2 = (g.averagedepth2.value);
if (isNaN(averagedepth2)) averagedepth2 = 0; g.averagedepth2.value = "0";
g.averagedepth2.value = Math.abs(averagedepth2);
// then compute the gallons based upon the formula
var gallons2 = ((1 * 3.14) * (radiusa / 2) * (radiusb / 2) * averagedepth2 * 7.48051945);
g.gallons2.value = Math.round(gallons2);
// then compute the uk gallons based upon the formula
var ukgallons2 = ((1 * 3.14) * (radiusa / 2) * (radiusb / 2) * averagedepth2 * 7.48051945 * 0.83267384);
g.ukgallons2.value = Math.round(ukgallons2);
}
// -->
