var menu = new CSSMenu('menu');
var isDOM=document.getElementById?1:0,isIE=document.all?1:0,isNS4=navigator.appName=='Netscape'&&!isDOM?1:0,isOp=self.opera?1:0,isDyn=isDOM||isIE||isNS4;function getRef(i,p){p=!p?document:p.navigator?p.document:p;return isIE?p.all[i]:isDOM?(p.getElementById?p:p.ownerDocument).getElementById(i):isNS4?p.layers[i]:null;};function getSty(i,p){var r=getRef(i,p);return r?isNS4?r:r.style:null;};if(!self.LayerObj)var LayerObj=new Function('i','p','this.ref=getRef(i,p);this.sty=getSty(i,p);return this');function getLyr(i,p){return new LayerObj(i,p)};function LyrFn(n,f){LayerObj.prototype[n]=new Function('var a=arguments,p=a[0],px=isNS4||isOp?0:"px";'+'with(this){'+f+'}');};LyrFn('x','if(!isNaN(p))sty.left=p+px;else return parseInt(sty.left)');LyrFn('y','if(!isNaN(p))sty.top=p+px;else return parseInt(sty.top)');if(!self.page)var page={win:self,minW:0,minH:0,MS:isIE&&!isOp};page.elmPos=function(e,p){var x=0,y=0,w=p?p:this.win;e=e?(e.substr?(isNS4?w.document.anchors[e]:getRef(e,w)):e):p;if(isNS4){if(e&&(e!=p)){x=e.x;y=e.y};if(p){x+=p.pageX;y+=p.pageY}}else if(e&&e.focus&&e.href&&this.MS&&navigator.platform.indexOf('Mac')>-1){e.onfocus=new Function('with(event){self.tmpX=clientX-offsetX;'+'self.tmpY=clientY-offsetY}');e.focus();x=tmpX;y=tmpY;e.blur()}else while(e){x+=e.offsetLeft;y+=e.offsetTop;e=e.offsetParent}return{x:x,y:y};};function CSSMenu(myName){this.myName=myName;this.menus=new Array();this.visMenus=new Array();this.cssDisp=false;this.hideDelay=500;};CSSMenu.prototype.lyrVis=function(mN,sh){with(this){var lyr=menus[mN].lyr;if(this.cssDisp)lyr.sty.display=sh?'block':'none';else lyr.sty.visibility=sh?'visible':'hidden';}};CSSMenu.prototype.show=function(mN,parMN,offR,offX,offY){with(this){for(var m in visMenus)visMenus[m]=false;if(mN){var mR=menus[mN];if(!mR||!mR.lyr){mR=menus[mN]={lyr:getLyr(myName+'-'+mN),childMN:'',parMN:'',hideTimer:null};if(!mR.lyr.ref){mR.lyr=null;return}mR.lyr.ref.onmouseover=new Function(myName+'.show("'+mN+'","'+parMN+'")');mR.lyr.ref.onmouseout=new Function(myName+'.hide("'+mN+'",0)');}mR.parMN=parMN;if(parMN)menus[parMN].childMN=mN;var m=mN;while(m){visMenus[m]=true;if(menus[m])clearTimeout(menus[m].hideTimer);m=menus[m].parMN;}var lX=0,lY=0;if(offR)with(page.elmPos(offR,mR.parMN?menus[mR.parMN].lyr.ref:0))lX=x,lY=y;if(mR.lyr)with(mR.lyr){if(typeof(lX+lY)=='number'){x(lX+eval(offX));y(lY+eval(offY))}lyrVis(mN,1);}}for(var m in menus)if(!visMenus[m]&&m!=menus[mN].childMN)hide(m,1);return;}};CSSMenu.prototype.hide=function(mN,doHide){with(this)with(menus[mN]){clearTimeout(hideTimer);if(!doHide){hideTimer=setTimeout(myName+'.hide("'+mN+'",1)',hideDelay);if(parMN)this.hide(parMN);}else{if(isNS4&&self.isMouseIn&&isMouseIn(lyr.sty))return;if(parMN)with(menus[parMN])if(childMN==mN)childMN='';if(lyr)lyrVis(mN,0);}return;}};if(isNS4){var csmMouseX,csmMouseY,csmOR=self.onresize,nsWinW=innerWidth,nsWinH=innerHeight;document.csmMM=document.onmousemove;self.onresize=function(){if(csmOR)csmOR();if(nsWinW!=innerWidth||nsWinH!=innerHeight)location.reload();};document.captureEvents(Event.MOUSEMOVE);document.onmousemove=function(e){csmMouseX=e.pageX;csmMouseY=e.pageY;return document.csmMM?document.csmMM(e):document.routeEvent(e);};function isMouseIn(sty){with(sty)return((csmMouseX>left)&&(csmMouseX<left+clip.width)&&(csmMouseY>top)&&(csmMouseY<top+clip.height));};}
