/* Smart Cache Slide Show Copyright Jason Moon To add more shock to your site, visit www.DHTML Shock.com */ // PUT THE URL'S OF YOUR IMAGES INTO THIS ARRAY... var Slides = new Array ('http://images5.theimagehosting.com/01.eb8.jpg', 'http://images5.theimagehosting.com/02.c39.JPG', 'http://images5.theimagehosting.com/03.2d2.JPG', 'http://images5.theimagehosting.com/04.e74.jpg', 'http://images5.theimagehosting.com/05.ecd.JPG', 'http://images5.theimagehosting.com/06.3d9.jpg', 'http://images5.theimagehosting.com/07.35b.jpg', 'http://images5.theimagehosting.com/08.b46.jpg', 'http://images5.theimagehosting.com/09.b51.jpg', 'http://images5.theimagehosting.com/10.df1.jpg', 'http://images5.theimagehosting.com/11.a4a.jpg', 'http://images5.theimagehosting.com/12.e2c.jpg', 'http://images5.theimagehosting.com/13.969.jpg', 'http://images5.theimagehosting.com/14.a5b.jpg', 'http://images5.theimagehosting.com/15.34d.jpg', 'http://images5.theimagehosting.com/16.4f2.jpg', 'http://images5.theimagehosting.com/17.570.jpg', 'http://images5.theimagehosting.com/18.46e.jpg', 'http://images5.theimagehosting.com/19.bbe.jpg', 'http://images5.theimagehosting.com/20.c47.jpg', 'http://images5.theimagehosting.com/21.fb6.jpg', 'http://images5.theimagehosting.com/22.5f5.jpg', 'http://images5.theimagehosting.com/23.980.jpg', 'http://images5.theimagehosting.com/24.266.jpg', 'http://images5.theimagehosting.com/25.e3d.jpg', 'http://images5.theimagehosting.com/26.354.jpg', 'http://images5.theimagehosting.com/27.c52.jpg', 'http://images5.theimagehosting.com/28.d0e.jpg', 'http://images5.theimagehosting.com/29.3e7.jpg', 'http://images5.theimagehosting.com/30.7f6.jpg'); // DO NOT EDIT BELOW THIS LINE! function CacheImage(ImageSource) { // TURNS THE STRING INTO AN IMAGE OBJECT var ImageObject = new Image(); ImageObject.src = ImageSource; return ImageObject; } function ShowSlide(Direction) { if (SlideReady) { NextSlide = CurrentSlide + Direction; // THIS WILL DISABLE THE BUTTONS (IE-ONLY) document.SlideShow.Previous.disabled = (NextSlide == 0); document.SlideShow.Next.disabled = (NextSlide == (Slides.length-1)); if ((NextSlide >= 0) && (NextSlide < Slides.length)) { document.images['Screen'].src = Slides[NextSlide].src; CurrentSlide = NextSlide++; Message = 'Picture ' + (CurrentSlide+1) + ' of ' + Slides.length; self.defaultStatus = Message; if (Direction == 1) CacheNextSlide(); } return true; } } function Download() { if (Slides[NextSlide].complete) { SlideReady = true; self.defaultStatus = Message; } else setTimeout("Download()", 100); // CHECKS DOWNLOAD STATUS EVERY 100 MS return true; } function CacheNextSlide() { if ((NextSlide < Slides.length) && (typeof Slides[NextSlide] == 'string')) { // ONLY CACHES THE IMAGES ONCE SlideReady = false; self.defaultStatus = 'Downloading next picture...'; Slides[NextSlide] = CacheImage(Slides[NextSlide]); Download(); } return true; } function StartSlideShow() { CurrentSlide = -1; Slides[0] = CacheImage(Slides[0]); SlideReady = true; ShowSlide(1); }
Hosted by www.Geocities.ws

1