
// Bugzilla-Fix for wheel-scrolling in divs for mozilla/firefox

var aFocused = false;

function getSel()
{
  var sel = "";
  if (window.getSelection)
  {
    sel = window.getSelection();
  }
  else if (document.getSelection)
  {
    sel = document.getSelection();
  }
  return sel;
}

function fixScroll()
{
  if (!aFocused)
  {
    var s = this.scrollTop;
    this.firstChild.focus();
    this.scrollTop = s;
  }
  return true;
}
function aOnFocus()
{
  aFocused = true;
  return false;
}
function aOnBlur()
{
  aFocused = false;
  return false;
}

function fixScrollInit()
{
  // With recent Firefoxes now disabled
  return;

  var con = document.getElementById("con");
  if (!document.all && con)
  {
    con.firstChild.onfocus = aOnFocus;
    con.firstChild.onblur = aOnBlur;
    con.onmouseover = fixScroll;
  }
  return;
}
