

<!--//
// 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 catName = new Array("thetigers","thelions","thecougars","otheranimals","back","adoptnow");
// Set Button Directory

var dirPath = "images/catbuttons/";

// Set Number of Page Links

var linkNum = catName.length;

// Define Source Arrays

var catmenuOn = new Array(linkNum)
var catmenuOff = new Array(linkNum)

// Set objects and cache sources
	
for (i=0; i<linkNum; i++){
	catmenuOn[i] = new Image();
	catmenuOn[i].src = dirPath + catName[i] + "_on.gif";
	catmenuOff[i] = new Image();
	catmenuOff[i].src = dirPath + catName[i] + "_off.gif";
}

function catmenu_over(theImage){
	if (browserCheck == "OK"){
		document.images[catName[theImage]].src = catmenuOn[theImage].src;
	}
}

function catmenu_out(theImage){
	if (browserCheck == "OK")
		document.images[catName[theImage]].src = catmenuOff[theImage].src
}
	


//-->

