/* ======= Rollover Javascript =======
*   === Developed by Steve Quinn ===
*        == June 10th, 2001 ==
*/

// Creates OFF image array and points to image paths
var imgPaths = 6
var imgPath = new Array()

for (n = 0;n<imgPaths;n++){
 imgPath[n] = new Image();
}

imgPath[0].src = "images/HomeButton1.gif"
imgPath[1].src = "images/BioButton1.gif"
imgPath[2].src = "images/Bookshortbutton1.gif"
imgPath[3].src = "images/LinksButton1.gif"
imgPath[4].src = "images/NewsButton1.gif"
imgPath[5].src = "images/jeb003c.gif"

// Creates ON image array and points to image paths
var preloadedimgs = 6
var preload = new Array()

for (n = 0;n<preloadedimgs;n++){		
 preload[n] = new Image();
}

preload[0].src = "images/HomeButton2.gif"
preload[1].src = "images/BioButton2.gif"
preload[2].src = "images/Bookshortbutton2.gif"
preload[3].src = "images/LinksButton2.gif"
preload[4].src = "images/NewsButton2.gif"
preload[5].src = "images/jeb003c1.gif"

// Function to swap the images to the desired state, ON or OFF
function ImgSwap(state,imageName,number) {

	if (state == "1") {
		document[imageName].src = preload[number].src;
		} else {
		document[imageName].src = imgPath[number].src;  
	}
}
//    CODE TO ADD TO IMAGE LINK IN HTML:
//
//    <A href="#" onmouseover='ImgSwap(1,"A",1)' onmouseout='ImgSwap(0,"A",1)'>
//    <Img src="images/off.gif" border="0" name="A"></A>
