if (!l) return;
hideActiveMenus();
if (l.action) {
eval("" + l.action);
}
window.ActiveMenuItem = 0;
}
function FW_clearTimeout()
{
if (fwHideMenuTimer) clearTimeout(fwHideMenuTimer);
fwHideMenuTimer = null;
fwDHFlag = false;
}
function FW_startTimeout()
{
fwStart = new Date();
fwDHFlag = true;
fwHideMenuTimer = setTimeout("fwDoHide()", 1000);
}
function fwDoHide()
{
if (!fwDHFlag) return;
var elapsed = new Date() - fwStart;
if (elapsed < 1000) {
fwHideMenuTimer = setTimeout("fwDoHide()", 1100-elapsed);
return;
}
fwDHFlag = false;
hideActiveMenus();
window.ActiveMenuItem = 0;
}
function FW_showMenu(menu, x, y, child) {
if (!window.fwWroteMenu) return;
FW_clearTimeout();
if (document.layers) {
if (menu) {
var l = menu.menuLayer || menu;
l.left = 1;
l.top = 1;
hideActiveMenus();
if (this.visibility) l = this;
window.ActiveMenu = l;
} else {
var l = child;
}
if (!l) return;
for (var i=0; i<l.layers.length; i++) {
if (!l.layers[i].isHilite)
l.layers[i].visibility = "inherit";
if (l.layers[i].document.layers.length > 0)
FW_showMenu(null, "relative", "relative", l.layers[i]);
}
if (l.parentLayer) {
if (x != "relative")
l.parentLayer.left = x || window.pageX || 0;
if (l.parentLayer.left + l.clip.width > window.innerWidth)
l.parentLayer.left -= (l.parentLayer.left + l.clip.width - window.innerWidth);
if (y != "relative")
l.parentLayer.top = y || window.pageY || 0;
if (l.parentLayer.isContainer) {
l.Menu.xOffset = window.pageXOffset;
l.Menu.yOffset = window.pageYOffset;
l.parentLayer.clip.width = window.ActiveMenu.clip.width +2;
l.parentLayer.clip.height = window.ActiveMenu.clip.height +2;
if (l.parentLayer.menuContainerBgColor) l.parentLayer.document.bgColor = l.parentLayer.menuContainerBgColor;
}
}
l.visibility = "inherit";
if (l.Menu) l.Menu.container.visibility = "inherit";
} else if (FIND("menuItem0")) {
var l = menu.menuLayer || menu;
hideActiveMenus();
if (typeof(l) == "string") {
l = FIND(l);
}
window.ActiveMenu = l;
var s = l.style;
s.visibility = "inherit";
if (x != "relative")
s.left = s.pixelLeft = x || (window.pageX + document.body.scrollLeft) || 0;
if (y != "relative")
s.top = s.pixelTop = y || (window.pageY + document.body.scrollTop) || 0;
l.Menu.xOffset = document.body.scrollLeft;
l.Menu.yOffset = document.body.scrollTop;
}
if (menu) {
window.activeMenus[window.activeMenus.length] = l;
}
}
function onMenuItemDown(e, l) {
var a = window.ActiveMenuItem;
if (document.layers) {
if (a) {
a.eX = e.pageX;
a.eY = e.pageY;
a.clicked = true;
}
}
}
function mouseupMenu(e)
{
hideMenu(true, e);
hideActiveMenus();
return true;
}
function mouseoutMenu()
{
hideMenu(false, false);
return true;
}
function hideMenu(mouseup, e) {
var a = window.ActiveMenuItem;
if (a && document.layers) {
a.document.bgColor = a.saveColor;
a.focusItem.top = -30;
if (a.hilite) a.hilite.visibility = "hidden";
if (mouseup && a.action && a.clicked && window.ActiveMenu) {
if (a.eX <= e.pageX+15 && a.eX >= e.pageX-15 && a.eY <= e.pageY+10 && a.eY >= e.pageY-10) {
setTimeout('window.ActiveMenu.Menu.onMenuItemAction();', 2);
}
}
a.clicked = false;
if (a.Menu.bgImageOver) {
a.background.src = a.Menu.bgImageUp;
}
} else if (window.ActiveMenu && FIND("menuItem0")) {
if (a) {
a.style.backgroundColor = a.saveColor;
if (a.hilite) a.hilite.style.visibility = "hidden";
if (a.Menu.bgImageUp) {
a.style.background = "url(" + a.M
hideActiveMenus();
if (l.action) {
eval("" + l.action);
}
window.ActiveMenuItem = 0;
}
function FW_clearTimeout()
{
if (fwHideMenuTimer) clearTimeout(fwHideMenuTimer);
fwHideMenuTimer = null;
fwDHFlag = false;
}
function FW_startTimeout()
{
fwStart = new Date();
fwDHFlag = true;
fwHideMenuTimer = setTimeout("fwDoHide()", 1000);
}
function fwDoHide()
{
if (!fwDHFlag) return;
var elapsed = new Date() - fwStart;
if (elapsed < 1000) {
fwHideMenuTimer = setTimeout("fwDoHide()", 1100-elapsed);
return;
}
fwDHFlag = false;
hideActiveMenus();
window.ActiveMenuItem = 0;
}
function FW_showMenu(menu, x, y, child) {
if (!window.fwWroteMenu) return;
FW_clearTimeout();
if (document.layers) {
if (menu) {
var l = menu.menuLayer || menu;
l.left = 1;
l.top = 1;
hideActiveMenus();
if (this.visibility) l = this;
window.ActiveMenu = l;
} else {
var l = child;
}
if (!l) return;
for (var i=0; i<l.layers.length; i++) {
if (!l.layers[i].isHilite)
l.layers[i].visibility = "inherit";
if (l.layers[i].document.layers.length > 0)
FW_showMenu(null, "relative", "relative", l.layers[i]);
}
if (l.parentLayer) {
if (x != "relative")
l.parentLayer.left = x || window.pageX || 0;
if (l.parentLayer.left + l.clip.width > window.innerWidth)
l.parentLayer.left -= (l.parentLayer.left + l.clip.width - window.innerWidth);
if (y != "relative")
l.parentLayer.top = y || window.pageY || 0;
if (l.parentLayer.isContainer) {
l.Menu.xOffset = window.pageXOffset;
l.Menu.yOffset = window.pageYOffset;
l.parentLayer.clip.width = window.ActiveMenu.clip.width +2;
l.parentLayer.clip.height = window.ActiveMenu.clip.height +2;
if (l.parentLayer.menuContainerBgColor) l.parentLayer.document.bgColor = l.parentLayer.menuContainerBgColor;
}
}
l.visibility = "inherit";
if (l.Menu) l.Menu.container.visibility = "inherit";
} else if (FIND("menuItem0")) {
var l = menu.menuLayer || menu;
hideActiveMenus();
if (typeof(l) == "string") {
l = FIND(l);
}
window.ActiveMenu = l;
var s = l.style;
s.visibility = "inherit";
if (x != "relative")
s.left = s.pixelLeft = x || (window.pageX + document.body.scrollLeft) || 0;
if (y != "relative")
s.top = s.pixelTop = y || (window.pageY + document.body.scrollTop) || 0;
l.Menu.xOffset = document.body.scrollLeft;
l.Menu.yOffset = document.body.scrollTop;
}
if (menu) {
window.activeMenus[window.activeMenus.length] = l;
}
}
function onMenuItemDown(e, l) {
var a = window.ActiveMenuItem;
if (document.layers) {
if (a) {
a.eX = e.pageX;
a.eY = e.pageY;
a.clicked = true;
}
}
}
function mouseupMenu(e)
{
hideMenu(true, e);
hideActiveMenus();
return true;
}
function mouseoutMenu()
{
hideMenu(false, false);
return true;
}
function hideMenu(mouseup, e) {
var a = window.ActiveMenuItem;
if (a && document.layers) {
a.document.bgColor = a.saveColor;
a.focusItem.top = -30;
if (a.hilite) a.hilite.visibility = "hidden";
if (mouseup && a.action && a.clicked && window.ActiveMenu) {
if (a.eX <= e.pageX+15 && a.eX >= e.pageX-15 && a.eY <= e.pageY+10 && a.eY >= e.pageY-10) {
setTimeout('window.ActiveMenu.Menu.onMenuItemAction();', 2);
}
}
a.clicked = false;
if (a.Menu.bgImageOver) {
a.background.src = a.Menu.bgImageUp;
}
} else if (window.ActiveMenu && FIND("menuItem0")) {
if (a) {
a.style.backgroundColor = a.saveColor;
if (a.hilite) a.hilite.style.visibility = "hidden";
if (a.Menu.bgImageUp) {
a.style.background = "url(" + a.M