	
	// the timeout in millisecond
	var menutimeout	= 750;
	
	// the time, in milliseconds
	var menutimer = 0;
	
	// the current menu item, starts off as null
	var themenuitem = null;
	
	// open the menu according to the ID
	function openmenu( id ) {
	
		menucancelclosetime();
	
		if( themenuitem != null ) {
		
			themenuitem.style.visibility = 'hidden';
			
		}
	
		themenuitem = document.getElementById( id );
		themenuitem.style.visibility = 'visible';
	
	}

	// closes the menu
	function closemenu() {
	
		if( themenuitem != null ) { 
		
			themenuitem.style.visibility = 'hidden';
			
		}
		
	}
	
	// start the timeout for menu auto-closing (rolling out of the div or main hyperlink)
	function closemenutime() {
	
		menutimer = window.setTimeout( closemenu, menutimeout );
		
	}
	
	// cancel the close time of the menu (rolling into the div)
	function menucancelclosetime() {
	
		if( menutimer ) {
		
			window.clearTimeout( menutimer );
			menutimer = null;
			
		}
		
	}
	