
/// MICHELLE's ADDITION Javascript

function showmenu(elmnt,leftpos,toppos)
	{
			
		if (document.layers)
		{ // NS 4 
				document.layers[elmnt].visibility = "show";
				navRoot = document.layers[elmnt];
				navRoot.left = leftpos;
				navRoot.top = toppos;
		} else if (document.all)
		{ // ie & Opera
				document.all(elmnt).style.visibility = "visible";
				navRoot =  document.all(elmnt);
				navRoot.style.left = leftpos;
				navRoot.style.top = toppos;
		} else if (document.getElementById)
		{ // NS 6+ & Firefox
				document.getElementById(elmnt).style.visibility="visible";
				navRoot = document.getElementById(elmnt);
				navRoot.style.left = leftpos;
				navRoot.style.top = toppos;
				//alert("this is the node of navRoot:" + navRoot.nodeName);
		}
		over(navRoot,elmnt,leftpos,toppos)
	}

function over(navRoot,elmnt,leftpos,toppos) 
	{
		for (i=0; i < navRoot.childNodes.length; i++) 
			{
				node = navRoot.childNodes[i];
				if (node.nodeName=="SPAN") 
					{
						node.onmouseover=function() { showmenu(elmnt,leftpos,toppos);}
					}
			}
	}
	
	function hidemenu(elmnt)
	{
		if (document.layers)
		{ // NS 4 
			document.layers[elmnt].visibility = "hide";
				navRoot = document.layers[elmnt];
		} else if (document.all)
		{ // ie & Opera
			 document.all(elmnt).style.visibility = "hidden";
				navRoot =  document.all(elmnt);
		} else if (document.getElementById)
		{ // NS 6+ & Firefox
			document.getElementById(elmnt).style.visibility="hidden";
				navRoot = document.getElementById(elmnt);
		}
		out(navRoot,elmnt)
	}
	
function out(navRoot, elmnt)
	{
	for (i=0; i < navRoot.childNodes.length; i++) 
		{
			node = navRoot.childNodes[i];
			if (node.nodeName=="SPAN") 
				{
					node.onmouseout=function() {hidemenu(elmnt);}
				}
		}
}