// flag to activate rollovers
var menuflag = 0;
 
// arrays to store images for rollovers, rollouts, and image names
var overImgs = new Array();
var outImgs = new Array();
var options = new Array('welcome','about','demo','purchase','support','contact','partner');

// path to the images
var imgPath = "/new/img/sa/";
 
// function loads the rollover and rollout images
function LoadMenu ()
{
  var n;
  if ( document.images )
  {  
    for ( n = 0; n < options.length; n++ )
    {
      option_name = options[n];
      icon_name = options[n] + "icon";
      
      overImgs[option_name] = new Image(); overImgs[option_name].src = imgPath + option_name + "-on.gif";
      overImgs[icon_name] = new Image(); overImgs[icon_name].src = imgPath + icon_name + "-on.gif";
      
      outImgs[option_name] = new Image(); outImgs[option_name].src = imgPath + option_name + "-off.gif";
      outImgs[icon_name] = new Image(); outImgs[icon_name].src = imgPath + icon_name + "-off.gif";
    }
  }
}

// function to show "out" images on main menu 
function ShowOut ( name )
{
  if ( document.images )
  {
    if ( menuflag )
    {
      document.images[name].src = outImgs[name].src;
      
      icon = name + "icon";
      document.images[icon].src = outImgs[icon].src;
    }
  }
}

// function to show "over" images on menu
function ShowOver ( name )
{
  if ( document.images )
  {
    if ( menuflag )
    {
      document.images[name].src = overImgs[name].src;

      icon = name + "icon";
      document.images[icon].src = overImgs[icon].src;
    }
  }
}

// do the loading of the menu images
LoadMenu();
