/////////////////////////////////////////////////////////////////// // Gregory Khrapunovich script library (2002-2003) // Language: javascript // Note: filename was given extention ".txt" to // allow displaying this file in the browser /////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////// // Add borders to images (called by window.onload) /////////////////////////////////////////////////////////////////// function OnLoadPhotos() { if (!document.images) return; for (var i=0; document.images[i]; i++) { var img = document.images[i]; if (img.style) img.style.border = '1px solid black'; } } //////////////////////////////////////////////////////////////////// // Change image border color when user puts the mouse over the image //////////////////////////////////////////////////////////////////// function img_over (which) { if (which.style) { which.style.borderColor='red'; which.style.cursor='hand' } } /////////////////////////////////////////////////////////////////// // Restore image border color when user moves the mouse out /////////////////////////////////////////////////////////////////// function img_out (which) { if (which.style) which.style.borderColor='black' } /////////////////////////////////////////////////////////////////// // Open a window with a single photo when user clicks on thumbnale /////////////////////////////////////////////////////////////////// function show_photo (which,width,height){ // Uncomment next line for InterDev debugging //debugger; // Get the photograph filename var photoName = which.src.replace("thumb.", ""); // Allocate space for the caption and border height += 50; width += 20; // Open the window and display the photo if (window.newwindow) newwindow.close(); newwindow=window.open(null,null,"height="+height+",width="+width); newwindow.document.write('Photo<'+'body'+'>'); newwindow.document.write('
') newwindow.document.write(which.alt + '
'); newwindow.document.write(''); newwindow.document.write(''); newwindow.focus(); } /////////////////////////////////////////////////////////////////// // Remove annoying tripod ads (called by window.onload) /////////////////////////////////////////////////////////////////// function CleanPage() { var tripodTables = document.getElementsByTagName("table"); // Remove first two tables because they are inserted by Tripod if (tripodTables) { if (tripodTables.length > 0) { for (var i=0; i<=1; i++) { var tbl = tripodTables[i]; tbl.style.display = "none" } } } } /////////////////////////////////////////////////////////////////// // Usage example (from index_photos.htm) /////////////////////////////////////////////////////////////////// // // // // // //Halloween (2001)