loaded = 0; layersMoved = 0; elementsHidden = 0; menuLeftShift = 6; menuRightShift = 10; layerPoppedUp = ""; mtimer = 0; currentY = 0; function grabMouse(e) { currentY = e.pageY; } if (NS4) { document.captureEvents(Event.MOUSEDOWN | Event.MOUSEMOVE); document.onmousemove = grabMouse; } function shutdown() { for (i=1; i<=numl; i++) { LMPopUpL(listl[i], false); } layerPoppedUp = ""; if (IE && !IE55) { showElements(); elementsHidden = 0; } } if (NS4) { document.onmousedown = shutdown; } else { document.onclick = shutdown; } function moveLayerX(menuName) { if (!loaded || (isVisible(menuName) && menuName != layerPoppedUp)) { return; } if (father[menuName] != "") { if (!Opera5 && !IE4) { width0 = lwidth[father[menuName]]; width1 = lwidth[menuName]; } else if (Opera5) { width0 = abscissaStep; width1 = abscissaStep; } else if (IE4) { width0 = getOffsetWidth(father[menuName]); width1 = getOffsetWidth(menuName); } onLeft = getOffsetLeft(father[menuName]) - width1 + menuLeftShift; onRight = getOffsetLeft(father[menuName]) + width0 - menuRightShift; windowWidth = getWindowWidth(); windowXOffset = getWindowXOffset(); if (onLeft < windowXOffset && onRight + width1 > windowWidth + windowXOffset) { if (onRight + width1 - windowWidth - windowXOffset > windowXOffset - onLeft) { onLeft = windowXOffset; } else { onRight = windowWidth + windowXOffset - width1; } } if (back[father[menuName]]) { if (onLeft < windowXOffset) { back[menuName] = 0; } else { back[menuName] = 1; } } else { if (onRight + width1 > windowWidth + windowXOffset) { back[menuName] = 1; } else { back[menuName] = 0; } } if (back[menuName]) { if (IE55) setLeft('if_'+menuName, onLeft); setLeft(menuName, onLeft); } else { if (IE55) setLeft('if_'+menuName, onRight); setLeft(menuName, onRight); } } moveLayerY(menuName, 0);} function moveLayerY(menuName, ordinateMargin) { if (!loaded || (isVisible(menuName) && menuName != layerPoppedUp)) { return; } if (!layersMoved) { moveLayers(); layersMoved = 1; } if (!NS4) { newY = getOffsetTop("ref" + menuName); } else { newY = currentY; } newY -= ordinateMargin; layerHeight = getOffsetHeight(menuName); windowHeight = getWindowHeight(); windowYOffset = getWindowYOffset(); if (newY + layerHeight > windowHeight + windowYOffset) { if (layerHeight > windowHeight) { newY = windowYOffset; } else { newY = windowHeight + windowYOffset - layerHeight; } } if (Math.abs(getOffsetTop(menuName) - newY) > thresholdY) { if (IE55) setTop('if_'+menuName, newY); setTop(menuName, newY); } } function LMPopUp(menuName, isCurrent) { if (!loaded || menuName == layerPoppedUp || (isVisible(menuName) && !isCurrent)) { return; } if (menuName == father[layerPoppedUp]) { LMPopUpL(layerPoppedUp, false); } else if (father[menuName] == layerPoppedUp) { LMPopUpL(menuName, true); } else { shutdown(); foobar = menuName; do { LMPopUpL(foobar, true); foobar = father[foobar]; } while (foobar != "") } layerPoppedUp = menuName; } function LMPopUpL(menuName, on) { if (!loaded) { return; } if (!layersMoved) { moveLayers(); layersMoved = 1; } if (IE55) setVisibility('if_' + menuName, on); setVisibility(menuName, on); if (IE && !IE55) { if (!elementsHidden) { hideElements(); elementsHidden = 1; } } } function resizeHandler() { if (NS4) { window.location.reload(); } shutdown(); for (i=1; i<=numl; i++) { setLeft(listl[i], 0); setTop(listl[i], 0); } layersMoved = 0; } windowOnResize('resizeHandler();'); function yaresizeHandler() { if (window.innerWidth != origWidth || window.innerHeight != origHeight) { if (Konqueror2 || Opera5) { window.location.reload(); } origWidth = window.innerWidth; origHeight = window.innerHeight; resizeHandler(); } setTimeout('yaresizeHandler()', 500); } function loadHandler() { if (Konqueror2 || Opera56) { origWidth = window.innerWidth; origHeight = window.innerHeight; yaresizeHandler(); } } window.onload = loadHandler; function fixieflm(menuName) { if (DOM) { setWidth(menuName, "100%"); } else { document.write(""); document.write("
"); } } function hilite(obj, bOn, stylePrefix) { if (bOn) { obj.className = stylePrefix + 'phplmmenuitem_hover'; } else { obj.className = stylePrefix + 'phplmmenuitem'; } } function contextLMPopUp(menuName) { if (!loaded) return; layersMoved = 0; LMPopUp(menuName, false); }