function AbsolutePosition(strObjectName, strAxis){ if (document.getElementById) { // IE 5+, NS6+, Mozilla objHTMLObject = document.getElementById(strObjectName); } else if(document.all) { objHTMLObject = document.all.item(strObjectName); } if (strAxis.toUpperCase() == 'Y'){ var intTempPos = objHTMLObject.offsetTop; var strTagName = objHTMLObject.tagName; while(strTagName != "BODY"){ objHTMLObject = objHTMLObject.offsetParent; intTempPos = intTempPos + objHTMLObject.offsetTop; strTagName = objHTMLObject.tagName; } } else if (strAxis.toUpperCase() == 'X'){ var intTempPos = objHTMLObject.offsetLeft; var strTagName = objHTMLObject.tagName; while(strTagName != "BODY"){ objHTMLObject = objHTMLObject.offsetParent; intTempPos = intTempPos + objHTMLObject.offsetLeft; strTagName = objHTMLObject.tagName; } } else { var intTempPos = 0; } return intTempPos; } function ShowSubMenu(MenuID){ document.getElementById("Menu" + MenuID).style.backgroundColor = '#1C71B8'; document.getElementById("Menu" + MenuID).style.cursor='pointer'; document.getElementById("Menu" + MenuID).style.color='#FFF'; var objMenu = document.getElementById("SubMenu"+ MenuID); var intPosY = AbsolutePosition("Menu" + MenuID , "Y") + 2; var intPosX = AbsolutePosition("Menu" + MenuID , "X") + 177; objMenu.style.left = intPosX + "px"; objMenu.style.top = intPosY + "px"; objMenu.style.display = "block"; objMenu = null; } function HideSubMenu(MenuID){ document.getElementById("Menu" + MenuID).style.backgroundColor = ''; document.getElementById("Menu" + MenuID).style.cursor=''; document.getElementById("Menu" + MenuID).style.color=''; var objMenu = document.getElementById("SubMenu"+ MenuID); objMenu.style.display = "none"; objMenu = null; } function ShowBrandSubMenu(MenuID){ document.getElementById("BrandMenu" + MenuID).style.backgroundColor = '#1C71B8'; document.getElementById("BrandMenu" + MenuID).style.cursor='pointer'; document.getElementById("BrandMenu" + MenuID).style.color='#FFF'; var objMenu = document.getElementById("BrandSubMenu"+ MenuID); var intPosY = AbsolutePosition("BrandMenu" + MenuID , "Y") + 2; var intPosX = AbsolutePosition("BrandMenu" + MenuID , "X") - 187; objMenu.style.left = intPosX + "px"; objMenu.style.top = intPosY + "px"; objMenu.style.display = "block"; objMenu = null; } function HideBrandSubMenu(MenuID){ document.getElementById("BrandMenu" + MenuID).style.backgroundColor = ''; document.getElementById("BrandMenu" + MenuID).style.cursor=''; document.getElementById("BrandMenu" + MenuID).style.color=''; var objMenu = document.getElementById("BrandSubMenu"+ MenuID); objMenu.style.display = "none"; objMenu = null; } // this function determines whether the event is the equivalent of the microsoft // mouseleave or mouseenter events. function isMouseLeaveOrEnter(e, handler) { if (e.type != 'mouseout' && e.type != 'mouseover') return false; var reltg = e.relatedTarget ? e.relatedTarget : e.type == 'mouseout' ? e.toElement : e.fromElement; while (reltg && reltg != handler) reltg = reltg.parentNode; return (reltg != handler); }