// function to calculate the total cost field
function Total() {
   var tot = 0;
   tot += (0.00 * document.order.qty1.value);
   tot += (30.00 * document.order.qty2.value);
   tot += (43.00 * document.order.qty3.value);
   tot += (43.00 * document.order.qty4.value);
   tot += (43.00 * document.order.qty5.value);
   tot += (26.00 * document.order.qty6.value);
   tot += (99.00 * document.order.qty7.value);



   document.order.totalcost.value = tot;
}

// function to update cost when quantity is changed
function UpdateCost(number, unitcost) {
   costname = "cost" + number;
   qtyname = "qty" + number;
   var q = document.order[qtyname].value;
   document.order[costname].value = q * unitcost;
   Total();
}

