<!-- function sf(){headpressure2.verticalheight.focus();} // This sets the initial cursor focus to the input tag named 'verticalheight'
function compute()
{
var h = document.headpressure2; // This is the name of the form we'll we working with turned into the variable h.
// line 1, vertical height to use in the pond calculation
var verticalheight2 = (h.verticalheight2.value);
if (isNaN(verticalheight2)) verticalheight2 = 0; h.verticalheight2.value = "0";
h.verticalheight2.value = Math.abs(verticalheight2);
// line 2, bends to use in the pond calculation
var bends2 = (h.bends2.value);
if (isNaN(bends2)) bends2 = 0; h.bends2.value = "0";
h.bends2.value = Math.abs(bends2);
// line 3, tubing length to use in the pond calculation
var tubinglength2 = (h.tubinglength2.value);
if (isNaN(tubinglength2)) tubinglength2 = 0; h.tubinglength2.value = "0";
h.tubinglength2.value = Math.abs(tubinglength2);
// line 4, adapters to use in the pond calculation
var adapters2 = (h.adapters2.value);
if (isNaN(adapters2)) adapters2 = 0; h.adapters2.value = "0";
h.adapters2.value = Math.abs(adapters2);
// then compute the total dynamic head pressure based upon the formula
var tdhp2 = (1 * verticalheight2) + (tubinglength2 / 10) + (bends2 / 2) + (adapters2 / 4);
h.tdhp2.value = Math.round(tdhp2);
}
// -->