function go() { el = document.getElementById( "jump" ); destination = el.options[ el.selectedIndex ].value; if ( destination ) location.href = destination; } function createCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; } var the_images = new Array(); function change() { if ( load_complete ) { el = document.forms[ 0 ]; el.action = dir + "/" + ( index + 1 ); el.submit(); } else { setTimeout( change, 3000 ); } } window.onload = function() { load_complete = true; // Page is loaded if ( document.getElementById( "jump" ) ) { document.getElementById( "jump" ).onchange = go; // Jump navigation document.getElementById( "jump" ).style.display = "inline"; } // Slideshow link properties if ( document.getElementById( "slideshow_link" ) ) { document.getElementById( "slideshow_link" ).style.display = "inline"; document.getElementById( "slideshow_link" ).onclick = function() { document.forms[ 0 ].submit(); } } // Cookie links if ( document.getElementById( "size_600" ) ) { document.getElementById( "size_600" ).style.display = "inline"; document.getElementById( "size_600" ).onclick = function() { createCookie( 'photowidth', 600, 365); document.location.reload(); } } if ( document.getElementById( "size_800" ) ) { document.getElementById( "size_800" ).style.display = "inline"; document.getElementById( "size_800" ).onclick = function() { createCookie( 'photowidth', 800, 365); document.location.reload(); } } if ( document.getElementById( "show_thumbs" ) ) { document.getElementById( "show_thumbs" ).style.display = "inline"; document.getElementById( "show_thumbs" ).onclick = function() { createCookie( 'hidethumbs', 0, 365); document.location.reload(); } } if ( document.getElementById( "hide_thumbs" ) ) { document.getElementById( "hide_thumbs" ).style.display = "inline"; document.getElementById( "hide_thumbs" ).onclick = function() { createCookie( 'hidethumbs', 1, 365); document.location.reload(); } } }