// JavaScript Document
/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Jim Stiles | www.jdstiles.com */
function startCalc(){
  interval = setInterval("calc()",1);
}
function calc(){
one1 = document.autoSumForm.FirstMortgage.value;
one2= document.autoSumForm.SecondMortage.value;
one3 = document.autoSumForm.SecuredLoan.value;
one4 = document.autoSumForm.Charges.value;
one5 = document.autoSumForm.Rent.value;
one6 = document.autoSumForm.GroundRent.value;
one7 = document.autoSumForm.HomeInsurance.value;
one8 = document.autoSumForm.CouncilTax.value;
one9 = document.autoSumForm.EndownmentPolicy.value;
one10 = document.autoSumForm.MiscellaneousEx.value;
one11 = document.autoSumForm.Gas.value;
one12 = document.autoSumForm.Electric.value;
one13 = document.autoSumForm.WaterRates.value;
one14 = document.autoSumForm.Telephone.value;
one15 = document.autoSumForm.MobileMain.value;
one16 = document.autoSumForm.MobilePartner.value;
one17 = document.autoSumForm.LifeInsurance.value;
one18 = document.autoSumForm.HealthInsurance.value;
one19 = document.autoSumForm.FoodToiletries.value;
one20 = document.autoSumForm.SchoolMeals.value;
one21 = document.autoSumForm.SchoolTravel.value;
one22 = document.autoSumForm.SchoolUniforms.value;
one23 = document.autoSumForm.AfterSchoolActivities.value;
one24 = document.autoSumForm.Clothing.value;
one25 = document.autoSumForm.OtherHPLease.value;
one26 = document.autoSumForm.CarVehicleHP.value;
one27 = document.autoSumForm.CarPetrol.value;
one28 = document.autoSumForm.CarInsurance.value;
one29 = document.autoSumForm.CarRoadTax.value;
one30 = document.autoSumForm.CarMaintenance.value;
one31 = document.autoSumForm.ChildMinding.value;
one32 = document.autoSumForm.DentalMedical.value;
one33 = document.autoSumForm.Pets.value;
  document.autoSumForm.totalexpenditure.value = (one1 * 1) + (one2 * 1) + (one3 * 1) + (one4 * 1) + (one5 * 1) + (one6 * 1) + (one7 * 1) + (one8 * 1) + (one9 * 1) + (one10 * 1) + (one11 * 1) + (one12 * 1) + (one13 * 1) + (one14 * 1) + (one15 * 1) + (one16 * 1) + (one17 * 1) + (one18 * 1) + (one19 * 1) + (one20 * 1) + (one21 * 1) + (one22 * 1) + (one23 * 1) + (one24 * 1) + (one25 * 1) + (one26 * 1) + (one27 * 1) + (one28 * 1) + (one29 * 1) + (one30 * 1) + (one31 * 1) + (one32 * 1) + (one33 * 1);
}
function stopCalc(){
  clearInterval(interval);
}


function startCalc2(){
  interval = setInterval("calc2()",1);
}
function calc2(){
one01 = document.autoSumForm.THP.value;
one02= document.autoSumForm.Overtime.value;
one03 = document.autoSumForm.Commsisions.value;
one04 = document.autoSumForm.Bonuses.value;
one05 = document.autoSumForm.ParttimeWork.value;
one06 = document.autoSumForm.PTHP.value;
one07 = document.autoSumForm.POvertime.value;
one08 = document.autoSumForm.PCom.value;
one09 = document.autoSumForm.PBonuses.value;
one010 = document.autoSumForm.PPTW.value;
one011 = document.autoSumForm.CB.value;
one012 = document.autoSumForm.CTC.value;
one013 = document.autoSumForm.WTC.value;
one014 = document.autoSumForm.Job.value;
one015 = document.autoSumForm.DA.value;
one016 = document.autoSumForm.Pension.value;
one017 = document.autoSumForm.ND.value;
one018 = document.autoSumForm.RP.value;
one019 = document.autoSumForm.CM.value;
one020 = document.autoSumForm.Miscellaneous.value;
  document.autoSumForm.totalincome.value = (one01 * 1) + (one02 * 1) + (one03 * 1) + (one04 * 1) + (one05 * 1) + (one06 * 1) + (one07 * 1) + (one08 * 1) + (one09 * 1) + (one010 * 1) + (one011 * 1) + (one012 * 1) + (one013 * 1) + (one014 * 1) + (one015 * 1) + (one016 * 1) + (one017 * 1) + (one018 * 1) + (one019 * 1) + (one020 * 1);
}
function stopCalc2(){
  clearInterval(interval);
}

function startCalc3(){
  interval = setInterval("calc3()",1);
}
function calc3(){
one001 = document.autoSumForm.totalincome.value;
one002= document.autoSumForm.totalexpenditure.value;
  document.autoSumForm.surplus.value = (one001 * 1) - (one002 * 1);
}
function stopCalc2(){
  clearInterval(interval);
}

