if(mnOn){
	outKill=true;	mSecsVis=800;

	prGl=["name","drop","dropPad","dropSp","dropSz","isRight","on3d","overlap","offset","oppad","imgSrc","imgSiz"];
	prCm=["fntC","fntB","fntI","bkgC","brdC","brdW","brdL","brdD","brdS","sprW","sprL","sprD","ovfntC","ovBkgC"];
	prBr=["lWidth","fntF","fntS"];

	origWidth=loader.innerWidth; origHeight=loader.innerHeight; loader.onresize=reDo;
	mLoaded = NSresized = false;
	isWin = (navigator.appVersion.indexOf("Win") != -1)
	if(!isWin && !isMac) NSfontOver = showVisited = false;

	mCreated = false;
	menuLoc = null;
	mnindex = 1000;
	mnInit();
	}

function mnInit(){
	if(mCreated){for(i=1; i<mnCount; i++) cur=eval("mnlst"+i); clearTimeout(mnTime);}
	mnCount = 0;
	mCreated = mCreating = mnOver = false;
	curMn = curLst = mnTime = null;
	}

function NSunloaded(){mLoaded = false;}
function NSloaded(e){if(e.target.name == mainFrName){mnInit(); mnStart();}}
function IEunloaded(){mnInit();	mLoaded = false;	setTimeout("keepTrack()",50);}

function keepTrack(){if(menuLoc.document.readyState == "complete"){mnInit(); mnStart();}	else setTimeout("keepTrack()",50);}

function mnStart(){
	mLoaded = true;
	menuLoc = window;
	if(!outKill)menuLoc.document.captureEvents(Event.MOUSEDOWN);
	mCreating = true;
	while(eval("window.mnAr" + mnCount)){
		mnDef=eval("mnDef" + mnCount);
		mnDefBr=eval("mnDef" + br + mnCount);
		gl=eval("mnGlob"+mnCount);
		for(i=0;i<gl.length;i++)eval(prGl[i] + "=" + gl[i]);
		imgPos = isRight ? ">"  : " ALIGN=RIGHT>";
		imgStr = imgSiz ? "<IMG SRC=" + imgSrc + " WIDTH=" + imgSiz + " HEIGHT=" + imgSiz +" BORDER=0 VSPACE=1" + imgPos : "";
		menuNS(false,mnCount);
		mnCount++;
		}
	mCreated=true; mCreating=false;
	}
	
function setMenuTree(isChild,parLst,lstCount) {
	var i=0, k=0;
	this.array = eval("mnAr" + lstCount);
	this.isPerm			= !isChild;
	this.isRight		= isRight;
	this.overlap		= overlap;
	this.offset			= offset;
	this.oppad			= oppad;
	this.maxOp			= this.array.length/4;
	this.hasParent	= isChild;
  this.setup			= lstSetup;
	if(eval("window.lProp" + lstCount)){
		prs=eval("window.lProp" + lstCount);
		for(k=0; k<prs.length; k++)
			if(prs[k]=="inh") eval("this." + pr[k] + "=parLst." + prCm[k]);
			else eval("this." + prCm[k] + "=" + prs[k]);
		}
	for(i=k; i<prCm.length; i++) eval("this." + prCm[i] + "=" + mnDef[i]);
	for(i=0; i<prBr.length; i++) eval("this." + prBr[i] + "=" + mnDefBr[i]);
	if(isChild){
		this.lLeft=parLst.lLeft; this.lTop=parLst.lTop;
		this.treeParent=parLst.treeParent;
		}
	else{
// **********************************    menu position  ************************************
		this.lLeft=18; this.lTop=89;
// **********************************    menu position  ************************************
		this.treeParent	= this.startChild	= this;
		if(drop){
			this.drop=true;
			this.topw = eval("mnTop" + lstCount);
			this.lWidth = 0;
			for(i=0; i<this.maxOp; i++) this.lWidth += this.topw[i]+dropSz;
			this.lWidth-=dropSz;
			}
		}
	}

function menuNS(isChild,lstCount,parLst,parOp){
	if(!isChild) lst=makeLst("mnlst" + lstCount,mnDefBr[0],null,null);
	else lst=makeLst("mnlst" + lstCount,null,parLst,null);
	lst.setMenuTree = setMenuTree;
	lst.setMenuTree(isChild,parLst,lstCount);
	for(lst.opCnt=0; lst.opCnt<lst.maxOp; lst.opCnt++){
		prevOp = (lst.opCnt > 0) ? lst.mnop : null;
		opName = "mnop" + lstCount + "_" + lst.opCnt;
		lst.mnop = makeLst(opName,null,null,lst);
		lst.mnop.prevOp = prevOp;
		lst.mnop.setup = opSetup;
		lst.mnop.setup(lst.opCnt,lst.array);
		if(lst.mnop.isSub){menuNS(true,lstCount + "_" + lst.opCnt,lst,lst.mnop); lst=lst.parentLst;}
		}
	lst.lastOp = lst.mnop;
	lst.setup(isChild,parLst,parOp);
	}

function makeLst(el,wd,pLst,cLst) {
		if(wd)elWidth=wd;
		else{
			if(drop && cLst && !cLst.hasParent) elWidth=cLst.topw[cLst.opCnt];
			else elWidth = cLst ? cLst.lWidth : pLst.lWidth;
			if(cLst)elWidth -= (cLst.brdW+cLst.oppad)*2;
			}
		if(!cLst) cLst = menuLoc;
		el = new Layer(elWidth,cLst);
	return eval(el);
	}

function opSetup(op,lstAr) {
	this.onmouseover = opOver;
	lst = this.container = this.parentLayer;
	arPtr = op*4;
	this.linkText	= lstAr[arPtr + 1];
	this.hasHilite= lstAr[arPtr + 2];
	this.isSub		= lstAr[arPtr + 3];
	this.isHilited= false;

	if(this.linkText){this.captureEvents(Event.MOUSEUP); this.onmouseup = mLink;}

	hStr=lstAr[arPtr];
	this.document.tags.A.textDecoration="none";
	if(lst.fntB)hStr = hStr.bold();
	if(lst.fntI)hStr = hStr.italics();
	hStr="<FONT FACE='" + lst.fntF + "' POINT-SIZE=" + lst.fntS + ">" + hStr+ "</FONT>";
	if(lst.drop) hStr="<center>" + hStr + "</center>";
	if(this.linkText){
		with (this.document)linkColor=	alinkColor=vlinkColor=lst.fntC;
		hStrOv = hStr.fontcolor(lst.ovFntC).link("javascript:void(0)");
		hStr = hStr.link("javascript:void(0)");
		}
	else{
		hStrOv = hStr.fontcolor(lst.ovFntC);
		hStr = hStr.fontcolor(lst.fntC);
		}
	this.hStr = (this.isSub && !lst.drop) ? imgStr + hStr : hStr;
	this.hStrOv = (this.isSub && !lst.drop) ? imgStr + hStrOv : hStrOv;		
	this.document.write(this.hStr);
	this.document.close();
	this.visibility = "inherit";
	this.bgColor = lst.bkgC;
	this.clip.top = this.clip.left = -lst.oppad;
	this.clip.bottom += lst.oppad;
	if(lst.drop){
		this.top = lst.brdW + lst.oppad;
		this.left = op ? this.prevOp.left + this.prevOp.clip.right + lst.oppad + dropSz : this.left + lst.oppad + lst.brdW;
		this.clip.right = lst.topw[op] - dropSz;
		if(op<lst.maxOp-1){
			lst.sp = new Layer(dropSz, lst);
			lst.sp.document.write("<img src='" + dropSp + "'>");
			lst.sp.document.close();
			lst.sp.left=this.left + this.clip.right;
			lst.sp.visibility = "show";
			}
		}
	else{
		this.top = op ? this.prevOp.top + this.prevOp.clip.height + lst.sprW : this.top = lst.brdW + lst.oppad;
		this.left = lst.brdW + lst.oppad;
		this.clip.right = lst.lWidth-(lst.brdW*2)-lst.oppad;		
		}
	}	

function lstSetup(hasParent,openCont,openItem) {
	this.onmouseover = lstOvr;
	this.onmouseout = lstOut;
	this.showIt=showIt;	this.keepIn=keepIn;	this.hTree=hTree;	this.hPar=hPar;	this.hChl=hChl;
	this.chlVis = this.isOn = false;
	this.crOp = null;
	if(hasParent){
		this.hasParent = true; this.parentLst = openCont;
		this.parentOp=openItem; this.parentOp.child=this;
		}
	else{curMn=this; this.hasParent = false;}

	with(this){
		bgColor = this.drop ? bkgC : brdC;
		fullHeight = lastOp.top + lastOp.clip.bottom + brdW;
		clip.right = lWidth;
		clip.bottom = this.drop ? fullHeight-oppad : fullHeight;
		document.captureEvents(Event.CLICK);
		document.onclick = function(){return false};
		if(isPerm){moveTo(lLeft,lTop); visibility="show";}
		}
	}

function lstOvr(){
	if(mnTime)clearTimeout(mnTime);
	if(!this.hasParent){if(curMn!=this)	curMn.hTree();	curMn=this;}
	this.isOn=mnOver=true;
	curLst=this;
	}

function lstOut() {
	this.isOn = mnOver = false;
	if(outKill) mnTime = setTimeout("curLst.hTree()",mSecsVis);  
	}

function opOver(){if(this.container.crOp != this){
	lst=this.container;
	if(lst.crOp){
		lst.crOp.bgColor=lst.bkgC;
		with(lst.crOp.document){linkColor=lst.fntC; write(lst.crOp.hStr); close();}
		}
	this.bgColor=lst.ovBkgC;

	lst.crOp = this;
	if(lst.chlVis && lst.visibleChild!=this.child) lst.hChl(this);
	if(this.isSub){
		if(lst.drop) this.child.moveTo(this.pageX-lst.oppad, lst.top + lst.clip.bottom);
		else{
			hrOfs = lst.isRight ? lst.overlap - lst.lWidth : lst.lWidth - lst.overlap;
			this.child.moveTo(lst.left + hrOfs, this.pageY + lst.offset);
			this.child.keepIn();
			}
		lst.chlVis = true;
		lst.visibleChild = this.child;
		this.child.showIt(true);
		}
	}}

function showIt(on){
	if(!this.isPerm) this.visibility = (on) ? "show" : "hide";
	if(!this.hasHilite && this.crOp){
		this.crOp.bgColor = this.bkgC;
		with(this.crOp.document){write(this.crOp.hStr); close();}
		this.crOp.isHilited = false;
		}
	this.crOp = null;
	}

function keepIn(){
		winRight = menuLoc.pageXOffset + menuLoc.innerWidth;
		rightPos = this.left + this.lWidth;
		if(rightPos > winRight){
			if(this.hasParent)	this.left = this.parentLst.left - this.lWidth + this.overlap;
			else this.left -= (rightPos - winRight);
			}
		winBot = menuLoc.pageYOffset + menuLoc.innerHeight;
		botPos = this.top + this.fullHeight;
		if(botPos > winBot) this.top -= (botPos - winBot + 3);
		if(this.left<menuLoc.pageXOffset) this.left = this.hasParent ? this.parentLst.left + this.lWidth - this.overlap : 5;
	}

function hTree(){mnTime=null;	if(mnOver)return;	if(this.chlVis)this.hChl();	this.hPar();}

function hPar(){
	lst = this;
	while(lst.hasParent){lst.showIt(false); lst.parentLst.isOn=false; lst=lst.parentLst;}
	if(!lst.isOn && !mnOver) lst.showIt(false);
	}

function hChl(mnop){
	chl = this.visibleChild;
	while(chl.chlVis){chl.visibleChild.showIt(false); chl.chlVis=false; chl=chl.visibleChild;}
	if(!this.isOn || !mnop.isSub || this.visibleChild!=this.child){this.visibleChild.showIt(false); this.chlVis=false;}
	}

function mClick(){if(!mnOver && !curLst==null && !curLst.isOn){lst=curLst; lst.hTree();}}

function moveTo(xPos,yPos){this.style.pixelLeft=xPos; this.style.pixelTop=yPos;}

function mLink(){if(this.linkText.indexOf("javascript")!=-1) eval(this.linkText); else window.top.location.href = this.linkText;}
 
function reDo(){if(loader.innerWidth!=origWidth || loader.innerHeight!=origHeight){mnInit(); NSresized=true; menuLoc.location.reload();}}

window.onerror = handleErr;

function handleErr(){
	arAccessErrors = ["permission","access"];
	mess = arguments[0].toLowerCase();
	found = false;
	for (i=0;i<arAccessErrors.length;i++){errStr=arAccessErrors[i]; if(mess.indexOf(errStr)!=-1)found=true;}
	return found;
	}