rem: if (MAIN_PHOTO_WIDTH <= slideshowImageWidths[currentImageIndex]) { 
add: if (slideshowImageWidths[currentImageIndex] < 0 || MAIN_PHOTO_WIDTH <= slideshowImageWidths[currentImageIndex]) { 
context: function setupMainImage() {    mainPhoto = document.getElementById('main-image');    if (MAIN_PHOTO_WIDTH <= slideshowImageWidths[currentImageIndex]) {	mainPhoto.style.width = MAIN_PHOTO_WIDTH + 'px';    } else {	/*	 * The image is below our ideal slideshow width, so we don't want to stretch it	 * horizontally.  Instead we center the image that we have a little better.	 */	mainPhoto.style.width = slideshowImageWidths[currentImageIndex] + 'px';	mainPhoto.style.left = parseInt(getElementStyle(mainPhoto.id, 'left')) +	    ((MAIN_PHOTO_WIDTH - slideshowImageWidths[currentImageIndex])/2) + 'px';    }    mainPhoto.style.height = 'auto'; /* @REVISIT - Safari doesn't play nice with this */    mainPhoto.origWidth = parseInt(getElementStyle(mainPhoto.id, 'width'));    mainPhoto.origLeft = parseInt(getElementStyle(mainPhoto.id, 'left'));    mainPhoto.galleryimg = 'no'; /* Disables IE's image toolbar, which was causing flicker */    addEvent(mainPhoto, 'click', showPhotoDetails, false);}
meta: 3727	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/3727/dfcee4b3f313c07278c3727d5013af8de2f7bf5c/thumbnail-functions.js/buggy/gallery2/themes/ajaxian/javascript/thumbnail-functions.js