function AdfDhtmlPopupLayer(){this.Init()}AdfObject.createSubclass(AdfDhtmlPopupLayer,AdfDhtmlPopupWindow);AdfDhtmlPopupLayer.HINT_ANIMATE_FRAME_METHOD="animateFrameMethod";AdfDhtmlPopupLayer.HINT_ANIMATE_VERTICALLY="animateVertically";AdfDhtmlPopupLayer.HINT_ANIMATE_HORIZONTALLY="animateHorizontally";AdfDhtmlPopupLayer.HINT_ANIMATE_CLOSED="animateClosed";AdfDhtmlPopupLayer.HINT_ANIMATION_DURATION_OPEN_SKIN_PROPERTY="animationDurationOpen";
AdfDhtmlPopupLayer.HINT_ANIMATION_DURATION_CLOSE_SKIN_PROPERTY="animationDurationClose";AdfDhtmlPopupLayer.HINT_ANIMATE_MIN_WIDTH="animateMinWidth";
AdfDhtmlPopupLayer.InitClass=function(){this._ANIMATE_DIRECTION_MAP={};this._ANIMATE_DIRECTION_MAP[AdfRichPopup.ALIGN_AFTER_START]=AdfDhtmlPopupLayer.HINT_ANIMATE_VERTICALLY;this._ANIMATE_DIRECTION_MAP[AdfRichPopup.ALIGN_AFTER_END]=AdfDhtmlPopupLayer.HINT_ANIMATE_VERTICALLY;this._ANIMATE_DIRECTION_MAP[AdfRichPopup.ALIGN_BEFORE_START]=AdfDhtmlPopupLayer.HINT_ANIMATE_VERTICALLY;this._ANIMATE_DIRECTION_MAP[AdfRichPopup.ALIGN_BEFORE_END]=AdfDhtmlPopupLayer.HINT_ANIMATE_VERTICALLY;this._ANIMATE_DIRECTION_MAP[AdfRichPopup.ALIGN_END_AFTER]=
AdfDhtmlPopupLayer.HINT_ANIMATE_HORIZONTALLY;this._ANIMATE_DIRECTION_MAP[AdfRichPopup.ALIGN_END_BEFORE]=AdfDhtmlPopupLayer.HINT_ANIMATE_HORIZONTALLY;this._ANIMATE_DIRECTION_MAP[AdfRichPopup.ALIGN_START_AFTER]=AdfDhtmlPopupLayer.HINT_ANIMATE_HORIZONTALLY;this._ANIMATE_DIRECTION_MAP[AdfRichPopup.ALIGN_START_BEFORE]=AdfDhtmlPopupLayer.HINT_ANIMATE_HORIZONTALLY;this._ANIMATE_DIRECTION_MAP[AdfRichPopup.ALIGN_OVERLAP_END_BEFORE]=AdfDhtmlPopupLayer.HINT_ANIMATE_HORIZONTALLY;this._ANIMATE_DIRECTION_MAP[AdfRichPopup.ALIGN_OVERLAP_START_BEFORE]=
AdfDhtmlPopupLayer.HINT_ANIMATE_HORIZONTALLY};AdfDhtmlPopupLayer.prototype.Init=function(){AdfDhtmlPopupLayer.superclass.Init.call(this)};AdfDhtmlPopupLayer.prototype.CreateDomElement=function(){var a=AdfPage.PAGE.getDomDocument().createElement("div");this.SetContentParent(a);return a};AdfDhtmlPopupLayer.prototype.SetContentParent=function(a){this._contentElement=a};AdfDhtmlPopupLayer.prototype.GetContentParent=function(){return this._contentElement};AdfDhtmlPopupLayer.prototype.HasShadow=function(){return!1};
AdfDhtmlPopupLayer.prototype.ShouldHideOnClip=function(){return!1};AdfDhtmlPopupLayer.prototype.shouldInvertPosition=function(){return!1};AdfDhtmlPopupLayer.prototype._getAnimationDirection=function(a){return(a=a[AdfRichPopup.HINT_ALIGN])?AdfDhtmlPopupLayer._ANIMATE_DIRECTION_MAP[a]:null};AdfDhtmlPopupLayer.prototype.GetAnimationDurationSkinProperty=function(a){return a[AdfDhtmlPopupLayer.HINT_ANIMATION_DURATION_OPEN_SKIN_PROPERTY]};
AdfDhtmlPopupLayer.prototype.GetCloseAnimationDurationSkinProperty=function(a){return a[AdfDhtmlPopupLayer.HINT_ANIMATION_DURATION_CLOSE_SKIN_PROPERTY]};
AdfDhtmlPopupLayer.prototype.AnimateUsingWrapper=function(a,b,d,e,f){var g=this.getElement(),h=g.ownerDocument.createElement("div"),k=h.style,l=g.style,m=g.offsetHeight,n=g.offsetWidth,p=parseInt(l.left),q=parseInt(l.top),r=this._getAnimationDirection(e),s=e[AdfDhtmlPopupLayer.HINT_ANIMATE_MIN_WIDTH];null==s&&(s=1);b?(k.left=f?l.left:p+n-s+"px",l.left="0px"):(k.left=l.left,k.right=l.right,l.left="",l.right="0px");k.overflow="hidden";k.position="absolute";var u={};r==AdfDhtmlPopupLayer.HINT_ANIMATE_HORIZONTALLY?
(k.height=m+"px",k.top=l.top):(d?(u.top=q,k.top=q+m+1+"px"):k.top=l.top,k.height="1px",u.height=m);l.top="0px";r==AdfDhtmlPopupLayer.HINT_ANIMATE_VERTICALLY?k.width=n+"px":f?(k.width=n+"px",u.width=s):(k.width=s+"px",u.width=n);k.zIndex=l.zIndex;g.parentNode.replaceChild(h,g);h.appendChild(g);l.visibility="";b&&(u.left=f?p+n-s:p);AdfPage.PAGE.prepareMaskingFrame();b=e[AdfDhtmlPopupLayer.HINT_ANIMATE_FRAME_METHOD];b||(b=AdfDhtmlElementAnimator.FRAME_METHOD_CONSTANT_SPEED);this._animator=AdfDhtmlElementAnimator.animate(b,
a,[{element:h,properties:u}],null,f?AdfDhtmlPopupLayer.CloseAnimationComplete:AdfDhtmlPopupWindow.AnimationComplete,{wrapper:h,myself:this})};AdfDhtmlPopupLayer.CloseAnimationComplete=function(a){var b=a.wrapper;a=a.myself;a._animating&&(delete a._animating,delete a._animator,AdfDhtmlPopupWindow._restoreRootPostAnimation(b),a._closedPopup())};
AdfDhtmlPopupLayer.prototype.AnimateClosing=function(){this._animating=!0;var a=!1,b=!1,d=this.GetPositionManagerIndex();if(0<=d&&(d=AdfPage.PAGE.getPositionManager().getComputedBehavior(d)))a=d.horizontalBehavior.floatingElementAnchor==AdfDhtmlPositionManager.RIGHT,b=d.verticalBehavior.floatingElementAnchor==AdfDhtmlPositionManager.BOTTOM;this.AnimateUsingWrapper(this._animationCloseDuration,a,b,this._hints,!0)};
AdfDhtmlPopupLayer.prototype.show=function(a){this._hints=a;var b=AdfPage.PAGE;if(b.isAnimationEnabled()&&a[AdfDhtmlPopupLayer.HINT_ANIMATE_CLOSED]){var d=this.GetCloseAnimationDurationSkinProperty(a);d&&(b=parseInt(b.getLookAndFeel().getSkinProperty(d)),0<b&&(this._animationCloseDuration=b))}AdfDhtmlPopupLayer.superclass.show.call(this,a)};
AdfDhtmlPopupLayer.prototype.hide=function(){if(!this._isHiding){var a=AdfPage.PAGE.findComponent(this._componentId);if(a&&a.getPeer().canHide&&!a.getPeer().canHide())return}var b="true"==this._closeHandlerParam.contentDom.getAttribute(AdfDhtmlPopupWindow.__REPLACEDOM_EXPANDO);if(this._isHiding)this._animator&&b&&(this._animator.stop(),a=this.getElement().parentNode,AdfDhtmlPopupLayer.CloseAnimationComplete({wrapper:a,myself:this}));else{this._isHiding=!0;this._animating&&(delete this._animating,
this._animator&&(this._animator.stop(),delete this._animator),AdfDhtmlPopupWindow._restoreRootPostAnimation(this.getElement().parentNode));var d=AdfPage.PAGE,a=d.findComponent(this._componentId);d.getAutoDismissalManager().removeBehavior(a);!this._isRestoring(a)&&(AdfFocusUtils.containsFocus(this.getElement())&&!AdfFocusUtils.isFocusChangePending())&&this._restoreFocus();this.getHints()[AdfDhtmlPopupLayer.HINT_ANIMATE_CLOSED]&&this._animationCloseDuration&&!0!=b?this.AnimateClosing():this._closedPopup()}};
AdfDhtmlPopupLayer.prototype._closedPopup=function(){var a=AdfPage.PAGE,b=this._closeHandler;b&&(delete this._closeHandler,b(this._closeHandlerParam),delete this._closeHandlerParam);this.destroy();delete this._isHiding;a.__perfTimings(!0,!1,!0,"popup hidden")};AdfDhtmlPopupLayer.prototype.getHints=function(){return this._hints};AdfDhtmlPopupLayer.prototype._getComponentFromHints=function(a){this._componentId=a=a[AdfDhtmlPopupHints.COMPONENT_CLIENT_ID];return AdfPage.PAGE.findComponent(a)};
AdfDhtmlPopupLayer.prototype.restoreAutodismiss=function(){if(this._autoDismissRemoved){var a=this.getHints();AdfPage.PAGE.getAutoDismissalManager().addBehavior(this._getComponentFromHints(a),a);this._autoDismissRemoved=!1}};AdfDhtmlPopupLayer.prototype.removeAutodismiss=function(){if(!this._autoDismissRemoved){this._autoDismissRemoved=!0;var a=this.getHints();AdfPage.PAGE.getAutoDismissalManager().removeBehavior(this._getComponentFromHints(a))}};