/* 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(){
  Qty_1 = document.autoSumForm.Qty_1.value;
  Units_1 = document.autoSumForm.Units_1.value; 
  UnitPrice_1 = document.autoSumForm.UnitPrice_1.value; 
  document.autoSumForm.Total_1.value = (Qty_1) * (Units_1) * (UnitPrice_1);
}
function stopCalc(){
  clearInterval(interval);
}


function startCalc_2(){
  interval = setInterval("calc_2()",1);
}
function calc_2(){
  Qty_2 = document.autoSumForm.Qty_2.value;
  Units_2 = document.autoSumForm.Units_2.value; 
  UnitPrice_2 = document.autoSumForm.UnitPrice_2.value;
  document.autoSumForm.Total_2.value = (Qty_2) * (Units_2) * (UnitPrice_2);
}
function stopCalc_2(){
  clearInterval(interval);
}


function startCalc_3(){
  interval = setInterval("calc_3()",1);
}
function calc_3(){
  Qty_3 = document.autoSumForm.Qty_3.value;
  Units_3 = document.autoSumForm.Units_3.value; 
  UnitPrice_3 = document.autoSumForm.UnitPrice_3.value;
  document.autoSumForm.Total_3.value = (Qty_3) * (Units_3) * (UnitPrice_3);
}
function stopCalc_3(){
  clearInterval(interval);
}


function startCalc_4(){
  interval = setInterval("calc_4()",1);
}
function calc_4(){
  Qty_4 = document.autoSumForm.Qty_4.value;
  Units_4 = document.autoSumForm.Units_4.value; 
  UnitPrice_4 = document.autoSumForm.UnitPrice_4.value;
  document.autoSumForm.Total_4.value = (Qty_4) * (Units_4) * (UnitPrice_4);
}
function stopCalc_4(){
  clearInterval(interval);
}


function startCalc_5(){
  interval = setInterval("calc_5()",1);
}
function calc_5(){
  Qty_5 = document.autoSumForm.Qty_5.value;
  Units_5 = document.autoSumForm.Units_5.value; 
  UnitPrice_5 = document.autoSumForm.UnitPrice_5.value;
  document.autoSumForm.Total_5.value = (Qty_5) * (Units_5) * (UnitPrice_5);
}
function stopCalc_5(){
  clearInterval(interval);
}



function startCalc_Subtotal(){
  interval = setInterval("calc_Subtotal()",1);
}
function calc_Subtotal(){
  Total_1 = document.autoSumForm.Total_1.value;
  Total_2 = document.autoSumForm.Total_2.value; 
  document.autoSumForm.Subtotal.value = (Total_1 * 1) + (Total_2 * 1);
}
function stopCalc_Subtotal(){
  clearInterval(interval);
}



function startCalc_grandTotal(){
  interval = setInterval("calc_grandTotal()",1);
}
function calc_grandTotal(){
  Subtotal = document.autoSumForm.Subtotal.value;
  Taxes = document.autoSumForm.Taxes.value; 
  ShippingHandling = document.autoSumForm.ShippingHandling.value;
  document.autoSumForm.grandTotal.value = ((Subtotal * 1) + (Taxes * Subtotal)) + (ShippingHandling * 1);
}
function stopCalc_grandTotal(){
  clearInterval(interval);
}


