﻿Type.registerNamespace("Infragistics.Web.UI");$IG.AnimationBase=function(a){this._element=a;this._duration=30;this._tickInterval=30;this._curveDepth=2};$IG.AnimationBase.prototype={play:function(){this._zero=(new Date()).getTime();this.onBegin();this._time=1;if(this._animating==true){this.stop()}this._animating=true;this._init();this.__tick("init")},stop:function(){this._animating=false;if(!this._timerId){return}clearInterval(this._timerId);delete this._timerId},onBegin:function(){},onNext:function(){},onEnd:function(){},get_duration:function(){return this._duration},set_duration:function(a){a=Math.ceil(a/this._tickInterval);this._duration=(a>1)?a:1},get_isAnimating:function(){return this._animating},__tick:function(b){this.onNext();this._next();if(this._animating){var c=++this._time,a=Math.floor(((new Date()).getTime()-this._zero)/this._tickInterval)-1;if(c<a){if((c=a)>this._duration){c=this._duration}}this._time=c;if(b=="init"){this._timerId=setInterval(Function.createDelegate(this,this.__tick),this._tickInterval)}}else{this.onEnd()}},_init:function(){},_next:function(){},_calc:function(c,j,i,h,g){var a=this._curveDepth;if(c==$IG.AnimationEquationType.Linear){return((h-i)/g)*j+i}else{if(c==$IG.AnimationEquationType.EaseIn){return(Math.pow(j,a)*(h-i))/Math.pow(g,a)+i}else{if(c==$IG.AnimationEquationType.EaseOut){return((-Math.pow(j,a)*(h-i))/Math.pow(g,a))+((2*j*(h-i))/g)+i}else{if(c==$IG.AnimationEquationType.EaseInOut){if(j<(g/2)){return(Math.pow(j,a)*((h-i)/2))/Math.pow((g/2),a)+i}else{return((-Math.pow((j-(g/2)),a)*((h-i)/2))/Math.pow((g/2),a))+((2*(j-(g/2))*((h-i)/2))/(g/2))+(i+h)/2}}}}}var b=(j/=g)*j;var f=b*j;return(h-i)*(44.25*f*b+-138.25*b*b+156.5*f+-76.5*b+15*j)+i},_setProp:function(style,name,val,name2){if(style){if(val&&val.length>0){eval("style."+name+"=val")}else{if(style.removeAttribute){style.removeAttribute(name)}else{if(style.removeProperty){style.removeProperty(name2?name2:name)}}}}},dispose:function(){this.stop();this._element=null}};$IG.AnimationBase.registerClass("Infragistics.Web.UI.AnimationBase");$IG.OpacityAnimation=function(a,b){$IG.OpacityAnimation.initializeBase(this,[a]);this._equationType=b?b:$IG.AnimationEquationType.Linear};$IG.OpacityAnimation.prototype={play:function(c,b,a,d){this._startOpacity=c;$util.setOpacity(this._element,c);this._endOpacity=b;this._removeOnStop=a;this._hideOnStop=d;$IG.OpacityAnimation.callBaseMethod(this,"play")},_next:function(){var a=this._startOpacity,b=this._endOpacity;var c=this._calc(this._equationType,this._time,a,b,this._duration);if(c<0){c=0}if(c>100){c=100}$util.setOpacity(this._elem2,c*this._opac2);$util.setOpacity(this._element,c);if((a<b&&c>=b)||(a>b&&c<=b)){this.stop()}},stop:function(){var b=this._element;var a=b?b.style:null;if(this._removeOnStop){this._setProp(a,"filter",null,"opacity")}if(this._hideOnStop){$util.display(b,true);$util.display(this._elem2,true)}if(b&&b._ig_sfa){b._ig_sfa._stop(this)}$IG.OpacityAnimation.callBaseMethod(this,"stop")}};$IG.OpacityAnimation.registerClass("Infragistics.Web.UI.OpacityAnimation",$IG.AnimationBase);$IG.SlideAnimation=function(a){$IG.SlideAnimation.initializeBase(this,[a])};$IG.SlideAnimation.prototype={play:function(d,e,g,f,a,c){var b=this._element;if(!b||this._div){return}this._type=e?e:0;if(g){this.set_duration(g)}this._initDiv(b,d,this._direction=f?f:1);if(this._height<3){return}if(!this._div0){this._up=a;this._right=c}this._hideOnStop=!d;this._start=d?0:this._height;this._end=d?this._height:0;$IG.SlideAnimation.callBaseMethod(this,"play")},_initDiv:function(h,e,b){var g=this._div0;var j=h._slide_div;if(!j){if(!(j=g)){j=document.createElement("DIV")}}h._slide_div=j;var i=j.style,f=h.style,c=h.parentNode;if(!g){i.width=i.height=""}$util.display(h);this._div=j;if((this._height=h.offsetHeight)<3){return}this._width=h.offsetWidth;this._ratio=this._width/this._height;if(g){this._div0o=g.style.overflow;this._div0w=g.style.width;this._div0h=g.style.height;i.overflow="hidden";if(e){if(b>1){i.width="0px"}if((b&1)==1){i.height="0px"}}return}i.width=((e&&b>1)?0:this._width)+"px";i.height=((e&&(b&1)==1)?0:this._height)+"px";i.overflow="hidden";i.position="absolute";i.left=f.left;i.top=f.top;var a=$util.getRuntimeStyle(h);this._pos=$util.getStyleValue(a,"position");this._left=i.marginLeft=$util.getStyleValue(a,"marginLeft");this._top=i.marginTop=$util.getStyleValue(a,"marginTop");this._iLeft=$util.toInt(this._left);this._iTop=$util.toInt(this._top);var d=$util.getStyleValue(a,"zIndex");if(d&&parseInt(d)>0){i.zIndex=d}f.position=f.marginLeft=f.marginTop="";c.insertBefore(j,h);c.removeChild(h);j.appendChild(h)},_next:function(){var d=this._start,e=this._end,a=this._height;var f=this._calc(this._type,this._time,d,e,this._duration);if(f<0){f=0}if(f>a){f=a}var c=this._div.style;var g=Math.floor(f*this._ratio),b=this._direction;if(this._up&&(b<2||b==3)){c.marginTop=(this._iTop+a-f)+"px"}if(this._right&&b>1){c.marginLeft=(this._iLeft+this._width-g)+"px"}if(b<2||b==3){c.height=f+"px"}if(b>1){c.width=g+"px"}if((d<e&&f>=e)||(d>e&&f<=e)){this.stop()}},stop:function(){var c=this._element,a=this._div;this._div=null;if(c&&a){if(this._hideOnStop){$util.display(c,true)}if(this._height>2){if(this._div0){this._setProp(b=this._div0.style,"overflow",this._div0o);this._setProp(b,"width",this._div0w);this._setProp(b,"height",this._div0h)}else{if(c.parentNode==a){var d=a.parentNode,b=c.style;b.position=this._pos;b.marginLeft=this._left;b.marginTop=this._top;a.removeChild(c);d.insertBefore(c,a);d.removeChild(a)}}}}if(c&&c._ig_sfa){c._ig_sfa._stop(this)}this._div0=null;$IG.SlideAnimation.callBaseMethod(this,"stop")}};$IG.SlideAnimation.registerClass("Infragistics.Web.UI.SlideAnimation",$IG.AnimationBase);$IG.SlideFadeAnimation=function(a){if(!a){a="300,0,300,0,1,200,0,200,0,1"}this._props=a=a.split(",");for(var b=0;b<10;b++){a[b]=parseInt(a[b])}$IG.SlideFadeAnimation.initializeBase(this)};$IG.SlideFadeAnimation.prototype={play:function(o,h,b,n,g,e,k){var d=this._fade,a=this._slide;if(d){d.dispose()}if(a){a.dispose()}delete this._fade;delete this._slide;if(!o){return false}this._fire=0;this._stopObj=g;this._stopFnc=e;this._custom=k;this._show=h;var j=this._fadeParent?o.parentNode:o;if(h){$util.display(o);$util.display(j)}var l=false,c=this._props;var m=h?0:5;var q=c[m];if(q>0){j._ig_sfa=this;this._fade=d=new $IG.OpacityAnimation(j,c[m+1]);this._fire=1;d.set_duration(q);d.play(h?0:100,h?100:0,false,!this._fadeParent&&!h);l=true}else{if(h&&c[5]>0){$util.setOpacity(j,100)}}q=c[m+2];if(q>0){o._ig_sfa=this;this._slide=a=new $IG.SlideAnimation(o);a._div0=this._div;this._fire+=2;a.set_duration(q);var f="",p=null;if(h){if(!(p=this._div)){p=o}if(p){p=p.style;if((f=p.position)=="absolute"){p=null}else{p.position="absolute"}}}a.play(h,c[m+3],q,c[m+4],b);if(p){a._setProp(p,"position",f)}l=true}if(!h&&!l){$util.display(o,true)}return l},_stop:function(b){var a=null;if(this._fade==b){a=b._element;if(this._fadeParent){a._ig_sfa=null}this._fire&=2}if(this._slide==b){a=b._element;this._fire&=1}if(this._fire!=0){return}if(a){a._ig_sfa=null}if(!this._stopObj||!this._stopFnc){return}try{this._stopFnc.apply(this._stopObj,[this._show,this._custom])}catch(a){}delete this._stopFnc;delete this._stopObj;delete this._custom},setSlideContainer:function(a){this._div=a},get_fade:function(){return this._fade},get_slide:function(){return this._slide},get_fadeOpenDuration:function(){return this._props[0]},set_fadeOpenDuration:function(a){this._props[0]=a},get_fadeCloseDuration:function(){return this._props[5]},set_fadeCloseDuration:function(a){this._props[5]=a},get_slideOpenDuration:function(){return this._props[2]},set_slideOpenDuration:function(a){this._props[2]=a},get_slideCloseDuration:function(){return this._props[7]},set_slideCloseDuration:function(a){this._props[7]=a},get_fadeOpenEquationType:function(){return this._props[1]},set_fadeOpenEquationType:function(a){this._props[1]=a},get_fadeCloseEquationType:function(){return this._props[6]},set_fadeCloseEquationType:function(a){this._props[6]=a},get_slideOpenEquationType:function(){return this._props[3]},set_slideOpenEquationType:function(a){this._props[3]=a},get_slideCloseEquationType:function(){return this._props[8]},set_slideCloseEquationType:function(a){this._props[8]=a},get_slideOpenDirection:function(){return this._props[4]},set_slideOpenDirection:function(a){this._props[4]=a},get_slideCloseDirection:function(){return this._props[9]},set_slideCloseDirection:function(a){this._props[9]=a},dispose:function(){if(!this._props){return}delete this._props;if(this._fade){this._fade.dispose()}if(this._slide){this._slide.dispose()}delete this._fade;delete this._slide;$IG.SlideFadeAnimation.callBaseMethod(this,"dispose")}};$IG.SlideFadeAnimation.registerClass("Infragistics.Web.UI.SlideFadeAnimation",Sys.Component);$IG.AnimationSlideDirection=function(){};$IG.AnimationSlideDirection.prototype={Vertical:1,Horizontal:2,Both:3};$IG.AnimationSlideDirection.registerEnum("Infragistics.Web.UI.AnimationSlideDirection");$IG.AnimationEquationType=function(){};$IG.AnimationEquationType.prototype={Linear:0,EaseIn:1,EaseOut:2,EaseInOut:3,Bounce:4};$IG.AnimationEquationType.registerEnum("Infragistics.Web.UI.AnimationEquationType");
if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();