enu.bgImageUp +")";;
}
}
}
if (!mouseup && window.ActiveMenu) {
if (window.ActiveMenu.Menu) {
if (window.ActiveMenu.Menu.hideOnMouseOut) {
FW_startTimeout();
}
return(true);
}
}
return(true);
}
function PxToNum(pxStr)
{ // pxStr == 27px, we want 27.
if (pxStr.length > 2) {
n = Number(pxStr.substr(0, pxStr.length-2));
return(n);
}
return(0);
}
function hideChildMenu(hcmLayer) {
FW_clearTimeout();
var l = hcmLayer;
for (var i=0; i < l.Menu.childMenus.length; i++) {
var theLayer = l.Menu.childMenus[i];
if (document.layers) {
theLayer.visibility = "hidden";
} else {
theLayer = FIND(theLayer);
theLayer.style.visibility = "hidden";
}
theLayer.Menu.hideChildMenu(theLayer);
}
if (l.childMenu) {
var childMenu = l.childMenu;
if (document.layers) {
l.Menu.FW_showMenu(null,null,null,childMenu.layers[0]);
childMenu.zIndex = l.parentLayer.zIndex +1;
childMenu.top = l.top + l.parentLayer.top + l.Menu.menuLayer.top + l.Menu.menuItemHeight/3;
if (childMenu.left + childMenu.clip.width > window.innerWidth) {
childMenu.left = l.parentLayer.left - childMenu.clip.width + l.Menu.menuLayer.left + 15;
l.Menu.container.clip.left -= childMenu.clip.width;
} else {
childMenu.left = l.parentLayer.left + l.parentLayer.clip.width + l.Menu.menuLayer.left -5;
}
var w = childMenu.clip.width+childMenu.left-l.Menu.container.clip.left;
if (w > l.Menu.container.clip.width)
l.Menu.container.clip.width = w;
var h = childMenu.clip.height+childMenu.top-l.Menu.container.clip.top;
if (h > l.Menu.container.clip.height) l.Menu.container.clip.height = h;
l.document.layers[1].zIndex = 0;
childMenu.visibility = "inherit";
} else if (FIND("menuItem0")) {
childMenu = FIND(l.childMenu);
var menuLayer = FIND(l.Menu.menuLayer);
var s = childMenu.style;
s.zIndex = menuLayer.style.zIndex+1;
if (document.all) { // ie case.
s.pixelTop = l.style.pixelTop + menuLayer.style.pixelTop + l.Menu.menuItemHeight/3;
s.left = s.pixelLeft = (menuLayer.style.pixelWidth) + menuLayer.style.pixelLeft -5;
} else { // zilla case
var top = PxToNum(l.style.top) + PxToNum(menuLayer.style.top) + l.Menu.menuItemHeight/3;
var left = (PxToNum(menuLayer.style.width)) + PxToNum(menuLayer.style.left) -5;
s.top = top;
s.left = left;
}
childMenu.style.visibility = "inherit";
} else {
return;
}
window.activeMenus[window.activeMenus.length] = childMenu;
}
}
function hideActiveMenus() {
if (!window.activeMenus) return;
for (var i=0; i < window.activeMenus.length; i++) {
if (!activeMenus[i]) continue;
if (activeMenus[i].visibility && activeMenus[i].Menu) {
activeMenus[i].visibility = "hidden";
activeMenus[i].Menu.container.visibility = "hidden";
activeMenus[i].Menu.container.clip.left = 0;
} else if (activeMenus[i].style) {
var s = activeMenus[i].style;
s.visibility = "hidden";
s.left = -200;
s.top = -200;
}
}
if (window.ActiveMenuItem) {
hideMenu(false, false);
}
window.activeMenus.length = 0;
}
}
}
}
if (!mouseup && window.ActiveMenu) {
if (window.ActiveMenu.Menu) {
if (window.ActiveMenu.Menu.hideOnMouseOut) {
FW_startTimeout();
}
return(true);
}
}
return(true);
}
function PxToNum(pxStr)
{ // pxStr == 27px, we want 27.
if (pxStr.length > 2) {
n = Number(pxStr.substr(0, pxStr.length-2));
return(n);
}
return(0);
}
function hideChildMenu(hcmLayer) {
FW_clearTimeout();
var l = hcmLayer;
for (var i=0; i < l.Menu.childMenus.length; i++) {
var theLayer = l.Menu.childMenus[i];
if (document.layers) {
theLayer.visibility = "hidden";
} else {
theLayer = FIND(theLayer);
theLayer.style.visibility = "hidden";
}
theLayer.Menu.hideChildMenu(theLayer);
}
if (l.childMenu) {
var childMenu = l.childMenu;
if (document.layers) {
l.Menu.FW_showMenu(null,null,null,childMenu.layers[0]);
childMenu.zIndex = l.parentLayer.zIndex +1;
childMenu.top = l.top + l.parentLayer.top + l.Menu.menuLayer.top + l.Menu.menuItemHeight/3;
if (childMenu.left + childMenu.clip.width > window.innerWidth) {
childMenu.left = l.parentLayer.left - childMenu.clip.width + l.Menu.menuLayer.left + 15;
l.Menu.container.clip.left -= childMenu.clip.width;
} else {
childMenu.left = l.parentLayer.left + l.parentLayer.clip.width + l.Menu.menuLayer.left -5;
}
var w = childMenu.clip.width+childMenu.left-l.Menu.container.clip.left;
if (w > l.Menu.container.clip.width)
l.Menu.container.clip.width = w;
var h = childMenu.clip.height+childMenu.top-l.Menu.container.clip.top;
if (h > l.Menu.container.clip.height) l.Menu.container.clip.height = h;
l.document.layers[1].zIndex = 0;
childMenu.visibility = "inherit";
} else if (FIND("menuItem0")) {
childMenu = FIND(l.childMenu);
var menuLayer = FIND(l.Menu.menuLayer);
var s = childMenu.style;
s.zIndex = menuLayer.style.zIndex+1;
if (document.all) { // ie case.
s.pixelTop = l.style.pixelTop + menuLayer.style.pixelTop + l.Menu.menuItemHeight/3;
s.left = s.pixelLeft = (menuLayer.style.pixelWidth) + menuLayer.style.pixelLeft -5;
} else { // zilla case
var top = PxToNum(l.style.top) + PxToNum(menuLayer.style.top) + l.Menu.menuItemHeight/3;
var left = (PxToNum(menuLayer.style.width)) + PxToNum(menuLayer.style.left) -5;
s.top = top;
s.left = left;
}
childMenu.style.visibility = "inherit";
} else {
return;
}
window.activeMenus[window.activeMenus.length] = childMenu;
}
}
function hideActiveMenus() {
if (!window.activeMenus) return;
for (var i=0; i < window.activeMenus.length; i++) {
if (!activeMenus[i]) continue;
if (activeMenus[i].visibility && activeMenus[i].Menu) {
activeMenus[i].visibility = "hidden";
activeMenus[i].Menu.container.visibility = "hidden";
activeMenus[i].Menu.container.clip.left = 0;
} else if (activeMenus[i].style) {
var s = activeMenus[i].style;
s.visibility = "hidden";
s.left = -200;
s.top = -200;
}
}
if (window.ActiveMenuItem) {
hideMenu(false, false);
}
window.activeMenus.length = 0;
}