function Menu(c,a,e,d,b,k,n,l,q){this.version="990702 [Menu; menu.js]";this.type="Menu";this.menuWidth=a;this.menuItemHeight=e;this.fontSize=b||12;this.fontWeight="plain";this.fontFamily=d||"arial,helvetica,verdana,sans-serif";this.fontColor=k||"#000000";this.fontColorHilite=n||"#ffffff";this.bgColor="#555555";this.menuItemBorder=this.menuBorder=1;this.menuItemBgColor=l||"#cccccc";this.menuLiteBgColor="#ffffff";this.menuBorderBgColor="#777777";this.menuHiliteBgColor=q||"#000084";this.menuContainerBgColor=
"#cccccc";this.childMenuIcon="arrows.gif";this.items=[];this.actions=[];this.childMenus=[];this.hideOnMouseOut=!0;this.addMenuItem=addMenuItem;this.addMenuSeparator=addMenuSeparator;this.writeMenus=writeMenus;this.FW_showMenu=FW_showMenu;this.onMenuItemOver=onMenuItemOver;this.onMenuItemAction=onMenuItemAction;this.hideMenu=hideMenu;this.hideChildMenu=hideChildMenu;window.menus||(window.menus=[]);this.label=c||"menuLabel"+window.menus.length;window.menus[this.label]=this;window.menus[window.menus.length]=
this;window.activeMenus||(window.activeMenus=[])}function addMenuItem(c,a){this.items[this.items.length]=c;this.actions[this.actions.length]=a}function addMenuSeparator(){this.items[this.items.length]="separator";this.actions[this.actions.length]="";this.menuItemBorder=0}function FIND(c){return document.all?document.all[c]:document.getElementById?document.getElementById(c):!1}
function writeMenus(c){if(!window.triedToWriteMenus){if(!c&&document.layers){window.delayWriteMenus=this.writeMenus;var a=setTimeout("delayWriteMenus()",250);c=new Layer(100);clearTimeout(a)}else if(document.all||document.hasChildNodes)document.writeln('<SPAN ID="menuContainer"></SPAN>'),c=FIND("menuContainer");window.fwHideMenuTimer=null;if(c){window.triedToWriteMenus=!0;c.isContainer=!0;c.menus=[];var e=0,d,b;for(d=0;d<window.menus.length;d++)c.menus[d]=window.menus[d];var k=window.menus.length=
0,n=0,l="",q=!1,u="";document.layers&&(q=!0);for(d=0;d<c.menus.length;d++,k++){a=c.menus[d];a.bgImageUp&&(a.menuBorder=0,a.menuItemBorder=0);if(q){var h=new Layer(100,c);var m=new Layer(100,h);m.top=a.menuBorder;m.left=a.menuBorder;var f=new Layer(100,m);f.top=a.menuBorder;f.left=a.menuBorder}else l+='<DIV ID="menuLayer'+k+'" STYLE="position:absolute;z-index:1;left:10;top:'+100*d+';visibility:hidden;">\n  <DIV ID="menuLite'+k+'" STYLE="position:absolute;z-index:1;left:'+a.menuBorder+";top:"+a.menuBorder+
';visibility:hide;" onMouseOut="mouseoutMenu();">\n\t <DIV ID="menuFg'+k+'" STYLE="position:absolute;left:'+a.menuBorder+";top:"+a.menuBorder+';visibility:hide;">\n';var g=d;for(d=0;d<a.items.length;d++){h=a.items[d];m=!1;var r=a.fontSize+6,t=a.fontSize;h.label&&(h=h.label,m=!0);a.menuItemHeight=a.menuItemHeight||r;a.menuItemIndent=a.menuItemIndent||t;var p="font-family:"+a.fontFamily+";font-weight:"+a.fontWeight+";fontSize:"+a.fontSize+";";a.fontStyle&&(p+="font-style:"+a.fontStyle+";");document.all?
p+="font-size:"+a.fontSize+';" onMouseOver="onMenuItemOver(null,this);" onClick="onMenuItemAction(null,this);':document.layers||(p+="font-size:"+a.fontSize+"px;");q&&(b=new Layer(800,f));r='<DIV ID="menuItem'+n+'" STYLE="position:absolute;left:0;top:'+d*a.menuItemHeight+";"+p+'">';t="</DIV>";a.bgImageUp&&(a.menuBorder=0,a.menuItemBorder=0,r='<DIV ID="menuItem'+n+'" STYLE="background:url('+a.bgImageUp+");position:absolute;left:0;top:"+d*a.menuItemHeight+";"+p+'">',document.layers&&(r='<LAYER BACKGROUND="'+
a.bgImageUp+'" ID="menuItem'+n+'" TOP="'+d*a.menuItemHeight+'" style="'+p+'">',t="</LAYER>"));var v="position:absolute;left:"+a.menuItemIndent+";top:1;";q&&(v+=p,t=r="");p='<DIV ID="menuItemText'+n+'" STYLE="'+v+"color:"+a.fontColor+';">'+h+'&nbsp</DIV>\n<DIV ID="menuItemHilite'+n+'" STYLE="'+v+"top:1;color:"+a.fontColorHilite+';visibility:hidden;">'+h+"&nbsp</DIV>";l="separator"==h?l+(r+'<DIV ID="menuSeparator'+n+'" STYLE="position:absolute;left:1;top:2;"></DIV>\n<DIV ID="menuSeparatorLite'+n+'" STYLE="position:absolute;left:1;top:2;"></DIV>\n'+
t):m?l+(r+p+'<DIV ID="childMenu'+n+'" STYLE="position:absolute;left:0;top:3;"><IMG SRC="'+a.childMenuIcon+'"></DIV>\n'+t):l+(r+p+t);q&&(b.document.open("text/html"),b.document.writeln(l),b.document.close(),l="",u+="-",e++,50<e&&(e=0,u=""),status=u);n++}q?(h=new Layer(100,f),h.visiblity="hidden",h.document.open("text/html"),h.document.writeln("&nbsp;"),h.document.close()):(l+='\t  <DIV ID="focusItem'+k+'" STYLE="position:absolute;left:0;top:0;visibility:hide;" onClick="onMenuItemAction(null,this);">&nbsp;</DIV>\n',
l+="   </DIV>\n  </DIV>\n</DIV>\n");d=g}if(document.layers)for(c.clip.width=window.innerWidth,c.clip.height=window.innerHeight,c.onmouseout=mouseoutMenu,c.menuContainerBgColor=this.menuContainerBgColor,d=0;d<c.document.layers.length;d++){proto=c.menus[d];a=c.document.layers[d];c.menus[d].menuLayer=a;c.menus[d].menuLayer.Menu=c.menus[d];c.menus[d].menuLayer.Menu.container=c;f=a.document.layers[0].document.layers[0];f.clip.width=proto.menuWidth||f.clip.width;f.clip.height=proto.menuHeight||f.clip.height;
for(g=0;g<f.document.layers.length-1;g++)b=f.document.layers[g],b.Menu=c.menus[d],b.menuHiliteBgColor=proto.menuHiliteBgColor,b.document.bgColor=proto.menuItemBgColor,b.saveColor=proto.menuItemBgColor,b.onmouseover=proto.onMenuItemOver,b.onclick=proto.onMenuItemAction,b.action=c.menus[d].actions[g],b.focusItem=f.document.layers[f.document.layers.length-1],b.clip.width=proto.menuWidth||f.clip.width+proto.menuItemIndent,b.clip.height=proto.menuItemHeight||b.clip.height,0<g&&(b.top=f.document.layers[g-
1].top+f.document.layers[g-1].clip.height+proto.menuItemBorder),b.hilite=b.document.layers[1],proto.bgImageUp&&(b.background.src=proto.bgImageUp),b.document.layers[1].isHilite=!0,-1!=b.document.layers[0].id.indexOf("menuSeparator")?(b.hilite=null,b.clip.height-=b.clip.height/2,b.document.layers[0].document.bgColor=proto.bgColor,b.document.layers[0].clip.width=b.clip.width-2,b.document.layers[0].clip.height=1,b.document.layers[1].document.bgColor=proto.menuLiteBgColor,b.document.layers[1].clip.width=
b.clip.width-2,b.document.layers[1].clip.height=1,b.document.layers[1].top=b.document.layers[0].top+1):2<b.document.layers.length&&(b.childMenu=c.menus[d].items[g].menuLayer,b.document.layers[2].left=b.clip.width-13,b.document.layers[2].top=b.clip.height/2-4,b.document.layers[2].clip.left+=3,b.Menu.childMenus[b.Menu.childMenus.length]=b.childMenu);f.document.bgColor=proto.bgColor;f.clip.width=b.clip.width+proto.menuBorder;f.clip.height=b.top+b.clip.height+proto.menuBorder;h=f.document.layers[g];h.clip.width=
f.clip.width;h.Menu=b.Menu;h.top=-30;h.captureEvents(Event.MOUSEDOWN);h.onmousedown=onMenuItemDown;a.document.bgColor=proto.menuBorderBgColor;m=a.document.layers[0];m.document.bgColor=proto.menuLiteBgColor;m.clip.width=f.clip.width+1;m.clip.height=f.clip.height+1;a.clip.width=f.clip.width+3*proto.menuBorder;a.clip.height=f.clip.height+3*proto.menuBorder}else{!document.all&&c.hasChildNodes?c.innerHTML=l:(c.document.open("text/html"),c.document.writeln(l),c.document.close());if(!FIND("menuLayer0"))return;
for(g=e=0;g<c.menus.length;g++){h=FIND("menuLayer"+g);c.menus[g].menuLayer="menuLayer"+g;h.Menu=c.menus[g];h.Menu.container="menuLayer"+g;h.style.zIndex=1;b=h.style;b.top=b.pixelTop=-300;b.left=b.pixelLeft=-300;a=c.menus[g];a.menuItemWidth=a.menuWidth||a.menuIEWidth||140;h.style.backgroundColor=a.menuBorderBgColor;for(d=f=0;d<c.menus[g].items.length;d++){b=FIND("menuItem"+e);b.Menu=c.menus[g];b.addEventListener?(b.style.width=a.menuItemWidth,b.style.height=a.menuItemHeight,b.style.top=f,b.addEventListener("mouseover",
onMenuItemOver,!1),b.addEventListener("click",onMenuItemAction,!1),b.addEventListener("mouseout",mouseoutMenu,!1)):(b.style.pixelWidth=a.menuItemWidth,b.style.pixelHeight=a.menuItemHeight,b.style.pixelTop=f);f=f+a.menuItemHeight+a.menuItemBorder;b.style.fontSize=a.fontSize;b.style.backgroundColor=a.menuItemBgColor;b.style.visibility="inherit";b.saveColor=a.menuItemBgColor;b.menuHiliteBgColor=a.menuHiliteBgColor;b.action=c.menus[g].actions[d];b.hilite=FIND("menuItemHilite"+e);b.focusItem=FIND("focusItem"+
g);b.focusItem.style.pixelTop=b.focusItem.style.top=-30;if(k=FIND("childMenu"+e))b.childMenu=c.menus[g].items[d].menuLayer,k.style.pixelLeft=k.style.left=a.menuItemWidth-11,k.style.pixelTop=k.style.top=a.menuItemHeight/2-4,b.Menu.childMenus[b.Menu.childMenus.length]=b.childMenu;(k=FIND("menuSeparator"+e))?(k.style.clip="rect(0 "+(a.menuItemWidth-3)+" 1 0)",k.style.width=k.style.pixelWidth=a.menuItemWidth,k.style.backgroundColor=a.bgColor,k=FIND("menuSeparatorLite"+e),k.style.clip="rect(1 "+(a.menuItemWidth-
3)+" 2 0)",k.style.width=k.style.pixelWidth=a.menuItemWidth,k.style.backgroundColor=a.menuLiteBgColor,b.style.height=b.style.pixelHeight=a.menuItemHeight/2,b.isSeparator=!0,f-=a.menuItemHeight-b.style.pixelHeight):b.style.cursor="hand";e++}a.menuHeight=f-1;m=FIND("menuLite"+g);b=m.style;b.height=b.pixelHeight=a.menuHeight+2*a.menuBorder;b.width=b.pixelWidth=a.menuItemWidth+2*a.menuBorder;b.backgroundColor=a.menuLiteBgColor;f=FIND("menuFg"+g);b=f.style;b.height=b.pixelHeight=a.menuHeight+a.menuBorder;
b.width=b.pixelWidth=a.menuItemWidth+a.menuBorder;b.backgroundColor=a.bgColor;b=h.style;b.width=b.pixelWidth=a.menuItemWidth+4*a.menuBorder;b.height=b.pixelHeight=a.menuHeight+4*a.menuBorder}}document.captureEvents&&document.captureEvents(Event.MOUSEUP);document.addEventListener&&document.addEventListener("mouseup",onMenuItemOver,!1);document.layers&&window.innerWidth&&(window.onresize=NS4resize,window.NS4sIW=window.innerWidth,window.NS4sIH=window.innerHeight);document.onmouseup=mouseupMenu;window.fwWroteMenu=
!0;status=""}}}function NS4resize(){(NS4sIW<window.innerWidth||NS4sIW>window.innerWidth||NS4sIH>window.innerHeight||NS4sIH<window.innerHeight)&&window.location.reload()}
function onMenuItemOver(c,a){FW_clearTimeout();a=a||this;c=window.ActiveMenuItem;if(document.layers)c&&(c.document.bgColor=c.saveColor,c.hilite&&(c.hilite.visibility="hidden"),c.Menu.bgImageOver&&(c.background.src=c.Menu.bgImageUp),c.focusItem.top=-100,c.clicked=!1),a.hilite&&(a.document.bgColor=a.menuHiliteBgColor,a.zIndex=1,a.hilite.visibility="inherit",a.hilite.zIndex=2,a.document.layers[1].zIndex=1,a.focusItem.zIndex=this.zIndex+2),a.Menu.bgImageOver&&(a.background.src=a.Menu.bgImageOver),a.focusItem.top=
this.top,a.Menu.hideChildMenu(a);else if(a.style&&a.Menu){c&&(c.style.backgroundColor=c.saveColor,c.hilite&&(c.hilite.style.visibility="hidden"),c.Menu.bgImageUp&&(c.style.background="url("+c.Menu.bgImageUp+")"));if(a.isSeparator)return;a.style.backgroundColor=a.menuHiliteBgColor;a.zIndex=1;a.Menu.bgImageOver&&(a.style.background="url("+a.Menu.bgImageOver+")");a.hilite&&(a.style.backgroundColor=a.menuHiliteBgColor,a.hilite.style.visibility="inherit");a.focusItem.style.top=a.focusItem.style.pixelTop=
a.style.pixelTop;a.focusItem.style.zIndex=a.zIndex+1;a.Menu.hideChildMenu(a)}else return;window.ActiveMenuItem=a}function onMenuItemAction(c,a){if(a=window.ActiveMenuItem)hideActiveMenus(),a.action&&eval(""+a.action),window.ActiveMenuItem=0}function FW_clearTimeout(){fwHideMenuTimer&&clearTimeout(fwHideMenuTimer);fwHideMenuTimer=null;fwDHFlag=!1}function FW_startTimeout(){fwStart=new Date;fwDHFlag=!0;fwHideMenuTimer=setTimeout("fwDoHide()",1E3)}
function fwDoHide(){if(fwDHFlag){var c=new Date-fwStart;1E3>c?fwHideMenuTimer=setTimeout("fwDoHide()",1100-c):(fwDHFlag=!1,hideActiveMenus(),window.ActiveMenuItem=0)}}
function FW_showMenu(c,a,e,d){if(window.fwWroteMenu){FW_clearTimeout();if(document.layers){if(c){var b=c.menuLayer||c;b.left=1;b.top=1;hideActiveMenus();this.visibility&&(b=this);window.ActiveMenu=b}else b=d;if(!b)return;for(d=0;d<b.layers.length;d++)b.layers[d].isHilite||(b.layers[d].visibility="inherit"),0<b.layers[d].document.layers.length&&FW_showMenu(null,"relative","relative",b.layers[d]);b.parentLayer&&("relative"!=a&&(b.parentLayer.left=a||window.pageX||0),b.parentLayer.left+b.clip.width>
window.innerWidth&&(b.parentLayer.left-=b.parentLayer.left+b.clip.width-window.innerWidth),"relative"!=e&&(b.parentLayer.top=e||window.pageY||0),b.parentLayer.isContainer&&(b.Menu.xOffset=window.pageXOffset,b.Menu.yOffset=window.pageYOffset,b.parentLayer.clip.width=window.ActiveMenu.clip.width+2,b.parentLayer.clip.height=window.ActiveMenu.clip.height+2,b.parentLayer.menuContainerBgColor&&(b.parentLayer.document.bgColor=b.parentLayer.menuContainerBgColor)));b.visibility="inherit";b.Menu&&(b.Menu.container.visibility=
"inherit")}else FIND("menuItem0")&&(b=c.menuLayer||c,hideActiveMenus(),"string"==typeof b&&(b=FIND(b)),window.ActiveMenu=b,d=b.style,d.visibility="inherit","relative"!=a&&(d.left=d.pixelLeft=a||window.pageX+document.body.scrollLeft||0),"relative"!=e&&(d.top=d.pixelTop=e||window.pageY+document.body.scrollTop||0),b.Menu.xOffset=document.body.scrollLeft,b.Menu.yOffset=document.body.scrollTop);c&&(window.activeMenus[window.activeMenus.length]=b)}}
function onMenuItemDown(c,a){a=window.ActiveMenuItem;document.layers&&a&&(a.eX=c.pageX,a.eY=c.pageY,a.clicked=!0)}function mouseupMenu(c){hideMenu(!0,c);hideActiveMenus();return!0}function mouseoutMenu(){hideMenu(!1,!1);return!0}
function hideMenu(c,a){var e=window.ActiveMenuItem;e&&document.layers?(e.document.bgColor=e.saveColor,e.focusItem.top=-30,e.hilite&&(e.hilite.visibility="hidden"),c&&e.action&&e.clicked&&window.ActiveMenu&&e.eX<=a.pageX+15&&e.eX>=a.pageX-15&&e.eY<=a.pageY+10&&e.eY>=a.pageY-10&&setTimeout("window.ActiveMenu.Menu.onMenuItemAction();",2),e.clicked=!1,e.Menu.bgImageOver&&(e.background.src=e.Menu.bgImageUp)):window.ActiveMenu&&FIND("menuItem0")&&e&&(e.style.backgroundColor=e.saveColor,e.hilite&&(e.hilite.style.visibility=
"hidden"),e.Menu.bgImageUp&&(e.style.background="url("+e.Menu.bgImageUp+")"));!c&&window.ActiveMenu&&window.ActiveMenu.Menu&&window.ActiveMenu.Menu.hideOnMouseOut&&FW_startTimeout();return!0}function PxToNum(c){return 2<c.length?Number(c.substr(0,c.length-2)):0}
function hideChildMenu(c){FW_clearTimeout();for(var a=0;a<c.Menu.childMenus.length;a++){var e=c.Menu.childMenus[a];document.layers?e.visibility="hidden":(e=FIND(e),e.style.visibility="hidden");e.Menu.hideChildMenu(e)}if(c.childMenu){a=c.childMenu;if(document.layers)c.Menu.FW_showMenu(null,null,null,a.layers[0]),a.zIndex=c.parentLayer.zIndex+1,a.top=c.top+c.parentLayer.top+c.Menu.menuLayer.top+c.Menu.menuItemHeight/3,a.left+a.clip.width>window.innerWidth?(a.left=c.parentLayer.left-a.clip.width+c.Menu.menuLayer.left+
15,c.Menu.container.clip.left-=a.clip.width):a.left=c.parentLayer.left+c.parentLayer.clip.width+c.Menu.menuLayer.left-5,e=a.clip.width+a.left-c.Menu.container.clip.left,e>c.Menu.container.clip.width&&(c.Menu.container.clip.width=e),e=a.clip.height+a.top-c.Menu.container.clip.top,e>c.Menu.container.clip.height&&(c.Menu.container.clip.height=e),c.document.layers[1].zIndex=0,a.visibility="inherit";else if(FIND("menuItem0")){a=FIND(c.childMenu);var d=FIND(c.Menu.menuLayer);e=a.style;e.zIndex=d.style.zIndex+
1;document.all?(e.pixelTop=c.style.pixelTop+d.style.pixelTop+c.Menu.menuItemHeight/3,e.left=e.pixelLeft=d.style.pixelWidth+d.style.pixelLeft-5):(c=PxToNum(c.style.top)+PxToNum(d.style.top)+c.Menu.menuItemHeight/3,d=PxToNum(d.style.width)+PxToNum(d.style.left)-5,e.top=c,e.left=d);a.style.visibility="inherit"}else return;window.activeMenus[window.activeMenus.length]=a}}
function hideActiveMenus(){if(window.activeMenus){for(var c=0;c<window.activeMenus.length;c++)if(activeMenus[c])if(activeMenus[c].visibility&&activeMenus[c].Menu)activeMenus[c].visibility="hidden",activeMenus[c].Menu.container.visibility="hidden",activeMenus[c].Menu.container.clip.left=0;else if(activeMenus[c].style){var a=activeMenus[c].style;a.visibility="hidden";a.left=-200;a.top=-200}window.ActiveMenuItem&&hideMenu(!1,!1);window.activeMenus.length=0}};
