function swapImg(thisImg, arrIndex) {
	document.images[thisImg].src = storeImages[arrIndex].src;
	imgIndex = arrIndex;
};

function nextImg(thisImg) {
	//alert("imgIndex = " + imgIndex);
	if (imgIndex == (storeImages.length -1)) {
		imgIndex = 0;
		swapImg(thisImg, imgIndex++);
	} else {
		swapImg(thisImg, ++imgIndex);
	}
};

function prevImg(thisImg) {
	if (imgIndex == 0) {
		imgIndex = storeImages.length-1;
		swapImg(thisImg, imgIndex--);
	} else {
		swapImg(thisImg, --imgIndex);
	}
};
