

ExecScript=false;
if (navigator.userAgent.indexOf("MSIE") == -1 || parseInt(navigator.appVersion.substring(0,1)) >= 4)
{
        ExecScript=true;
        var graphic = new Array(10);   // ARRAY OF IMAGE OBJECTS
		var highlighted = new Array();
		var BotAct = new Array()
        highlighted[0]=-1;    // HIGHLIGHTED GRAPHIC - SET INITIAL VALUE
        BotAct[0]=-1;
        highlighted[1]=-1;    // HIGHLIGHTED GRAPHIC - SET INITIAL VALUE
        BotAct[1]=-1;		
        offSuffix         = "_off.gif";
        onSuffix          = "_on.gif";
        pickSuffix        = "_pick.gif";
}
// CREATE NEW GRAPHIC OBJECT
function tocGraphic (name,layer)
{
  this.name = name;
  this.off      = new Image ();
  this.off.src  = imageSubdirectory + name + offSuffix;
  this.on         = new Image ();
  this.on.src     = imageSubdirectory + name + onSuffix;
  this.pick       = new Image ();
  this.pick.src   = imageSubdirectory + name + pickSuffix;
  this.layer = layer
}

// CHANGE GRAPHIC TO 'PICKED' STATE WHEN MOUSE IS CLICKED
function doClick (num,clase) 
{
var ImgColl;
        if (ExecScript)
        {
			var ns4x = (navigator.appName == "Netscape");
			if(ns4x && graphic[num].layer!="")
			{
				ImgColl=window.document.layers[graphic[num].layer].document.images;	
			}
			else
			{
				ImgColl=document.images;
			}
			if(BotAct[clase]!=num)
			  { 
                ImgColl[graphic[num].name].src = graphic[num].pick.src;
                if (BotAct[clase] != -1) 
                {
					if(ns4x && graphic[num].layer!="")
					{
						ImgColl=window.document.layers[graphic[BotAct[clase]].layer].document.images;	
					}
					else
					{
						ImgColl=document.images;
					}							
                        ImgColl[graphic[BotAct[clase]].name].src = graphic[BotAct[clase]].off.src;
                }
                BotAct[clase] = num;
			  }
        }
}

// ON MOUSEOVER, REPLACE THE GRAPHIC OVER WHICH THE MOUSE IS POSITIONED
//  WITH THE "on" VERSION OF THAT GRAPHIC.
function doMouseOver(num,clase) 
{
        
        if (ExecScript) 
        {
			if(num!=BotAct[clase])
				{
                document.images[graphic[num].name].src = graphic[num].on.src;
                if (highlighted[clase] != num && BotAct[clase] != highlighted[clase]  ) 
                {
                    document.images[graphic[highlighted[clase]].name].src = graphic[highlighted[clase]].off.src;
                }                       
                highlighted[clase] = num;
				}
        }

}

// THIS FUNCTION WILL ENSURE THAT WHEN THE POINTER LEAVES THE TOC
//  NOTHING WILL BE HIGHLIGHTED.
function doMouseOut (num,clase) 
{
        if (ExecScript) 
        {
                if (BotAct[clase] != highlighted[clase] ) 
                {
                    document.images[graphic[highlighted[clase]].name].src = graphic[highlighted[clase]].off.src;
                }
        }
}

function CancelPick(clase)
{
   if (ExecScript)
  if (BotAct[clase] != -1) 
    {
      document.images[graphic[BotAct[clase]].name].src = graphic[BotAct[clase]].off.src;
	  BotAct[clase] = -1
    }
                
}
