// Gallery script. which_image_loaded = 0; // The php tag writes the number of images in the directory. NUMBER_OF_IMAGES = 23; ImageNames = new Object(); ImageNames.length = NUMBER_OF_IMAGES - 1; for (counter = 0; counter < NUMBER_OF_IMAGES; counter++){ file_number = counter + 1; filename = ("images/gallery/gallery" + file_number + ".jpg"); ImageNames[counter] = filename; } function changeImage(direction) { which_image_loaded += direction; if (which_image_loaded < 0) which_image_loaded = NUMBER_OF_IMAGES - 1; if (which_image_loaded == NUMBER_OF_IMAGES) which_image_loaded = 0; if (document.images) { if (document.getElementById('gaScreenshot').filters) { document.getElementById('gaScreenshot').style.filter="blendTrans(duration=1)"; document.getElementById('gaScreenshot').filters.blendTrans(duration=0).Apply(); document.getElementById('gaScreenshot').filters.blendTrans.Play(); } document.gaScreenshot.src = ImageNames[which_image_loaded]; } }