// JavaScript Document
  function getElementById(ElementId)
  {
    if (document.documentElement)
    {
      return document.getElementById(ElementId);
    }
    else
    {
      return document.all[ElementId];
    }
  }

  function cancel_items(form, checkboxs_name)
  {
    var product, product_qty;
    
    // get the form elements
    var el = form.elements;
    
    // loop through the elements...
    for(i=0;i<el.length;i++)
    {
      // and check if it is a checkbox
      if((el[i].type == "checkbox") && (el[i].name == checkboxs_name) && (el[i].checked))
      {
        product = el[i].id;
        product = product.replace(/cbCartProduct./, 'inCartProductQty.');
        product_qty = getElementById(product);
        if (product_qty != null)
        {
          product_qty.value = 0;
        }
      }
    }
    document.getElementById("frmCart").submit();
  }

  function getElementById(ElementId)
  {
    if (document.documentElement)
    {
      return document.getElementById(ElementId);
    }
    else
    {
      return document.all[ElementId];
    }
  }

  function change_currency()
  {
    var curr = getElementById('ddCurrency').options[getElementById('ddCurrency').selectedIndex].value;
    window.location.href = '?curr='+curr;
  }

  function buy_item()
  {
    var ppid = getElementById('ddProductPackages').options[getElementById('ddProductPackages').selectedIndex].value;
    var str = 'cart.asp?action=insert&ppid=0';
    str = str.replace('ppid=0', 'ppid=' + ppid);
    window.location.href = str;
  }
