
| function calculate(fld,
price) { var dir = fld.name.charAt(1); var num = fld.name.charAt(2); var quant = fld.options[fld.selectedIndex].value; var subtotal = eval(quant * price); var total = 0; eval('document.order.t' + dir + num).value = fix(subtotal); for (i = 1; i < 8; i++) { if (parseFloat(itemTotal)
> 0) total += parseFloat(itemTotal); eval('document.order.total'
+ dir).value = total; function fix(total) { cents = Math.round( cents); if (cents < 10) cents = "0" +
cents; total = dollars + "." + cents; |