var isNav4, isIE5
var range = ""
var styleObj = ""
var OpSys
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

if (navigator.appVersion.charAt(0) == "4") {
	if (navigator.appName >= "Netscape") {
		isNav4 = true
		document.captureEvents(Event.KEYDOWN)
	} else {
		isIE5 = true
		range = "all."
		styleObj = ".style"
	}
}

if(navigator.userAgent.indexOf('Mac') != -1) { 
	OpSys = "Mac"; 
} else {
	OpSys = "Win";
}
// Convert object name string or object reference into a valid object reference
function getObject(obj) {
	var theObj
	theObj = document.getElementById(obj)
}
var activeState = ""
var btnHilite = new Array(11)
 btnHilite[0] = "fishGlow"
 btnHilite[1] = "frogGlow"
 btnHilite[2] = "flyGlow"
 btnHilite[3] = "pigG"
 btnHilite[4] = "catGlow"
 btnHilite[5] = "invertGlow"
 btnHilite[6] = "demoH"
 btnHilite[7] = "demoPigH"
 btnHilite[8] = "demoFlyH"
 btnHilite[9] = "demoCatH"
 
function MouseOverBtn(btnNum) {
	var theHilite = btnHilite[btnNum-1];
	activeState = theHilite;
	if (isNav4 == true) {
	} else {
	 	var theObj = document.getElementById(theHilite); //getObject(theHilite);
 		var theObj = document.getElementById(theHilite); //theObj = getObject(theLabel);
	theObj.style.visibility = "visible";
	}
}

function clearHilite(btnNum) {

	var theHilite = btnHilite[btnNum-1];
	activeState = theHilite;

 if (activeState) {
	if (isNav4 == true) {
	}else{
		var theObj = document.getElementById(activeState);
		theObj.style.visibility = "hidden";
	}
  }	
	return true
}

function clickBtn(thePage) {
	theVis = true
	switch (thePage) {
   		case 1:
  			theURL = "fish.html";
  			clearHilite(1)
  			break
  		case 2: 
 	  		theURL = "frog.html";
  			clearHilite(2)
  			clearHilite(7)
  	  		break
 		case 3: 
 	  		theURL = "fly.html";
  			clearHilite(3)
  			clearHilite(9)
  	  		break
 		case 4: 
 	  		theURL = "pig.html";
  			clearHilite(4)
  			clearHilite(8)
  	  		break
 		case 5: 
 	  		theURL = "cat.html";
  			clearHilite(5)
			clearHilite(10)
  	  		break
		case 6: 
 	  		theURL = "invert.html";
  			clearHilite(6)
  	  		break
  	}
	//if(thePage <6){
	 	location.href=theURL		
	// }else{
	//	location.href="../index2.html?"+theURL	
	//}
}
