// JavaScript Document
{
photo1 = new Image()
photo1.SRC="/images/photos/off/1.jpg"
photo2 = new Image()
photo2.SRC="/images/photos/off/2.jpg"
photo3 = new Image()
photo3.SRC="/images/photos/off/3.jpg"
photo4 = new Image()
photo4.SRC="/images/photos/off/4.jpg"
photo5 = new Image()
photo5.SRC="/images/photos/off/5.jpg"
photo6 = new Image()
photo6.SRC="/images/photos/off/6.jpg"

photo1On = new Image()
photo1On.SRC="/images/photos/on/1.jpg"
photo2On = new Image()
photo2On.SRC="/images/photos/on/2.jpg"
photo3On = new Image()
photo3On.SRC="/images/photos/on/3.jpg"
photo4On = new Image()
photo4On.SRC="/images/photos/on/4.jpg"
photo5On = new Image()
photo5On.SRC="/images/photos/on/5.jpg"
photo6On = new Image()
photo6On.SRC="/images/photos/on/6.jpg"
}
function photoOn(imgName)
{
	//alert(imgName);
	photoOff()
	//translate the name into something usable
	var photoNumber = (imgName.charAt(4)*1) + 1
	var imageName = "photo" + photoNumber
	//alert(photoNumber)
	document.images[imageName].src = eval(imageName + "On.SRC");
	//alert(document.images[imgName].src);
}
function photoOff()
{
	//loop through the photos and set them all to "off"
	for (var i=1;i<7;i++){
		imgName = "photo" + i;
		document.images[imgName].src = eval(imgName + ".SRC");
	}
}