// 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] = 69;
priceArr[2] = 129;
priceArr[3] = 179;
priceArr[6] = 299;
priceArr[9] = 378;

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

// 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('quantity').value = qty;
  document.getElementById('shipping').value = shipm;
}

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

}


