playIng = 0
firstImage = 0
secondImage = 1
thirdImage = 2

function initPlay(){
playIng = !playIng;
	if (playIng){
		playSets()
	}
}

function cycleIt(){
	if (playIng){
		window.setTimeout('playSets()',3000)
	}
}
function nextSet(){
if (!playIng){
	firstImage = firstImage+3
	if (firstImage>eval(slideShow.length-1)){
		firstImage=0
	}
	secondImage = secondImage+3
	if (secondImage>eval(slideShow.length-1)){
		secondImage=1
	}
	thirdImage = thirdImage+3
	if (thirdImage>eval(slideShow.length-1)){
		thirdImage=2
	}
	document.images.first.src=slideShow[firstImage].src
	document.images.second.src=slideShow[secondImage].src
	document.images.third.src=slideShow[thirdImage].src
	}
}
function prevSet(){
if (!playIng){
	firstImage = firstImage-3
	if (firstImage<0){
		firstImage=eval(slideShow.length-3)
	}
	secondImage = secondImage-3
	if (secondImage<0){
		secondImage=eval(slideShow.length-2)
	}
	thirdImage = thirdImage-3
	if (thirdImage<0){
		thirdImage=eval(slideShow.length-1)
	}
	document.images.first.src=slideShow[firstImage].src
	document.images.second.src=slideShow[secondImage].src
	document.images.third.src=slideShow[thirdImage].src
	}
}

function playSets(){
firstImage = firstImage+3
if (firstImage>eval(slideShow.length-1)){
	firstImage=0
}
secondImage = secondImage+3
if (secondImage>eval(slideShow.length-1)){
	secondImage=1
}
thirdImage = thirdImage+3
if (thirdImage>eval(slideShow.length-1)){
	thirdImage=2
}
document.images.first.src=slideShow[firstImage].src
document.images.second.src=slideShow[secondImage].src
document.images.third.src=slideShow[thirdImage].src
cycleIt();
}

function windowPop (theNum){
	if (theNum==1){
	theImage = bigPicture[firstImage]
	winName = "memory" + firstImage
	} else if (theNum==2){
	theImage = bigPicture[secondImage]
	winName = "memory" + secondImage
	} else if (theNum==3){
	theImage = bigPicture[thirdImage]
	winName = "memory" + thirdImage
	}
	
	window.open(theImage,'winName','height=400,width=400,screenX=200,screenY=200,resizable=yes,scrollbars=yes')
}