function fixHeight() {
  // not supporting nav4, ie4 or below
  if (!document.getElementById)
    return;
  
  // extremely stripped-down, error-prone detection of browser type.
  // just looking for moz, ie, or opera. default 'fix' behavior is for ie
  var agt = navigator.userAgent.toLowerCase();
  var browser;
  if (agt.indexOf('gecko') != -1)
    browser = 'moz';
  else if (agt.indexOf('opera') != -1)
    browser = 'opera';
  else
    browser = 'ie';

  // get content and sidebar heights
  Parent = document.getElementById("content");
  Child = document.getElementById("sidebar");
  parentHeight = Parent.offsetHeight;
  childHeight = Child.offsetHeight;

  //alert("parent: " + parentHeight + "\nchild: " + childHeight);
  if ((parentHeight < childHeight) || (parentHeight - childHeight < 50)) { 
    Parent.style.height = childHeight + (browser == 'opera' ? 50 : 0) + 'px';
    if (browser == 'ie') {
      Parent.style.paddingTop = '35px';
      Parent.style.paddingBottom = '0px';
    }
  }

  return true;
}