/////////////////////////////////////////////////////////////////// // 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('