//<![CDATA[
<!-- Begin
var factor1 = 0.07;
var factor2 = 1.7;
var factor3 = 0.24;
var factor4 = 1.0;
var factor5 = 3.0;
var factor6 = 0.23;
var factor7 = 5.0;
var factor8 = 2.6;
var factor9 = 1.8;
var factor10 = 3.0;
var factor11 = 0.129;
var factor12 = 1.0;

var household1 = eval(documemt.autoSumForm.household1.value);
var household2 = eval(documemt.autoSumForm.household2.value);
var household3 = eval(documemt.autoSumForm.household3.value);
var household4 = eval(documemt.autoSumForm.household4.value);
var household5 = eval(documemt.autoSumForm.household5.value);
var household6 = eval(documemt.autoSumForm.household6.value);
var household7 = eval(documemt.autoSumForm.household7.value);
var transport1 = eval(documemt.autoSumForm.transport1.value);
var transport2 = eval(documemt.autoSumForm.transport2.value);
var transport3 = eval(documemt.autoSumForm.transport3.value);
var transport4 = eval(documemt.autoSumForm.transport4.value);
var waste1 = eval(documemt.autoSumForm.waste1.value);

function startCalc(){
  interval = setInterval("calc()",1);   
   }
function numbersOnly(evt, val) {
evt = (evt) ? evt : event;
var charCode = (evt.charCode) ? evt.charCode : ((evt.keyCode) ? evt.keyCode : ((evt.which) ? evt.which : 0));
if ( (charCode >= 48 && charCode <= 57) || charCode == 8 || charCode == 9 || charCode == 13 || charCode == 46) 
{
if (val.length > 6) {
return(false);
}
else {
return(true);
}
};
return(false);
}

function calc(){


  ghg1 = (document.autoSumForm.household1.value)*factor1;
  document.autoSumForm.ghg1.value = Math.round((ghg1*100)) / 100; 
  ghg2 = (document.autoSumForm.household2.value)*factor2;
  document.autoSumForm.ghg2.value = Math.round((ghg2*100)) / 100; 
  ghg3 = (document.autoSumForm.household3.value)*factor3;
  document.autoSumForm.ghg3.value = Math.round((ghg3*100)) / 100; 
  ghg4 = (document.autoSumForm.household4.value)*factor4;
  document.autoSumForm.ghg4.value = Math.round((ghg4*100)) / 100; 
  ghg5 = (document.autoSumForm.household5.value)*factor5;
  document.autoSumForm.ghg5.value = Math.round((ghg5*100)) / 100; 
  ghg6 = (document.autoSumForm.household6.value)*factor6;
  document.autoSumForm.ghg6.value = Math.round((ghg6*100)) / 100; 
  ghg7 = (document.autoSumForm.household7.value)*factor7;
  document.autoSumForm.ghg7.value = Math.round((ghg7*100)) / 100; 
  ghg8 = (document.autoSumForm.transport1.value)*factor8;
  document.autoSumForm.ghg8.value = Math.round((ghg8*100)) / 100; 
  ghg9 = (document.autoSumForm.transport2.value)*factor9;
  document.autoSumForm.ghg9.value = Math.round((ghg9*100)) / 100; 
  ghg10 = (document.autoSumForm.transport3.value)*factor10;
  document.autoSumForm.ghg10.value = Math.round((ghg10*100)) / 100; 
  ghg11 = (document.autoSumForm.transport4.value)*factor11;
  document.autoSumForm.ghg11.value = Math.round((ghg11*100)) / 100; 
  ghg12 = (document.autoSumForm.waste1.value)*factor12;
  document.autoSumForm.ghg12.value = Math.round((ghg12*100)) / 100; 
   
document.autoSumForm.ghgEnergy.value = Math.round(((ghg1 * 1) + (ghg2 * 1) + (ghg3 * 1) + (ghg4 * 1) + (ghg5 * 1) + (ghg6 * 1) + (ghg7 * 1))*100)/100;
document.autoSumForm.ghgTransport.value = Math.round(((ghg8 * 1) + (ghg9 * 1) + (ghg10 * 1) + (ghg11 * 1))*100)/100;
document.autoSumForm.ghgTotal.value = Math.round(((ghg1 * 1) + (ghg2 * 1) + (ghg3 * 1) + (ghg4 * 1) + (ghg5 * 1) + (ghg6 * 1) + (ghg7 * 1) + (ghg8 * 1) + (ghg9 * 1) + (ghg10 * 1) + (ghg11 * 1) + (ghg12 * 1))*100)/100;
}
function stopCalc(){
  clearInterval(interval);
}

//  End -->
//]]>
