<!-- function sf(){headpressure.verticalheight.focus();} // This sets the initial cursor focus to the input tag named 'verticalheight'
function compute()
{
var h = document.headpressure; // 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 verticalheight = (h.verticalheight.value);
if (isNaN(verticalheight)) verticalheight = 0; h.verticalheight.value = "0";
h.verticalheight.value = Math.round(verticalheight);
// line 2, bends to use in the pond calculation
var bends = (h.bends.value);
if (isNaN(bends)) bends = 0; h.bends.value = "0";
h.bends.value = Math.round(bends);
// line 3, tubing length to use in the pond calculation
var tubinglength = (h.tubinglength.value);
if (isNaN(tubinglength)) tubinglength = 0; h.tubinglength.value = "0";
h.tubinglength.value = Math.round(tubinglength);
// line 4, adapters to use in the pond calculation
var adapters = (h.adapters.value);
if (isNaN(adapters)) adapters = 0; h.adapters.value = "0";
h.adapters.value = Math.round(adapters);
// then compute the total dynamic head pressure based upon the formula
var tdhp = (1 * verticalheight) + (tubinglength / 10) + (bends / 2) + (adapters / 4);
h.tdhp.value = Math.round(tdhp);
}
// -->
