function onblur_calc()
{
  var item_totals;
  var blk_qty = parseInt(document.order_sheet.blk_qty.value);
  if(isNaN(blk_qty) === true)
  {
    blk_qty = 0;
  }
  var blu_qty = parseInt(document.order_sheet.blu_qty.value);
  if(isNaN(blu_qty) === true)
  {
    blu_qty = 0;
  }
  var grn_qty = parseInt(document.order_sheet.grn_qty.value);
  if(isNaN(grn_qty) === true)
  {
    grn_qty = 0;
  }
  var gld_qty = parseInt(document.order_sheet.gld_qty.value);
  if(isNaN(gld_qty) === true)
  {
    gld_qty = 0;
  }
  var htpnk_qty = parseInt(document.order_sheet.htpnk_qty.value);
  if(isNaN(htpnk_qty) === true)
  {
    htpnk_qty = 0;
  }
  var ltpnk_qty = parseInt(document.order_sheet.ltpnk_qty.value);
  if(isNaN(ltpnk_qty) === true)
  {
    ltpnk_qty = 0;
  }
  var mrn_qty = parseInt(document.order_sheet.mrn_qty.value);
  if(isNaN(mrn_qty) === true)
  {
    mrn_qty = 0;
  }
  var ntrl_qty = parseInt(document.order_sheet.ntrl_qty.value);
  if(isNaN(ntrl_qty) === true)
  {
    ntrl_qty = 0;
  }
  var orng_qty = parseInt(document.order_sheet.orng_qty.value);
  if(isNaN(orng_qty) === true)
  {
    orng_qty = 0;
  }
  var prpl_qty = parseInt(document.order_sheet.prpl_qty.value);
  if(isNaN(prpl_qty) === true)
  {
    prpl_qty = 0;
  }
  var red_qty = parseInt(document.order_sheet.red_qty.value);
  if(isNaN(red_qty) === true)
  {
    red_qty = 0;
  }
var lime_qty = parseInt(document.order_sheet.lime_qty.value);
  if(isNaN(lime_qty) === true)
  {
    lime_qty = 0;
  }
  
  var qty_total = blk_qty + blu_qty + grn_qty + gld_qty + htpnk_qty + ltpnk_qty + mrn_qty + ntrl_qty + orng_qty + prpl_qty + red_qty + lime_qty;
  
  //If you change any of the prices or quantities, this starts the section you need to make changes to
  if((qty_total == 0) || (qty_total == "") || (isNaN(qty_total) === true))
  {
    price_per_roll = 0;
    }
  if((qty_total == 1) && (qty_total == 1))
  {
    price_per_roll = 6.00;
  }
  if((qty_total >= 2) && (qty_total <= 3))
  {
    price_per_roll = 3.25;
  }
 if((qty_total >= 4) && (qty_total <= 7))
  {
    price_per_roll = 2.80;
  }
  if((qty_total >= 8) && (qty_total <= 16))
  {
    price_per_roll = 2.50;
  }
  if((qty_total >= 17) && (qty_total <= 29))
  {
    price_per_roll = 2.00;
  }
  if((qty_total >= 30) && (qty_total <= 47))
  {
    price_per_roll = 1.60;
  }
  if(qty_total >= 48)
  {
    price_per_roll = 1.25;
  }
  //do not edit below this line!
  
  var total_price = price_per_roll * qty_total;
    
  document.order_sheet.total_qty.value = qty_total;
  document.order_sheet.price_per_roll.value = price_per_roll.toFixed(2);
  document.order_sheet.total_price.value = total_price.toFixed(2);
  
  var blk_price = blk_qty * price_per_roll;
  var blu_price = blu_qty * price_per_roll;
  var grn_price = grn_qty * price_per_roll;
  var gld_price = gld_qty * price_per_roll;
  var htpnk_price = htpnk_qty * price_per_roll;
  var ltpnk_price = ltpnk_qty * price_per_roll;
  var mrn_price = mrn_qty * price_per_roll; 
  var ntrl_price = ntrl_qty * price_per_roll;
  var orng_price = orng_qty * price_per_roll;
  var prpl_price = prpl_qty * price_per_roll;
  var red_price = red_qty * price_per_roll;
  var lime_price = lime_qty * price_per_roll;
  
  document.order_sheet.blk_price.value = blk_price.toFixed(2);
  document.order_sheet.blu_price.value = blu_price.toFixed(2);
  document.order_sheet.grn_price.value = grn_price.toFixed(2);
  document.order_sheet.gld_price.value = gld_price.toFixed(2);
  document.order_sheet.htpnk_price.value = htpnk_price.toFixed(2);
  document.order_sheet.ltpnk_price.value = ltpnk_price.toFixed(2);
  document.order_sheet.mrn_price.value = mrn_price.toFixed(2);
  document.order_sheet.ntrl_price.value = ntrl_price.toFixed(2);
  document.order_sheet.orng_price.value = orng_price.toFixed(2);
  document.order_sheet.prpl_price.value = prpl_price.toFixed(2);
  document.order_sheet.red_price.value = red_price.toFixed(2);
  document.order_sheet.lime_price.value = lime_price.toFixed(2);
  
  document.paypal.amount.value = price_per_roll.toFixed(2);
  document.paypal.quantity.value = qty_total;
}
function buildlist()
{
  if(document.order_sheet.blk_qty.value > 0)
  {
    if(document.paypal.item_name.value !== "Pre-wrap rolls: ")
    {
      document.paypal.item_name.value += ", ";
    }
    document.paypal.item_name.value += document.order_sheet.blk_qty.value + " Blk";
  }
  if(document.order_sheet.blu_qty.value > 0)
  {
    if(document.paypal.item_name.value !== "Pre-wrap rolls: ")
    {
      document.paypal.item_name.value += ", ";
    }
    document.paypal.item_name.value += document.order_sheet.blu_qty.value + " Blu";
  }
  if(document.order_sheet.grn_qty.value > 0)
  {
    if(document.paypal.item_name.value !== "Pre-wrap rolls: ")
    {
      document.paypal.item_name.value += ", ";
    }
    document.paypal.item_name.value += document.order_sheet.grn_qty.value + " Grn";
  }
  if(document.order_sheet.gld_qty.value > 0)
  {
    if(document.paypal.item_name.value !== "Pre-wrap rolls: ")
    {
      document.paypal.item_name.value += ", ";
    }
    document.paypal.item_name.value += document.order_sheet.gld_qty.value + " Gld";
  }
  if(document.order_sheet.htpnk_qty.value > 0)
  {
    if(document.paypal.item_name.value !== "Pre-wrap rolls: ")
    {
      document.paypal.item_name.value += ", ";
    }
    document.paypal.item_name.value += document.order_sheet.htpnk_qty.value + " Hot Pink";
  }
  if(document.order_sheet.ltpnk_qty.value > 0)
  {
    if(document.paypal.item_name.value !== "Pre-wrap rolls: ")
    {
      document.paypal.item_name.value += ", ";
    }
    document.paypal.item_name.value += document.order_sheet.ltpnk_qty.value + " Lt Pink";
  }
  if(document.order_sheet.mrn_qty.value > 0)
  {
    if(document.paypal.item_name.value !== "Pre-wrap rolls: ")
    {
      document.paypal.item_name.value += ", ";
    }
    document.paypal.item_name.value += document.order_sheet.mrn_qty.value + " Mar";
  }
  if(document.order_sheet.ntrl_qty.value > 0)
  {
    if(document.paypal.item_name.value !== "Pre-wrap rolls: ")
    {
      document.paypal.item_name.value += ", ";
    }
    document.paypal.item_name.value += document.order_sheet.ntrl_qty.value + " Nat";
  }
  if(document.order_sheet.orng_qty.value > 0)
  {
    if(document.paypal.item_name.value !== "Pre-wrap rolls: ")
    {
      document.paypal.item_name.value += ", ";
    }
    document.paypal.item_name.value += document.order_sheet.orng_qty.value + " Org";
  }
  if(document.order_sheet.prpl_qty.value > 0)
  {
    if(document.paypal.item_name.value !== "Pre-wrap rolls: ")
    {
      document.paypal.item_name.value += ", ";
    }
    document.paypal.item_name.value += document.order_sheet.prpl_qty.value + " Prpl";
  }
  if(document.order_sheet.red_qty.value > 0)
  {
    if(document.paypal.item_name.value !== "Pre-wrap rolls: ")
    {
      document.paypal.item_name.value += ", ";
    }
    document.paypal.item_name.value += document.order_sheet.red_qty.value + " Red";
  }
  
  if(document.order_sheet.lime_qty.value > 0)
  
  {
    if(document.paypal.item_name.value !== "Pre-wrap rolls: ")
    {
      document.paypal.item_name.value += ", ";
    }
    document.paypal.item_name.value += document.order_sheet.lime_qty.value + " Lime";
  }
}