// variables to activate menu and select current page
var menuflag = 0;
var current="";

// arrays to hold image names and source strings
var overImgs = new Array();
var outImgs = new Array();
var selImgs = new Array();
var options = new Array('home','find','access','help','robertson');

// the base URI for the images from the HTML page being viewed
var imgPath = "img/";


// loads all the menu images
function LoadMenu ()
{
  var n;
  
  if ( document.images )
  {  
    for ( n = 0; n < options.length; n++ )
    {
      option_name = options[n];
      overImgs[option_name] = new Image(); overImgs[option_name].src = imgPath + option_name + "-on.gif";
      outImgs[option_name] = new Image(); outImgs[option_name].src = imgPath + option_name + "-off.gif";
      selImgs[option_name] = new Image(); selImgs[option_name].src = imgPath + option_name + "-selected.gif";
    }
  }
}

// shows the default menu image
function ShowOut ( id )
{
  if ( document.images )
  {
    if ( menuflag && ( id != current ) )
    {
        document.images[id].src = outImgs[id].src;
    }
  }
}

// shows the mouseover menu image
function ShowOver ( id )
{
  if ( document.images )
  {
    if ( menuflag && ( id != current ) )
    {
        document.images[id].src = overImgs[id].src;
    }
  }
}

// shows the "greyed" menu image
function Selected ( id )
{
  if ( document.images )
  {
    document.images[id].src = selImgs[id].src;
  }
}

LoadMenu();
