var myMenuTop = null;
var myMenuKill = null;
var myMenuPopup = null;
var myMenuUrl = null;
var myMenuParent = null;
var myMenuScrollTimer = null;
var myMenuShadows = new Array();
var myMenuDirSave = "LTR";
var myMenuCTSave = false;
var myMenuRenderStart = null;
var myMenuShadowsEnabled = true;
window.attachEvent("onload", myMenuInit);
function myMenuInit()
{
try
{
myMenuDirSave = myMenuDir();
myMenuCTSave = myMenuCT();
}
catch(e)
{
return;
}
myMenuTop = document.getElementById("myMenuTop");
myMenuUrl = myMenuTop.getAttribute("url");
myMenuParent = myMenuTop.getAttribute("parent");
myMenuAttach(myMenuTop);
}
function myPage(label, url, target, menu, linkID)
{
this.label = label;
this.url = url;
this.target = target;
this.menu = menu;
this.linkID = linkID;
}
function myLabel(label)
{
this.label = label;
}
function myMenuEnter()
{
if (myMenuKill)
{
window.clearTimeout(myMenuKill);
myMenuKill = null;
}
}
function myMenuLeave()
{
myMenuKill = window.setTimeout("myMenuKiller()", 200);
}
function myMenuKiller()
{
myKillMenu(myMenuTop.getAttribute("currentMenu"));
myMenuTop.removeAttribute("currentMenu");
}
function myMenuAttach(el)
{
el.attachEvent("onmouseenter", myMenuEnter);
el.attachEvent("onmouseleave", myMenuLeave);
var divs = el.getElementsByTagName("DIV");
var t = divs.length;
for (var i=0; i < t; i++)
{
var div = divs.item(i);
if (div.className == "myMenuRow")
{
div.attachEvent("onmouseenter", myMenuMouseover);
div.attachEvent("onmouseleave", myMenuMouseout);
div.attachEvent("onmousedown", myMenuMousedown);
div.attachEvent("onmouseup", myMenuMouseup);
div.setAttribute("save-background", div.style.background);
div.setAttribute("save-border", div.style.borderColor);
var a = div.getElementsByTagName("A");
if (a.length > 0)
{
var a0 = a[0];
if (a0.getAttribute("aoff"))
a0.outerHTML = a0.innerHTML;
else
{
div.setAttribute("status", a0.href);
div.attachEvent("onclick", myMenuClick);
}
}
if (div.getAttribute("menu"))
{
var imgs = div.getElementsByTagName("IMG");
if (imgs.length > 0)
{
var img = imgs[0];
img.style.visibility = "visible";
}
else
{
var x;
if (myMenuDirSave == "LTR")
x = (div.offsetWidth - 10) + "px";
else if (myMenuTop.contains(div))
x = "4px";
else
x = "6px";
var img = "";
div.insertAdjacentHTML("afterBegin", img);
}
}
}
}
}
function myMenuClick()
{
var div = window.event.srcElement;
var a = div.getElementsByTagName("A");
if (a.length == 0) return;
if (window.event.shiftKey)
{
var target = a[0].target;
a[0].target = "_new";
a[0].click();
a[0].target = target;
}
else
a[0].click();
}
function myKillMenu(id)
{
if (id == null) return;
var menu = document.getElementById(id);
var current = menu.getAttribute("currentMenu");
if (current)
{
myKillMenu(current);
menu.removeAttribute("currentMenu");
}
var temp = myMenuShadows[id];
if (temp)
{
var i;
var tempLength = temp.length;
for (i=0; i