

<!--//
// Javascript source for swapover / link controls.
// Copyright P.Martland 1998
// Adapted for Big Cat sanctuary 2003
//
// Usage:
// Each link is represented in the array with a name, this name should
// should also be used as the NAME parameter in the Img tag of the page
// this script is embedded in.
// 
// The A tag should utilse onmouseover/onmouseout events that represent
// the functions below, but it is important to remember that the first
// images mouse event begins at zero. Hence, for the first A tag, the
// onmouseover event would be represented as: onmouseover="on_Over(0)".

// Simple Browser Check

var browserCheck = false;

if(parseInt(navigator.appVersion) >= 4)
{
	browserCheck = "OK";
}
else 
{
	browserCheck = "NOTOK";
}


// Initiate an array to store the button/swapover image names



var mbutName = new Array("home","join","adopt","shop","memorial","gallery","downloads","contact");
// Set Button Directory

var dirPath = "images/topmenu/";

// Set Number of Page Links

var linkNum = mbutName.length;

// Define Source Arrays

var menuOn = new Array(linkNum)
var menuOff = new Array(linkNum)

// Set objects and cache sources
	
for (i=0; i<linkNum; i++){
	menuOn[i] = new Image();
	menuOn[i].src = dirPath + mbutName[i] + "_on.gif";
	menuOff[i] = new Image();
	menuOff[i].src = dirPath + mbutName[i] + "_off.gif";
}

function menu_over(theImage){
	if (browserCheck == "OK"){
		document.images[mbutName[theImage]].src = menuOn[theImage].src;
	}
}

function menu_out(theImage){
	if (browserCheck == "OK")
		document.images[mbutName[theImage]].src = menuOff[theImage].src
}
	


//-->

