

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 == "swapMeJpg") || (links[i].className == "ShireGo")) {
			//alert(links[i].className)
		
				links[i].onmouseover = function() {
			
				return swapImage(this)		
					
				}	
			
			
				links[i].onmouseout = function() {
			
				return noSwapImage(this)		
					
				}	
			

				}
				
				
				
				
				
			if(links[i].className == "swapBackground") {
			//alert(links[i].className)
		
				links[i].onmouseover = function() {
			
				return swapBackground(this)		
					
				}	
			
			
				links[i].onmouseout = function() {
			
				return noSwapBackground(this)		
					
				}	
			

			}		
		
		}
		
	
}

	
	


function swapImage(obj) {
	
		//alert(obj.src)
		obj.src = "images/" + obj.id + "_on.jpg"	
		//alert(obj.src)
	
	
}


function noSwapImage(obj) {
	
		//alert(obj.id)
	
		obj.src = "images/" + obj.id + "_off.jpg"	 
	
	
}


function swapBackground(obj) {
	
		
		obj.style.backgroundImage = "url(images/menuBackground_on.jpg)"	 	
	
}


function noSwapBackground(obj) {
	
		obj.style.backgroundImage = "url(images/menuBackground_off.jpg)"	 	
	
}


function swapMenuBackground(obj) {
	
		
		obj.style.backgroundImage = "url(images/pointer.gif)"	 	
	
}


function noSwapMenuBackground(obj) {
	
		obj.style.backgroundImage = "url(images/pointerOff.gif)"	 	
	
}


function swapButtonBackgroundOn(obj) {
	
		//alert(obj.style.backgroundImage = "url:(images/" + obj.id + "_on.jpg);")
		obj.style.backgroundImage = "url(images/" + obj.id + "_on.jpg)"	
		//alert(obj.style.backgroundImage)
}


function swapButtonBackgroundOff(obj) {
	
		//alert(obj.style.backgroundImage = "url:(images/" + obj.id + "_on.jpg);")
		obj.style.backgroundImage = "url(images/" + obj.id + "_off.jpg)"	
		//alert(obj.style.backgroundImage)
}


function swapBackgroundClass(obj) {
	
		obj.style.backgroundImage = "url(images/" + obj.className + "_on.gif)"	
		 
		//alert("url(images/" + obj.className + "_on.gif)")

	
}


function noSwapBackgroundClass(obj) {
		
		obj.style.backgroundImage = "url(images/" + obj.className + "_off.gif)"	 
	
}