function WM_netscapeCssFix()
  {
  // This part was inspired by Matthew_Baird@wayfarer.com
  // It gets around another unfortunate bug whereby Netscape 
  // fires a resize event when the scrollbars pop up. This 
  // checks to make sure that the window's available size 
  // has actually changed.

  if (document.WM.WM_netscapeCssFix.initWindowWidth != window.innerWidth || document.WM.WM_netscapeCssFix.initWindowHeight != window.innerHeight)
  {
  document.location = document.location;
  }
  }

  function WM_netscapeCssFixCheckIn()
  {
  // This function checks to make sure the version of Netscape 
  // in use contains the bug; if so, it records the window's 
  // width and height and sets all resize events to be handled 
  // by the WM_netscapeCssFix() function.

  if ((navigator.appName == 'Netscape') && (parseInt(navigator.appVersion) == 4))
  {
  if (typeof document.WM == 'undefined')
  {
  document.WM = new Object;
  }

  if (typeof document.WM.WM_scaleFont == 'undefined')
  {
  document.WM.WM_netscapeCssFix = new Object;
  document.WM.WM_netscapeCssFix.initWindowWidth = window.innerWidth;
  document.WM.WM_netscapeCssFix.initWindowHeight = window.innerHeight;
  }

  window.onresize = WM_netscapeCssFix;
  }
  }

//  WM_netscapeCssFixCheckIn()













function timedHide(num) {
   if(is.ns){
      timerID = setTimeout('menu'+num+'Div.hide()',3000);
      timerRunning = true;
      }
   }

function stopHide(){
   if(is.ns){
      if (timerRunning){
         clearTimeout(timerID);
         timerRunning = false;
         }
      }
   }

function hideMenu(num) { 
   divName = 'menu' + num + 'Div';
   divID = 'menu_' + num
   if (is.ie) {
      if (!document.getElementById(divID).contains(event.toElement)) {
         eval(divName+ '.hide()');
         }
      }
   }

function getImage(name) {
   if (is.ns) {
      return findImage(name, document);
      }
   if (is.ie)
      return eval('document.all.' + name);
   return null;
   }

function findImage(name, doc) {
   var i, img;
   for (i = 0; i < doc.images.length; i++)
      if (doc.images[i].name == name)
         return doc.images[i];
   for (i = 0; i < doc.layers.length; i++)
      if ((img = findImage(name, doc.layers[i].document)) != null) {
         img.container = doc.layers[i];
         return img;
         }
   return null;
   }

function getImagePageLeft(img) {
   var x, obj;
   if (is.safari) {
      return findPosX(img);
      }
   if (is.ns) {
      if (img.container != null)
         return img.container.pageX + img.x;
      else
         return img.x;
      }
   if (is.ie) {
      x = 0;
      obj = img;
      while (obj.offsetParent != null) {
         x += obj.offsetLeft;
         obj = obj.offsetParent;
         }
      x += obj.offsetLeft;
      return x;
      }
   return -1;
   }

function getImagePageTop(img) {
   var y, obj;
   if (is.safari) {
      return findPosY(img);
      }
   if (is.ns) {
      if (img.container != null) {
         return img.container.pageY + img.y;
         }
      else {
         return img.y;
         }
      }
   if (is.ie) {
      y = 0;
      obj = img;
      while (obj.offsetParent != null) {
         y += obj.offsetTop;
         obj = obj.offsetParent;
         }
      y += obj.offsetTop;
      return y;
      }
   return -1;
   }

function inspect(elm) {
   var str = "";
   for (var i in elm) {
      str += i + ": " + elm.getAttribute(i) + "\n";
      }
   alert(str);
   }



function findPosX(obj) {
   var curleft = 0;
   if (obj.offsetParent) {
      while (obj.offsetParent) {
         curleft += obj.offsetLeft
         obj = obj.offsetParent;
         }
      }
   else if (obj.x)
      curleft += obj.x;
   return curleft;
   }

function findPosY(obj) {
   var curtop = 0;
   if (obj.offsetParent) {
      while (obj.offsetParent) {
         curtop += obj.offsetTop
         obj = obj.offsetParent;
         }
      }
   else if (obj.y)
      curtop += obj.y;
   return curtop;
   }

