function xbGetWindowHeight(windowRef)
{
  var height = 0;
  
  if (!windowRef)
  {
    windowRef = window;
  }

  if (typeof(windowRef.innerWidth) == 'number')
  {
    height = windowRef.innerHeight;
  }
  else if (windowRef.document.body && typeof(windowRef.document.body.clientWidth) == 'number')
  {
    height = windowRef.document.body.clientHeight;    
  }
  return height;
}

if (document.layers) {
  origWidth  = window.innerWidth;
  origHeight = window.innerHeight;
}
window.onresize = navBarReload;

function navBarReload() {

  if (document.layers && origWidth == window.innerWidth && origHeight == window.innerHeight)
    return;

  // For IE, reload on a timer in case the Windows 'Show window contents while
  // dragging' display option is on.

  if (document.all)
    setTimeout('window.location.href = window.location.href', 2000);
  else
    window.location.href = window.location.href;
}