

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;

	   
	var links = document.getElementsByTagName("img");

	for(i = 0; i < links.length; i++) {
		
		
			if(links[i].className.indexOf("swapMe") >= 0) {

		
				links[i].onmouseover = function() {
			
				return swapImage(this)		
					
				}	
			
			
				links[i].onmouseout = function() {
			
				return noSwapImage(this)		
					
				}	
			

				}
				
				
				
				
				
			if(links[i].className.indexOf("swapBackground") >= 0) {
		
				links[i].onmouseover = function() {
			
				return swapBackground(this)		
					
				}	
			
			
				links[i].onmouseout = function() {
			
				return noSwapBackground(this)		
					
				}	
			

			}	
			
			
			
			if(links[i].className.indexOf("button") >= 0) {
		
				links[i].onmouseover = function() {
			
				return swapButton(this)		
					
				}	
			
			
				links[i].onmouseout = function() {
			
				return noSwapButton(this)		
					
				}	
			

			}	
			
				
		
		}
		
	
}

	
	


function swapImage(obj) {
	
		//alert(obj.src)
		obj.src = "images/" + obj.id + "_on.jpg"	
		
}


function noSwapImage(obj) {
		
		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) {
	
		//alert(obj.parentNode.parentNode.id)
		obj.parentNode.style.backgroundImage = "url(images/usedPointer.gif)"	 	
	
}


function noSwapMenuBackground(obj) {
	
		obj.parentNode.style.backgroundImage = "none"	 	
	
}


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)"	 
	
}



function swapButton(obj) {
	
		obj.src = "images/" + obj.className + "press.jpg"	
		 
		//alert("url(images/" + obj.className + "_on.gif)")

	
}


function noSwapButton(obj) {
		
		obj.src = "images/" + obj.className + ".jpg"	
	
}