var oDiv;
var oMenuArray = new Array() ;

function lp(event) 
{
	var foundDiv = false;
	//MS Model
	if (window.event) 
	{
		oTarget = window.event.srcElement
		foundDiv = true;
	}
	else
	{
		//W3C Model
		if(event.target)
		{
			oTarget = event.target
			foundDiv = true; 
		}
	}
	
	if(foundDiv)
	{
		GetCallerDiv(oTarget)
		if(oDiv.className == "SubItemHover" || oDiv.className == "SubItemSelected")
		{
			if (oDiv.childNodes[0].getAttribute("target") != "_blank")
			{
				document.location.href = oDiv.childNodes[0].getAttribute("href");
			}
		}
		if(oDiv.className == "ItemTwistHover" || oDiv.className == "ItemTwistSelected")
		{
			sID = oDiv.id + "Menu";
			oSubMenu = document.getElementById(sID)
			if(oSubMenu.style.display == "none")
			{
				var aDivs = document.getElementsByTagName("DIV");
				for (i = 0; i < aDivs.length; i++) 
				{
					if(aDivs[i].className == "ItemTwist" || aDivs[i].className == "ItemTwistSelected")
					{
						document.getElementById(aDivs[i].id + "Menu").style.display = "none"
					}
				}
				oSubMenu.style.display = "block"
			}
			else
			{
				oSubMenu.style.display = "none"
			}
		}
	}
}

function mv(event) 
{
	//alert(document.getElementById('sPath').value)
	var foundDiv = false;
	var sPath = document.getElementById('sPath').value;
	//MS Model
	if (window.event) 
	{
		oTarget = window.event.srcElement
		foundDiv = true;
	}
	else
	{
		//W3C Model
		if(event.target)
		{
			oTarget = event.target
			foundDiv = true;
		}
	}
	if(foundDiv)
	{
		GetCallerDiv(oTarget)
		if(oDiv.className == "Item") oDiv.className = "ItemHover"
		if(oDiv.className == "Item2") 
		{
			document.getElementById(oDiv.id + "IMG").setAttribute("src", sPath + "menu_img/arrow2b.gif")
			oDiv.className = "Item2Hover"
		}
		if(oDiv.className == "SubItem") oDiv.className = "SubItemHover"
		if(oDiv.className == "ItemTwist") 
		{
			document.getElementById(oDiv.id + "IMG").setAttribute("src", sPath + "menu_img/arrow1b.gif")
			oDiv.className = "ItemTwistHover"
		}
	}
}
function mo(event) 
{
	var foundDiv = false;
	var sPath = document.getElementById('sPath').value;
	
	//MS Model
	if (window.event) 
	{
		oTarget = window.event.srcElement
		foundDiv = true;
	}
	else
	{
		//W3C Model
		if(event.target)
		{
			oTarget = event.target
			foundDiv = true;
		}
	}
	if(foundDiv)
	{
		GetCallerDiv(oTarget)
		if(oDiv.className == "ItemHover") oDiv.className = "Item"
		if(oDiv.className == "Item2Hover") 
		{
			document.getElementById(oDiv.id + "IMG").setAttribute("src", sPath + "menu_img/arrow2.gif")
			oDiv.className = "Item2"
		}
		if(oDiv.className == "SubItemHover") oDiv.className = "SubItem"
		if(oDiv.className == "ItemTwistHover")
		{
			document.getElementById(oDiv.id + "IMG").setAttribute("src", sPath + "menu_img/arrow1.gif")
			oDiv.className = "ItemTwist"
		}
	}
}

function GetCallerDiv(oElt)
{
	if(oElt.tagName == "DIV")
	{
		oDiv = oElt;
	}
	else
	{
		GetCallerDiv(oElt.parentNode);
	}
}

function scrollingmenu(toggle) {

}

function scrollingmenu() {

}