var nlsMenu = new Object();
var nlsMenuMgr = new Object();
var nlsWinElmt = [];
var ag0 = window.navigator.userAgent;
var nls_isIE = (ag0.indexOf("MSIE") >= 0);
var nls_isIE5 = (ag0.indexOf("MSIE 5.0") >= 0);
var nls_isSafari = (ag0.indexOf("Safari") >= 0);
var nls_isOpera = (ag0.indexOf("Opera") >= 0);
if (nls_isOpera) {
	nls_isIE = false;
	nls_isIE5 = false
}
function NlsMenuManager(A) {
	this.mgrId = A;
	this.menus = new Object();
	this.menubar = null;
	this.timeout = 10000;
	this.flowOverFormElement = false;
	this.assocMenuMgr = [];
	this.defaultEffect = null;
	this.icPath = "";
	this.memorizeSel = false;
	this.rt = new Object();
	this.tmId = null;
	this.setTimeout = function(B, C) {
		this.tmId = window.setTimeout(B, C)
	};
	this.clearTimeout = function() {
		if (this.tmId != null) {
			window.clearTimeout(this.tmId);
			this.tmId = null
		}
	};
	nlsMenuMgr[A] = this;
	if (nls_isIE) {
		window.attachEvent("onload", function() {
			nlsMenuMgr[A].init()
		})
	}
	return this
}
var NlsMnMgr = NlsMenuManager.prototype;
NlsMnMgr.createMenu = function(B) {
	var A = new NlsMenu(B);
	A.mgr = this;
	A.mgrId = this.mgrId;
	A.icPath = this.icPath;
	A.useEffect(this.defaultEffect);
	if (this.design) {
		A.$menuItemClick = NlsMenu.$dsItemClick
	}
	this.menus[B] = A;
	return A
};
NlsMnMgr.createMenubar = function(B) {
	if (this.menubar) {
		alert("Menubar already exists!")
	}
	var A = new NlsMenubar(B);
	A.mgr = this;
	A.mgrId = this.mgrId;
	A.icPath = this.icPath;
	if (this.design) {
		A.$menuItemClick = NlsMenu.$dsItemClick
	}
	this.menubar = A;
	return A
};
NlsMnMgr.renderMenus = function(C) {
	if (C && C != "") {
		var B = NlsMenu.$GE(C);
		var A = "";
		for (it in this.menus) {
			A += this.menus[it].renderMenu()
		}
		B.innerHTML = A
	} else {
		for (it in this.menus) {
			document.write(this.menus[it].renderMenu())
		}
	}
};
NlsMnMgr.renderMenubar = function(A) {
	if (this.menubar) {
		if (A && A != "") {
			NlsMenu.$GE(A).innerHTML = this.menubar.renderMenubar()
		} else {
			document.write(this.menubar.renderMenubar())
		}
	}
	if (this.memorizeSel) {
		this.loadPath()
	}
};
NlsMnMgr.hideMenus = function() {
	for ( var A in this.menus) {
		if (this.menus[A].rt.active) {
			this.menus[A].hideMenu()
		}
	}
	if (this.menubar) {
		this.menubar.hideMenu()
	}
};
NlsMnMgr.addAssocMenuMgr = function(B, A) {
	this.assocMenuMgr[this.assocMenuMgr.length] = [ B, A ]
};
NlsMnMgr.getMenu = function(A) {
	return this.menus[A]
};
NlsMnMgr.init = function() {
	if (this.menubar) {
		this.menubar.init()
	}
};
function listAllWinElmt() {
	nlsWinElmt = [];
	var B = document.getElementsByTagName("SELECT");
	var F;
	var D;
	var A;
	var E;
	for ( var C = 0; C < B.length; C++) {
		F = B[C];
		D = F;
		A = 0;
		E = 0;
		while (D != null) {
			A += D.offsetLeft;
			E += D.offsetTop;
			D = D.offsetParent
		}
		nlsWinElmt[nlsWinElmt.length] = {
			e :F,
			eX1 :A,
			eY1 :E,
			eX2 :A + F.offsetWidth,
			eY2 :E + F.offsetHeight
		}
	}
}
function NlsMenuItem(D, E, C, I, H, A, B, K, J, M, F, G, L) {
	this.id = D;
	this.intKey = "";
	this.capt = E;
	this.url = (C == null ? "" : C);
	this.ico = (I == null || I == "" || I.length == 0) ? null : I;
	this.enable = (H == null ? true : H);
	this.xtra = A;
	this.stlprf = "";
	this.target = null;
	this.title = K == null ? "" : K;
	this.itemEffect = null;
	this.visible = "false";
	this.state = 1;
	this.selected = false;
	this.subMenuId = (B ? B : "");
	this.crsFrame = (J ? J : false);
	this.subFrame = (M ? M : null);
	this.subPos = (F ? F : [ null, null ]);
	this.subPosAdj = (G ? G : [ 0, 0 ]);
	this.subDir = (L ? L : [ "right", "down" ]);
	this.toString = function() {
		return "NlsMenuItem"
	};
	this.useItemEffect = function(N) {
		this.itemEffect = new NlsMenuItemEffect(this.intKey, N)
	};
	this.rt = {
		subUrl :null,
		loaded :0
	};
	return this
}
function NlsMenuSeparator(A) {
	this.stlprf = "";
	this.intKey = "";
	this.seprt = A != null ? A : "";
	this.render = function() {
		if (this.seprt != "") {
			return this.seprt
		}
		return ("<table border=0 cellpadding=0 cellspacing=0 width='100%' height='0%'><tr><td class=\""
				+ this.stlprf + 'nlsseparator"></td></tr></table>')
	};
	this.toString = function() {
		return "NlsMenuSeparator"
	}
}
function NlsCustomMenuItem(A) {
	this.intKey = "";
	this.cstMenu = (A ? A : "&nbsp;");
	this.toString = function() {
		return "NlsCustomMenuItem"
	}
}
function NlsMenu(A) {
	this.lsItm = null;
	this.mgrId = "";
	this.mgr = null;
	this.winElmt = null;
	this.container = null;
	this.customBorder = null;
	this.shadow = new NlsMenuShadow("none", "5px", A);
	this.count = 0;
	this.isMenubar = false;
	this.effect = null;
	this.srItems = [];
	this.rt = {
		ready :true,
		active :false
	};
	this.mId = A;
	this.items = new Object();
	this.stlprf = "";
	this.subMenuIc = null;
	this.target = "_self";
	this.icPath = "";
	this.itemSpc = "";
	this.stretchItem = true;
	this.selection = false;
	this.showIcon = false;
	this.showSubIcon = true;
	this.absWidth = "";
	this.orient = "V";
	this.defItmEff = null;
	this.defPos = [ 0, 0 ];
	this.maxItemCol = 100;
	this.zIndex = 100;
	this.wnd = window;
	nlsMenu[A] = this;
	return this
}
var NLSMENU = NlsMenu.prototype;
NLSMENU.addItem = function(J, D, C, H, G, A, B, I) {
	var E = this.mId + "_" + J;
	var F = new NlsMenuItem(J, D, C, H, G, A, B, I);
	F.intKey = E;
	F.mId = this.mId;
	this.items[E] = F;
	this.srItems[this.srItems.length] = F;
	if (this.defItmEff != null && typeof (NlsMenuItemEffect) != "undefined") {
		F.useItemEffect(this.defItmEff)
	}
	this.count++;
	return F
};
NLSMENU.addSeparator = function(C) {
	var A = "sep_" + this.count;
	var B = (C ? C : new NlsMenuSeparator());
	B.stlprf = this.stlprf;
	B.intKey = A;
	this.items[A] = B;
	this.srItems[this.srItems.length] = B;
	this.count++;
	return B
};
NLSMENU.addSubmenu = function(H, A, F, I, B, E, G) {
	var C = this.mId + "_" + H;
	var D = this.items[C];
	D.subMenuId = A;
	D.subFrame = (I ? I : null);
	D.crsFrame = (F ? F : false);
	D.subPos = (B ? B : [ null, null ]);
	D.subPosAdj = (E ? E : [ 0, 0 ]);
	D.subDir = (G ? G : [ "right", "down" ]);
	return D
};
NLSMENU.addCustomMenu = function(C) {
	var A = "cst_" + this.count;
	var B = new NlsCustomMenuItem(C);
	B.intKey = A;
	this.items[A] = B;
	this.srItems[this.srItems.length] = B;
	this.count++;
	return B
};
NLSMENU.getItemById = function(A) {
	return this.items[this.mId + "_" + A]
};
NLSMENU.setItemStyle = function(C, B) {
	var A = this.mId + "_" + C;
	var D = this.items[A];
	D.stlprf = B
};
NLSMENU.setItemText = function(C, B) {
	var A = this.mId + "_" + C;
	var D = this.items[A];
	D.capt = B;
	var E = NlsMenu.$GE(A + "x2");
	if (E) {
		E.innerHTML = B
	}
};
NLSMENU.enableItem = function(B, A) {
	var C = this.items[this.mId + "_" + B];
	C.enable = A;
	setMnStyle(NlsMenu.$GE(C.intKey), (A ? (C.selected ? "S" : "N") : "D"),
			NlsMenu.getPrf(C, this));
	setMnIcon(this, C, "N")
};
NLSMENU.dropShadow = function(B, A) {
	if (this.shadow) {
		this.shadow.pos = B;
		this.shadow.offset = (A ? A : "5px")
	} else {
		this.shadow = new NlsMenuShadow(B, A, this.mId)
	}
};
NLSMENU.applyBorder = function(C, B, D, A) {
	if (!C && !B && !D && !A) {
		this.customBorder = null
	} else {
		this.customBorder = new NlsMenuBorder(C, B, D, A)
	}
};
NLSMENU.useEffect = function(A) {
	if (A != null && A != "") {
		this.effect = new NlsMenuEffect(this.mId, A)
	}
};
NLSMENU.renderMenu = function() {
	var L = "", J = null;
	var K = (document.getElementsByTagName ? document
			.getElementsByTagName("SCRIPT") : document.scripts);
	for ( var H = 0; H < K.length; H++) {
		if (K[H].src.toLowerCase().indexOf("nlsmenu.js") >= 0) {
			L = K[H].src.replace(/nlsmenu.js/gi, "")
		}
	}
	if (!this.subMenuIc) {
		J = [ L + "img/submenu.gif", L + "img/submenuovr.gif" ]
	} else {
		J = [ this.icPath + this.subMenuIc[0] ];
		if (this.subMenuIc[1]) {
			J[1] = this.icPath + this.subMenuIc[1]
		}
	}
	var I = "<table cellpadding='0' cellspacing='0' ";
	var A = (this.absWidth == "" ? "" : "width='" + this.absWidth + "'");
	var D = "<table cellpadding='0' cellspacing='"
			+ (this.itemSpc == "" ? "0" : this.itemSpc) + "' width='100%'>";
	var B = 0, E = this.stlprf, G = null, F = null, C = null;
	for ( var H = 0; H < this.srItems.length; H++) {
		G = this.srItems[H];
		C = nlsMenu[G.subMenuId];
		if (!G.crsFrame) {
			if (C) {
				C.prIt = G.intKey
			}
			if (!C && G.rt && !G.rt.subUrl) {
				G.subMenuId = ""
			}
		}

		
		if (G.toString() == "NlsMenuSeparator") {
			D += (this.orient == "V" ? "<tr>" : "");
			D += ("<td class='" + this.stlprf + "nlsseparatorcontainer'>"
					+ G.render() + "</td>");
			D += (this.orient == "V" ? "</tr>" : "")
		} else {
			if (G.toString() == "NlsCustomMenuItem") {
				D += (this.orient == "V" ? "<tr>" : "");
				D += ("<td>" + G.cstMenu + "</td>");
				D += (this.orient == "V" ? "</tr>" : "")
			} else {
				E = NlsMenu.getPrf(G, this);
				if (this.orient == "V") {
					D += "<tr>"
				}
				if (this.orient == "H") {
					if (B == 0) {
						D += "<tr>"
					}
					B++
				}
				if ((H==0) && (this.orient == "H")) {					
					D += ('<td class="horz_nlsseparatorcontainer"><table height="0%" cellspacing="0" cellpadding="0" border="0" width="100%"><tbody><tr><td class="horz_nlsseparator"/></tr></tbody></table></td>');
				}
				D += "<td align='center' id=\""
						+ G.intKey
						+ '" class="'
						+ E
						+ 'nlsitemcontainer" onmouseover="nlsMenuItemOver(event, \''
						+ G.intKey + "')\" onclick=\"return nlsMenu['"
						+ this.mId + "'].$menuItemClick(event, '" + G.intKey
						+ "');\">";
				D += I
						+ (this.stretchItem ? "width='100%'" : "")
						+ ' height=\'100%\'><tr style="cursor:pointer;" title="'
						+ G.title + '">';
				if (this.showIcon) {
					D += '<td id="' + G.intKey + 'x1" class="' + E
							+ 'nlsiconcell" align="center" nowrap>';
					if (G.ico) {
						if (G.ico[0]) {
							D += '<img id="ic_' + G.intKey + '" '
									+ (G.enable ? "" : "style='display:none'")
									+ ' src="' + this.icPath + G.ico[0] + '">'
						}
						if (G.ico[1]) {
							D += '<img id="icovr_' + G.intKey
									+ "\" style='display:none' src=\""
									+ this.icPath + G.ico[1] + '">'
						}
						if (G.ico[2]) {
							D += '<img id="icdis_' + G.intKey + '" '
									+ (!G.enable ? "" : "style='display:none'")
									+ ' src="' + this.icPath + G.ico[2] + '">'
						}
					}
					D += "</td>"
				}
				D += "<td align='left' id=\"" + G.intKey + 'x2" class="' + E
						+ (G.enable ? 'nlsitem"' : 'nlsitemdisable"')
						+ " nowrap>" + G.capt + "</td>";
				if (this.showSubIcon && G.subMenuId != "") {
					D += '<td id="'
							+ G.intKey
							+ 'x3" class="'
							+ E
							+ 'nlssubmenucell" align="center" nowrap>'
							+ (G.subMenuId != "" ? "<img id='subic_"
									+ G.intKey
									+ "' src=\""
									+ J[0]
									+ '">'
									+ (J.length > 1 ? "<img id='subicovr_"
											+ G.intKey
											+ "' style='display:none' src=\""
											+ J[1] + '">' : "") : "") + "</td>"
				}
				D += "</tr></table>";
				D += "</td>";
				if (this.orient == "V") {
					D += "</tr>"
				}
				if (this.orient == "H" && B == this.maxItemCol) {
					D += "</tr>";
					B = 0
				}
			}
		}
	}
	if (this.orient == "H" && B != 0) {
		if (this.srItems.length > this.maxItemCol) {
			while (++B <= this.maxItemCol) {
				D += '<td class="' + E + 'nlsitemcontainer">&nbsp;</td>'
			}
		}
		D += "</tr>"
	}
	D += "</table>";
	D = I + "class='" + this.stlprf + "nlsmenu' " + A + "><tr><td>" + D
			+ "</td></tr></table>";
	if (this.customBorder != null) {
		D = this.customBorder.applyBorder(D, this.stlprf)
	}
	D = this.shadow.dropShadow(D);
	D = "<div "
			+ (nls_isIE && !this.isMenubar ? "style='position:absolute;z-index:"
					+ (this.zIndex - 1) + ";'"
					: "") + ">" + D;
	if (!this.isMenubar && nls_isIE && !nls_isIE5
			&& this.mgr.flowOverFormElement) {
		D += "<iframe id='"
				+ this.mId
				+ "ifrm' scrolling='no' frameborder=0 width='1' height='1' style='position:absolute;top:0px;left:0px;z-index:-1;filter:alpha(opacity=0)' src='"
				+ L + "img/blank.gif'></iframe>"
	}
	D += "</div>";
	if (arguments[0] == "content") {
		return D
	}
	D = "<div id='"
			+ this.mId
			+ "' style="
			+ (this.isMenubar ? "''" : "'position:absolute;z-index:"
					+ this.zIndex + ";display:none;'")
			+ " onmouseover=\"_nlsMenuItemOver('" + this.mgrId
			+ "')\" onmouseout=\"nlsMenuItemOut('" + this.mgrId + "')\">" + D
			+ "</div>";
	return D
};
NLSMENU.init = function() {
	var A = this.rt.vshade;
	if (!A) {
		A = NlsMenu.$GE("vshade_" + this.mId)
	}
	var C = this.rt.actmn;
	if (!C) {
		C = NlsMenu.$GE("actmn_" + this.mId)
	}
	if (A) {
		var B = C.childNodes[0].offsetHeight - parseInt(this.shadow.offset);
		if (B >= 0) {
			A.style.height = B + "px"
		}
	}
	this.rt.actmn = C;
	this.rt.vshade = A
};
function NlsMenuShadow(C, B, A) {
	this.pos = C;
	this.offset = B;
	this.mId = A;
	this.dropShadow = function(E) {
		var F = nlsMenu[this.mId];
		var I = "<table cellpadding=0 cellspacing=0 ";
		var L = "<div>" + I + "id='effwin_" + this.mId + "' height='0px'>";
		var G = "<td style='padding-@@PAD:" + this.offset + ";'>" + I
				+ "width='100%' height='5px' class='" + F.stlprf
				+ "horzshadow'><tr><td></td></tr></table></td>";
		var M = "<td style='padding-@@PAD:" + this.offset + ";height:100%;'>"
				+ I + "id='vshade_" + this.mId
				+ "' width='5px' height='100%' class='" + F.stlprf
				+ "vertshadow'><tr><td></td></tr></table></td>";
		var J = "<td id='actmn_" + this.mId + "'>" + E + "</td>";
		var H = "<td class='" + F.stlprf
				+ "cornshadow' width='5px' height='5px'></td>";
		var D = [ M.replace(/@@PAD/gi, "top"), M.replace(/@@PAD/gi, "bottom") ];
		var K = [ G.replace(/@@PAD/gi, "left"), G.replace(/@@PAD/gi, "right") ];
		switch (this.pos) {
		case "none":
			L += "<tr>" + J + "</tr>";
			break;
		case "bottomright":
			L += "<tr>" + J + D[0] + "</tr><tr>" + K[0] + H + "</tr>";
			break;
		case "bottomleft":
			L += "<tr>" + D[0] + J + "</tr><tr>" + H + K[1] + "</tr>";
			break;
		case "topleft":
			L += "<tr>" + H + K[1] + "</tr><tr>" + D[1] + J + "</tr>";
			break;
		case "topright":
			L += "<tr>" + K[0] + H + "</tr><tr>" + J + D[1] + "</tr>";
			break
		}
		return L + "</table></div>"
	}
}
NLSMENU.showMenu = function(x1, y1, x2, y2, mnOrient, subDir, subAdj) {
	this.mgr.clearTimeout();
	if (this.menuOnShow(this.mId) == false) {
		return
	}
	var ctx = NlsMenu.$GE(this.mId);
	if (!ctx) {
		return
	}
	ctx.style.visibility = "hidden";
	ctx.style.display = "";
	if (nls_isIE) {
		this.init()
	}
	var w = window, d = document.body, de = document.documentElement;
	var scrOffX = w.scrollX || d.scrollLeft || de.scrollLeft;
	var scrOffY = w.scrollY || d.scrollTop || de.scrollTop;
	var cW = w.innerWidth || d.clientWidth;
	var cH = w.innerHeight || d.clientHeight;
	var mW = ctx.childNodes[0].offsetWidth;
	var mH = ctx.childNodes[0].offsetHeight;
	var sDir = (subDir ? [ subDir[0], subDir[1] ] : [ "right", "down" ]);
	var adjX = (subAdj ? subAdj[0] : this.defPos[0]), adjY = (subAdj ? subAdj[1]
			: this.defPos[1]);
	var dmfrm = NlsMenu.$GE(this.mId + "ifrm");
	if (dmfrm) {
		var actMn = NlsMenu.$GE("actmn_" + this.mId).children[0];
		dmfrm.width = actMn.offsetWidth;
		dmfrm.height = actMn.offsetHeight
	}
	var mX = 0, mY = 0;
	if (mnOrient == "V") {
		if (sDir[0] == "right") {
			if (x2 + mW > cW) {
				if (x1 >= mW) {
					mX = x1 - mW + adjX + scrOffX;
					sDir[0] = "left"
				} else {
					mX = cW - mW - 1 + scrOffX
				}
			} else {
				mX = x2 + scrOffX - adjX
			}
		} else {
			if (x1 - mW < 0) {
				if (x2 + mW < cW) {
					mX = x2 - adjX + scrOffX;
					sDir[0] = "right"
				} else {
					mX = scrOffX
				}
			} else {
				mX = x1 - mW + adjX + scrOffX
			}
		}
		if (sDir[1] == "down") {
			if (y1 + mH > cH) {
				if (y2 >= mH) {
					mY = y2 - mH + scrOffY - adjY;
					sDir[1] = "up"
				} else {
					mY = cH - mH - 1 + scrOffY
				}
			} else {
				mY = y1 + scrOffY + adjY
			}
		} else {
			if (y1 - mH < 0) {
				if (y1 + mH < cH) {
					mY = y1 + scrOffY - adjY;
					sDir[1] = "down"
				} else {
					mY = scrOffY
				}
			} else {
				mY = y2 - mH + scrOffY - adjY
			}
		}
	} else {
		if (sDir[0] == "right") {
			if (x1 + mW > cW) {
				if (x2 >= mW) {
					mX = x2 - mW + scrOffX - adjX;
					sDir[0] = "left"
				} else {
					mX = cW - mW - 1 + scrOffX
				}
			} else {
				mX = x1 + scrOffX + adjX
			}
		} else {
			if (x2 - mW < 0) {
				if (x1 + mW < cW) {
					mX = x1 + scrOffX + adjX;
					sDir[0] = "right"
				} else {
					mX = scrOffX
				}
			} else {
				mX = x2 - mW + scrOffX - adjX
			}
		}
		if (sDir[1] == "down") {
			if (y2 + mH > cH) {
				if (y1 >= mH) {
					mY = y1 - mH + scrOffY + adjY;
					sDir[1] = "up"
				} else {
					mY = cH - mH - 1 + scrOffY
				}
			} else {
				mY = y2 + scrOffY - adjY
			}
		} else {
			if (y1 - mH < 0) {
				if (y2 + mH < cH) {
					mY = y2 + scrOffY - adjY;
					sDir[1] = "down"
				} else {
					mY = scrOffY
				}
			} else {
				mY = y1 - mH + scrOffY + adjY
			}
		}
	}
	if (nls_isIE5 || !this.mgr.flowOverFormElement) {
		if (this.winElmt == null) {
			hideWinElmt(this, mX, mY, mX + mW, mY + mH)
		}
		if (this.winElmt == null) {
			this.winElmt = []
		}
		for ( var i = 0; i < this.winElmt.length; i++) {
			this.winElmt[i].style.visibility = "hidden"
		}
	}
	with (ctx.style) {
		left = mX + "px";
		top = mY + "px";
		zIndex = this.zIndex;
		if (this.effect) {
			with (this.effect) {
				prop.dir = sDir[(mnOrient == "V" ? 0 : 1)];
				start(false);
				visibility = "visible";
				run()
			}
		} else {
			visibility = "visible"
		}
	}
	this.rt.active = true
};
function hideWinElmt(D, E, A, C, G) {
	var F;
	for ( var B = 0; B < nlsWinElmt.length; B++) {
		F = nlsWinElmt[B];
		if ((F.eX1 >= E && F.eX1 <= C && F.eY1 >= A && F.eY1 <= G)
				|| (F.eX1 >= E && F.eX1 <= C && F.eY2 >= A && F.eY2 <= G)
				|| (F.eX2 >= E && F.eX2 <= C && F.eY1 >= A && F.eY1 <= G)
				|| (F.eX2 >= E && F.eX2 <= C && F.eY2 >= A && F.eY2 <= G)
				|| (E >= F.eX1 && E <= F.eX2 && A >= F.eY1 && A <= F.eY2)
				|| (E >= F.eX1 && E <= F.eX2 && G >= F.eY1 && G <= F.eY2)
				|| (C >= F.eX1 && C <= F.eX2 && A >= F.eY1 && A <= F.eY2)
				|| (C >= F.eX1 && C <= F.eX2 && G >= F.eY1 && G <= F.eY2)
				|| (F.eX1 < E && F.eX2 > C && F.eY1 >= A && F.eY1 <= G)
				|| (F.eX1 < E && F.eX2 > C && F.eY2 >= A && F.eY2 <= G)) {
			if (F.e.style.visibility != "hidden") {
				F.e.style.visibility = "hidden";
				if (D.winElmt == null) {
					D.winElmt = []
				}
				D.winElmt[D.winElmt.length] = F.e
			}
		}
	}
}
NLSMENU.showMenuAbs = function(A, C) {
	var B = NlsMenu.$GE(this.mId);
	B.style.top = C + "px";
	B.style.left = A + "px";
	B.style.display = "";
	this.rt.active = true
};
NLSMENU.hideMenu = function() {
	var A = NlsMenu.$GE(this.mId);
	if (!A) {
		return
	}
	if (!this.isMenubar) {
		this.rt.active = false;
		if (this.effect) {
			this.effect.start(true);
			if ((nls_isIE && this.effect.effName != "aoslide") || nls_isOpera
					&& this.effect.effName != "aoslide") {
				A.style.visibility = "hidden"
			} else {
				this.effect.onHide = function() {
					A.style.visibility = "hidden"
				}
			}
			this.effect.run()
		} else {
			A.style.visibility = "hidden"
		}
		this.menuOnHide(this.mId)
	} else {
		this.isMenuOpened = false
	}
	if (this.lsItm != null) {
		var B = this.items[this.lsItm.id];
		if (B.state != 2 && !B.selected) {
			setMnStyle(this.lsItm, (B.enable ? "N" : "D"), NlsMenu.getPrf(B,
					this));
			setMnIcon(this, B, "N")
		}
		this.lsItm = null
	}
	if (this.winElmt != null && this.winElmt.length > 0) {
		for (i = 0; i < this.winElmt.length; i++) {
			this.winElmt[i].style.visibility = "visible"
		}
	}
	if (typeof (window.status) != "undefined") {
		window.status = ""
	}
};
NLSMENU.hasSubmenu = function(A) {
	var B = this.items[this.mId + "_" + A].subMenuId;
	return (nlsMenu[B])
};
function $itemClick(F, D) {
	var E = nlsMenuMgr[F.mgrId];
	E.hideMenus();
	var B = E.assocMenuMgr;
	if (B && B.length > 0) {
		for ( var C = 0; C < B.length; C++) {
			B[C][0].hideAllNlsMenu()
		}
	}
	var A = D.target;
	if (A == null) {
		A = F.target != null ? F.target : "_self"
	}
	if (D.url != "") {
		window.open(D.url, A)
	} else {
		return F.menuOnClick(F.mId, D.id)
	}
}
NLSMENU.$menuItemClick = function(E, F) {
	if (!this.items[F].enable) {
		return
	}
	var B = this.items[F], D = NlsMenu.getPrf(B, this);
	var A = NlsMenu.$GE(F), C = this.mgr;
	if (this.isMenubar && this.dropOnClick && this.hasSubmenu(B.id)) {
		if (!this.isMenuOpened) {
			NlsMenu.showMenu(this, B);
			this.isMenuOpened = true
		} else {
			C.hideMenus();
			setMnStyle(A, (B.enable ? "O" : "D"), D);
			setMnIcon(this, B, "O");
			this.isMenuOpened = false;
			return null
		}
	} else {
		if (B.toggle) {
			this.setItemState(F, (B.state == 1 ? 2 : 1))
		} else {
			if (this.selection) {
				this.setSelection(F, true)
			} else {
				if (C.memorizeSel) {
					C.selectPath(this.mId, B.id);
					C.savePath(F)
				}
			}
		}
		$itemClick(this, B)
	}
};
NLSMENU.menuOnClick = function(B, A) {
	return true
};
NLSMENU.menuOnShow = function(A) {
	return true
};
NLSMENU.menuOnHide = function(A) {
	return true
};
NLSMENU.reload = function(C) {
	var B = this.effect;
	if (B) {
		B.elm = null;
		B.prop.init = false
	}
	if (C != true) {
		this.mgr.hideMenus()
	}
	var A = NlsMenu.$GE(this.mId);
	A.innerHTML = this.renderMenu("content")
};
function setMnIcon(D, G, F) {
	var C = (G.enable ? F : "D");
	if (D.showIcon && G.ico && G.ico.length > 1) {
		var E = G.intKey;
		var I = NlsMenu.$GE("ic_" + E), B = NlsMenu.$GE("icovr_" + E), H = NlsMenu
				.$GE("icdis_" + E);
		I.style.display = (C == "N" || (C == "D" && !H) ? "" : "none");
		B.style.display = (C == "O" ? "" : "none");
		if (H) {
			H.style.display = (C == "D" ? "" : "none")
		}
	}
	if (D.showSubIcon && G.subMenuId != "") {
		var A = NlsMenu.$GE("subicovr_" + G.intKey);
		if (A) {
			A.style.display = (C == "O" ? "" : "none");
			A = NlsMenu.$GE("subic_" + G.intKey);
			if (A) {
				A.style.display = (C == "N" || C == "D" ? "" : "none")
			}
		}
	}
}
function setMnStyle(D, C, G) {
	var A = (C == "O" ? "over" : (C == "S" ? "sel" : ""));
	D.className = G + "nlsitemcontainer" + A;
	var E = D.childNodes[0].rows[0], F = null;
	for ( var B = 0; B < E.cells.length; B++) {
		F = E.cells[B];
		if (F.id == D.id + "x1") {
			F.className = G + "nlsiconcell" + A
		}
		if (F.id == D.id + "x2") {
			F.className = G + "nlsitem" + (C == "D" ? "disable" : A)
		}
		if (F.id == D.id + "x3") {
			F.className = G + "nlssubmenucell" + A
		}
	}
}
function nlsMenuItemOver(F, A) {
	var B = A.split("_");
	var J = nlsMenu[B[0]];
	if (J.mgr.design == true) {
		return
	}
	var I = J.lsItm;
	if (!J.rt.active || !J.rt.ready) {
		return
	}
	var E = null, K = "", H = null;
	if (I != null) {
		E = J.items[I.id];
		if (E.intKey == A) {
			return
		}
		if (E.state != 2 && !E.selected) {
			var K = NlsMenu.getPrf(E, J);
			var D = (E.itemEffect != null);
			if (D) {
				E.itemEffect.init()
			}
			setMnStyle(I, (E.enable ? "N" : "D"), K);
			setMnIcon(J, E, "N");
			if (D) {
				E.itemEffect.start()
			}
		}
		var C = (E.crsFrame ? E.subFrame.nlsGetMenu(E.subMenuId)
				: nlsGetMenu(E.subMenuId));
		while (C != null) {
			H = null;
			if (C.lsItm) {
				E = C.items[C.lsItm.id];
				H = (E.crsFrame ? E.subFrame.nlsGetMenu(E.subMenuId) : C.wnd
						.nlsGetMenu(E.subMenuId))
			}
			C.hideMenu();
			C = H
		}
	}
	var G = NlsMenu.$GE(A);
	E = J.items[A];
	if (typeof (window.status) != "undefined") {
		window.status = E.url
	}
	if (E.state != 2 && !E.selected) {
		if (E.itemEffect != null) {
			E.itemEffect.init()
		}
		setMnStyle(G, (E.enable ? "O" : "D"), NlsMenu.getPrf(E, J));
		setMnIcon(J, E, "O");
		if (E.itemEffect != null) {
			E.itemEffect.start()
		}
	}
	if (!J.isMenubar || (J.isMenubar && !J.dropOnClick)
			|| (J.isMenubar && J.dropOnClick && J.isMenuOpened)) {
		NlsMenu.showMenu(J, E)
	}
	J.lsItm = G
}
function nls_getXY(A) {
	var C = new Object();
	C.x = 0;
	C.y = 0;
	C.x2 = 0;
	C.y2 = 0;
	var B = A;
	var D = document;
	while (B) {
		C.x += B.offsetLeft;
		C.y += B.offsetTop;
		B = B.offsetParent
	}
	C.x -= (window.scrollX || D.body.scrollLeft || D.documentElement.scrollLeft);
	C.y -= (window.scrollY || D.body.scrollTop || D.documentElement.scrollTop);
	if (A) {
		C.x2 = C.x + A.offsetWidth;
		C.y2 = C.y + A.offsetHeight
	}
	return C
}
NlsMenu.showMenu = function(B, A) {
	if (A.rt.subUrl && A.rt.loaded == 0) {
		NlsMenuUtil.loadAJAXMenu(B, A)
	} else {
		NlsMenu.$showMenu(B, A)
	}
};
NlsMenu.$showMenu = function(D, B) {
	var A = NlsMenu.$GE(B.intKey);
	if (B.subMenuId != "" && B.enable == true) {
		var C = nls_getXY(A), F = null;
		if (B.crsFrame) {
			var E = B.subPos;
			if (E[0] == "REL") {
			} else {
				C.x = E[0];
				C.x2 = C.x
			}
			if (E[1] == "REL") {
			} else {
				C.y = E[1];
				C.y2 = C.y
			}
			if (!B.subFrame.nlsGetMenu) {
				return
			}
			F = B.subFrame.nlsGetMenu(B.subMenuId);
			if (!F) {
				return
			}
		} else {
			F = nlsGetMenu(B.subMenuId);
			if (!F) {
				return
			}
			if (F.zIndex <= D.zIndex) {
				F.zIndex = D.zIndex + 1
			}
		}
		F.showMenu(C.x, C.y, C.x2, C.y2, D.orient, B.subDir, B.subPosAdj)
	}
};
NlsMenu.getPrf = function(A, B) {
	if (!A.stlprf || A.stlprf == "") {
		return B.stlprf
	} else {
		return A.stlprf
	}
};
function nls_showMenu(D, C, B, F, G) {
	var A = nlsGetMenu(D);
	if (!A) {
		hideAllNlsMenu();
		return
	}
	A.mgr.clearTimeout();
	if (A.rt.active) {
		return
	}
	var E = nls_getXY(C);
	A.mgr.hideMenus();
	A.showMenu(E.x, E.y, E.x2, E.y2, B, F, G)
}
function nls_hideMenu(B) {
	var A = nlsGetMenu(B);
	if (!A) {
		return
	}
	nlsMenuItemOut(A.mgrId)
}
function _nlsMenuItemOver(A) {
	var E = nlsMenuMgr[A];
	if (E.design == true) {
		return
	}
	E.clearTimeout();
	var D = E.assocMenuMgr;
	if (D && D.length > 0) {
		for ( var B = 0; B < D.length; B++) {
			if (!D[B][0].nlsMenuMgr) {
				continue
			}
			D[B][0].nlsMenuMgr[D[B][1]].clearTimeout()
		}
	}
	for ( var C in nlsMenuMgr) {
		if (C != A) {
			nlsMenuMgr[C].hideMenus()
		}
	}
}
function nlsMenuItemOut(B) {
	var E = nlsMenuMgr[B];
	if (E.design == true) {
		return
	}
	E.clearTimeout();
	E.setTimeout( function() {
		_nlsMenuItemOut(B)
	}, E.timeout);
	var A = E.assocMenuMgr;
	if (A && A.length > 0) {
		for ( var C = 0; C < A.length; C++) {
			var D = A[C];
			if (!D[0].nlsMenuMgr) {
				continue
			}
			D[0].nlsMenuMgr[D[1]].clearTimeout();
			D[0].nlsMenuMgr[D[1]].setTimeout( function() {
				D[0]._nlsMenuItemOut(B)
			}, E.timeout)
		}
	}
}
function _nlsMenuItemOut(A) {
	nlsMenuMgr[A].hideMenus()
}
function nlsGetMenu(A) {
	return nlsMenu[A]
}
NLSMENU.isMenuOpened = false;
NLSMENU.dropOnClick = false;
NLSMENU.renderMenubar = function() {
	return this.renderMenu()
};
function NlsMenubar(A) {
	var B = new NlsMenu(A);
	B.isMenubar = true;
	B.rt.active = true;
	return B
}
function hideAllNlsMenu() {
	for (it in nlsMenu) {
		if (nlsMenu[it].rt.active) {
			nlsMenu[it].hideMenu()
		}
	}
}
NlsMenu.$GE = function(A) {
	if (document.all) {
		return document.all(A)
	} else {
		if (document.getElementById) {
			return document.getElementById(A)
		}
	}
};