// JavaScript Document // confirm there's at least one image to zoom if(document.getElementById('linkZoomGallery')) { var hasEnlarged = false; for (h=0;h ':''; // alt title according to the enlargement altTitle = (ZoomImg[i] && ZoomImg[i]!="")?'title="click to see enlarged"':'title="no zoom available"'; document.getElementById("thumbCell_"+i).innerHTML = ''+separator+'
'; } else document.getElementById("thumbCell_"+i).style.display = 'none'; } if (NewImg[0] && NewImg[0]!="") { displayImage(0); // display first image } else { if (document.getElementById("imageGallery")) document.getElementById("imageGallery").style.display='none'; } } var current_image=0; // global var stores image being showed function displayImage(id) { if (id < NewImg.length) { current_image = id; // keeps 'num id' of image showed document.getElementById('mainImage').innerHTML = ""+ImgAlt+""; for (i=0; i < NewImg.length; i++) { document.getElementById('thumb_'+i).className = (current_image!=i)?'thumb-off':'thumb-on'; } } } // initialize the image gallery generateGallery();