function Menu(I,M,V,J,G,H,L,E,A,B,Q,T,U,D,O,N,F,C,R,P,K,S){this.version="020320 [Menu; mm_menu.js]";this.type="Menu";this.menuWidth=M;this.menuItemHeight=V;this.fontSize=G;this.fontWeight="plain";this.fontFamily=J;this.fontColor=H;this.fontColorHilite=L;this.bgColor="#555555";this.menuBorder=1;this.menuBgOpaque=C;this.menuItemBorder=1;this.menuItemIndent=P;this.menuItemBgColor=E;this.menuItemVAlign=Q;this.menuItemHAlign=B;this.menuItemPadding=T;this.menuItemSpacing=U;this.menuLiteBgColor="#ffffff";this.menuBorderBgColor="#777777";this.menuHiliteBgColor=A;this.menuContainerBgColor="#cccccc";this.childMenuIcon="arrows.gif";this.submenuXOffset=O;this.submenuYOffset=N;this.submenuRelativeToItem=F;this.vertical=R;this.items=new Array();this.actions=new Array();this.childMenus=new Array();this.hideOnMouseOut=true;this.hideTimeout=D;this.addMenuItem=addMenuItem;this.writeMenus=writeMenus;this.MM_showMenu=MM_showMenu;this.onMenuItemOver=onMenuItemOver;this.onMenuItemAction=onMenuItemAction;this.hideMenu=hideMenu;this.hideChildMenu=hideChildMenu;if(!window.menus){window.menus=new Array()}this.label=" "+I;window.menus[this.label]=this;window.menus[window.menus.length]=this;if(!window.activeMenus){window.activeMenus=new Array()}}function addMenuItem(A,B){this.items[this.items.length]=A;this.actions[this.actions.length]=B}function FIND(A){if(window.mmIsOpera){return(document.getElementById(A))}if(document.all){return(document.all[A])}if(document.getElementById){return(document.getElementById(A))}return(false)}function writeMenus(W){if(window.triedToWriteMenus){return }var p=navigator.userAgent.toLowerCase();window.mmIsOpera=p.indexOf("opera")!=-1;if(!W&&document.layers){window.delayWriteMenus=this.writeMenus;var T=setTimeout("delayWriteMenus()",500);W=new Layer(100);clearTimeout(T)}else{if(document.all||document.hasChildNodes||window.mmIsOpera){document.writeln('<span id="menuContainer"></span>');W=FIND("menuContainer")}}window.mmHideMenuTimer=null;if(!W){return }window.triedToWriteMenus=true;W.isContainer=true;W.menus=new Array();for(var m=0;m<window.menus.length;m++){W.menus[m]=window.menus[m]}window.menus.length=0;var O=0;var L=0;var H=0;var J="";var C=false;var D="";var q=0;if(document.layers){C=true}for(var m=0;m<W.menus.length;m++,O++){var o=W.menus[m];if(o.bgImageUp||!o.menuBgOpaque){o.menuBorder=0;o.menuItemBorder=0}if(C){var k=new Layer(100,W);var K=new Layer(100,k);K.top=o.menuBorder;K.left=o.menuBorder;var P=new Layer(100,K);P.top=o.menuBorder;P.left=o.menuBorder}else{J+='<div id="menuLayer'+O+'" style="position:absolute;z-index:1;left:10px;top:'+(m*100)+"px;visibility:hidden;color:"+o.menuBorderBgColor+';">\n  <div id="menuLite'+O+'" style="position:absolute;z-index:1;left:'+o.menuBorder+"px;top:"+o.menuBorder+'px;visibility:hide;" onmouseout="mouseoutMenu();">\n	 <div id="menuFg'+O+'" style="position:absolute;left:'+o.menuBorder+"px;top:"+o.menuBorder+'px;visibility:hide;">\n'}var Z=m;for(var m=0;m<o.items.length;m++){var R=o.items[m];var Y=false;var M=o.fontSize+2*o.menuItemPadding;if(R.label){R=R.label;Y=true}o.menuItemHeight=o.menuItemHeight||M;var V="";if(o.fontFamily!=""){V+="font-family:"+o.fontFamily+";"}V+="font-weight:"+o.fontWeight+";fontSize:"+o.fontSize+"px;";if(o.fontStyle){V+="font-style:"+o.fontStyle+";"}if(document.all||window.mmIsOpera){V+="font-size:"+o.fontSize+'px;" onmouseover="onMenuItemOver(null,this);" onclick="onMenuItemAction(null,this);'}else{if(!document.layers){V+="font-size:"+o.fontSize+"px;"}}var j;if(C){var Q=o.menuWidth;if(o.menuItemHAlign=="right"){Q-=o.menuItemPadding}j=new Layer(Q,P)}var f=0;var E=m*o.menuItemHeight;if(!o.vertical){f=m*o.menuWidth;E=0}var U='<div id="menuItem'+L+'" style="position:absolute;left:'+f+"px;top:"+E+"px;"+V+'">';var I="</div>";if(o.bgImageUp){U='<div id="menuItem'+L+'" style="background:url('+o.bgImageUp+");position:absolute;left:"+f+"px;top:"+E+"px;"+V+'">'}var G=0,H=0,g=0,A=0;G=1+o.menuItemPadding+o.menuItemIndent;g=G+o.menuWidth-2*o.menuItemPadding-o.menuItemIndent;if(o.menuItemVAlign=="top"){H=o.menuItemPadding}if(o.menuItemVAlign=="bottom"){H=o.menuItemHeight-o.fontSize-1-o.menuItemPadding}if(o.menuItemVAlign=="middle"){H=((o.menuItemHeight/2)-(o.fontSize/2)-1)}A=o.menuItemHeight-2*o.menuItemPadding;var e="position:absolute;left:"+G+"px;top:"+H+"px;";if(C){e+=V+"right:"+g+";bottom:"+A+";";U="";I=""}if(document.all&&!window.mmIsOpera){R='<div align="'+o.menuItemHAlign+'">'+R+"</div>"}else{if(C){R='<div style="text-align:'+o.menuItemHAlign+';">'+R+"</div>"}else{var F=null;if(o.menuItemHAlign!="left"){if(window.mmIsOpera){var c=o.menuItemHAlign=="center"?-(o.menuWidth-2*o.menuItemPadding):(o.menuWidth-6*o.menuItemPadding);F='<div id="menuItemHilite'+L+'Shim" style="position:absolute;top:1px;left:'+o.menuItemPadding+"px;width:"+c+"px;text-align:"+o.menuItemHAlign+';visibility:visible;">'+R+"</div>";R='<div id="menuItemText'+L+'Shim" style="position:absolute;top:1px;left:'+o.menuItemPadding+"px;width:"+c+"px;text-align:"+o.menuItemHAlign+';visibility:visible;">'+R+"</div>"}else{F='<div id="menuItemHilite'+L+'Shim" style="position:absolute;top:1px;left:1px;right:-'+(G+o.menuWidth-3*o.menuItemPadding)+"px;text-align:"+o.menuItemHAlign+';visibility:visible;">'+R+"</div>";R='<div id="menuItemText'+L+'Shim" style="position:absolute;top:1px;left:1px;right:-'+(G+o.menuWidth-3*o.menuItemPadding)+"px;text-align:"+o.menuItemHAlign+';visibility:visible;">'+R+"</div>"}}else{F=null}}}if(document.all&&!window.mmIsOpera){R='<div id="menuItemShim'+L+'" style="position:absolute;left:0px;top:0px;">'+R+"</div>"}var B='<div id="menuItemText'+L+'" style="'+e+"color:"+o.fontColor+';">'+R+'&nbsp</div>\n<div id="menuItemHilite'+L+'" style="'+e+"color:"+o.fontColorHilite+';visibility:hidden;">'+(F||R)+"&nbsp</div>";if(Y){J+=(U+B+'<div id="childMenu'+L+'" style="position:absolute;left:0px;top:3px;"><img src="'+o.childMenuIcon+'"></div>\n'+I)}else{J+=(U+B+I)}if(C){j.document.open("text/html");j.document.writeln(J);j.document.close();J="";D+="-";q++;if(q>50){q=0;D=""}status=D}L++}if(C){var X=new Layer(100,P);X.visiblity="hidden";X.document.open("text/html");X.document.writeln("&nbsp;");X.document.close()}else{J+='	  <div id="focusItem'+O+'" style="position:absolute;left:0px;top:0px;visibility:hide;" onclick="onMenuItemAction(null,this);">&nbsp;</div>\n';J+="   </div>\n  </div>\n</div>\n"}m=Z}if(document.layers){W.clip.width=window.innerWidth;W.clip.height=window.innerHeight;W.onmouseout=mouseoutMenu;W.menuContainerBgColor=this.menuContainerBgColor;for(var m=0;m<W.document.layers.length;m++){proto=W.menus[m];var o=W.document.layers[m];W.menus[m].menuLayer=o;W.menus[m].menuLayer.Menu=W.menus[m];W.menus[m].menuLayer.Menu.container=W;var P=o.document.layers[0].document.layers[0];P.clip.width=proto.menuWidth||P.clip.width;P.clip.height=proto.menuHeight||P.clip.height;for(var h=0;h<P.document.layers.length-1;h++){var j=P.document.layers[h];j.Menu=W.menus[m];j.menuHiliteBgColor=proto.menuHiliteBgColor;j.document.bgColor=proto.menuItemBgColor;j.saveColor=proto.menuItemBgColor;j.onmouseover=proto.onMenuItemOver;j.onclick=proto.onMenuItemAction;j.mmaction=W.menus[m].actions[h];j.focusItem=P.document.layers[P.document.layers.length-1];j.clip.width=proto.menuWidth||P.clip.width;j.clip.height=proto.menuItemHeight||j.clip.height;if(h>0){if(j.Menu.vertical){j.top=P.document.layers[h-1].top+P.document.layers[h-1].clip.height+proto.menuItemBorder+proto.menuItemSpacing}else{j.left=P.document.layers[h-1].left+P.document.layers[h-1].clip.width+proto.menuItemBorder+proto.menuItemSpacing}}j.hilite=j.document.layers[1];if(proto.bgImageUp){j.background.src=proto.bgImageUp}j.document.layers[1].isHilite=true;if(j.document.layers.length>2){j.childMenu=W.menus[m].items[h].menuLayer;j.document.layers[2].left=j.clip.width-13;j.document.layers[2].top=(j.clip.height/2)-4;j.document.layers[2].clip.left+=3;j.Menu.childMenus[j.Menu.childMenus.length]=j.childMenu}}if(proto.menuBgOpaque){P.document.bgColor=proto.bgColor}if(proto.vertical){P.clip.width=j.clip.width+proto.menuBorder;P.clip.height=j.top+j.clip.height+proto.menuBorder}else{P.clip.height=j.clip.height+proto.menuBorder;P.clip.width=j.left+j.clip.width+proto.menuBorder;if(P.clip.width>window.innerWidth){P.clip.width=window.innerWidth}}var X=P.document.layers[h];X.clip.width=P.clip.width;X.Menu=j.Menu;X.top=-30;X.captureEvents(Event.MOUSEDOWN);X.onmousedown=onMenuItemDown;if(proto.menuBgOpaque){o.document.bgColor=proto.menuBorderBgColor}var K=o.document.layers[0];if(proto.menuBgOpaque){K.document.bgColor=proto.menuLiteBgColor}K.clip.width=P.clip.width+1;K.clip.height=P.clip.height+1;o.clip.width=P.clip.width+(proto.menuBorder*3);o.clip.height=P.clip.height+(proto.menuBorder*3)}}else{if((!document.all)&&(W.hasChildNodes)&&!window.mmIsOpera){W.innerHTML=J}else{W.document.open("text/html");W.document.writeln(J);W.document.close()}if(!FIND("menuLayer0")){return }var S=0;for(var Z=0;Z<W.menus.length;Z++){var k=FIND("menuLayer"+Z);W.menus[Z].menuLayer="menuLayer"+Z;k.Menu=W.menus[Z];k.Menu.container="menuLayer"+Z;k.style.zindex=1;var d=k.style;d.pixeltop=-300;d.pixelleft=-300;d.top="-300px";d.left="-300px";var o=W.menus[Z];o.menuItemWidth=o.menuWidth||o.menuIEWidth||140;if(o.menuBgOpaque){k.style.backgroundColor=o.menuBorderBgColor}var H=0;var G=0;o.menuItemLayers=new Array();for(var m=0;m<W.menus[Z].items.length;m++){var j=FIND("menuItem"+S);j.Menu=W.menus[Z];j.Menu.menuItemLayers[j.Menu.menuItemLayers.length]=j;if(j.addEventListener||window.mmIsOpera){j.style.width=o.menuItemWidth+"px";j.style.height=o.menuItemHeight+"px";j.style.pixelWidth=o.menuItemWidth;j.style.pixelHeight=o.menuItemHeight;j.style.top=H+"px";j.style.left=G+"px";if(j.addEventListener){j.addEventListener("mouseover",onMenuItemOver,false);j.addEventListener("click",onMenuItemAction,false);j.addEventListener("mouseout",mouseoutMenu,false)}if(o.menuItemHAlign!="left"){j.hiliteShim=FIND("menuItemHilite"+S+"Shim");j.hiliteShim.style.visibility="inherit";j.textShim=FIND("menuItemText"+S+"Shim");j.hiliteShim.style.pixelWidth=o.menuItemWidth-2*o.menuItemPadding-o.menuItemIndent;j.hiliteShim.style.width=j.hiliteShim.style.pixelWidth;j.textShim.style.pixelWidth=o.menuItemWidth-2*o.menuItemPadding-o.menuItemIndent;j.textShim.style.width=j.textShim.style.pixelWidth}}else{j.style.pixelWidth=o.menuItemWidth;j.style.pixelHeight=o.menuItemHeight;j.style.pixelTop=H;j.style.pixelLeft=G;if(o.menuItemHAlign!="left"){var b=FIND("menuItemShim"+S);b[0].style.pixelWidth=o.menuItemWidth-2*o.menuItemPadding-o.menuItemIndent;b[1].style.pixelWidth=o.menuItemWidth-2*o.menuItemPadding-o.menuItemIndent;b[0].style.width=b[0].style.pixelWidth+"px";b[1].style.width=b[1].style.pixelWidth+"px"}}if(o.vertical){H=H+o.menuItemHeight+o.menuItemBorder+o.menuItemSpacing}else{G=G+o.menuItemWidth+o.menuItemBorder+o.menuItemSpacing}j.style.fontSize=o.fontSize+"px";j.style.backgroundColor=o.menuItemBgColor;j.style.visibility="inherit";j.saveColor=o.menuItemBgColor;j.menuHiliteBgColor=o.menuHiliteBgColor;j.mmaction=W.menus[Z].actions[m];j.hilite=FIND("menuItemHilite"+S);j.focusItem=FIND("focusItem"+Z);j.focusItem.style.pixelTop=-30;j.focusItem.style.top="-30px";var N=FIND("childMenu"+S);if(N){j.childMenu=W.menus[Z].items[m].menuLayer;N.style.pixelLeft=o.menuItemWidth-11;N.style.left=N.style.pixelLeft+"px";N.style.pixelTop=(o.menuItemHeight/2)-4;N.style.top=N.style.pixelTop+"px";j.Menu.childMenus[j.Menu.childMenus.length]=j.childMenu}j.style.cursor="hand";S++}if(o.vertical){o.menuHeight=H-o.menuItemSpacing;o.menuWidth=o.menuItemWidth}else{o.menuHeight=o.menuItemHeight;o.menuWidth=G-o.menuItemSpacing}var K=FIND("menuLite"+Z);var d=K.style;d.pixelHeight=o.menuHeight+(o.menuBorder*2);d.height=d.pixelHeight+"px";d.pixelWidth=o.menuWidth+(o.menuBorder*2);d.width=d.pixelWidth+"px";if(o.menuBgOpaque){d.backgroundColor=o.menuLiteBgColor}var P=FIND("menuFg"+Z);d=P.style;d.pixelHeight=o.menuHeight+o.menuBorder;d.height=d.pixelHeight+"px";d.pixelWidth=o.menuWidth+o.menuBorder;d.width=d.pixelWidth+"px";if(o.menuBgOpaque){d.backgroundColor=o.bgColor}d=k.style;d.pixelWidth=o.menuWidth+(o.menuBorder*4);d.width=d.pixelWidth+"px";d.pixelHeight=o.menuHeight+(o.menuBorder*4);d.height=d.pixelHeight+"px"}}if(document.captureEvents){document.captureEvents(Event.MOUSEUP)}if(document.addEventListener){document.addEventListener("mouseup",onMenuItemOver,false)}if(document.layers&&window.innerWidth){window.onresize=NS4resize;window.NS4sIW=window.innerWidth;window.NS4sIH=window.innerHeight;setTimeout("NS4resize()",500)}document.onmouseup=mouseupMenu;window.mmWroteMenu=true;status=""}function NS4resize(){if(NS4sIW!=window.innerWidth||NS4sIH!=window.innerHeight){window.location.reload()}}function onMenuItemOver(B,A){MM_clearTimeout();A=A||this;a=window.ActiveMenuItem;if(document.layers){if(a){a.document.bgColor=a.saveColor;if(a.hilite){a.hilite.visibility="hidden"}if(a.Menu.bgImageOver){a.background.src=a.Menu.bgImageUp}a.focusItem.top=-100;a.clicked=false}if(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}if(A.Menu.bgImageOver){A.background.src=A.Menu.bgImageOver}A.focusItem.top=this.top;A.focusItem.left=this.left;A.focusItem.clip.width=A.clip.width;A.focusItem.clip.height=A.clip.height;A.Menu.hideChildMenu(A)}else{if(A.style&&A.Menu){if(a){a.style.backgroundColor=a.saveColor;if(a.hilite){a.hilite.style.visibility="hidden"}if(a.hiliteShim){a.hiliteShim.style.visibility="inherit"}if(a.Menu.bgImageUp){a.style.background="url("+a.Menu.bgImageUp+")"}}A.style.backgroundColor=A.menuHiliteBgColor;A.zIndex=1;if(A.Menu.bgImageOver){A.style.background="url("+A.Menu.bgImageOver+")"}if(A.hilite){A.hilite.style.visibility="inherit";if(A.hiliteShim){A.hiliteShim.style.visibility="visible"}}A.focusItem.style.pixelTop=A.style.pixelTop;A.focusItem.style.top=A.focusItem.style.pixelTop+"px";A.focusItem.style.pixelLeft=A.style.pixelLeft;A.focusItem.style.left=A.focusItem.style.pixelLeft+"px";A.focusItem.style.zIndex=A.zIndex+1;A.Menu.hideChildMenu(A)}else{return }}window.ActiveMenuItem=A}function onMenuItemAction(e,l){l=window.ActiveMenuItem;if(!l){return }hideActiveMenus();if(l.mmaction){eval(""+l.mmaction)}window.ActiveMenuItem=0}function MM_clearTimeout(){if(mmHideMenuTimer){clearTimeout(mmHideMenuTimer)}mmHideMenuTimer=null;mmDHFlag=false}function MM_startTimeout(){if(window.ActiveMenu){mmStart=new Date();mmDHFlag=true;mmHideMenuTimer=setTimeout("mmDoHide()",window.ActiveMenu.Menu.hideTimeout)}}function mmDoHide(){if(!mmDHFlag||!window.ActiveMenu){return }var A=new Date()-mmStart;var B=window.ActiveMenu.Menu.hideTimeout;if(A<B){mmHideMenuTimer=setTimeout("mmDoHide()",B+100-A);return }mmDHFlag=false;hideActiveMenus();window.ActiveMenuItem=0}function MM_showMenu(B,H,G,A,E){if(!window.mmWroteMenu){return }MM_clearTimeout();if(B){var D=FIND(E)||document.images[E]||document.links[E]||document.anchors[E];H=moveXbySlicePos(H,D);G=moveYbySlicePos(G,D)}if(document.layers){if(B){var C=B.menuLayer||B;C.top=C.left=1;hideActiveMenus();if(this.visibility){C=this}window.ActiveMenu=C}else{var C=A}if(!C){return }for(var F=0;F<C.layers.length;F++){if(!C.layers[F].isHilite){C.layers[F].visibility="inherit"}if(C.layers[F].document.layers.length>0){MM_showMenu(null,"relative","relative",C.layers[F])}}if(C.parentLayer){if(H!="relative"){C.parentLayer.left=H||window.pageX||0}if(C.parentLayer.left+C.clip.width>window.innerWidth){C.parentLayer.left-=(C.parentLayer.left+C.clip.width-window.innerWidth)}if(G!="relative"){C.parentLayer.top=G||window.pageY||0}if(C.parentLayer.isContainer){C.Menu.xOffset=window.pageXOffset;C.Menu.yOffset=window.pageYOffset;C.parentLayer.clip.width=window.ActiveMenu.clip.width+2;C.parentLayer.clip.height=window.ActiveMenu.clip.height+2;if(C.parentLayer.menuContainerBgColor&&C.Menu.menuBgOpaque){C.parentLayer.document.bgColor=C.parentLayer.menuContainerBgColor}}}C.visibility="inherit";if(C.Menu){C.Menu.container.visibility="inherit"}}else{if(FIND("menuItem0")){var C=B.menuLayer||B;hideActiveMenus();if(typeof (C)=="string"){C=FIND(C)}window.ActiveMenu=C;var I=C.style;I.visibility="inherit";if(H!="relative"){I.pixelLeft=H||(window.pageX+document.body.scrollLeft)||0;I.left=I.pixelLeft+"px"}if(G!="relative"){I.pixelTop=G||(window.pageY+document.body.scrollTop)||0;I.top=I.pixelTop+"px"}C.Menu.xOffset=document.body.scrollLeft;C.Menu.yOffset=document.body.scrollTop}}if(B){window.activeMenus[window.activeMenus.length]=C}MM_clearTimeout()}function onMenuItemDown(C,B){var A=window.ActiveMenuItem;if(document.layers&&A){A.eX=C.pageX;A.eY=C.pageY;A.clicked=true}}function mouseupMenu(A){hideMenu(true,A);hideActiveMenus();return true}function getExplorerVersion(){var C=parseFloat(navigator.appVersion);if(navigator.appName!="Microsoft Internet Explorer"){return C}var B=navigator.appVersion;var A=B.indexOf("MSIE ");if(A>=0){B=B.substring(A+5);C=parseFloat(B)}return C}function mouseoutMenu(){if((navigator.appName=="Microsoft Internet Explorer")&&(getExplorerVersion()<4.5)){return true}hideMenu(false,false);return true}function hideMenu(C,B){var A=window.ActiveMenuItem;if(A&&document.layers){A.document.bgColor=A.saveColor;A.focusItem.top=-30;if(A.hilite){A.hilite.visibility="hidden"}if(C&&A.mmaction&&A.clicked&&window.ActiveMenu){if(A.eX<=B.pageX+15&&A.eX>=B.pageX-15&&A.eY<=B.pageY+10&&A.eY>=B.pageY-10){setTimeout("window.ActiveMenu.Menu.onMenuItemAction();",500)}}A.clicked=false;if(A.Menu.bgImageOver){A.background.src=A.Menu.bgImageUp}}else{if(window.ActiveMenu&&FIND("menuItem0")){if(A){A.style.backgroundColor=A.saveColor;if(A.hilite){A.hilite.style.visibility="hidden"}if(A.hiliteShim){A.hiliteShim.style.visibility="inherit"}if(A.Menu.bgImageUp){A.style.background="url("+A.Menu.bgImageUp+")"}}}}if(!C&&window.ActiveMenu){if(window.ActiveMenu.Menu){if(window.ActiveMenu.Menu.hideOnMouseOut){MM_startTimeout()}return(true)}}return(true)}function hideChildMenu(F){MM_clearTimeout();var B=F;for(var D=0;D<B.Menu.childMenus.length;D++){var I=B.Menu.childMenus[D];if(document.layers){I.visibility="hidden"}else{I=FIND(I);I.style.visibility="hidden";if(I.Menu.menuItemHAlign!="left"){for(var C=0;C<I.Menu.menuItemLayers.length;C++){var M=I.Menu.menuItemLayers[C];if(M.textShim){M.textShim.style.visibility="inherit"}}}}I.Menu.hideChildMenu(I)}if(B.childMenu){var K=B.childMenu;if(document.layers){B.Menu.MM_showMenu(null,null,null,K.layers[0]);K.zIndex=B.parentLayer.zIndex+1;K.top=B.Menu.menuLayer.top+B.Menu.submenuYOffset;if(B.Menu.vertical){if(B.Menu.submenuRelativeToItem){K.top+=B.top+B.parentLayer.top}K.left=B.parentLayer.left+B.parentLayer.clip.width-(2*B.Menu.menuBorder)+B.Menu.menuLayer.left+B.Menu.submenuXOffset}else{K.top+=B.top+B.parentLayer.top;if(B.Menu.submenuRelativeToItem){K.left=B.Menu.menuLayer.left+B.left+B.clip.width+(2*B.Menu.menuBorder)+B.Menu.submenuXOffset}else{K.left=B.parentLayer.left+B.parentLayer.clip.width-(2*B.Menu.menuBorder)+B.Menu.menuLayer.left+B.Menu.submenuXOffset}}if(K.left<B.Menu.container.clip.left){B.Menu.container.clip.left=K.left}var H=K.clip.width+K.left-B.Menu.container.clip.left;if(H>B.Menu.container.clip.width){B.Menu.container.clip.width=H}var E=K.clip.height+K.top-B.Menu.container.clip.top;if(E>B.Menu.container.clip.height){B.Menu.container.clip.height=E}B.document.layers[1].zIndex=0;K.visibility="inherit"}else{if(FIND("menuItem0")){K=FIND(B.childMenu);var J=FIND(B.Menu.menuLayer);var L=K.style;L.zIndex=J.style.zIndex+1;if(document.all||window.mmIsOpera){L.pixelTop=J.style.pixelTop+B.Menu.submenuYOffset;if(B.Menu.vertical){if(B.Menu.submenuRelativeToItem){L.pixelTop+=B.style.pixelTop}L.pixelLeft=B.style.pixelWidth+J.style.pixelLeft+B.Menu.submenuXOffset;L.left=L.pixelLeft+"px"}else{L.pixelTop+=B.style.pixelTop;if(B.Menu.submenuRelativeToItem){L.pixelLeft=J.style.pixelLeft+B.style.pixelLeft+B.style.pixelWidth+(2*B.Menu.menuBorder)+B.Menu.submenuXOffset}else{L.pixelLeft=(J.style.pixelWidth-4*B.Menu.menuBorder)+J.style.pixelLeft+B.Menu.submenuXOffset}L.left=L.pixelLeft+"px"}}else{var G=parseInt(J.style.top)+B.Menu.submenuYOffset;var A=0;if(B.Menu.vertical){if(B.Menu.submenuRelativeToItem){G+=parseInt(B.style.top)}A=(parseInt(J.style.width)-4*B.Menu.menuBorder)+parseInt(J.style.left)+B.Menu.submenuXOffset}else{G+=parseInt(B.style.top);if(B.Menu.submenuRelativeToItem){A=parseInt(J.style.left)+parseInt(B.style.left)+parseInt(B.style.width)+(2*B.Menu.menuBorder)+B.Menu.submenuXOffset}else{A=(parseInt(J.style.width)-4*B.Menu.menuBorder)+parseInt(J.style.left)+B.Menu.submenuXOffset}}L.top=G+"px";L.left=A+"px"}K.style.visibility="inherit"}else{return }}window.activeMenus[window.activeMenus.length]=K}}function hideActiveMenus(){if(!window.activeMenus){return }for(var A=0;A<window.activeMenus.length;A++){if(!activeMenus[A]){continue}if(activeMenus[A].visibility&&activeMenus[A].Menu&&!window.mmIsOpera){activeMenus[A].visibility="hidden";activeMenus[A].Menu.container.visibility="hidden";activeMenus[A].Menu.container.clip.left=0}else{if(activeMenus[A].style){var B=activeMenus[A].style;B.visibility="hidden";B.left="-200px";B.top="-200px"}}}if(window.ActiveMenuItem){hideMenu(false,false)}window.activeMenus.length=0}function moveXbySlicePos(A,B){if(!document.layers){var E=navigator.platform?navigator.platform=="Win32":false;var F=document.all&&!E&&getExplorerVersion()==4.5;var D=B;var C=0;while(D){if(D.leftMargin&&!E){A+=parseInt(D.leftMargin)}if((D.offsetLeft!=C)&&D.offsetLeft){A+=parseInt(D.offsetLeft)}if(D.offsetLeft!=0){C=D.offsetLeft}D=F?D.parentElement:D.offsetParent}}else{if(B.x){A+=B.x}}return A}function moveYbySlicePos(F,A){if(!document.layers){var D=navigator.platform?navigator.platform=="Win32":false;var E=document.all&&!D&&getExplorerVersion()==4.5;var C=A;var B=0;while(C){if(C.topMargin&&!D){F+=parseInt(C.topMargin)}if((C.offsetTop!=B)&&C.offsetTop){F+=parseInt(C.offsetTop)}if(C.offsetTop!=0){B=C.offsetTop}C=E?C.parentElement:C.offsetParent}}else{if(A.y>=0){F+=A.y}}return F}var Browser=function(){this.init()};Browser.getInstance=function(){if(!Browser.instance){Browser.instance=new Browser()}return Browser.instance};Browser.prototype={init:function(){var A=navigator.userAgent.toLowerCase(),B=function(C){return A.indexOf(C)!=-1};this.name=(!(/opera|webtv/i.test(A))&&/msie (\d)/.test(A))?((B("mac")?"ieMac ":"")+"ie ie"+RegExp.$1):B("gecko/")&&/.* (.+)\/(\d)\.[\d.]+$/.test(A)?"gecko "+RegExp.$1+RegExp.$2:B("opera")?"opera":B("konqueror")?"konqueror":B("applewebkit/")?"webkit safari":B("mozilla/")?"gecko":"";this.os=(B("x11")||B("linux"))?"linux":B("mac")?"mac":B("win")?"win":""},addClasses:function(){var B=this.name+" "+this.os;var A=document.getElementsByTagName("html")[0];A.className+=A.className?" "+B:B}};var Validator=function(A){this.setForm(A);this.rules=new Array();Validator.instances.push(this)};Validator.instances=new Array();Validator.getValidator=function(C){var B;if(C){if(typeof C=="string"){C=document.forms[C]}for(var A=0;A<Validator.instances.length;A++){if(Validator.instances[A].form==C){B=Validator.instances[A];break}}if(!B){B=new Validator(C)}}else{C=document.forms[0];if(!Validator.instances.length){B=new Validator(C)}else{if(Validator.instances.length==1){B=Validator.instances[0];if(!B.form||!B.isInDocument(B.form)){B=new Validator(C);Validator.instances[0]=B}}}}if(!B){B=new Validator()}return B};Validator.addRule=function(A){return Validator.getValidator(A.getForm()).addRule(A)};Validator.setRequired=function(A){return Validator.getValidator(rule.getForm()).setRequired(A)};Validator.handleSubmit=function(C,A,B){if(!A){A=Validator.getValidator(C)}if(A){var D=A.validate(C);if(!D&&B&&YAHOO.util.Event){YAHOO.util.Event.stopEvent(B)}return D}};Validator.prototype={setAlertErrorMessages:function(A){if(typeof A=="undefined"){A=true}if(A){this.showErrorMessages=this.alertErrorMessages}},addRule:function(B,A){if(B){B.setValidator(this);this.rules.push(B);if(A){B.validateEmpty=true}}},setRequired:function(B){if(typeof B=="string"){B=B.split(/ *, */)}for(var A=0;A<B.length;A++){this.addRule(new RequiredRule(B[A]))}},setForm:function(A){if(typeof A=="string"){this.form=document.forms[this.form]}else{if(typeof A=="object"){this.form=A}else{if(!A){this.form=document.forms[0]}}}},handleSubmitEvent:function(A){if(!Validator.handleSubmit(this.form,this)){YAHOO.util.Event.stopEvent(A)}},getForm:function(){return this.form},validate:function(E){var A,D,G,B,H=true;for(var C=0;C<this.rules.length;C++){var G=this.rules[C];try{D=G.validate(E)}catch(F){console.log(F);D=false}G.wasValid=D;if(!D){if(!A){try{if(B=G.getInput()){B.focus();A=true}}catch(F){console.log(F)}}H=false}}this.showErrorMessages();return H},showErrorMessages:function(){for(var B=0;B<this.rules.length;B++){try{rule=this.rules[B];if(rule.wasValid){rule.hideErrorMessage()}else{rule.showErrorMessage();var A=rule.getInput();Validator.addClass("invalidValue")}}catch(C){alert(rule.getErrorMessage())}}},alertErrorMessages:function(){var B="";for(var A=0;A<this.rules.length;A++){rule=this.rules[A];if(!rule.wasValid){B+=rule.getErrorMessage()+"\n"}}if(B){alert(B)}},isInDocument:function(A){while(A){A=A.parentNode;if(A==document){return true}}}};Validator.hasClass=function(C,B){var A=new RegExp("(?:^|\\s+)"+B+"(?:\\s+|$)");return A.test(C.className)};Validator.addClass=function(B,A){if(Validator.hasClass(B,A)){return }B.className=B.className+" "+A};Validator.replaceClass=function(D,B,A){if(B===A){return false}if(!Validator.hasClass(D,B)){Validator.addClass(D,A)}else{var C=new RegExp("(?:^|\\s+)"+B+"(?:\\s+|$)","g");D.className=D.className.replace(C," "+A+" ")}};var ValidationRule=function(A,E,D,C,B){this.validator=null;this.elementId=A;this.element=null;this.regEx=E;this.func=D;this.errorMessageId=C;this.wasValid=false;this.validateEmpty=false;if(B){this.validateEmpty=true}};ValidationRule.prototype={setValidator:function(A){this.validator=A},getForm:function(){var A=this.getInput(),B;if(A){B=A.parentNode;while(B){if(B.tagName.toUpperCase()=="FORM"){return B}B=B.parentNode}}},validate:function(A){var C=true;if(!this.getInput()){return true}var B=this.getValue();if(!B&&!this.validateEmpty){return true}if(this.func){if(!this.func(A,this)){C=false}}if(this.regEx){if(!this.regEx.exec(B)){C=false}}return C},getInput:function(){if(!this.element){this.element=document.getElementById(this.elementId);if(!this.element&&this.validator){var B=this.validator.form;for(var A=0;A<B.elements.length;A++){if(B.elements[A].name==this.elementId){this.element=B.elements[A];if(this.element.id){this.elementId=this.element.id}break}}}}return this.element},getValue:function(){return this.getInput().value},showErrorMessage:function(){var A;if(this.errorMessageId){A=document.getElementById(this.errorMessageId);if(A&&!A.innerHTML){this.setErrorMessageText(A,this.getErrorMessage())}}else{A=this.createErrorMessage(this.getErrorMessage())}if(A){Validator.replaceClass(A,"hiddenErrorMessage","visibleErrorMessage");A.style.visibility="visible"}},hideErrorMessage:function(){if(this.errorMessageId){var A=document.getElementById(this.errorMessageId);if(A){Validator.replaceClass(A,"visibleErrorMessage","hiddenErrorMessage");A.style.visibility="hidden"}}},getLabel:function(){return document.getElementById(this.elementId+"_label")},getErrorMessage:function(){return"Please check that you have entered a valid value"},setErrorMessageText:function(B,A){B.innerHTML=A},createErrorMessage:function(B){var E="_0",D=0;do{this.errorMessageId=this.elementId+"_errorMessage"+E;D++;E="_"+D}while(document.getElementById(this.errorMessageId));var C=document.createElement("DIV");C.id=this.errorMessageId;C.innerHTML=B;if(D){C.suffix=D}var A=this.getInput();return A.parentNode.insertBefore(C,A)},setValidateEmpty:function(A){this.validateEmpty=A}};var RequiredRule=function(A,B){this.elementId=A;if(B){this.errorMessageId=B}};RequiredRule.prototype=new ValidationRule();RequiredRule.prototype.parentClass=ValidationRule.prototype;RequiredRule.prototype.constructor=ValidationRule;RequiredRule.prototype.validate=function(E){var B=this.getInput();var G=false;if(B){if(B.tagName=="SELECT"){for(var C=0;C<B.options.length;C++){var D=B.options[C];if(D.selected&&D.value&&(D.value!="__NULL__")){G=true;break}}}else{if(B.type=="radio"){for(var C=0;C<E.elements.length;C++){if(E.elements[C].name==B.name){if(E.elements[C].checked){G=true;break}}}}else{if(B.type=="checkbox"){if(B.checked){G=true}}else{if(B.tagName=="DIV"){for(var C=0;C<B.childNodes.length;C++){var F=B.childNodes[C];if(F.tagName=="INPUT"){if(F.type=="radio"&&F.checked){G=true;break}}}}else{if(B.value){G=true}}}}}}else{var A=this.elementId.length;for(var C=0;C<E.elements.length;C++){if(this.elementId==E.elements[C].id.substr(0,A)){if(E.elements[C].checked){G=true;break}}}}return G};RequiredRule.prototype.getErrorMessage=function(){var A=this.getInput();var B=this.getLabel();var C="";if(B&&B.firstChild&&B.firstChild.nodeValue){B=" for "+B.firstChild.nodeValue.toLowerCase()}else{B=""}if(A){if(A.tagName=="SELECT"){return"Please select an option"+B}else{if(A.type=="radio"||A.type=="checkbox"){return"Please make a selection"+B}else{if(A.type=="file"){return"Please make sure that you have selected a file to upload"}}}}return"Please enter a value"+B};var EmailAddressRule=function(A,C,B){this.elementId=A;if(C){this.errorMessageId=C}this.regEx=new RegExp("^[a-z0-9_.-]+@[a-z0-9_.-]+(.[a-z0-9_.-]+)*$","i");if(B){this.validateEmpty=true}};EmailAddressRule.prototype=new ValidationRule();EmailAddressRule.prototype.parentClass=ValidationRule.prototype;EmailAddressRule.prototype.constructor=ValidationRule;EmailAddressRule.prototype.getErrorMessage=function(){return"Please check that you have entered a valid email address"};if(console==undefined){var console={};with(console){log=debug=info=warn=error=time=timeEnd=profile=profileEnd=trace=group=groupEnd=dir=dirxml=function(){}}};
