   /*PLU Homepage Menus
   * by Kevin Freitas. v1.0 20020604
   * Copyright (c) 2002 Pacific Lutheran University Web Development. All Rights Reserved.
   * Originally published at http://www.plu.edu/
   * You may use this code on a public Web site only if this entire
   * copyright notice appears unchanged and you publicly display
   * on the Web page a link to http://www.plu.edu/.
   *
   * Contact webmaster@plu.edu for all other uses.
   */

   var layerToHide;
   var Ltop;
   var Lbtm;
   var LBoundary = 0;
   var RBoundary = 0;

   function hideMe()
   {
       if(layerToHide != null)
       {
           if(document.layers)
           {
               var showWhat = document.layers[layerToHide];
               showWhat.visibility = "hidden";
           }
           else if (document.all)
           { <!--- MAY BE INTERFERING WITH IE 6 --->
               var showWhat = document.all(layerToHide).style;
               showWhat.visibility = "hidden";
           }
           else if (document.getElementById)
           {
               var showWhat = document.getElementById(layerToHide);
               showWhat.style.visibility = "hidden";
           }
       }
   }

   function showMe(menuName, hdistance)
   {
       layerToHide = menuName;
       Lbtm = parseInt(Ltop) + parseInt(hdistance);

       if(document.layers)
       { // netscape 4.x
           var showWhat = document.layers[menuName];

           LBoundary = 12 + (hdistance - 1) * (window.innerWidth * 0.1599)
           RBoundary = LBoundary + 200;
           showWhat.top = 2;
           showWhat.left = 32 + (hdistance - 1) * (window.innerWidth * 0.1599);

           showWhat.visibility = "visible";
           Ltop = document.layers[menuName].top;
	}
        else if (document.all)
        { // ie 4.x -- MAY BE INTERFERING WITH IE 6 --
            var showWhat = document.all(menuName).style;

            LBoundary = 12 + (hdistance - 1) * (document.body.clientWidth * 0.1599);
            RBoundary = LBoundary + 200;
            showWhat.pixelLeft = 32 + (hdistance - 1) * (document.body.clientWidth * 0.1599);

            showWhat.visibility = "visible";
            Ltop = document.all[menuName].style.top; Ltop = Ltop.replace(/px/,""); // replace 'px' with nothing
	}
        else if (document.getElementById)
        { // opera, netscape, ie 5+
            var showWhat = document.getElementById(menuName);

            LBoundary = 12 + (hdistance - 1) * (window.innerWidth * 0.1599);
            RBoundary = LBoundary + 200;
            showWhat.style.left = 32 + (hdistance - 1) * (window.innerWidth * 0.1599);

            showWhat.style.visibility = "visible";
            Ltop = document.getElementById(menuName).style.top; Ltop = Ltop.replace(/px/,""); // replace 'px' with nothing
	}
   }

   function showMe2(menuName, hdistance)
   {
       layerToHide = menuName;
       Lbtm = parseInt(Ltop) + parseInt(hdistance);

       if(document.layers)
       { // netscape 4.x
           var showWhat = document.layers[menuName];

           LBoundary = 12 + hdistance;
           RBoundary = LBoundary + 200;
           showWhat.top = 2;
           showWhat.left = hdistance;

           showWhat.visibility = "visible";
           Ltop = document.layers[menuName].top;
	}
        else if (document.all)
        { // ie 4.x -- MAY BE INTERFERING WITH IE 6 --
            var showWhat = document.all(menuName).style;

            LBoundary = 12 + hdistance;
            RBoundary = LBoundary + 200;
            showWhat.pixelLeft = hdistance;

            showWhat.visibility = "visible";
            Ltop = document.all[menuName].style.top; Ltop = Ltop.replace(/px/,""); // replace 'px' with nothing
	}
        else if (document.getElementById)
        { // opera, netscape, ie 5+
            var showWhat = document.getElementById(menuName);

            LBoundary = 12 + hdistance;
            RBoundary = LBoundary + 200;
            showWhat.style.left = hdistance;

            showWhat.style.visibility = "visible";
            Ltop = document.getElementById(menuName).style.top; Ltop = Ltop.replace(/px/,""); // replace 'px' with nothing
	}
   }

   if (document.layers) document.captureEvents(Event.MOUSEMOVE);

   document.onmousemove = getMouseXY;

   function getMouseXY(e)
   {
	// Save mouse pointer position.

       if (document.layers)
       {
           tempX = e.pageX;
           tempY = e.pageY;
       }

       var WhatBrowser = navigator.appName + navigator.appVersion.charAt(0);

       if (document.getElementById)
       { // need different detection setup for Netscape 6 and Mozilla 1
           if (WhatBrowser == "Netscape5")
           {
               tempX = e.pageX; //<-- Netscape 6 and Mozilla 1 use
               tempY = e.pageY; //<-- Netscape 6 and Mozilla 1 use
           }
           else
           {
               tempX = window.event.clientX + document.body.scrollLeft;
               tempY = window.event.clientY + document.body.scrollTop;
           }
       }

       if (tempY > 250) hideMe();
       if (tempX < LBoundary || tempX > RBoundary) hideMe();

       //document.Show.mouseX.value = tempX;
       //document.Show.mouseY.value = tempY;
       //return true;

   }

   function init()
   {
       setTimeout("window.onresize = redo", 1000);
   }

   function redo()
   {
       window.location.reload();
   }

   if (document.layers) window.onload = init;