
productDetailMenu()

function productDetailMenu()	{
	
	/* 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("productDetailTopMenu")) return false;
	
	
	/* get the reference to the productRange object and then create an array 
	   of all the <a> tags found in the array. To each tag assign a function to
	   the onmouseover and onmouseout events - which calls the changeColour and changeColour functions. */	
	
	var menu = document.getElementById("productDetailTopMenu");
	var menulinks = menu.getElementsByTagName("a");
	var existingColour
		
		for(i = 0; i < menulinks.length; i++) {
		
			
			menulinks[i].onmouseover = function() {
			
					
				return changeColour(this, "#FFFFFF");	
			}
			
			
			menulinks[i].onmouseout = function() {
			
					   		
				return resetColour(this);	
				
			}
			
			
			
		}
}


function changeColour(linkNode, colour)	{
	
	existingColour = linkNode.style.color
	
	linkNode.style.color = colour;
	
	
}


function resetColour(linkNode)	{
	

linkNode.style.color = existingColour;
	
	
}


