var version = "";
var sAgent = navigator.userAgent;


if (sAgent.indexOf("Mozilla/3") != -1 || sAgent.indexOf("Mozilla/4") != -1
	 || sAgent.indexOf("IE 4") != -1 || sAgent.indexOf("IE 5") 
	 || sAgent.indexOf("IE 6") || sAgent.indexOf("Mozilla/6") || sAgent.indexOf("Mozilla/7"))
{
  var version = "n3";

	home_On = new Image();
	email_On = new Image();
	events_On = new Image();
	ab_On = new Image();
	lnk_On = new Image();

	home_On.src = "./images/homeon.gif";
	email_On.src = "./images/emailon.gif";
	events_On.src = "./images/eventson.gif";
	ab_On.src = "./images/abouton.gif";
	lnk_On.src = "./images/linkson.gif";

	home_Off = new Image();
	email_Off = new Image();
	events_Off = new Image();
	ab_Off = new Image();
	lnk_Off = new Image();

	home_Off.src = "./images/home.gif";
	email_Off.src = "./images/email.gif";
	events_Off.src = "./images/events.gif";
	ab_Off.src = "./images/about.gif";
	lnk_Off.src = "./images/links.gif";

}
 

/* ----------------------------------------------------------------
   sniffing code to detect for IE4 on either Windows NT or 95  
---------------------------------------------------------------- */

  var bIs95NT 
      = sAgent.indexOf("Windows 95") > -1 
      || sAgent.indexOf("Windows NT")  > -1 
      || sAgent.indexOf("Win32")  > -1 
      || sAgent.indexOf("Windows 98")  > -1  
	  || sAgent.indexOf("Windows ME")  > -1  
	  || sAgent.indexOf("Windows XP")  > -1  
	  || sAgent.indexOf("OS X")  > -1  
   var bIsIE4 
      = (( sAgent.indexOf("IE 4")  > -1 ) || ( sAgent.indexOf("IE 5") > -1 ) 
	  || ( sAgent.indexOf("IE 6")  > -1 ) || ( sAgent.indexOf("Mozilla/6") > -1 ) 
	  || ( sAgent.indexOf("Mozilla/7") > -1 ))
      && sAgent.indexOf("b1") <= -1 
      && sAgent.indexOf("p1") <= -1
   var bIsIE432 = bIs95NT && bIsIE4

/* ----------------------------------------------------------------
   variable declarations for doMenu 
   sOpenMenuID points to any open pop-up menus, is blank otherwise 
---------------------------------------------------------------- */

   var sOpenMenuID = ""
   var iTimerID 

/* ----------------------------------------------------------------
   main function, doMenu, that hides any open pop-up menus, determines 
   which menu DIV to access, and starts its display 
---------------------------------------------------------------- */

   function doMenu() {
      if (bIsIE432) {
         var eSrc = window.event.srcElement
         window.event.cancelBubble = true
         if (sOpenMenuID != "") {
            document.all[sOpenMenuID].style.display = "none"
         }
         if (eSrc.className=="clsMenuTitle") {
            var nMenuNum = eSrc.id.substring(eSrc.id.length - 1,eSrc.id.length)
            sOpenMenuID = "idMenu" + nMenuNum
            var eMenu = document.all[sOpenMenuID]
            // start displaying the pop-up menu 
            eMenu.style.clip = "rect(0 0 0 0)"
            document.all[sOpenMenuID].style.display = "block"
            nChunk = 25
            iTimerID = window.setTimeout("showMenu(" + eMenu.id + "),10")
         }
      }
  }

/* ----------------------------------------------------------------
   nChunk is a variable scaled by 25 in successive iterations 
   of a conditional loop 
---------------------------------------------------------------- */

   var nChunk

/* ----------------------------------------------------------------
   showMenu function reveals the menu in 25 percent 
   chunks every 10 milliseconds 
---------------------------------------------------------------- */

   function showMenu(eMenu) {
      eMenu.style.clip = "rect(0 100% " + nChunk + "% 0)"
      nChunk +=25
      if (nChunk <= 100) {
         iTimerID = window.setTimeout("showMenu(" + eMenu.id + "),10")
      }
      else {
         window.clearTimeout(iTimerID)
      }
   }
