function shopOrdersHistory(panel)
{
  if (!ajaxBusy())
  {
    var canPay = "Y";
    if (typeof(orderCheckOut) == "undefined")
      canPay = "N";
    setPanelLoadingSignal(panel);
    ajaxGetText(shopApp + "?sessionId=" + sessionId + "&content=ordersHistory&canPay=" + canPay, "", "",
      function() {
        if (validAccess())
        {
          updatePanelContent(panel, ajaxResponseText);
          var e1 = document.getElementById("ordersHistoryListing");
          var e2 = document.getElementById("ordersHistoryListingVertScrollbar");
          if (e1.scrollHeight == e1.offsetHeight)
            e2.style.visibility = "hidden";
          else
          {
            e1.scrollTop = 0;
//            e1.style.height = e1.offsetParent.offsetHeight - e1.offsetTop + "px";
            e1.style.width = e1.offsetParent.offsetWidth - e1.offsetLeft - e2.offsetWidth - 8 + "px";
            e2.style.cssFloat = "left";
            e2.style.position = "relative";
            e2.style.left = e1.offsetLeft + e1.offsetWidth + 8 + "px";
            e2.style.top = e1.offsetTop + Math.round((e1.offsetHeight - e2.offsetHeight) / 2) + "px";
          }
        }
      }
    );
  }
}

