NewImg = new Array('file1.jpg','file2.jpg','file3.jpg','file4.jpg'); //Starting image is Selected var StartFile = 'file3.jpg'; var ImgNum; for(i in NewImg) { File = NewImg[i].split('/'); File = File.pop(); if(File == StartFile) { ImgNum = i; break; } } var ImgLength = NewImg.length - 1; function chgImg(direction) { if (document.images) { ImgNum = ImgNum + direction; if (ImgNum > ImgLength) { ImgNum = 0; } if (ImgNum < 0) { ImgNum = ImgLength; } document.imageviewer.src = NewImg[ImgNum]; } } //
Previous Detail ¦ Close Window ¦ Next Detail