// preloads images and sets up names for them.


//----------------------BIG IMAGE CHANGE----------------------//
if (document.images) {

	port1On = new Image();
	port1On.src = "images/book1/photo_01.jpg";

	port2On = new Image();
	port2On.src = "images/book1/photo_02.jpg";

	port3On = new Image();
	port3On.src = "images/book1/photo_03.jpg";

	port4On = new Image();
	port4On.src = "images/book1/photo_04.jpg";

	port5On = new Image();
	port5On.src = "images/book1/photo_05.jpg";

	port6On = new Image();
	port6On.src = "images/book1/photo_06.jpg";

	port7On = new Image();
	port7On.src = "images/book1/photo_07.jpg";

	port8On = new Image();
	port8On.src = "images/book1/photo_08.jpg";

	port9On = new Image();
	port9On.src = "images/book1/photo_09.jpg";

	port10On = new Image();
	port10On.src = "images/book1/photo_10.jpg";
	
	port11On = new Image();
	port11On.src = "images/book1/photo_11.jpg";
	
	port12On = new Image();
	port12On.src = "images/book1/photo_12.jpg";
	
	port13On = new Image();
	port13On.src = "images/book1/photo_13.jpg";
	
	port14On = new Image();
	port14On.src = "images/book1/photo_14.jpg";
	
	port15On = new Image();
	port15On.src = "images/book1/photo_15.jpg";
	
	port16On = new Image();
	port16On.src = "images/book1/photo_16.jpg";
	
	port17On = new Image();
	port17On.src = "images/book1/photo_17.jpg";
	
	port17On = new Image();
	port17On.src = "images/book1/photo_18.jpg";
	
	port17On = new Image();
	port17On.src = "images/book1/photo_19.jpg";





//----------------------THUMBNAIL ROLL-OVER----------------------//

	port1_butt_off = new Image();
	port1_butt_off.src = "images/butt01_off.giff";
	port1_butt_on = new Image();
	port1_butt_on.src = "images/butt01_on.gif";

	port2_butt_off = new Image();
	port2_butt_off.src = "images/butt02_off.gif";
	port2_butt_on = new Image();
	port2_butt_on.src = "images/butt02_on.gif";

	port3_butt_off = new Image();
	port3_butt_off.src = "images/butt03_off.gif";
	port3_butt_on = new Image();
	port3_butt_on.src = "images/butt03_on.gif";

	port4_butt_off = new Image();
	port4_butt_off.src = "images/butt04_off.gif";
	port4_butt_on = new Image();
	port4_butt_on.src = "images/butt04_on.gif";

	port5_butt_off = new Image();
	port5_butt_off.src = "images/butt05_off.gif";
	port5_butt_on = new Image();
	port5_butt_on.src = "images/butt05_on.gif";

	port6_butt_off = new Image();
	port6_butt_off.src = "images/butt06_off.gif";
	port6_butt_on = new Image();
	port6_butt_on.src = "images/butt06_on.gif";

	port7_butt_off = new Image();
	port7_butt_off.src = "images/butt07_off.gif";
	port7_butt_on = new Image();
	port7_butt_on.src = "images/butt07_on.gif";

	port8_butt_off = new Image();
	port8_butt_off.src = "images/butt08_off.gif";
	port8_butt_on = new Image();
	port8_butt_on.src = "images/butt08_on.gif";

	port9_butt_off = new Image();
	port9_butt_off.src = "images/butt09_off.gif";
	port9_butt_on = new Image();
	port9_butt_on.src = "images/butt09_on.gif";

	port10_butt_off = new Image();
	port10_butt_off.src = "images/butt10_off.gif";
	port10_butt_on = new Image();
	port10_butt_on.src = "images/butt10_on.gif";
	
	port11_butt_off = new Image();
	port11_butt_off.src = "images/butt11_off.gif";
	port11_butt_on = new Image();
	port11_butt_on.src = "images/butt11_on.gif";
	
	port12_butt_off = new Image();
	port12_butt_off.src = "images/butt12_off.gif";
	port12_butt_on = new Image();
	port12_butt_on.src = "images/butt12_on.gif";
	
	port13_butt_off = new Image();
	port13_butt_off.src = "images/butt13_off.gif";
	port13_butt_on = new Image();
	port13_butt_on.src = "images/butt13_on.gif";
	
	port14_butt_off = new Image();
	port14_butt_off.src = "images/butt14_off.gif";
	port14_butt_on = new Image();
	port14_butt_on.src = "images/butt14_on.gif";
	
	port15_butt_off = new Image();
	port15_butt_off.src = "images/butt15_off.gif";
	port15_butt_on = new Image();
	port15_butt_on.src = "images/butt15_on.gif";
	
	port16_butt_off = new Image();
	port16_butt_off.src = "images/butt16_off.gif";
	port16_butt_on = new Image();
	port16_butt_on.src = "images/butt16_on.gif";
	
	port17_butt_off = new Image();
	port17_butt_off.src = "images/butt17_off.gif";
	port17_butt_on = new Image();
	port17_butt_on.src = "images/butt17_on.gif";
	
	port18_butt_off = new Image();
	port18_butt_off.src = "images/butt18_off.gif";
	port18_butt_on = new Image();
	port18_butt_on.src = "images/butt18_on.gif";
	
	port19_butt_off = new Image();
	port19_butt_off.src = "images/butt19_off.gif";
	port19_butt_on = new Image();
	port19_butt_on.src = "images/butt19_on.gif";
	



}
















//----------------------CHANGE NOTHING BELOW----------------------//


// changes portfolio images
function changeImages() {
  if (document.images) {
    for (var i=0; i<changeImages.arguments.length; i+=2) {
      document[changeImages.arguments[i]].src = eval(changeImages.arguments[i+1] + ".src");
    }
  }
}



// clicked is the variable that indicates whether an image has ben clicked or not.
// it is used to keep that image locked, and turn the last image to its _off state.
var clicked = 'x';


// master rollover script using above name,
// and adding an _on/_off suffix from above as well
function roll(imgName, aB) {
	if (clicked != imgName) {
		imgRoll = eval(imgName + aB + ".src");
		document [imgName].src = imgRoll;
	}
}


// the script that tests and swaps the images when clicked.
// same as above, but adding a test for lastImg (what clicked WAS),
// and locks the clicked variable to the current value.
function clicker(imgName) {
	if (clicked != 'x' && clicked != imgName) {
		lastImg = eval(clicked + "_off.src");
		document [clicked].src = lastImg;
	}
	if (clicked != imgName) {
		imgClicked = eval(imgName + "_on.src");
		document [imgName].src = imgClicked;
		clicked=imgName;
	}
}







