
var imageSwaps = new Array()

imageSwaps[0] = "images/ceiling_on.jpg"
imageSwaps[1] = "images/table_on.jpg"
imageSwaps[2] = "images/wall_on.jpg"
imageSwaps[3] = "images/floor_on.jpg"
imageSwaps[4] = "images/exteriot_on.jpg"
imageSwaps[5] = "images/accessories_on.jpg"
imageSwaps[6] = "images/submit_button_on.jpg"


function checkForImageSwap() {

	/* 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("menuSlide")) return false;

	
	/* get the reference to the menuSlide object and then create an array 
	   of all the <a> tags found in the array. To each tag assign a function to
	   the onclick method - which calls the showPic function. */
	   
	//var gallery = document.getElementById("menuSlide");
	var links = document.getElementsByTagName("img");

	for(i = 0; i < links.length; i++) {
		
		//
		
			if(links[i].className == "swapMe") {
		//alert(links[i].className)
		
				links[i].onmouseover = function() {
			
				return swapImage(this)		
					
				}	
			
			
				links[i].onmouseout = function() {
			
				return noSwapImage(this)		
					
				}	
			

				}
		
		}
		
	
}

	
	


function swapImage(obj) {
	
		obj.src = "images/" + obj.id + "_on.jpg"	 
		//alert(obj.src)
	
	
}


function noSwapImage(obj) {
	
		//alert(obj.id)
	
		obj.src = "images/" + obj.id + "_off.jpg"	 
	
	
}