




function binGalleryShow()	{
	
	/* check the browser is capable of recognising the DOM objects
	   we need to implement the script - otherwise return false and allow the normal link to be executed */
	   
	if(!document.getElementsByTagName) return false;
	if(!document.getElementById) return false;
	if(!document.getElementById("galleryList")) return false;
	
	
	/* get the reference to the galleryList object and then create an array 
	   of all the <img> tags found in the array. To each tag assign a function to
	   the onmouseover and onmouseout events - which calls the fadeImage and restoreImage functions. */	
	
	var menu = document.getElementById("galleryList");
	var menulinks = menu.getElementsByTagName("img");
	var galleryImage
		
		for(i = 0; i < menulinks.length; i++) {
		
			menulinks[i].onmouseover = function() {
			
				return fadeBinGalleryImage(this)		
					
			}
			
			
			menulinks[i].onmouseout = function() {
			
				return restoreBinGalleryImage(this)		
					
			}
			
			
			
		}
}


function fadeBinGalleryImage(thisImage)	{

			
	
			thisImage.style.opacity = "0.5";
			thisImage.style.filter = "alpha(opacity = 50)";
			galleryImage = thisImage.getAttribute("alt")
			
			document.getElementById("leftImage").src = "images/indexGallery/onBlack/" + galleryImage + ".jpg"
			document.getElementById("rightImage").src = "images/indexGallery/inSitu/" + galleryImage + ".jpg"
}


function restoreBinGalleryImage(thisImage)	{


			thisImage.style.opacity = "1";
			thisImage.style.filter = "alpha(opacity = 100)";

			document.getElementById("leftImage").src = "images/indexGallery/onBlack/statement.jpg"
			document.getElementById("rightImage").src = "images/indexGallery/inSitu/0.jpg"

}