// preloads images and sets up names for them.


//----------------------BEGIN TEXTILES----------------------//
if (document.images) {

	port300On = new Image();
	port300On.src = "images/client_work/client_bag_01.gif";

	port301On = new Image();
	port301On.src = "images/client_work/client_bag_02.gif";

	port302On = new Image();
	port302On.src = "images/client_work/client_bag_03.gif";


//----------------------END TEXTILES----------------------//



//----------------------BEGIN IDENTITY----------------------//


	port1On = new Image();
	port1On.src = "images/client_work/client_coded_1.gif";

	port2On = new Image();
	port2On.src = "images/client_work/client_coded_2.gif";

	port3On = new Image();
	port3On.src = "images/client_work/client_coded_3.gif";

	port4On = new Image();
	port4On.src = "images/client_work/client_chick.gif";

	port5On = new Image();
	port5On.src = "images/client_work/client_punchline.gif";





//----------------------END IDENTITY----------------------//



//----------------------BEGIN POSTERS----------------------//

	port100On = new Image();
	port100On.src = "images/client_work/client_wilco.gif";

	port101On = new Image();
	port101On.src = "images/client_work/client_vida.gif";

	port102On = new Image();
	port102On.src = "images/client_work/client_scratch.gif";

	port103On = new Image();
	port103On.src = "images/client_work/client_circus.gif";

	port104On = new Image();
	port104On.src = "images/client_work/client_puffy.gif";

	port105On = new Image();
	port105On.src = "images/client_work/client_college.gif";

	port106On = new Image();
	port106On.src = "images/client_work/client_mmw.gif";

	port107On = new Image();
	port107On.src = "images/client_work/client_flatland.gif";

	port108On = new Image();
	port108On.src = "images/client_work/client_vermont.gif";

//----------------------END POSTERS----------------------//



//----------------------BEGIN POSTCARDS----------------------//

	port200On = new Image();
	port200On.src = "images/client_work/client_smart.gif";

	port201On = new Image();
	port201On.src = "images/client_work/client_john.gif";

	port202On = new Image();
	port202On.src = "images/client_work/client_handsome_01.gif";

	port203On = new Image();
	port203On.src = "images/client_work/client_handsome_02.gif";

	port204On = new Image();
	port204On.src = "images/client_work/client_handsome_03.gif";

	port205On = new Image();
	port205On.src = "images/client_work/client_chemical.gif";

	port206On = new Image();
	port206On.src = "images/client_work/client_people_01.gif";

	port207On = new Image();
	port207On.src = "images/client_work/client_people_02.gif";

	port208On = new Image();
	port208On.src = "images/client_work/client_people_03.gif";

//----------------------END POSTCARDS----------------------//



//----------------------BEGIN PACKAGING----------------------//




//----------------------BEGIN PACKAGING----------------------//

}
















//----------------------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;
	}
}





