var powercost; var offpeakpowercost; var yearpowercost; var lighthours; var floodlighthours; var tubes; var fridge; var showers; var taps; var computers; var laptops; var thinclients; var server; var insulation; var drafts; var ice; var savekWh; var savedollars; var savewater; var savewatertotal; var Totalsavedollars; var TotalsavekWh; var TotalsaveCo2; var forout; var ResultsOut; var temp1; function getresults() { savekWh = 0; savedollars = 0; Totalsavedollars = 0; TotalsavekWh = 0; savewatertotal = 0; TotalsaveCo2 = 0; ResultsOut = ""; document.myForm.ResultsOut.value = ""; powercost = Math.round(document.myForm.powercost.value * 100)/100; offpeakpowercost = Math.round(document.myForm.offpeakpowercost.value * 100)/100; yearpowercost = Math.round(document.myForm.yearpowercost.value); lighthours = Math.round(document.myForm.lighthours.value); floodlighthours = Math.round(document.myForm.floodlighthours.value); tubes = Math.round(document.myForm.tubes.value); fridge = Math.round(document.myForm.fridge.value); showers = Math.round(document.myForm.showers.value); taps = Math.round(document.myForm.taps.value); computers = Math.round(document.myForm.computers.value); laptops = Math.round(document.myForm.laptops.value); thinclients = Math.round(document.myForm.thinclients.value); server = Math.round(document.myForm.server.value); insulation = document.myForm.insulation.checked; drafts = document.myForm.drafts.checked; ice = document.myForm.ice.checked; ResultsOut = "Power cost " + powercost + ", Off peak Power cost " + offpeakpowercost + ", Year power cost " + yearpowercost + " \r"; document.myForm.ResultsOut.value = ResultsOut; if (lighthours > 0) { savekWh = lighthours * 0.062 * 365; savedollars = savekWh * powercost; TotalsavekWh = TotalsavekWh + savekWh; Totalsavedollars = Totalsavedollars + savedollars; ResultsOut = ResultsOut + "Lighting savings $" + Math.round(savedollars* 100)/100 + ", " + Math.round(savekWh* 100)/100 + "kWh. Calc = 62 Watts per light saved x hours x 365 days. \r"; document.myForm.ResultsOut.value = ResultsOut; } if (floodlighthours > 0) { savekWh = floodlighthours * 0.102 * 365; savedollars = savekWh * powercost; TotalsavekWh = TotalsavekWh + savekWh; Totalsavedollars = Totalsavedollars + savedollars; ResultsOut = ResultsOut + "Floodlighting savings $" + Math.round(savedollars* 100)/100 + ", " + Math.round(savekWh* 100)/100 + "kWh. Calc = 102 Watts per light saved x hours x 365 days. \r"; document.myForm.ResultsOut.value = ResultsOut; } if (tubes > 0) { savekWh = tubes * 0.012 * 365; savedollars = savekWh * powercost; TotalsavekWh = TotalsavekWh + savekWh; Totalsavedollars = Totalsavedollars + savedollars; ResultsOut = ResultsOut + "Fluroescent tube savings $" + Math.round(savedollars* 100)/100 + ", " + Math.round(savekWh* 100)/100 + "kWh. Calc = 12 watts x tube hours x 365 days. \r"; document.myForm.ResultsOut.value = ResultsOut; } if (fridge > 0) { savekWh = 700 * fridge; savedollars = savekWh * powercost; TotalsavekWh = TotalsavekWh + savekWh; Totalsavedollars = Totalsavedollars + savedollars; ResultsOut = ResultsOut + "Fridge savings $" + Math.round(savedollars* 100)/100 + ", " + Math.round(savekWh* 100)/100 + "kWh. Calc = Fridges * 700kWh. \r"; document.myForm.ResultsOut.value = ResultsOut; } if (showers > 0) { savekWh = showers * (20-9) * 0.052 * 365 * 0.5 * 5; savedollars = savekWh * powercost; savewater = (20-9) * showers * 365 * 5; TotalsavekWh = TotalsavekWh + savekWh; savewatertotal = savewatertotal + savewater; Totalsavedollars = Totalsavedollars + savedollars; ResultsOut = ResultsOut + "Showers savings $" + Math.round(savedollars* 100)/100 + ", " + Math.round(savekWh* 100)/100 + "kWh, Water saved " + Math.round(savewater) + " litres. Calc = showers x (20old-9new)litres/min x 0.052kWh(to heat 1 litre of water) x 0.5 (50% hot water) x 5 min showers x 365 days. \r"; document.myForm.ResultsOut.value = ResultsOut; } if (taps > 0) { savekWh = taps * (20-5) * 0.052 * 365 * 0.5; savedollars = savekWh * powercost; savewater = (20-5) * taps * 365; TotalsavekWh = TotalsavekWh + savekWh; savewatertotal = savewatertotal + savewater; Totalsavedollars = Totalsavedollars + savedollars; ResultsOut = ResultsOut + "Taps savings $" + Math.round(savedollars* 100)/100 + ", " + Math.round(savekWh* 100)/100 + "kWh, Water saved " + Math.round(savewater) + " litres. Calc = taps min x (20old-5new)litres/min x 0.052kWh(to heat 1 litre of water) x 0.5 (50% hot water) x 365 days. \r"; document.myForm.ResultsOut.value = ResultsOut; } if (computers > 0) { savekWh = 0.38 * 0.2 * 24 * 365 * computers; savedollars = savekWh * powercost; TotalsavekWh = TotalsavekWh + savekWh; Totalsavedollars = Totalsavedollars + savedollars; ResultsOut = ResultsOut + "Computer savings $" + Math.round(savedollars* 100)/100 + ", " + Math.round(savekWh* 100)/100 + "kWh. Calc= 38% saving x 200 watt PC x 24 hours x 365 days. \r"; document.myForm.ResultsOut.value = ResultsOut; } if (laptops > 0) { savekWh = 0.38 * 0.05 * 24 * 365 * laptops; savedollars = savekWh * powercost; TotalsavekWh = TotalsavekWh + savekWh; Totalsavedollars = Totalsavedollars + savedollars; ResultsOut = ResultsOut + "Laptop savings $" + Math.round(savedollars* 100)/100 + ", " + Math.round(savekWh* 100)/100 + "kWh. Calc= 38% saving x 50 watt laptop x 24 hours x 365 days. \r"; document.myForm.ResultsOut.value = ResultsOut; } if (thinclients > 0) { savekWh = 0.085 * 45 * 52 * thinclients; savedollars = savekWh * powercost; TotalsavekWh = TotalsavekWh + savekWh; Totalsavedollars = Totalsavedollars + savedollars; ResultsOut = ResultsOut + "Thin client savings $" + Math.round(savedollars* 100)/100 + ", " + Math.round(savekWh* 100)/100 + "kWh. Calc = thin clients x 85 watts saving x 45 hours per week x 52 weeks. \r"; document.myForm.ResultsOut.value = ResultsOut; } if (server > 0) { savekWh = 0.6 * 24 * 365 * server; savedollars = savekWh * powercost; TotalsavekWh = TotalsavekWh + savekWh; Totalsavedollars = Totalsavedollars + savedollars; ResultsOut = ResultsOut + "Server savings $" + Math.round(savedollars* 100)/100 + ", " + Math.round(savekWh* 100)/100 + "kWh. Calc = servers x (300W server + 300W cooling) x 24 hours x 365 days. \r"; document.myForm.ResultsOut.value = ResultsOut; } if (insulation == true) { savedollars = yearpowercost * 0.3 * 0.4; savekWh = savedollars/powercost; TotalsavekWh = TotalsavekWh + savekWh; Totalsavedollars = Totalsavedollars + savedollars; ResultsOut = ResultsOut + "Insulation savings $" + Math.round(savedollars* 100)/100 + ", " + Math.round(savekWh* 100)/100 + "kWh. Calc = Year cost x 40% for heat/cooling x 30% saving. \r"; document.myForm.ResultsOut.value = ResultsOut; } if (drafts == true) { savedollars = yearpowercost * 0.3 * 0.4; savekWh = savedollars/powercost; TotalsavekWh = TotalsavekWh + savekWh; Totalsavedollars = Totalsavedollars + savedollars; ResultsOut = ResultsOut + "Drafts savings $" + Math.round(savedollars* 100)/100 + ", " + Math.round(savekWh* 100)/100 + "kWh. Calc = Year cost x 40% for heat/cooling x 30% saving. \r"; document.myForm.ResultsOut.value = ResultsOut; } if (ice == true) { temp1 = (powercost - offpeakpowercost) * 0.95; savedollars = yearpowercost * temp1 * 0.4; savekWh = yearpowercost * 0.4 * 0.1; TotalsavekWh = TotalsavekWh + savekWh; Totalsavedollars = Totalsavedollars + savedollars; ResultsOut = ResultsOut + "Ice Cooling savings $" + Math.round(savedollars* 100)/100 + ", " + Math.round(savekWh* 100)/100 + "kWh. Calc = ((Peak power - off peak power)x 95% reduction) x year power x 40%. \r"; document.myForm.ResultsOut.value = ResultsOut; } document.myForm.yearkwh.value = Math.round(TotalsavekWh); document.myForm.yearsaved.value = Math.round(Totalsavedollars); document.myForm.savewatertotal.value = Math.round(savewatertotal); document.myForm.yearco2saved.value = Math.round(TotalsavekWh); }