// Configurable section

// The number of bottles of products we offer in this order page
var amtArr=new Array(1,2,3,6,9);

// Price corresponding to each quantity of product
var priceArr=new Array();
priceArr[1] = 54.95;
priceArr[2] = 89.95;
priceArr[3] = 129.95;
priceArr[6] = 239.95;
priceArr[9] = 349.95;

// Shipping price in the order Reg. Mail, Mail Express and DHL/FEDEX
var ShipPriceArr = new Array(0, 14.95, 29.95);

// End of Configurable section

// Do not modify the code below this unless you know what you are doing //

function calcTotal(shipm, qty) {
  
  var totalPrice = priceArr[qty]+ ShipPriceArr[shipm];
  var totalEle = document.getElementById('amt'+qty);
  clearAll();
  totalEle.value = totalPrice.toFixed(2);
  document.getElementById('shipping_method').value = shipm+1;
  document.getElementById('additem').value = qty;
}

function clearAll() {
    var i =0;
    for(i = 0; i < amtArr.length; i++) {
      document.getElementById('amt'+amtArr[i]).value='';
    }

}

