// Written By Adam Kazery// Usage://<IMG NAME="myImageID" id="myImageID" SRC="images/image1.jpg" ALT="image" onClick="next('myImageID','image2','image3','image4','image1')">// The first parameter is the id of the image// It is neccissary to add the original image to the end of the swap array.imageNum = 1function next() {theImages = new Array() total = next.arguments.length for(i = 1; i < total; i++) {   theImages[i] = new Image()   theImages[i].src = "http://www.nancypriceinteriors.com/images/" + arguments[i] + ".jpg"	}var imagename = next.arguments[0];   document.getElementById(imagename).src = theImages[imageNum].src     imageNum++   if(imageNum >= total) {   imageNum = 1   } }