/* The whole file needs to go with Sl_cal.asp <script type="text/javascript" language="JavaScript" src="ScriptLibrary/Sl-Cal.js"></script> */


<!-- Begin
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.forthBox.value;
  five = document.autoSumForm.fifBox.value;
  six = document.autoSumForm.siBox.value;
  seven = document.autoSumForm.limitBox.value;
  eight = document.autoSumForm.toBox.value;
  document.autoSumForm.totalBox.value = (one * 1) + (two * 1) + (three * 1) + (four * 1) + (five * 1) + (six * 1);
  document.autoSumForm.perBox.value = Math.round(100 * ((one *1) / ((one * 1) + (two * 1) + (three * 1) + (four * 1) + (five * 1) + (six * 1))));
  document.autoSumForm.per1Box.value = Math.round(100 * ((two *1) / ((one * 1) + (two * 1) + (three * 1) + (four * 1) + (five * 1) + (six * 1))));
  document.autoSumForm.per2Box.value = Math.round(100 * ((three *1) / ((one * 1) + (two * 1) + (three * 1) + (four * 1) + (five * 1) + (six * 1))));
  document.autoSumForm.per3Box.value = Math.round(100 * ((four *1) / ((one * 1) + (two * 1) + (three * 1) + (four * 1) + (five * 1) + (six * 1))));
  document.autoSumForm.per4Box.value = Math.round(100 * ((five *1) / ((one * 1) + (two * 1) + (three * 1) + (four * 1) + (five * 1) + (six * 1))));
  document.autoSumForm.per5Box.value = Math.round(100 * ((six *1) / ((one * 1) + (two * 1) + (three * 1) + (four * 1) + (five * 1) + (six * 1))));
  document.autoSumForm.ad1Box.value = Math.round((95 * ((one * 1) + (two * 1) + (three * 1) ))/100);
  document.autoSumForm.ad2Box.value = Math.round((90 * ((one * 1) + (two * 1) + (three * 1) ))/100);
  document.autoSumForm.ad3Box.value = Math.round((85 * ((one * 1) + (two * 1) + (three * 1) ))/100);
  document.autoSumForm.ad4Box.value = Math.round((80 * ((one * 1) + (two * 1) + (three * 1) ))/100);
  document.autoSumForm.ad5Box.value = Math.round((75 * ((one * 1) + (two * 1) + (three * 1) ))/100);
  document.autoSumForm.ad6Box.value = Math.round((70 * ((one * 1) + (two * 1) + (three * 1) ))/100);
  document.autoSumForm.ad7Box.value = Math.round((65 * ((one * 1) + (two * 1) + (three * 1) ))/100);
  document.autoSumForm.ad11Box.value = Math.round((95 * ((one * 1) + (two * 1) + (three * 1) + (four * 1) ))/100);
  document.autoSumForm.ad12Box.value = Math.round((90 * ((one * 1) + (two * 1) + (three * 1) + (four * 1) ))/100);
  document.autoSumForm.ad13Box.value = Math.round((85 * ((one * 1) + (two * 1) + (three * 1) + (four * 1) ))/100);
  document.autoSumForm.ad14Box.value = Math.round((80 * ((one * 1) + (two * 1) + (three * 1) + (four * 1) ))/100);
  document.autoSumForm.ad15Box.value = Math.round((75 * ((one * 1) + (two * 1) + (three * 1) + (four * 1) ))/100);
  document.autoSumForm.ad16Box.value = Math.round((70 * ((one * 1) + (two * 1) + (three * 1) + (four * 1) ))/100);
  document.autoSumForm.ad17Box.value = Math.round((65 * ((one * 1) + (two * 1) + (three * 1) + (four * 1) ))/100);
  document.autoSumForm.od1Box.value = Math.round(((95 * ((one * 1) + (two * 1) + (three * 1) ))/100) - (seven * 1));
  document.autoSumForm.od2Box.value = Math.round(((90 * ((one * 1) + (two * 1) + (three * 1) ))/100) - (seven * 1));
  document.autoSumForm.od3Box.value = Math.round(((85 * ((one * 1) + (two * 1) + (three * 1) ))/100) - (seven * 1));
  document.autoSumForm.od4Box.value = Math.round(((80 * ((one * 1) + (two * 1) + (three * 1) ))/100) - (seven * 1));
  document.autoSumForm.od5Box.value = Math.round(((75 * ((one * 1) + (two * 1) + (three * 1) ))/100) - (seven * 1));
  document.autoSumForm.od6Box.value = Math.round(((70 * ((one * 1) + (two * 1) + (three * 1) ))/100) - (seven * 1));
  document.autoSumForm.od7Box.value = Math.round(((65 * ((one * 1) + (two * 1) + (three * 1) ))/100) - (seven * 1));
  document.autoSumForm.od11Box.value = Math.round(((95 * ((one * 1) + (two * 1) + (three * 1) + (four * 1) ))/100) - (seven * 1));
  document.autoSumForm.od12Box.value = Math.round(((90 * ((one * 1) + (two * 1) + (three * 1) + (four * 1) ))/100) - (seven * 1));
  document.autoSumForm.od13Box.value = Math.round(((85 * ((one * 1) + (two * 1) + (three * 1) + (four * 1) ))/100) - (seven * 1));
  document.autoSumForm.od14Box.value = Math.round(((80 * ((one * 1) + (two * 1) + (three * 1) + (four * 1) ))/100) - (seven * 1));
  document.autoSumForm.od15Box.value = Math.round(((75 * ((one * 1) + (two * 1) + (three * 1) + (four * 1) ))/100) - (seven * 1));
  document.autoSumForm.od16Box.value = Math.round(((70 * ((one * 1) + (two * 1) + (three * 1) + (four * 1) ))/100) - (seven * 1));
  document.autoSumForm.od17Box.value = Math.round(((65 * ((one * 1) + (two * 1) + (three * 1) + (four * 1) ))/100) - (seven * 1));
  document.autoSumForm.dtBox.value = Math.round(365 * (((one * 1) + (two * 1) + (three * 1) + (four * 1) + (five * 1) + (six * 1)) / (eight * 1)));
}
function stopCalc(){
  clearInterval(interval);
}
//  End -->



