Javascript to calculate Electricity and Heat emission factors.