<!-- function sf(){ampstowatts.amps.focus();} // This sets the initial cursor focus to the input tag named 'amps'
function computeaw()
{
var aw = document.ampspowercost; // This is the name of the form we'll we working with turned into the variable aw.
// line 1, amps to use in the pond calculation
var amps = (aw.amps.value);
if (isNaN(amps)) amps = 0; aw.amps.value = "0";
aw.amps.value = Math.abs(amps);	
// line 2, volts to use in the pond calculation
var volts = (aw.volts.value);
if (isNaN(volts)) volts = 0; aw.volts.value = "0";
aw.volts.value = Math.abs(volts);		
// line 3, hours 2 to use in the power cost calculation
var hours2 = (aw.hours2.value);
if (isNaN(hours2)) hours2 = 0; aw.hours2.value = "0";
aw.hours2.value = Math.abs(hours2);	
// line 4, kwatthour 2 to use in the power cost calculation
var kwatthour2 = (aw.kwatthour2.value);
if (isNaN(kwatthour2)) kwatthour2 = 0; aw.kwatthour2.value = "0";
aw.kwatthour2.value = Math.abs(kwatthour2);	
// then compute the power cost per day based upon the formula
var perday2 = ((amps * volts / 1000) * hours2 * kwatthour2);
aw.perday2.value = (perday2).toFixed(2);	
// then compute the power cost per year based upon the formula
var peryear2 = ((amps * volts / 1000) * hours2 * 365 * kwatthour2);
aw.peryear2.value = (peryear2).toFixed(2);	
// then compute the power cost per month based upon the formula
var permonth2 = ((amps * volts / 1000) * hours2 * (365 /12) * kwatthour2);
aw.permonth2.value = (permonth2).toFixed(2);	
}
// -->
