function slideshow_load() { var slideshow = { showwin : null, showimg : null, list : null, current : 0, baseURL : wgServer + wgArticlePath.replace( "$1" , "File:"), nextImage : function() { with(slideshow) { if( showwin != null && showwin.document != null ) { showimg.src = 'http://toolserver.org/tsthumb/tsthumb?w=800&h=800&domain=commons.wikimedia.org&f='+encodeURIComponent(slideshow.list[slideshow.current]); current++; if( current >= list.length ) current = 0; window.setTimeout(slideshow.nextImage,3000); } } }, showButton : function() { this.startButton.style.visibility = 'visible'; }, hideButton : function() { this.startButton.style.visibility = 'hidden'; }, // cross-browser event attachment (John Resig) // http://www.quirksmode.org/blog/archives/2005/10/_and_the_winner_1.html addEvent : function ( obj, type, fn ) { if (obj.addEventListener) obj.addEventListener( type, fn, false ); else if (obj.attachEvent) { obj["e"+type+fn] = fn; obj[type+fn] = function() { obj["e"+type+fn]( window.event ); } obj.attachEvent( "on"+type, obj[type+fn] ); } }, start : function( e ) { slideshow.list = new Array(); slideshow.current = 0; var links; if( typeof(this.gallery) != 'undefined' ) { slideshow.showwin = window.open('', 'showwin', 'left=0,top=0,width=' + screen.width + ',height=' + screen.height + ',toolbar=0,resizable=0,fullscreen=1'); var divs = this.gallery.getElementsByTagName('div'); for( var key=0; key< divs.length; key++ ) { if( divs[key].className == 'thumb' ) { links = divs[key].getElementsByTagName('a'); if( links.length > 0 && links[0].href.substr( 0, slideshow.baseURL.length ) == slideshow.baseURL ) slideshow.list.push( links[0].href.substr( slideshow.baseURL.length ) ); } } slideshow.showwin.document.open('text/html'); slideshow.showwin.document.write('