ver5 = 0;
if (navigator.userAgent.indexOf("MSIE 5")!=-1) ver5 = 1;
window.onload = startIt;
isLoaded = false;
if (!window.imgHspace) imgHspace=0;
mSecsVis = secondsVisible*1000;
imgStr = "";
fullImgSize = (imgHSiz+(imgHspace*2));
imgStr = ""+ imgStr +"";
areCreated = false;
menuLoc = null;
function initVars() {
if(areCreated) {
for(i=1; i" + htmStr + "
";
if (hasMore) {
makeMenuIE(true,menuCount + "_" + menu.itemCount,menu);
menu = menu.parentMenu;
}
}
menu.innerHTML = menu.itemStr;
itemColl = menu.children.tags("SPAN");
for (i = 0; i < itemColl.length; i++) {
it = itemColl(i);
it.setup = itemSetup;
it.setup(i + 1, menu.array);
}
if (itemColl.length) menu.lastItem = itemColl(itemColl.length - 1);
menu.setup(isChild,parMenu);
}
function makeElement(whichEl,whichWidth,whichParent,whichContainer) {
elStr = "";
if (ver5) {
document.write(elStr);
} else {
menuLoc.document.body.insertAdjacentHTML("BeforeEnd",elStr);
}
return eval(whichEl);
}
function itemSetup(whichItem,whichArray) {
this.onmouseover = itemOver;
this.onmouseout = itemOut;
this.container = this.offsetParent;
arrayPointer = (this.container.hasParent) ? (whichItem-1) * 4 : ((whichItem-1) * 4) + 6;
this.dispText = whichArray[arrayPointer];
this.linkText = whichArray[arrayPointer + 1];
this.linkState = whichArray[arrayPointer + 2];
this.hasMore = whichArray[arrayPointer + 3];
if (this.hasMore) {
this.child = eval("elMenu" + this.id.substr(4));
this.child.parentMenu = this.container;
this.child.parentItem = this;
}
if (this.linkText) {
this.onclick = linkIt;
this.style.cursor = "hand";
}
with (this.style) {
padding = itemPad;
if (this.container.isTree && !this.hasMore) paddingRight = itemPad+fullImgSize;
color = (this.linkState == 1) ? fntCol : menuFontGray;
fontSize = fntSiz + "pt";
fontFamily = fntFam;
borderBottomWidth = separator + "px";
borderBottomColor = separatorCol;
borderBottomStyle = "solid";
backgroundColor = backCol;
}
}
function menuSetup(hasParent,openCont,openItem) {
this.onmouseover = menuOver;
this.onmouseout = menuOut;
this.showIt = showIt;
this.hideTree = hideTree
this.hideParents = hideParents;
this.hideChildren = hideChildren;
this.hideTop = hideTop;
this.hasChildVisible = false;
this.isOn = false;
this.hideTimer = null;
this.currentItem = null;
this.hideSelf = hideSelf;
if (hasParent) {
this.hasParent = true;
this.parentMenu = openCont;
} else this.hasParent = false;
with (this.style) {
width = this.menuWidth;
borderWidth = borWid;
borderColor = borCol;
borderStyle = "solid";
}
if (this.lastItem) this.lastItem.style.border="";
this.fullHeight = this.scrollHeight;
this.showIt(false);
this.onselectstart = cancelSelect;
this.moveTo = moveTo;
this.moveTo(0,0);
}
function popUp(menuName,e){
if (!isLoaded) return;
linkEl = event.srcElement;
linkEl.onclick = popMenu;
if (!beingCreated && !areCreated) startIt();
linkEl.menuName = menuName;
}
function popMenu(e){
if (!isLoaded || !areCreated) return true;
eType = event.type;
if (eType != "click") return true;
hideAll();
linkEl = event.srcElement;
currentMenu = eval(linkEl.menuName);
currentMenu.hasParent = false;
currentMenu.treeParent.startChild = currentMenu;
menuLocBod = menuLoc.document.body;
xPos = (currentMenu.menuLeft) ? currentMenu.menuLeft : (event.clientX + menuLocBod.scrollLeft);
yPos = (currentMenu.menuTop) ? currentMenu.menuTop : (event.clientY + menuLocBod.scrollTop);
xPos = new Number(xPos) + (menuLocBod.clientWidth - 630) / 2;
currentMenu.moveTo(xPos,yPos);
currentMenu.isOn = true;
currentMenu.showIt(true);
return false;
}
function menuOver(e) {
this.isOn = true;
isOverMenu = true;
currentMenu = this;
if (this.hideTimer) clearTimeout(this.hideTimer);
}
function menuOut() {
theEvent = menuLoc.event;
if (theEvent.srcElement.contains(theEvent.toElement)) return;
this.isOn = false;
isOverMenu = false;
menuLoc.status = "";
allTimer = setTimeout("currentMenu.hideTree()",10);
}
function itemOver(){
theEvent = menuLoc.event;
if (theEvent.srcElement.tagName == "IMG") return;
if (this.linkState == 1) {
this.style.backgroundColor = this.container.menuBGOver;
this.style.color = overFnt;
} else {
this.style.backgroundColor = menuBGOverGray;
this.style.color = menuFontOverGray;
}
this.style.fontWeight = "bold";
if (!this.container.hasParent)
eval(this.container.menuHead).style.backgroundColor = this.container.menuHeadCol;
tmpstr = this.dispText.replace(/ /g, " ");
menuLoc.status = tmpstr;
this.container.currentItem = this;
if (this.container.hasChildVisible) this.container.hideChildren(this);
if (this.hasMore) {
horOffset = this.container.menuWidth - childOverlap;
this.childX = this.container.style.pixelLeft + horOffset;
this.childY = this.offsetTop + this.container.style.pixelTop + childOffset + borWid;
this.child.moveTo(this.childX,this.childY);
this.container.hasChildVisible = true;
this.container.visibleChild = this.child;
this.child.showIt(true);
}
}
function itemOut() {
theEvent = menuLoc.event;
if (theEvent.srcElement.contains(theEvent.toElement) || (theEvent.fromElement.tagName=="IMG" && theEvent.toElement.contains(theEvent.fromElement)))
return;
this.style.fontWeight = "normal";
this.style.backgroundColor = backCol;
if (this.linkState == 1) this.style.color = fntCol;
else this.style.color = menuFontGray;
}
function moveTo(xPos,yPos) {
this.style.pixelLeft = xPos;
this.style.pixelTop = yPos;
}
function showIt(on) {
if (on) {
this.style.visibility = "visible";
if (!this.hasParent) eval(this.menuHead).style.backgroundColor = this.menuHeadCol;
} else {
this.style.visibility = "hidden";
if (!this.hasParent && this.menuHead.indexOf('menu') >= 0)
eval(this.menuHead).style.backgroundColor = menuHeadDefCol;
}
this.currentItem = null;
}
function linkIt() {
if (this.linkText.indexOf("javascript:")!=-1) eval(this.linkText)
else menuLoc.location.href = this.linkText;
}
function hideAll() {
for(i=1; i