// Browser Slide-Show script. With image cross fade effect for those browsers // that support it. // Script copyright (C) 2004-08 www.cryer.co.uk. // Script is free to use provided this copyright header is included. var slideCache = new Array(); function RunSlideShowWithLinks(pictureID,linkID,imageLinks,displaySecs) { var separator = imageLinks.indexOf(";"); var nextImage = imageLinks.substring(0,separator); if (slideCache[nextImage] && slideCache[nextImage].loaded) { var futureImages = imageLinks.substring(separator +1,imageLinks.length) + ';' + nextImage; separator = futureImages.indexOf(";"); var nextLink = futureImages.substring(0,separator); futureImages= futureImages.substring(separator +1,imageLinks.length) + ';' + nextLink; var picture=document.getElementById(pictureID); if (picture.filters) { picture.style.filter="blendTrans(duration=2)"; picture.filters.blendTrans.Apply(); } picture.src = nextImage; document.getElementById(linkID).href = nextLink; if (picture.filters) { picture.filters.blendTrans.Play(); } setTimeout("RunSlideShowWithLinks('"+pictureID+"','"+linkID+"','"+futureImages+"',"+displaySecs+")", displaySecs*1000); var SlideshowRelated = document.getElementsByName('SlideshowRelated'); if( SlideshowRelated[0] ) SlideshowRelated[0].href = nextLink; // Identify the next image to cache. separator = futureImages.indexOf(";"); nextImage = futureImages.substring(0,separator); } else { setTimeout("RunSlideShowWithLinks('"+pictureID+"','"+linkID+"','"+imageLinks+"',"+displaySecs+")",250); } // Cache the next image to improve performance. if (slideCache[nextImage] == null) { slideCache[nextImage] = new Image; slideCache[nextImage].loaded = false; slideCache[nextImage].onload = function(){this.loaded=true}; slideCache[nextImage].src = nextImage; } }