/* * This script and many more are available free online at * The JavaScript Source!! http://javascript.internet.com */ function changeImage() { if(typeof mainimage != 'undefined') mainimage.src = list.options[list.selectedIndex].value; } function prevImage() { if(list.selectedIndex == 0) list.selectedIndex = list.options.length-1; else list.selectedIndex--; changeImage(); } function nextImage() { if(list.selectedIndex == list.options.length-1) list.selectedIndex = 0; else list.selectedIndex++; changeImage(); } window.onload = function() { changeImage() };