<!-- function sf(){squarepond.length.focus();} // This sets the initial cursor focus to the input tag named 'length'
function computea()
{
var f = document.squarepond; // This is the name of the form we'll we working with turned into the variable f.
// line 1, length to use in the pond calculation
var length = (f.length.value);
if (isNaN(length)) length = 0; f.length.value = "0";
f.length.value = Math.abs(length);
// line 2, width to use in the pond calculation
var width = (f.width.value);
if (isNaN(width)) width = 0; f.width.value = "0";
f.width.value = Math.abs(width);
// then compute the surface area based upon the formula
var surfacearea = (length * width);
f.surfacearea.value = (surfacearea).toFixed(1);
}
// -->
