function getresults() { var panelwatts; var installnetcost; var sizem2; var solarefficiency; var yearradiation; var yearkwh; var lifespan; var totalpowerout; var costperkwh; var feedintariff; var temp; var temp2; var powercost; panelwatts = document.myForm.panelwatts.value; installnetcost = document.myForm.installnetcost.value; sizem2 = document.myForm.sizem2.value solarefficiency = document.myForm.solarefficiency.value yearradiation = document.myForm.yearradiation.value; powercost = document.myForm.powercost.value; feedintariff = document.myForm.feedintariff.value; yearkwh = Math.round(sizem2 * solarefficiency * yearradiation * 365 * 0.9); lifespan = document.myForm.lifespan.value; totalpowerout = yearkwh * lifespan; document.myForm.totalpowerout.value = totalpowerout; temp = installnetcost / totalpowerout; temp2 = Math.round(temp * 1000); costperkwh = temp2 / 1000; document.myForm.costperkwh.value = costperkwh; document.myForm.lifesavings.value = Math.round(totalpowerout * powercost); document.myForm.lifenetsavings.value = document.myForm.lifesavings.value - installnetcost; document.myForm.feedinlifenetsavings.value = Math.round(totalpowerout * feedintariff) - installnetcost; temp2 = Math.round((document.myForm.lifesavings.value / installnetcost)/ lifespan * 1000); document.myForm.lifeROI.value = temp2 /10; temp2 = Math.round((Math.round(totalpowerout * feedintariff) / installnetcost)/ lifespan * 1000); document.myForm.feedinlifeROI.value = temp2 /10; document.myForm.solarreturn1year.value = yearkwh * powercost; document.myForm.solarreturn1yearfeedin.value = yearkwh * feedintariff; } function getarea() { var panels; var width; var height; var sizem2; var temp; var temp2; panels = document.myForm.panels.value; width = document.myForm.width.value; height = document.myForm.height.value; temp = Math.round(panels * width * height /100000); document.myForm.sizem2.value = temp / 10; }