


// ---------------------------------------------
//	L A Y E R S
// ---------------------------------------------
function findPosX(obj)
{
	var curleft = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curleft += obj.offsetLeft
			obj = obj.offsetParent;
		}
	}
	else if (obj.x)
		curleft += obj.x;
	return curleft;
}
function findPosY(obj)
{
	var curtop = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	}
	else if (obj.y)
		curtop += obj.y;
	return curtop;
}


// ----------------------------------------------------
//	S U B M E N U   L E V E L   3   H O R I Z O N T A L
// ----------------------------------------------------
function ShowHML3Submenu(idMenu, id, RTL)
{
	var navigation = document.getElementById("navh");
	var topNav = findPosY(navigation);
	var left = findPosX(idMenu);
	var topDiff = topNav + 23;
	var leftDiff = 0;
	if (RTL == true)
	{
		leftDiff = left - (235 - idMenu.offsetWidth) + 3;
	}
	else
	{
		leftDiff = left + 2;
	}
	bwIE = (navigator.appVersion.indexOf("MSIE") != -1) ? "True" : "False";
	bwIE60 = (navigator.appVersion.indexOf("MSIE 6.0") != -1) ? "True" : "False";
	bwGecko = (navigator.userAgent.indexOf("Gecko") != -1) ? "True" : "False";
	bwFirefox3 = (navigator.userAgent.indexOf("Firefox/3") != -1) ? "True" : "False";
	bwFirefox3Beta = (navigator.userAgent.indexOf("Shiretoko/3") != -1) ? "True" : "False";
	bwSafari = (navigator.userAgent.indexOf("Safari") != -1) ? "True" : "False";
	bwOpera = (navigator.userAgent.indexOf("Opera") != -1) ? "True" : "False";
	bwChrome = (navigator.userAgent.indexOf("Chrome") != -1) ? "True" : "False";
	if (bwIE == "True")
	{
		topDiff = topDiff - -12;
		leftDiff = leftDiff - -9;
	}
	if (bwGecko == "True")
	{
		topDiff++;
	}
	if (bwFirefox3 == "True" || bwFirefox3Beta == "True")
	{
		topDiff = topDiff - 4;
		leftDiff = leftDiff - 1;
	}
  if (bwSafari == "True")
	{
		topDiff = topDiff - 4;
		leftDiff = leftDiff - 1;
	}
	if (bwOpera == "True")
	{
		topDiff = topDiff - 4;
		leftDiff = leftDiff - 1;
	}
	if (document.getElementById(id) != null)
	{
		document.getElementById(id).style.top = topDiff + "px";
		document.getElementById(id).style.left = leftDiff + "px";
	}
	if (bwIE60 == "True")
	{
		document.getElementById(id).style.display = "inline";
	}
}
function HideHML3Submenu(idMenu, id)
{
	bwIE60 = (navigator.appVersion.indexOf("MSIE 6.0") != -1) ? "True" : "False";
	if (bwIE60 == "True")
	{
		document.getElementById(id).style.display = "none";
	}
}
function ShowHML3Menu(idMenu, id)
{
	if (document.getElementById(idMenu) != null)
	{
		document.getElementById(idMenu).className = "menuLevel3Hover";
	}
	bwIE60 = (navigator.appVersion.indexOf("MSIE 6.0") != -1) ? "True" : "False";
	if (bwIE60 == "True")
	{
		document.getElementById(id).style.display = "inline";
	}
}
function HideHML3Menu(idMenu, id)
{
	if (document.getElementById(idMenu) != null)
	{
		document.getElementById(idMenu).className = "menuLevel3Normal";
	}
	bwIE60 = (navigator.appVersion.indexOf("MSIE 6.0") != -1) ? "True" : "False";
	if (bwIE60 == "True")
	{
		document.getElementById(id).style.display = "none";
	}
}
function HideHML3MenuSel(idMenu, id)
{
	if (document.getElementById(idMenu) != null)
	{
		document.getElementById(idMenu).className = "menuLevel3Selected";
	}
	bwIE60 = (navigator.appVersion.indexOf("MSIE 6.0") != -1) ? "True" : "False";
	if (bwIE60 == "True")
	{
		document.getElementById(id).style.display = "none";
	}
}

// ---------------------------------------------
//	S U B M E N U   L E V E L   3
// ---------------------------------------------
function ShowML3Submenu(idMenu, id)
{
	var navigation = document.getElementById("nav");
	var topNav = findPosY(navigation);
	var top = findPosY(idMenu);
	var topDiff = top - topNav - 1;
	bwIE = (navigator.appVersion.indexOf("MSIE") != -1) ? "True" : "False";
	bwIE60 = (navigator.appVersion.indexOf("MSIE 6.0") != -1) ? "True" : "False";
	bwGecko = (navigator.userAgent.indexOf("Gecko") != -1) ? "True" : "False";
	if (bwIE == "False")
	{
		topDiff = topDiff - 1;
	}
	if (bwGecko == "True")
	{
		topDiff = topDiff + 1;
	}
	if (document.getElementById(id) != null)
	{
		document.getElementById(id).style.top = topDiff + "px";
	}
	if (bwIE60 == "True")
	{
		document.getElementById(id).style.display = "inline";
	}
}
function HideML3Submenu(idMenu, id)
{
	bwIE60 = (navigator.appVersion.indexOf("MSIE 6.0") != -1) ? "True" : "False";
	if (bwIE60 == "True")
	{
		document.getElementById(id).style.display = "none";
	}
}
function ShowML3Menu(idMenu, id)
{
	if (document.getElementById(idMenu) != null)
	{
		document.getElementById(idMenu).className = "menuLevel3VerticalHover";
	}
	bwIE60 = (navigator.appVersion.indexOf("MSIE 6.0") != -1) ? "True" : "False";
	if (bwIE60 == "True")
	{
		document.getElementById(id).style.display = "inline";
	}
}
function HideML3Menu(idMenu, id)
{
	if (document.getElementById(idMenu) != null)
	{
		document.getElementById(idMenu).className = "menuLevel3VerticalNormal";
	}
	bwIE60 = (navigator.appVersion.indexOf("MSIE 6.0") != -1) ? "True" : "False";
	if (bwIE60 == "True")
	{
		document.getElementById(id).style.display = "none";
	}
}
function HideML3MenuSel(idMenu, id)
{
	if (document.getElementById(idMenu) != null)
	{
		document.getElementById(idMenu).className = "menuLevel3VerticalSelected";
	}
	bwIE60 = (navigator.appVersion.indexOf("MSIE 6.0") != -1) ? "True" : "False";
	if (bwIE60 == "True")
	{
		document.getElementById(id).style.display = "none";
	}
}



