/* 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(){
  one = document.autoSumForm.firstBox.value;
  two = document.autoSumForm.secondBox.value; 
  three = document.autoSumForm.thirdBox.value;
  four = document.autoSumForm.fourthBox.value;
  five = document.autoSumForm.fifthBox.value;
  six = document.autoSumForm.sixthBox.value;
  seven = document.autoSumForm.seventhBox.value;
  eight = document.autoSumForm.eighthBox.value;
  nine = document.autoSumForm.ninthBox.value;
  ten = document.autoSumForm.tenthBox.value;
  eleven = document.autoSumForm.eleventhBox.value;
  twelve = document.autoSumForm.twelfthBox.value;
  thirteen = document.autoSumForm.thirteenthBox.value;
  fourteen = document.autoSumForm.fourteenthBox.value;
  fifteen = document.autoSumForm.fifteenthBox.value;
  sixteen = document.autoSumForm.sixteenthBox.value;
  document.autoSumForm.totalIn.value = (one * 1) + (two * 1) + (three * 1);
  document.autoSumForm.totalOut.value = (four * 1) + (five * 1) + (six * 1) + (seven * 1) + (eight * 1) + (nine * 1) + (ten * 1) + (eleven * 1) + (twelve * 1) + (thirteen * 1) + (fourteen * 1) + (fifteen * 1) + (sixteen * 1);
  document.autoSumForm.totalAll.value = ((one * 1) + (two * 1) + (three * 1)) - ((four * 1) + (five * 1) + (six * 1) + (seven * 1) + (eight * 1) + (nine * 1) + (ten * 1) + (eleven * 1) + (twelve * 1) + (thirteen * 1) + (fourteen * 1) + (fifteen * 1) + (sixteen * 1));
}
function stopCalc(){
  clearInterval(interval);
}

