


function mainMenu()	{
	
	/* 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("menu")) return false;
	
	
	/* get the reference to the menu 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 swapMenuBullet and restoreMenuBullet functions. */	
	
	var menu = document.getElementById("menu");
	var menulinks = menu.getElementsByTagName("a");
	
		for(i = 0; i < menulinks.length; i++) {
		
			
			menulinks[i].onmouseover = function() {
			
					  return swapMenuBullet(this);		
			}
			
			
			menulinks[i].onmouseout = function() {
			
					 return  restoreMenuBullet(this)		
				
			}
			
			
			
		}
}


function swapMenuBullet(thisImage)	{

			thisImage.parentNode.style.backgroundImage = "url(images/menu_on.gif)";
						
}


function restoreMenuBullet(thisImage)	{
	

			if (thisImage.parentNode.className == "") {
				
				thisImage.parentNode.style.backgroundImage = "url(images/menu_off.gif)";
			}
		
}