function SetCatalogueOpt()
{
  var allCells = document.getElementsByTagName("a");
  for (var i = 0; i < allCells.length; i++)
  {
    if (allCells[i].className == "catalogFolderFooter" || allCells[i].className == "catalogItemFooter")
    {
      var name = allCells[i].innerHTML;
      name = name.replace(/^\s+|\s+$/g, '');
      if(name in oc(['In-Stock Binders','Manilla Tabs','White Tabs','Single-Sided Tabs','Business Card']))
      {
        var url1 = allCells[i].href;
        allCells[i].href = "javascript:ShowPopupThenNavigateTo('" + url1 + "')";
        var url2 = allCells[i - 1].href;
        allCells[i - 1].href = "javascript:ShowPopupThenNavigateTo('" + url2 + "')";
      }
    }
  }
}

function FixForIE(hasBackground)
{
  var element = document.documentElement;
  if (!hasBackground && element.style.backgroundImage)// || element.style.backgroundImage == ""))
    document.documentElement.style.backgroundImage = "url(http:)";
  document.documentElement.style.backgroundAttachment = "fixed";
  element = document.body;
  if (!hasBackground && element.style.backgroundImage)// || element.style.backgroundImage == "")
    document.body.style.backgroundImage = "url(http:)";
  document.body.style.backgroundAttachment = "fixed";
  document.getElementById("preloader_image").style.display = "";
  document.getElementById("preloader_frame").style.display = "none";
}

function ShowPopupThenNavigateTo(newurl)
{
  ShowPopup();
  window.location = newurl;
  var popup_throbber = document.getElementById("preloader_image");
  if (popup_throbber.style.display != "none")
  {
    popup_throbber.src = popup_throbber.src;
  }
}

function ShowPopup()
{
  document.getElementById("DisabledBG").style.display = "";
  document.getElementById("PleaseWait").style.display = "";
}

function HidePopup()
{
  document.getElementById("PleaseWait").style.display = "none";
  document.getElementById("DisabledBG").style.display = "none";
}

function oc(a)
{
  var o = {};
  for(var i=0;i<a.length;i++)
  {
    o[a[i]]='';
  }
  return o;
}
