function getresults() { var powercost; var hoursinuse; var daysperweek; var hoursstandby; var yearstandby; var onwatts; var standbywatts; var yearstandby; var yearkwh; var yearcost; var yearon; var temp1; var temp2; var temp3; var temp4; var temp5; var temp6; var totals; powercost = document.myForm.powercost.value; hoursinuse = document.myForm.hoursinuse.value; daysperweek = document.myForm.daysperweek.value; onwatts = document.myForm.onwatts.value; standbywatts = document.myForm.standbywatts.value; yearon = (hoursinuse * daysperweek * 52 * onwatts)/1000; hoursstandby = 24 - hoursinuse; yearstandby =(hoursstandby * daysperweek * 52 * standbywatts)/1000; temp1 = yearon + yearstandby; temp2 = temp1 * 100; temp3 = Math.round(temp2); temp4 = temp3 * powercost; temp5 = Math.round(temp4); document.myForm.yearkwh.value = temp3/100; document.myForm.yearcost.value = temp5/100; } function import1() { document.myForm.hrsday1.value = document.myForm.hoursinuse.value; document.myForm.daysweek1.value = document.myForm.daysperweek.value; document.myForm.poweron1.value = document.myForm.onwatts.value; document.myForm.poweroff1.value = document.myForm.standbywatts.value; document.myForm.powerused1.value = document.myForm.yearkwh.value; document.myForm.powercost1.value = document.myForm.yearcost.value; GetTotal() } function import2() { document.myForm.hrsday2.value = document.myForm.hoursinuse.value; document.myForm.daysweek2.value = document.myForm.daysperweek.value; document.myForm.poweron2.value = document.myForm.onwatts.value; document.myForm.poweroff2.value = document.myForm.standbywatts.value; document.myForm.powerused2.value = document.myForm.yearkwh.value; document.myForm.powercost2.value = document.myForm.yearcost.value; GetTotal() } function import3() { document.myForm.hrsday3.value = document.myForm.hoursinuse.value; document.myForm.daysweek3.value = document.myForm.daysperweek.value; document.myForm.poweron3.value = document.myForm.onwatts.value; document.myForm.poweroff3.value = document.myForm.standbywatts.value; document.myForm.powerused3.value = document.myForm.yearkwh.value; document.myForm.powercost3.value = document.myForm.yearcost.value; GetTotal() } function import4() { document.myForm.hrsday4.value = document.myForm.hoursinuse.value; document.myForm.daysweek4.value = document.myForm.daysperweek.value; document.myForm.poweron4.value = document.myForm.onwatts.value; document.myForm.poweroff4.value = document.myForm.standbywatts.value; document.myForm.powerused4.value = document.myForm.yearkwh.value; document.myForm.powercost4.value = document.myForm.yearcost.value; GetTotal() } function import5() { document.myForm.hrsday5.value = document.myForm.hoursinuse.value; document.myForm.daysweek5.value = document.myForm.daysperweek.value; document.myForm.poweron5.value = document.myForm.onwatts.value; document.myForm.poweroff5.value = document.myForm.standbywatts.value; document.myForm.powerused5.value = document.myForm.yearkwh.value; document.myForm.powercost5.value = document.myForm.yearcost.value; GetTotal() } function import6() { document.myForm.hrsday6.value = document.myForm.hoursinuse.value; document.myForm.daysweek6.value = document.myForm.daysperweek.value; document.myForm.poweron6.value = document.myForm.onwatts.value; document.myForm.poweroff6.value = document.myForm.standbywatts.value; document.myForm.powerused6.value = document.myForm.yearkwh.value; document.myForm.powercost6.value = document.myForm.yearcost.value; GetTotal() } function GetTotal() { temp1 = document.myForm.powerused1.value * 1; temp2 = document.myForm.powerused2.value * 1; temp3 = document.myForm.powerused3.value * 1; temp4 = document.myForm.powerused4.value * 1; temp5 = document.myForm.powerused5.value * 1; temp6 = document.myForm.powerused6.value * 1; totals = temp1 + temp2 + temp3 + temp4 + temp5 + temp6; document.myForm.Totalpowerused.value = totals; temp1 = document.myForm.powercost1.value * 1; temp2 = document.myForm.powercost2.value * 1; temp3 = document.myForm.powercost3.value * 1; temp4 = document.myForm.powercost4.value * 1; temp5 = document.myForm.powercost5.value * 1; temp6 = document.myForm.powercost6.value * 1; totals = temp1 + temp2 + temp3 + temp4 + temp5 + temp6; document.myForm.Totalpowercost.value = totals; }