/*
Script: Image Rollovers

Created on: April 12/2000
Created by; Chris Jones(chris@nkaos.com) & Paul Kalupnieks(paulk@nkaos.com).

Description: Changes the source of a given image to an on state and then back again.
			 The functions accept one parameted, the numeric value of that image in
			 the refname array.
			 
Compatibility: Javascript 1.0, Netscape 3.0+, Internet Explorer 4.0+
*/

var itsgood = document.images;
var off = new Array(); // defines an array for off iamges
var on = new Array(); // edfines an array for on images
var imagePath = pathMod + "images/nav/"; // this points to the directory where your nav images are

/* 
The refname array is used to build the on and off arrays.
For every image that will be a rollover, the has to be a name value in the tag.. like so
<img src="../images/howto.gif" width=119 height=25 border=0 alt="" NAME="howto">

To make the script more usable make all of the rollover images use this format
offimage = howto.gif
onimage  = howto_ov.gif

and give the image name value 'howto'
*/
refname = new Array();
refname[0] = "overview";
refname[1] = "life";
refname[2] = "testimon";
refname[3] = "contact";

for(j=0;j<refname.length;j++){
	if (itsgood){ 
		off[j] = new Image();
		off[j].src = imagePath + refname[j] + '.gif';
		on[j] = new Image();
		on[j].src = imagePath + refname[j] + '_ov.gif';
	}
}

// these are the funcitons that actually execute the the rollovers
// msover is for the oMouseover event, and msout is for the onMouseout event

function msover(number) {
	if (itsgood){
		var name=refname[number];
		document.images[name].src = on[number].src;
	}
}
		
function msout(number) {
	if (itsgood){
		var name=refname[number];
		document.images[name].src = off[number].src;
	}
}

/*
Script: genericRoll

Created on: July 17/2000
Created by; Chris Jones(chris@nkaos.com).

Description: A generic rollever script.  Requires that you pass the name of the image to change
			 and the path to the new image.  Should work for rolling over and rolling out
			 
Compatibility: Javascript 1.0, Netscape 3.0+, Internet Explorer 4.0+
*/

function genericRoll(imageToChange, changeTo) {
	if(itsgood){
		document.images[imageToChange].src = changeTo;
	}
}
