

function activateDropDownMenus()	{

	/* 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("mainMenu")) return false;
	
	
	var dropDowns = document.getElementById("mainMenu").getElementsByTagName("li"); 
	var thisElement
	var children	
			
		
	if (dropDowns.length > 0) {
		
			for(i = 0; i < dropDowns.length; i++) {


						if (dropDowns[i].className == "mainitem") {
												
	
												dropDowns[i].onmouseover = function() {
												
														swapBackground(this)
														showMenu(this)
											
													}
													
														dropDowns[i].onmouseout = function() {
								
															noSwapBackground(this)
															hideMenu(this)
											
														}													
													
												
																		
						}
																															
			}
			
	}	   
	
}


function showMenu(subMenu)	{
	

	
	if (subMenu.hasChildNodes){
								
		children = subMenu.childNodes
									
			for(j=0 ; j < children.length; j++) {
					
										
				if(children[j].nodeName == "UL") {
												
					children[j].style.display = "list-item"

				}	
		}
	
	}
	
	return true
}




function hideMenu(subMenu)	{
	
	
	
	if (subMenu.hasChildNodes){
								
		children = subMenu.childNodes
									
			for(j=0 ; j < children.length; j++) {
											
				if(children[j].nodeName == "UL") {
												
					children[j].style.display = 'none'

				}	
		}
	
	}
	
	return true
}