var photoalbum_basefolder = '/siteimages/'; var photoalbum_current = 0; var photoalbum_images = new Array(); photoalbum_images[0] = new Array( 'top_photo_1.jpg', 'image0' ); photoalbum_images[1] = new Array( 'top_photo_2.jpg', 'image1' ); photoalbum_images[2] = new Array( 'top_photo_3.jpg', 'image2' ); photoalbum_images[3] = new Array( 'top_photo_4.jpg', 'image3' ); photoalbum_images[4] = new Array( 'top_photo_5.jpg', 'image4' ); photoalbum_images[5] = new Array( 'top_photo_6.jpg', 'image5' ); function createAlbum() { document.open(); document.writeln( '
' ); document.writeln( '' ); document.writeln( '

' + photoalbum_images[photoalbum_current][1] + '

' ); document.writeln( '
' ); document.writeln( '' ); document.writeln( '' ); document.writeln( '
' ); document.writeln( '
' ); document.close(); } function getRef( id ) { var ref; if (document.getElementById) // this is the way the standards work ref = document.getElementById(id); else if (document.all) // this is the way old msie versions work ref = document.all[id]; else if (document.layers) // this is the way nn4 works ref = document.layers[id]; return ref; } function changeImage( image ) { imageref = getRef( 'photoalbum_image' ); imageref.src = photoalbum_basefolder + photoalbum_images[image][0]; imageref.title = photoalbum_images[image][1]; captionref = getRef( 'photoalbum_caption' ); captionref.innerHTML = photoalbum_images[image][1]; photoalbum_current = image; } function nextImage() { nImage = photoalbum_current + 1; if (nImage >= photoalbum_images.length) nImage = 0; changeImage( nImage ); } function previousImage() { pImage = photoalbum_current - 1; if (pImage < 0) pImage = photoalbum_images.length - 1; changeImage( pImage ); }