function AdfDhtmlElementAnimator(a,b,d,e,f,g,h){this.Init(a,b,d,e,f,g,h)}AdfObject.createSubclass(AdfDhtmlElementAnimator);AdfDhtmlElementAnimator.prototype.Init=function(a,b,d,e,f,g,h){AdfDhtmlElementAnimator.superclass.Init.call(this);this._itemState=a;this._duringAnimate=b;this._afterAnimate=d;this._callbackParameters=e;this._component=f;this._startTime=(new Date).getTime();this._frameMethod=g;this._frameCount=h};
AdfDhtmlElementAnimator.prototype.stop=function(){this._stopped=!0;window.clearInterval(this._intervalID);var a=this._callbackParameters;this._destroy();return a};
AdfDhtmlElementAnimator.animate=function(a,b,d,e,f,g,h){for(var k=AdfAgent.AGENT,l=d.length,m=Array(l),n=0;n<l;n++){var p=d[n],q=p.properties,q=void 0===q?p.properties:q,r=p.element,r=void 0===r?p.element:r,p={};AdfDhtmlElementAnimator._gatherSizeState(p,q,r,"width","offsetWidth","borderLeftWidth","borderRightWidth");AdfDhtmlElementAnimator._gatherSizeState(p,q,r,"height","offsetHeight","borderTopWidth","borderBottomWidth");var s=q.alpha;if(null!=s&&!isNaN(s)){var u=r.style.opacity;if(r.ownerDocument.all&&
null==u)try{u=r.filters.alpha.opacity/100}catch(t){}if(null==u||""==""+u)u=1;p.opacity=[u,s/100,!0]}s=q.zIndex;null!=s&&!isNaN(s)&&(p.zIndex=[AdfDhtmlElementAnimator._getElementZIndex(k,r),s,!0]);s=q.top;null!=s&&!isNaN(s)&&(u=(u=r.style.top)&&"auto"!=u?parseInt(u):k.getElementTop(r),p.top=[u,s]);s=q.left;null!=s&&!isNaN(s)&&(u=(u=r.style.left)&&"auto"!=u?parseInt(u):k.getElementLeft(r),p.left=[u,s]);s=q.right;null!=s&&!isNaN(s)&&(u=(u=r.style.right)&&"auto"!=u?parseInt(u):k.getElementLeft(r),p.right=
[u,s]);s=q.offsetTop;null!=s&&!isNaN(s)&&(p.offsetTop=[r.offsetTop,s]);s=q.offsetLeft;null!=s&&!isNaN(s)&&(p.offsetLeft=[r.offsetLeft,s]);s=q.scrollLeft;null!=s&&!isNaN(s)&&(p.scrollLeft=[r.scrollLeft,s,!0]);q=q.scrollTop;null!=q&&!isNaN(q)&&(p.scrollTop=[r.scrollTop,q,!0]);m[n]={element:r,state:p}}b=Math.max(1,Math.round(b*AdfDhtmlElementAnimator._FRAMES_PER_MILLISECOND));AdfPage.PAGE.isAnimationEnabled()||(b=1);return(new AdfDhtmlElementAnimator(m,e,f,g,h,a,b))._start()};
AdfDhtmlElementAnimator._getElementZIndex=function(a,b){var d=a.getComputedStyle(b);return d&&(d=d.zIndex,!isNaN(d))?d:0};AdfDhtmlElementAnimator._gatherSizeState=function(a,b,d,e,f,g,h){b=b[e];null!=b&&!isNaN(b)&&(f=d[f],null!=d.style&&(f=AdfDhtmlElementAnimator._subtractBorderSize(f,d.style[g]),f=AdfDhtmlElementAnimator._subtractBorderSize(f,d.style[h])),a[e]=[f,b])};
AdfDhtmlElementAnimator.prototype._start=function(){this._animationStepCallback=this.createCallback(this._animationStep);this._intervalID=self.setInterval(this._animationStepCallback,Math.floor(1/AdfDhtmlElementAnimator._FRAMES_PER_MILLISECOND));return this};
AdfDhtmlElementAnimator.prototype._destroy=function(){delete this._itemState;delete this._duringAnimate;delete this._afterAnimate;delete this._callbackParameters;delete this._component;delete this._startTime;delete this._intervalID;delete this._animationStepCallback;delete this._stopped};
AdfDhtmlElementAnimator.prototype._animationStep=function(){if(!(this._stopped||null==this._intervalID))if(this._performAfterAnimate){window.clearInterval(this._intervalID);null!=this._afterAnimate&&this._afterAnimate(this._callbackParameters);if(this._component){var a=this._component;a.getPeer()||(a=this._component.getClientId(),a=AdfPage.PAGE.findComponent(a));a&&(AdfPage.PAGE.__queueDescendantResizeNotifySource(a),AdfPage.PAGE.__doDescendantResizeNotify())}this._destroy()}else{var b=(new Date).getTime()-
this._startTime,a=this._itemState,d=a.length,b=Math.round(AdfDhtmlElementAnimator._FRAMES_PER_MILLISECOND*b),e=this._frameCount,f=this._frameMethod,g=!1;b>=e-1&&(this._performAfterAnimate=g=!0);for(var h=0;h<d;h++){var k=a[h],l=k.element,k=k.state,m,n;for(n in k)m=g?k[n][1]:AdfDhtmlElementAnimator._computeFrameProperty(b,parseFloat(k[n][0]),parseFloat(k[n][1]),f,e),k[n][2]||(m+="px"),AdfDhtmlElementAnimator._renderFrameProperty(l,m,n)}a=this._duringAnimate;null!=a&&a(this._callbackParameters)}};
AdfDhtmlElementAnimator._renderFrameProperty=function(a,b,d){"opacity"==d&&AdfAgent.AGENT.getPlatform()==AdfAgent.IE_PLATFORM?(b*=100,a.style.filter=1==b?"":"alpha(opacity\x3d"+b+")"):"offsetLeft"==d?a.style.left=b:"offsetTop"==d?a.style.top=b:"scrollLeft"==d?AdfAgent.AGENT.scrollToPos(a,b,null):"scrollTop"==d?AdfAgent.AGENT.scrollToPos(a,null,b):a.style[d]=b};
AdfDhtmlElementAnimator._computeFrameProperty=function(a,b,d,e,f){a/=f;switch(e){case AdfDhtmlElementAnimator.FRAME_METHOD_CONSTANT_SPEED:e=a;break;case AdfDhtmlElementAnimator.FRAME_METHOD_ACCELERATING:e=Math.pow(a,2);break;case AdfDhtmlElementAnimator.FRAME_METHOD_DECELERATING:e=1-Math.pow(a-1,2);break;case AdfDhtmlElementAnimator.FRAME_METHOD_SLOW_FAST_SLOW:e=(Math.cos(a*Math.PI+Math.PI)+1)/2;break;default:AdfLogger.LOGGER.severe("Invalid AdfDhtmlElementAnimator framing method: "+e),e=1}return b+
e*(d-b)};AdfDhtmlElementAnimator._subtractBorderSize=function(a,b){null!=b&&""!=b&&(a-=parseInt(b));return a};AdfDhtmlElementAnimator._FRAMES_PER_MILLISECOND=0.06;AdfDhtmlElementAnimator.FRAME_METHOD_CONSTANT_SPEED=0;AdfDhtmlElementAnimator.FRAME_METHOD_ACCELERATING=1;AdfDhtmlElementAnimator.FRAME_METHOD_DECELERATING=2;AdfDhtmlElementAnimator.FRAME_METHOD_SLOW_FAST_SLOW=3;