function fillForm(){
  var i;
  var st = 0;
  for(i in myCart){
    myCart[i].checkMin();
    document._pp_cart["amount_"+i].value= myCart[i].getPrice().toFixed(2);
    document._pp_cart["quantity_"+i].value= myCart[i].qty;
    document._pp_cart["_total_"+i].value= getTotal(myCart[i]).toFixed(2);
    st += getTotal(myCart[i]);
  }
  if(document._pp_cart){
    document._pp_cart["_sub_total"].value= st.toFixed(2);
    var ship = getShipping(st);
    document._pp_cart["_shipping"].value = ship.toFixed(2);
    document._pp_cart["_total"].value= (ship + st).toFixed(2);
  }
}
function changeQty(x){
  var amt = document._pp_cart["quantity_"+x].value;
  if(isNaN(amt)){
    alert("'"+amt+"' is not a valid quantity.\nPlease enter a valid number");
    document._pp_cart["quantity_"+x].value = myCart[x].qty;
  }
  else{
    myCart[x].qty = parseInt(amt);
  }
}
function getTotal(obj){
  return obj.qty * obj.getPrice();
}
var changed=false;
function formChange(){
  changed=true;
}
function cartEnable(){
  var i;
  for(i in myCart){
    document._pp_cart["amount_"+i].disabled = false;
  }
}
function getShipping(total){
  var ship =  ( .10 * total);
  return (ship < 5) ? 5 : ship;
  //return 0;
}