var im=M.U(M,"AdfDhtmlMenuPeer",p);v("AdfDhtmlMenuPeer",im);im.m=function(){z.kb(W);M.ha(this,I.Xc,I.Xf,I.tc,I.Dd,I.qd,I.ec,I.Wf);M.ha(this,I.Qd,I.Ve);M.hb(this,AdfRichMenu.DISABLED,AdfRichMenu.VISIBLE,AdfRichMenu.TEXT);this.kda=[];this.jn=[];this.XNa=3;this.PKa=15;this.ypa=300;var a=E.cL,b=E.qj|E.uh;this.yxa=E.gg(a,b);a=E.dF;b=E.qj|E.uh;this.dva=E.gg(a,b)};v("AdfDhtmlMenuPeer.InitSubclass",im.m);
im.prototype.Init=function(a){a.getParent();im.f.Init.call(this,a);a=F.c.u();a=parseInt(a.ka("af|menu-tr-visible-items"));this.pY=isNaN(a)?14:a;this.ep=this.Oo=this.RX=p};z.a("AdfDhtmlMenuPeer.prototype.Init",{Init:im.prototype.Init});im.prototype.q=function(a,b){if("1"==b.getAttribute(W.U3)){var d=a.e();im.gRa(d)}};z.a("AdfDhtmlMenuPeer.prototype.InitDomElement",{q:im.prototype.q});im.rC=function(){im.NY&&(window.clearTimeout(im.NY),delete im.NY,delete im.uH)};
v("AdfDhtmlMenuPeer.cancelShowing",im.rC);
im.prototype.show=function(a,b){var d=this.h(),e=this.d(),f=e.e();H.n(d,W.Pg);!this.In()&&this.ev()&&W.gEa(f);b==n&&a!=n&&(d=a.focus,b=d!=n?d:this.In()?l:p);fp(this);if("noContent"==this.gx())this.$P("fetching"),f={},f.e$a=gp(this),this.EYa=a,this.DYa=b,(new Nf(e,Nf.kj,f)).v(),this.Ada();else if("fetching"==this.gx())D.i.info("Currently waiting on menu content fetch: "+e.e());else if(d=hp(this),"block"==d.style.display)f=w.b,f.R().gj&&f instanceof ee?O.Qh(d):b&&O.ra(this.ya);else{this.kg();var g=
ip(this,a,b);d.style.display="block";var h=this.iUa;h||(d.style.visibility="hidden");this.fe(e,d,g,f);if(!h){e=w.b;this.d().getDetachable()&&(g=M.g(f,"close"),this.u9=e.getElementById(g),this.t9=this.o(this.s9),e.S(this.u9,"click",this.t9),g=M.g(f,"handle"),this.ix=e.getElementById(g),this.Lda=this.o(this.VZa),e.S(this.ix,"mousedown",this.Lda));g=M.g(f,"ScrollContent");this.IH=e.getElementById(g);h=this.IH.rows;if(h.length<this.pY)this.YM=p;else{g=[];for(i=0;i<h.length;i++){var m=h[i];"none"!=m.style.display&&
g.push(m)}if(this.YM=g.length>this.pY)h=M.g(f,"ScrollUp"),this.iu=e.getElementById(h),this.iu.style.display="block",h=M.g(f,"sUpBg"),this.qda=e.getElementById(h),h=M.g(f,"ScrollDown"),this.hu=e.getElementById(h),this.hu.style.display="block",h=M.g(f,"sDwnBg"),this.nda=e.getElementById(h),f=M.g(f,"ScrollBox"),this.Il=e.getElementById(f),this.Il.style.height=g[this.pY].offsetTop-2-g[0].offsetTop+"px"}d.style.visibility="";this.iUa=l;this.YM&&jp(this)}this.YM&&this.Vn();this.d().getDetachable()&&(kp(this)&&
this.li==n)&&(this.li=new lh(lp(this),this.ix),this.li.F1(this.o(this.Aua)),this.li.D1(this.o(this.tua)))}};z.a("AdfDhtmlMenuPeer.prototype.show",{show:im.prototype.show});im.prototype.fe=function(a,b,d,e){W.Dea(e);im.f.fe.call(this,a,b,d,e)};z.a("AdfDhtmlMenuPeer.prototype.showPopup",{fe:im.prototype.fe});im.prototype.ob=function(){var a=this.d(),b=a.e();b==im.zH&&im.Pya();this.rh()||(mp(this,b),im.f.ob.call(this,a,b),this.d().getDetachable()&&(this.li&&this.li.ud(),delete this.li))};
z.a("AdfDhtmlMenuPeer.prototype.hidePopup",{ob:im.prototype.ob});im.prototype.Xi=function(){var a=this.d(),b=a.e();this.rh()?b==im.zH&&im.Pya():(mp(this,b),D.i.finest("menuBar auto open mode, set to OFF due to cancel popup event"),W.uv(p),im.f.Xi.call(this,a,b))};z.a("AdfDhtmlMenuPeer.prototype.cancelPopup",{Xi:im.prototype.Xi});
im.prototype.close=function(a,b){var d=this.d();if(this.rh()){H.n(hp(this),W.UD);if(this.HN&&this.IN){var e=this.li.La();e.style.left=this.HN;e.style.top=this.IN}b||this.hr();e=d.e();im.YY(e);im.f.ob.call(this,d,e)}else this.In()?d.getParent().rb():(a?this.ob():np(this),b||this.hr())};z.a("AdfDhtmlMenuPeer.prototype.close",{close:im.prototype.close});im.prototype.rh=r("RX");z.a("AdfDhtmlMenuPeer.prototype.isDetached",{rh:im.prototype.rh});
im.prototype.In=function(){return this.d().getParent()instanceof AdfRichPopup};z.a("AdfDhtmlMenuPeer.prototype.isContextMenu",{In:im.prototype.In});im.prototype.ev=function(){return 1==gp(this)};z.a("AdfDhtmlMenuPeer.prototype.isRootMenu",{ev:im.prototype.ev});
im.prototype.Vn=function(){if(this.YM){for(var a=this.IH.rows,b=a.length,d=0,e=0,f=0;f<b;f++){var g=a[f];if("none"!=g.style.display){d=f;break}}for(f=b-1;-1<f;f--)if(g=a[f],"none"!=g.style.display){e=f;break}b=w.b;f=g=p;g=b.Uc(this.Il);d=b.Uc(a[d]);a=b.Uc(a[e]);f=90<=100*((g.bottom-a.top)/(a.bottom-a.top));(g=90<=100*((d.bottom-g.top)/(d.bottom-d.top)))?(H.n(this.iu,M.gb),H.n(this.qda,M.gb)):(H.F(this.iu,M.gb),H.F(this.qda,M.gb));f?(H.n(this.hu,M.gb),H.n(this.nda,M.gb)):(H.F(this.hu,M.gb),H.F(this.nda,
M.gb))}};z.a("AdfDhtmlMenuPeer.prototype.updateScrollIconsState",{Vn:im.prototype.Vn});im.prototype.kg=function(){this.ya&&this.ya.setAttribute("tabIndex","-1");var a=hp(this);this.ya=O.pD(a,{F0:l,E0:l})};z.a("AdfDhtmlMenuPeer.prototype.resetActiveDescendant",{kg:im.prototype.kg});
im.prototype.Ab=function(a,b){if("fetching"!=this.gx())im.f.Ab.call(this,a,b);else{var d=H.ca(a);if(d==n)D.i.warning("Unexpected element received by AdfDhtmlMenuPeer.prototype.ReplaceDomElement"),im.f.Ab.call(this,a,b);else{this.h().appendChild(d);w.b.wa(d);this.$P("contentLoaded");var d=this.d(),e=this.h().getAttribute("id"),e=M.g(e,"lazy-fetch-message");im.f.ob.call(this,d,e);this.show(this.EYa,this.DYa)}}};z.a("AdfDhtmlMenuPeer.prototype.ReplaceDomElement",{Ab:im.prototype.Ab});
im.prototype.Va=function(a,b){var d=this.h();W.kh(d,l,p);b.style.display="none";im.f.Va.call(this,a,b);d.appendChild(b);this.In()&&(d=a.getParent(),rc.Xra(d,b),d.k().Va(d,n))};z.a("AdfDhtmlMenuPeer.prototype.PopupClosed",{Va:im.prototype.Va});im.prototype.vb=function(){W.wS();if(1<gp(this)&&!kp(this)){im.uH==this&&im.rC();var a=this.h();H.F(a,W.Pg);H.F(a,W.Bf)}};z.a("AdfDhtmlMenuPeer.prototype.HandleComponentMouseOut",{vb:im.prototype.vb});
im.prototype.pa=function(a){if(!a.na()&&!this.Gd()){var b=this.h(),d=a.ia(),e=1<gp(this),f=this.d(),g=a.getSource();switch(d){case E.fi:g!=f&&(f=O.Zl(hp(this)),this.tu(f),O.ra(f),a.cancel());return;case E.nm:g!=f&&(f=O.KC(hp(this)),this.tu(f),O.ra(f),a.cancel());return;case E.$a:this.Oo&&(H.n(b,W.Bf),this.show(n,l));this.Oo=p;a.cancel();return;case E.zd:this.ep&&(H.n(b,W.Bf),this.show(n,l));this.ep=p;a.cancel();return;case E.xh:this.rh()?(this.s9(),a.cancel()):e?b!=F.c.Qc&&(this.focus(f),this.close(l,
l),a.cancel()):this.In()?(W.Rj(),b.blur(),this.focus(f),f=f.getParent(),f.k().rb(f),a.cancel()):(D.i.finest("menuBar auto open mode, set to OFF due to escape pressed while on a root menu"),W.uv(p),W.Rj(l));return}b=kp(this);d=this.ev();f=a.getSource()==f;if(b&&d||!f)f=this.IH||hp(this),im.HWa(f,a)}};z.a("AdfDhtmlMenuPeer.prototype.HandleComponentKeyUp",{pa:im.prototype.pa});
im.prototype.ba=function(a){if(!a.na()&&!this.Gd()){var b=a.ia(),d=w.b;b==E.$a?(this.Oo=l,a.cancel(),a.dc()):b==E.zd?(this.ep=l,a.cancel(),a.dc()):d.oy()==I.ec&&this.Ak(b,a)}};z.a("AdfDhtmlMenuPeer.prototype.HandleComponentKeyDown",{ba:im.prototype.ba});im.prototype.zb=function(a){if(!a.na()&&!this.Gd()&&w.b.oy()==I.Wf){var b=a.ia();this.Ak(b,a)}};z.a("AdfDhtmlMenuPeer.prototype.HandleComponentKeyPress",{zb:im.prototype.zb});
im.prototype.Ha=function(a){var b=a.getSource(),d=this.d();b==d?(b=this.h(),1<gp(this)?H.n(b,W.Pg):W.Mp()?(W.kh(b,l),H.n(b,W.Bf),this.show(n,p)):W.By(b)):b.getParent()==d&&(b=b.e(),b=w.b.getElementById(b),(b=O.Zl(b))&&b!=this.ya&&this.tu(b));a.cancel()};z.a("AdfDhtmlMenuPeer.prototype.HandleComponentFocus",{Ha:im.prototype.Ha});
im.prototype.Ka=function(a){op(this);if(this.Gd())W.Mp()&&this.ev()&&W.Rj(p);else if(!a.na()){var b=w.b,d=a.L(),e=this.h();b.Zh(d,e)&&(a.cancel(),this.In()||(a=this.d(),1<gp(this)?(H.n(e,W.Pg),W.kh(e,p),im.rC(),im.NY=F.c.R().setTimeout(this.o(this.zTa),im.ypa),im.uH=this,O.Vl(e)||this.focus(a)):!kp(this)&&!W.Mp()?W.By(e):(W.Mp()&&(W.kh(e,l),H.n(e,W.Bf),this.show(n,p)),O.Vl(e)||this.focus(a))))}};z.a("AdfDhtmlMenuPeer.prototype.HandleComponentMouseOver",{Ka:im.prototype.Ka});
im.prototype.qa=function(a){if(!this.Gd()&&a.Jb()){var b=w.b,d=a.L(),e=this.h(),f=this.iu&&b.Zh(d,this.iu);a=this.hu&&b.Zh(d,this.hu);f||a?(b.G()==w.aa&&(d=f?this.iu:this.hu,d!=F.c.Qc&&(d.tabIndex=0,d.focus(),d.tabIndex=-1)),b.cd()[w.Vc]!=w.Wc?pp(this,a,l):pp(this,a)):b.Zh(d,e)&&(b.va(d),H.n(e,W.Bf),this.In()||(b=F.c.R(),b=Boolean(b.gj&&w.b instanceof ee),1<gp(this)?this.show(n,b):kp(this)?(this.close(l,l),D.i.finest("menuBar auto open mode, set to OFF due to menu clicked while menu IS visible"),
W.uv(p)):(this.show(n,b),D.i.finest("menuBar auto open mode, set to ON due to menu clicked while menu IS NOT visible"),W.uv(l))))}};z.a("AdfDhtmlMenuPeer.prototype.HandleComponentMouseDown",{qa:im.prototype.qa});im.prototype.cc=function(a){if(!this.Gd()&&a.Jb()){var b=w.b,d=a.L();this.ix&&H.F(this.ix,W.Bf);a=this.iu&&b.Zh(d,this.iu);b=this.hu&&b.Zh(d,this.hu);if(a||b)qp(this),this.Vn()}};z.a("AdfDhtmlMenuPeer.prototype.HandleComponentMouseUp",{cc:im.prototype.cc});
im.prototype.Eb=function(){var a=this.h(),b=!(1<gp(this)),d=1<gp(this)&&!kp(this),e=1<gp(this)&&kp(this)&&this.rh();(b||d||e)&&H.F(a,W.Pg);(this.rh()||!kp(this))&&H.F(a,W.Bf)};z.a("AdfDhtmlMenuPeer.prototype.HandleComponentBlur",{Eb:im.prototype.Eb});
im.prototype.Z=function(a){var b=a.e();W.nha(b)?this.ob():this.rh()&&this.s9();if(this.d().getDetachable()){var d=w.b,e=this.t9;e&&d.sa(this.u9,"click",e);delete this.u9;delete this.t9;(e=this.Lda)&&d.sa(this.ix,"mousedown",e);delete this.ix;delete this.Lda}1<gp(this)||im.N_a(b);delete this.Kba;delete this.iu;delete this.hu;delete this.qda;delete this.nda;delete this.Il;delete this.IH;im.f.Z.call(this,a)};z.a("AdfDhtmlMenuPeer.prototype.ComponentRemoved",{Z:im.prototype.Z});
im.prototype.Od=function(a,b,d){W.Y0(a,b,d,hp(this))};z.a("AdfDhtmlMenuPeer.prototype.ComponentDisabledChanged",{Od:im.prototype.Od});im.prototype.fk=function(a,b,d,e){im.f.fk.call(this,a,b,d,e);W.Z0(a,b,d,hp(this))};z.a("AdfDhtmlMenuPeer.prototype.ComponentVisibleChanged",{fk:im.prototype.fk});im.prototype.Qf=function(a,b,d,e){return e!=n&&(b=H.Ua(b,"A"))?H.zy(a,b,d):p};z.a("AdfDhtmlMenuPeer.prototype.ComponentTextChanged",{Qf:im.prototype.Qf});im.prototype.Aa=function(){return ng.JBa()};
z.a("AdfDhtmlMenuPeer.prototype.GetInlineEditor",{Aa:im.prototype.Aa});im.prototype.T1=da("pY");z.a("AdfDhtmlMenuPeer.prototype.setVisibleItems",{T1:im.prototype.T1});im.prototype.uc=function(a){this.bind(a);if(this.ev()){a=this.Ee(a);var b=a!=n?a.k():n;b&&b.uc&&b.uc(a)}};z.a("AdfDhtmlMenuPeer.prototype.__preferredSizeChangeNotify",{uc:im.prototype.uc});
im.Pya=function(){var a=im.zH;if(a!=n){if(a=F.c.j(a))if((a=a.k())&&a instanceof im&&a.li){var b=a.li.La();b.style.left=a.HN;b.style.top=a.IN;var b={y:a.IN,x:a.HN},d=lp(a);d&&d.Ty(b);rp(a)}im.zH=n}};im.fva=function(){if(!ya.Bc(im.jn)){var a,b=im.gY;b==n?a=im.jn[0]:(a=im.jn.length,1==a?a=im.jn[0]:(b=ya.indexOf(im.jn,b),a=b>=a-1?im.jn[0]:im.jn[b+1]));if(b=F.c.j(a)){var d=b.k();d.bind(b);(d.ya==n||!O.AJ(d.ya))&&d.kg();O.ra(d.ya);im.gY=a}else im.YY(a),im.fva()}};
im.qRa=function(a){var b=w.b;if(ya.Bc(im.jn)){if(b.G()==w.ed){var d=F.c.w();b.S(d,"keypress",im.qta)}F.c.Qy(im.dva,im.fva)}0>ya.indexOf(im.jn,a)&&(im.gY=a,im.jn.push(a))};im.YY=function(a){ya.Of(im.jn,a);var b=ya.Bc(im.jn);if(b||a==im.gY)im.gY=n;b&&(F.c.Cv(im.dva),a=w.b,a.G()==w.ed&&(b=F.c.w(),a.sa(b,"keypress",im.qta)))};im.qta=function(a){var b=w.b.ia(a);a.ctrlKey&&(a.shiftKey&&b==E.dF)&&w.b.va(a)};im.fZa=function(){im.bVa()};im.gRa=function(a){var b=im.kda;0==b.length&&F.c.Qy(im.yxa,im.fZa);b.push(a)};
im.N_a=function(a){var b=im.kda;ya.Of(b,a);0==b.length&&F.c.Cv(im.yxa)};im.bVa=function(){var a=im.kda;B.assert(1<a.length);var a=F.c.j(a[0]),b=a.getParent();B.assert(!(b instanceof AdfRichMenu));a=a.k();if(!a.nya){b=a.h().parentNode;do var d=b.getAttribute("id"),b=b.parentNode;while(!d&&b);d&&(a.nya=d)}a=w.b.getElementById(a.nya);O.Sj(a)};
im.HWa=function(a,b){var d=b.gg(),e=d.k0();if(!(e&E.uh||e&E.lm||e&E.mo)){e&E.qj&&(e>>=E.qj,d=E.gg(d.ia(),e));for(var d=d.eq().toUpperCase(),e=a.getElementsByTagName("tr"),f=e.length,g=0;g<f;g++){var h=e[g];if(h&&1==h.nodeType){var m=h.getAttribute("accessKey");if(m&&d==m.toUpperCase()){O.ra(h);b.cancel();break}}}}};
im.prototype.Ak=function(a,b){var d=b.L();if(d.ctrlKey){if(this.rh()||this.li&&kp(this))if(d=w.b.G()==w.aa?187==a:61==a,b.L().altKey&&d)sp(this,0,0),b.cancel();else{d=l;switch(a){case E.Ya:sp(this,0,-20);break;case E.Ja:sp(this,0,20);break;case E.Kb:sp(this,-20,0);break;case E.Lb:sp(this,20,0);break;default:d=p}d&&b.cancel()}}else if(!d.altKey&&(!d.shiftKey&&!d.metaKey)&&b.getSource()!=this.d())switch(d=b.getSource().k().h(),a){case E.Ya:B.p(this.ya);B.assert(d==this.ya);this.ya||(D.i.warning("Menu has lost its assigned activeDescendant!"),
this.kg());d=O.CI(hp(this),d,l);B.p(d);this.ya=d;this.Vn();b.cancel();break;case E.Ja:B.p(this.ya);B.assert(d==this.ya);this.ya||(D.i.warning("Menu has lost its assigned activeDescendant!"),this.kg());d=O.BI(hp(this),d,l);B.p(d);this.ya=d;this.Vn();b.cancel();break;case E.Kb:d=this.d();this.ev()?(this.focus(d),this.close(l,l),W.U5a=p):!this.rh()&&!this.In()&&(this.focus(d),this.close(l,l));b.cancel();break;case E.Lb:d=b.getSource(),d instanceof AdfRichMenu?(d.k().show(n,l),b.cancel()):this.rh()||
this.In()?b.cancel():this.ev()&&(d=this.d(),this.focus(d),this.close(l,l),D.i.finest("menuBar auto open mode, set to OFF due to right arrow key pressed on root menu item"),W.uv(p),b.cancel())}};im.prototype.VZa=function(a){w.b.va(a);H.n(this.ix,W.Bf)};
function ip(a,b,d){var e={},f=a.h(),g=a.d();e.type="menu";e.autodismiss="autodismissMenu";e.alignElement=f;e.focus=d?l:p;d=g.getText();d==n&&(d=g.getShortDesc());e.title=d;e.animate=AdfRichPopup.wja;e.closeOnEscape=p;if(b==n||b.mousePosition==n)1<gp(a)||W.ej(f)?e[AdfRichPopup.fd]=AdfRichPopup.bz:e[AdfRichPopup.fd]=AdfRichPopup.of;ya.qb(e,b);return e}
im.prototype.Ada=function(){var a=w.b,b=this.d(),d=this.h().getAttribute("id"),d=M.g(d,"lazy-fetch-message"),a=a.getElementById(d),a=H.ca(a),e=ip(this,n,p);e.type="inlineSelector";H.setVisible(a,l);im.f.fe.call(this,b,a,e,d)};
function fp(a){if(a.rh()){var b=a.d().e();im.zH=b;W.Dea(b);im.YY(b);tp(a);var b=F.c.bm(),d=a.h(),e=hp(a),f=AdfRichPopup.bz,g=e.clientHeight-4,e=e.clientWidth+qg.Fp(),b=b.o_(g,e,f,d,n);a.RX=p;F.c.Ac()?(b={left:b.x,top:b.y},H.F(hp(a),W.UD),d=a.li.La(),Qg(3,300,[{element:d,ib:b}],n,im.LRa,[a,b.y,b.x])):(jp(a),(d=lp(a))&&d.Ty(b),H.F(hp(a),W.UD))}}im.LRa=function(a){var b=a[0],d=a[1];a=a[2];jp(b);d={y:d,x:a};(b=lp(b))&&b.Ty(d)};
function up(a,b){var d=a.h(),d=H.sb(d,b);if("noContent"==a.gx())return d;var e=H.oc(hp(a),b);return d||e}function gp(a){if(!a.kua){var b=a.h();a.kua=parseInt(b.getAttribute(W.U3))}return a.kua}u=im.prototype;u.Gd=function(){var a=this.h();return a.disabled||H.ta(a,M.gb)};function mp(a,b){B.assert(!a.rh(),"this method is not intended for detached menus");if(a.ev()){var d=a.h();H.F(d,W.Bf);H.F(d,W.Pg)}im.uH&&up(a,im.uH.h())&&im.rC();a.Il&&(a.Il.scrollTop=0);W.Vha(b)}
u.Aua=function(){this.hr();tp(this);var a=this.h();W.kh(a,l);a=this.li.La();this.HN=a.style.left;this.IN=a.style.top;a=this.d().e();W.Vha(a);im.qRa(a);D.i.finest("menuBar auto open mode, set to OFF due to menu first becoming detached");W.uv(p)};u.tua=function(){var a=lp(this);B.assert(a!=n,"menuPopup should not disappear during a drag.");if(a){a.VJ(n);var b={y:a.oJ(),x:a.YI()};a.Ty(b);rp(this);jp(this);a.Nh();W.Rj()}};function np(a,b){a.MY&&op(a);a.MY=F.c.R().setTimeout(a.o(a.yTa),im.ypa-b)}
u.yTa=function(){var a=this.d();this.Qa(a,a.e())&&this.ob()};u.zTa=function(){var a=this.d();this.Qa(a,a.e())?fp(this):(delete im.uH,delete im.NY,this.show(n,p))};function op(a){if(a.MY){window.clearTimeout(a.MY);delete a.MY;var b=im.uH;b&&gp(b)<=gp(a)&&im.rC()}}u.n8=function(){rp(this)};z.a("AdfDhtmlMenuPeer.prototype.__makeDetached",{n8:im.prototype.n8});
function rp(a){H.F(a.ix,W.Bf);var b=a.li.La();a.RX=l;a.HN=b.style.left;a.IN=b.style.top;H.n(hp(a),W.UD);W.kh(a.h().parentNode,l,l);lp(a).Lr()}im.prototype.hr=function(){var a=this.h();H.F(a,W.Pg);H.F(a,W.Bf)};im.prototype.s9=function(){var a=this.d(),b=a.e();H.F(hp(this),W.UD);this.RX=p;var d=this.h();H.F(d,W.Pg);im.YY(b);this.li&&this.li.ud();delete this.li;b==im.zH&&(im.zH=n);im.f.ob.call(this,a,b);W.Rj();W.bia()};
function sp(a,b,d){a.Aua();var e=a.li.La();e.style.left=e.offsetLeft+b+"px";e.style.top=e.offsetTop+d+"px";a.tua()}function vp(a){a=lp(a);if(a!=n&&a.kf()!=n)return a.kf()}function tp(a){a=vp(a);qg.yi(a)&&qg.wv(a,p)}function jp(a){a=vp(a);a!=n&&qg.yi(a)&&(qg.ms(a),qg.wv(a,l))}im.prototype.w8=function(a,b){pp(this,a,b)};z.a("AdfDhtmlMenuPeer.prototype.__startScroll",{w8:im.prototype.w8});function pp(a,b,d){a.VP=im.XNa;d&&(a.VP=im.PKa);b||(a.VP*=-1);d?a.Aza():(b=a.o(a.Aza),a.oda=setInterval(b,10))}
function qp(a){a.oda&&clearInterval(a.oda);a.oda=n;var b=a.Il.scrollTop,d=a.IH.rows,e=d.length;if(0>a.VP)for(var f=e-1;-1<f;f--){var g=d[f];if("none"!=g.style.display&&(e=g.offsetTop,b>=e)){a.Il.scrollTop=e;break}}else for(var h=b+a.Il.offsetHeight,f=0;f<e;f++)if(g=d[f],"none"!=g.style.display&&(g=g.offsetTop+g.offsetHeight,h<=g)){a.Il.scrollTop=b+(g-h);break}}
im.prototype.Aza=function(){this.Il.scrollTop+=this.VP;var a=this.Il.scrollTop,b=this.IH.offsetHeight-this.Il.offsetHeight;(0>=a||a>=b)&&qp(this);this.Vn()};function hp(a){if(a.Kba==n){var b=a.h().getAttribute("id"),b=M.g(b,"menu");a.Kba=w.b.getElementById(b)}return a.Kba}function lp(a){var b=a.d(),d=b.e();return a.bs(b,d)}function kp(a){return lp(a)?l:p}im.prototype.vJ=function(){return this.au!=n&&"contentLoaded"==this.au};z.a("AdfDhtmlMenuPeer.prototype.isContentLoaded",{vJ:im.prototype.vJ});
im.prototype.gx=function(){this.au==n&&(this.au=hp(this)==n?"noContent":"contentLoaded");return this.au};im.prototype.$P=da("au");im.prototype.tu=function(a){B.p(a);this.ya&&this.ya.setAttribute("tabIndex","-1");a.setAttribute("tabIndex","0");this.ya=a};im.prototype.Ki=function(a,b,d){im.f.Ki.call(this,a,b,d);this.In()||kp(this)||this.show(n,p)};z.a("AdfDhtmlMenuPeer.prototype.SimulateMouseOnDescendant",{Ki:im.prototype.Ki});