<!--

item_weight = new Array (0.0,0.2,0.3,1.2,2.2,28.0,43.0);
item_size = new Array ("---","1 OZ Bottle","2  OZ Bottle","16  OZ Bottle","32  OZ Bottle","25 LB Pail","40 LB Pail");
additional_handling_charges = new Array(0.00,0.00,0.00,0.00,0.00,8.00,8.00)

function update_price(thisForm) {
  item_price = thisForm.product_selected.value;
  item_index = thisForm.product_selected.selectedIndex;
  additional_handling = 0.00;
  // reset item_quantity to zero if invalid data
  item_quantity = thisForm.quantity.value;
  if (object_is_ok(item_quantity,0,4,'0123456789','Quantity') ==  false) {
    item_quantity = '0';
    thisForm.quantity.value = 0;
  }
  // no need to validate , the following are computed values, just update form element
  if (thisForm.water_soluble_option[1].checked) { // Water Soluble Option was selected
    item_price = variable_round(item_price * 0.5,2);
    item_price = format_to_dollars(item_price);
  }  
  additional_handling = variable_round(item_quantity * additional_handling_charges[item_index],2);
  additional_handling = format_to_dollars(additional_handling);
  extended_price = variable_round(item_price * item_quantity,2);
  extended_price = format_to_dollars(extended_price);
  thisForm.unit_price.value = item_price;
  thisForm.item_index.value = item_index;
  thisForm.extended_price.value = extended_price;
  thisForm.item_weight.value = item_weight[item_index];
  thisForm.item_size.value = item_size[item_index];
  thisForm.additional_handling_charges.value = additional_handling;
}

//-->
