function Hg(){this.Init()}v("AdfDhtmlZOrderManager",Hg);z.l(Hg);
Hg.da=function(){var a=["__af_Z_maskingframe","__af_Z_window","__af_Z_tooltip"];this.bL="DhtmlZOrderManagerLayerContainer";v("AdfDhtmlZOrderManager.LAYERCONTAINER",Hg.bL);this.XD=a[1];v("AdfDhtmlZOrderManager.FLOATINGTYPE_WINDOW",Hg.XD);this.XS=a[2];v("AdfDhtmlZOrderManager.FLOATINGTYPE_TOOLTIP",Hg.XS);this.h3=a[0];v("AdfDhtmlZOrderManager.FLOATINGTYPE_MASKINGFRAME",Hg.h3);this.yla=a;v("AdfDhtmlZOrderManager.LAYERIDS",Hg.yla);this.TKa="AFZOrderLayerContainer";this.S3="AFZOrderLayer";v("AdfDhtmlZOrderManager.LAYER_STYLECLASS",
Hg.S3);this.Zoa=Math.pow(2,31)-2;this.d7a=3;this.RGa="about:blank";this.ww="data-afr-fid";this.GU="data-afr-inuse"};v("AdfDhtmlZOrderManager.InitClass",Hg.da);Hg.prototype.Init=function(){Hg.f.Init.call(this);this.$O={};this.YXa=w.b.G()==w.ed};z.a("AdfDhtmlZOrderManager.prototype.Init",{Init:Hg.prototype.Init});Hg.jga=function(){return Hg.Zoa};v("AdfDhtmlZOrderManager.getMaxZIndex",Hg.jga);Hg.prototype.Bb=function(){this.$O=n};z.a("AdfDhtmlZOrderManager.prototype.dispose",{Bb:Hg.prototype.Bb});
Hg.prototype.jp=function(a,b,d,e){qh(this,e);b=e?M.Na(e,b):b;rh(this,b).addElement(a,d)};z.a("AdfDhtmlZOrderManager.prototype.addElementToLayer",{jp:Hg.prototype.jp});Hg.prototype.bk=function(a){var b=a.parentNode,d=b.parentNode.getAttribute(Hg.ww);qh(this,d);b=b.getAttribute("id");B.Wa(b);(b=rh(this,b))&&b.bk(a);Gg.scope(a)};z.a("AdfDhtmlZOrderManager.prototype.raiseToFront",{bk:Hg.prototype.bk});Hg.Wta=function(a){B.s(a);return a.split(":").join("$")+"$key"};
function rh(a,b){var d=Hg.Wta(b),e=a.$O[d];return e&&!e.ey()?(delete a.$O[d],n):e}function sh(a,b){var d=rh(a,b);if(d)return d.ey();d=F.c.w().createElement("div");d.setAttribute("id",b);d.style.zIndex=Hg.Zoa;return d}
function qh(a,b){var d;d=Hg.bL;d=b?M.Na(b,d):d;d=w.b.getElementById(d);if(!d){d=Hg.yla;var e=Hg.bL,e=b?M.Na(b,e):e,e=sh(a,e);H.n(e,Hg.TKa);b&&e.setAttribute(Hg.ww,b);for(var f=Hg.S3,g=0;g<d.length;g++){var h=b?M.Na(b,d[g]):d[g],m=sh(a,h),q=new ph(h),h=a,s=e,y=m,A=q.getId(),A=Hg.Wta(A);h.$O[A]=q;s.appendChild(y);w.b.wa(s);H.n(m,f)}th(e);d=e}Hg.M$(b).lastChild!=d&&(e=d.getAttribute(Hg.ww),e=Hg.M$(e),d.parentNode!=e?th(d):(e.removeChild(d),e.appendChild(d)))}
function th(a){var b=a.getAttribute(Hg.ww),b=Hg.M$(b);a.parentNode!=b&&(b.appendChild(a),w.b.wa(a))}Hg.prototype.vC=function(a){if(a==n)return p;var b=Hg.bL;for(a=a.parentNode;a;a=a.parentNode)if(1==a.nodeType){var d=a.getAttribute("id");if(d){var d=d.split(":"),e=d.length;if(1<e&&b==d[e-1])return l}}return p};z.a("AdfDhtmlZOrderManager.prototype.containsElement",{vC:Hg.prototype.vC});Hg.prototype.wi=function(){var a=0,b=this.$O;for(id in b){var d=b[id];d&&d.ey()&&(a+=d.Gfa())}return a};
z.a("AdfDhtmlZOrderManager.prototype.getElementCount",{wi:Hg.prototype.wi});Hg.prototype.Ci=function(a){if(a.parentNode){Gg.ZEa(a);var b=a.parentNode.getAttribute("id");B.Wa(b);b=rh(this,b);B.zc(b);b.Ci(a)}};z.a("AdfDhtmlZOrderManager.prototype.removeElement",{Ci:Hg.prototype.Ci});Hg.M$=function(a){return(a=w.b.getElementById(a))?a:F.c.w().body};
Hg.prototype.Py=function(a){var b;if(a){var d=Hg.bL;for(a=a.parentNode;a;a=a.parentNode)if(1==a.nodeType){var e=a.getAttribute("id");if(e){var e=e.split(":"),f=e.length;if(1<f&&e[f-1]==d){b=a.getAttribute(Hg.ww);break}}}}qh(this,b);a=Hg.h3;d=b?M.Na(b,a):a;d=rh(this,d);delete d.jea;d.pja(Hg.FUa);e=d.jea;delete d.jea;e||(e=this.YXa?"DIV":"IFRAME",e=d.ey().ownerDocument.createElement(e),this.Ry(e),"IFRAME"==e.tagName&&(e.src=Hg.RGa,e.setAttribute("aria-hidden",l)),e.setAttribute(Hg.GU,p),this.jp(e,a,
n,b));return e};z.a("AdfDhtmlZOrderManager.prototype.prepareMaskingFrame",{Py:Hg.prototype.Py});Hg.FUa=function(a,b){return"false"==b.getAttribute(Hg.GU)?(a.jea=b,l):p};Hg.prototype.yC=function(a){a=this.Py(a);a.setAttribute(Hg.GU,l);a.style.zIndex=1;return a};z.a("AdfDhtmlZOrderManager.prototype.createMaskingFrame",{yC:Hg.prototype.yC});
Hg.prototype.Ry=function(a){a.frameBorder="0";a.className="AFMaskingFrame";var b=a.style;b.visibility="hidden";b.width="0px";b.height="0px";b.left="0px";b.top="0px";b.zIndex=0;a.setAttribute(Hg.GU,p)};z.a("AdfDhtmlZOrderManager.prototype.removeMaskingFrame",{Ry:Hg.prototype.Ry});z.kb(Hg);