<!--


/* GLOBAL VARIABLES */
var see = "visible";
var nosee = "hidden";
var over = new Array()   // menu rollover array for over state
var out  = new Array()  // menu rollover array for out state


/********* GLOBAL ROLLOVERS ************/

// mouseovers
   function mon(num,div) 
   {
      if(document.layers && div) 
      {
          document[div].document["img"+num].src = over[num].src;
      } else {
         document["img"+num].src = over[num].src;           
      }
   }

// mouseouts
   function moff(num,div) 
   {
      if (document.layers && div) 
      {
          document[div].document["img"+num].src = out[num].src;
      } else {
         document["img"+num].src = out[num].src;
      }
   }

/********* DOM CAPATIBILITY ****/
function getDOM(div)
{
	if (document.layers) return document[div];
	else if (document.all) return document.all[div].style;
	else if (document.getElementById) return document.getElementById(div).style;
	else return false;
}

/****** top menu control ************/

// menu controller vars
var ison=0;
var timer, whatdiv
var menuOffRate = 1000; //set the time for the menu to be turned off

function allMenu(vis1,vis2,vis3) 
{
  	  getDOM("galleryMenu").visibility = vis1;
      getDOM("aboutFMenu").visibility = vis2;
      getDOM("aboutIMenu").visibility = vis3; 
	  getDOM("exSubMenu").visibility =nosee;
	  getDOM("inuGraSubMenu").visibility =nosee;
}  
function visMenu(div) 
{ 
  getDOM(div).visibility = see;
  ison==1;
  clearTimeout(timer);
}
function closeMenu(div) 
{
  ison==0;
  whatdiv = div;
  if(ison==1) visMenu(div);
  if(ison!=1) timer = setTimeout("closeMenu2(whatdiv)",menuOffRate);
} 
function closeMenu2(whatdiv) 
{
  getDOM(whatdiv).visibility = nosee;
  ison=0;
}   

/********* visibility code for sub menus *************/

function visLyr(type1,type2) 
{
   getDOM("inuGraSubMenu").visibility = type1;
   getDOM("exSubMenu").visibility = type2;
}

/************* map functionality ****************/

// general function that controls the toggling visibility
// of layers on map.html

function mapVis(type1,type2,type3,type4) 
{
   	  getDOM("legend1").visibility = type1;
      getDOM("mapNames").visibility = type2;
      getDOM("legend2").visibility = type3;
      getDOM("mapArt").visibility = type4;
}

function mapTextVis(div,type) 
{
      getDOM("mapText").visibility = see;
      getDOM("header").visibility = see;
      getDOM(div).visibility = type;  
}

function mapTextHide(div,type) 
{
      getDOM("mapText").visibility = nosee;
      getDOM("header").visibility = nosee;
      getDOM(div).visibility = type;  
}


/******* visibility switch used for about_feh/newsletter.html *******/
function news(type1,type2,type3,type4,type5,type6) 
{
     getDOM("capText").visibility=type1;
     getDOM("capText2").visibility=type2;
     getDOM("capText3").visibility=type3;
	 getDOM("capText4").visibility=type4;
	 getDOM("capText5").visibility=type5;   
	 getDOM("capText6").visibility=type6; 
}


// loading MAP for map page
function initMap() 
{
   getDOM("loadingMap").visibility = nosee;
}

//-->
/**
*    function setLayerVisibility:
*    called on body onLoad event. Checks for query string
*    If length is greater than 1 (more than just '?')
*    then check for '=' (this isn't needed!), if not present
*    then forward arg to mapTextVis, which is the default
*    method to turn on/off regional text...
*/
function setLayerVisibility()
{
   loc = location.search;
   if(loc.length > 1)
   {
       if(loc.indexOf("=") < 0)
       {
           mapTextVis(loc.substring(1, loc.length),'visible');
       }
   }
} 