loader=(isFrames)?parent:window;
origWidth=loader.innerWidth;
origHeight=loader.innerHeight;
loader.onresize=reDo;
isLoaded=false;
NSresized=false;
if(!window.menuVersion) clickKill=showVisited=NSfontOver=keepHilite=clickStart=false;
menuParamNum=0;
menVer4=true;
isWin=(navigator.appVersion.indexOf("Win") != -1)
if(!isWin&&!isMac) NSfontOver=showVisited=false;
mSecsVis=secondsVisible*1000;
isRight=(window.navFrLoc&&navFrLoc == "right");
imgSuf=(isRight)?">" :"ALIGN=RIGHT>";
imgStr="":"";
areCreated=false;
menuLoc=null;
function initVars(){
if(areCreated){
for(i=1;i<=topCount;i++){
cur=eval("elMenu"+i);
clearTimeout(cur.hideTimer);
cur.hideTimer=null;
}
clearTimeout(allTimer);
}
topCount=1;
areCreated=false;
beingCreated=false;
isOverMenu=false;
currentMenu=null;
allTimer=null;
Level3Item=false;
Level2Item=false;
Level1Item=false;
LevelFocus=0;
Itemtimer=null;
}
initVars();
function NSloaded(e){
if(e.target.name == mainFrName){
initVars();
startIt();
}
}
function NSunloaded(){isLoaded=false;}
function keepTrack(){
if(menuLoc.document.readyState == "complete"){
initVars();
startIt();
}else setTimeout("keepTrack()",50);
}
function startIt(){
if(!menusOn) return;
isLoaded=true;
if(isFrames){
menuLoc=eval("parent.frames."+mainFrName);
loader.captureEvents(Event.LOAD);
loader.onload=NSloaded;
menuLoc.onunload=NSunloaded;
}else menuLoc=window;
menuLoc.nav=nav=window;
}
function makeTop(topCount){
beingCreated=true;
NS_ShowTop=true;
Curr_topCount=topCount;
clearTimeout(Itemtimer);
startIt();
if(isMenu){
nowYOffset=window.pageYOffset;
nowYHeight=innerHeight;
nowXWidth=innerWidth;
if(nowYOffset!=oldYOffset||nowYHeight!=oldYHeight||nowXWidth!=oldXWidth){
for(i=0;i1)?menu.item:null;
itemName="item"+menuCount+"_"+menu.itemCount;
menu.item=makeElement(itemName,null,null,menu);
menu.item.prevItem=prevItem;
menu.item.setup=itemSetup;
menu.item.setup(menu.itemCount,menu.array,menuCount);
}
menu.lastItem=menu.item;
menu.setup(isChild,parMenu,parItem);
}
function setMenuTree(isChild,parMenu){
this.maxItems=(isChild)?this.array.length/3:(this.array.length-menuParamNum)/3;
nowYHeight=innerHeight;
nowXWidth=innerWidth;
l2Height=NSl2Height;
pageOffset=window.pageYOffset;
if(!isChild){
yAxisPoint=yStartPoint+(Curr_topCount-1)*21;
yHeight=this.maxItems*l2Height;
l2Height=NSl2Height;
if(nowXWidth<=NSDocumentWidth){
browserHeight=nowYHeight-15;
this.menuLeft=NSImageX;
}else{
browserHeight=nowYHeight;
this.menuLeft=NSImageX;
//this.menuLeft=(nowXWidth-NSDocumentWidth)/2+NSImageX;
}
yTopOffset=yAxisPoint-pageOffset;
yBottomOffset=browserHeight-yHeight-yTopOffset;
this.menuWidth=menuWidth;
if(yBottomOffset<0){
if((browserHeight+pageOffset-ADHeight)"+htmStr+ "";
if(this.linkText){
with(this.document){
linkColor=fntCol;
alinkColor=this.container.menuFontColor;
vlinkColor=(showVisited)?showVisited:this.container.menuFontColor;
}
htmStrOver=htmStr.fontcolor(this.container.menuFontOver).link("javascript:void(0)");
htmStr=htmStr.link(this.linkText);
}else{
htmStrOver=htmStr.fontcolor(this.container.menuFontOver);
htmStr=htmStr.fontcolor(this.container.menuFontColor);
}
this.htmStr=(this.hasMore)?imgStr+htmStr:spStr+htmStr;
this.htmStrOver=(this.hasMore)?imgStr+htmStrOver:spStr+htmStrOver;
this.document.writeln(this.htmStr);
this.document.close();
this.visibility="inherit";
this.bgColor=this.container.menuBGColor;
if(whichItem == 1) this.top=borWid+itemPad;
else this.top=this.prevItem.top+this.prevItem.clip.height+separator;
this.left=borWid+itemPad ;
this.clip.top=this.clip.left=-itemPad;
this.clip.bottom += itemPad;
this.clip.right=this.container.menuWidth-(borWid*2)-itemPad;
}
function menuSetup(hasParent,openCont,openItem){
this.onmouseover=menuOver;
this.onmouseout=menuOut;
this.showIt=showIt;
this.keepInWindow=keepInWindow;
this.hideTree=hideTree
this.hideParents=hideParents;
this.hideChildren=hideChildren;
this.hideTop=hideTop;
this.hasChildVisible=false;
this.isOn=false;
this.hideTimer=null;
this.childOverlap=(perCentOver != null)?((perCentOver/100)*this.menuWidth):childOverlap;
this.currentItem=null;
this.hideSelf=hideSelf;
if(hasParent){
this.hasParent=true;
this.parentMenu=openCont;
}else this.hasParent=false;
this.bgColor=this.menuBorCol;
this.fullHeight=this.lastItem.top+this.lastItem.clip.bottom+borWid;
this.clip.right=this.menuWidth;
this.clip.bottom=this.fullHeight;
this.moveTo(this.menuLeft,this.menuTop);
this.visibility="show";
}
function popUp(Count,e){
if(isMenu){
switchOn("menu"+Count);
if(NSresized) startIt();
if(!isLoaded) return;
menuName=eval("elMenu"+Count);
if(Level1Item&&Level1Item!=menuName){
clearTimeout(Itemtimer);
temp=eval(Level1Item);
temp.showIt(false);
Level1Item=null;
}
linkEl=e.target;
if(!beingCreated&&!areCreated) startIt();
linkEl.menuName=menuName;
hideAllLevel3();
}
}
function menuOver(){
this.isOn=true;
isOverMenu=true;
currentMenu=this;
if(this.hideTimer) clearTimeout(this.hideTimer);
}
function menuOut(){
this.isOn=false;
isOverMenu=false;
}
function itemOver(){
clearTimeout(Itemtimer);
switchOn("menu"+parseInt(this.topCount));
if(Level2Item.hasMore&&this!=Level2Item&&this.hasMore){
temp=eval("elMenu"+Level2Item.topCount+"_"+Level2Item.topItemCount);
temp.showIt(false);
Level2Item.hasChildVisible=false;
Level2Item=false;
}
if(this.hasMore){
this.makeSecond=makeSecond;
this.makeSecond(this.topCount,this.topItemCount);
this.hasChildVisible=true;
this.visibleChild=this.child;
}
ls = this.topCount+" ";
if(!this.hasMore&&ls.indexOf("_")==-1){ hideAllLevel3(); }
this.bgColor=overCol;
}
function itemOut(){
this.bgColor=backCol;
if(NS_ShowTop==false) Itemtimer=setTimeout("hideAll()",300);
if(this.hasMore) Level2Item=this;
else Level3Item=this;
}
function moveTo(xPos,yPos){
this.style.pixelLeft=xPos;
this.style.pixelTop=yPos;
}
function showIt(on){
this.visibility=(on)?"show":"hide";
if(!this.hasHilite&&keepHilite&&this.currentItem){
this.currentItem.bgColor=this.menuBGColor;
if(NSfontOver){
with(this.currentItem.document){
write(this.currentItem.htmStr);
close();
}
}
this.currentItem.isHilited=false;
}
this.currentItem=null;
}
function keepInWindow(){
scrBars=20;
botScrBar=(isFrames&&navFrLoc=="bottom")?(borWid*2):scrBars;
rtScrBar=(isFrames&&navFrLoc=="right")?(borWid*2):scrBars;
alert(botScrBar);
alert(rtScrBar);
winRight=(menuLoc.pageXOffset+menuLoc.innerWidth)-rtScrBar;
rightPos=this.left+this.menuWidth;
if(rightPos>winRight){
if(this.hasParent){
parentLeft=this.parentMenu.left;
newLeft=((parentLeft-this.menuWidth)+this.childOverlap);
this.left=newLeft;
}else{
dif=rightPos-winRight;
this.left -= dif;
}
}
winBot=(menuLoc.pageYOffset+menuLoc.innerHeight)-botScrBar ;
botPos=this.top+this.fullHeight;
if(botPos>winBot){
dif=botPos-winBot;
this.top -= dif;
}
winLeft=menuLoc.pageXOffset;
leftPos=this.left;
if(leftPos