﻿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(a){this.onNext();this._next();if(this._animating){var b=++this._time,c=Math.floor(((new Date()).getTime()-this._zero)/this._tickInterval)-1;if(b<c){if((b=c)>this._duration){b=this._duration}}this._time=b;if(a=="init"){this._timerId=setInterval(Function.createDelegate(this,this.__tick),this._tickInterval)}}else{this.onEnd()}},_init:function(){},_next:function(){},_calc:function(f,j,i,h,g){var a=this._curveDepth;if(f==$IG.AnimationEquationType.Linear){return((h-i)/g)*j+i}else{if(f==$IG.AnimationEquationType.EaseIn){return(Math.pow(j,a)*(h-i))/Math.pow(g,a)+i}else{if(f==$IG.AnimationEquationType.EaseOut){return((-Math.pow(j,a)*(h-i))/Math.pow(g,a))+((2*j*(h-i))/g)+i}else{if(f==$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 c=(j/=g)*j;var b=c*j;return(h-i)*(44.25*b*c+-138.25*c*c+156.5*b+-76.5*c+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,d,a){this._startOpacity=c;$util.setOpacity(this._element,c);this._endOpacity=b;this._removeOnStop=d;this._hideOnStop=a;$IG.OpacityAnimation.callBaseMethod(this,"play")},_next:function(){var c=this._startOpacity,a=this._endOpacity;var b=this._calc(this._equationType,this._time,c,a,this._duration);if(b<0){b=0}if(b>100){b=100}$util.setOpacity(this._elem2,b*this._opac2);$util.setOpacity(this._element,b);if((c<a&&b>=a)||(c>a&&b<=a)){this.stop()}},stop:function(){var a=this._element;var b=a?a.style:null;if(this._removeOnStop){this._setProp(b,"filter",null,"opacity")}if(this._hideOnStop){$util.display(a,true);$util.display(this._elem2,true)}if(a&&a._ig_sfa){a._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(e,g,d,f,a,c){var b=this._element;if(!b||this._div){return}this._type=g?g:0;if(d){this.set_duration(d)}this._initDiv(b,e,this._direction=f?f:1);if(this._height<3){return}if(!this._div0){this._up=a;this._right=c}this._hideOnStop=!e;this._start=e?0:this._height;this._end=e?this._height:0;$IG.SlideAnimation.callBaseMethod(this,"play")},_initDiv:function(c,f,i){var j=this._div0;var e=c._slide_div;if(!e){if(!(e=j)){e=document.createElement("DIV")}}c._slide_div=e;var b=e.style,g=c.style,h=c.parentNode;if(!j){b.width=b.height=""}$util.display(c);this._div=e;if((this._height=c.offsetHeight)<3){return}this._width=c.offsetWidth;this._ratio=this._width/this._height;if(j){this._div0o=j.style.overflow;this._div0w=j.style.width;this._div0h=j.style.height;b.overflow="hidden";if(f){if(i>1){b.width="0px"}if((i&1)==1){b.height="0px"}}return}b.width=((f&&i>1)?0:this._width)+"px";b.height=((f&&(i&1)==1)?0:this._height)+"px";b.overflow="hidden";b.position="absolute";b.left=g.left;b.top=g.top;var a=$util.getRuntimeStyle(c);this._pos=$util.getStyleValue(a,"position");this._left=b.marginLeft=$util.getStyleValue(a,"marginLeft");this._top=b.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){b.zIndex=d}g.position=g.marginLeft=g.marginTop="";h.insertBefore(e,c);h.removeChild(c);e.appendChild(c)},_next:function(){var c=this._start,a=this._end,d=this._height;var e=this._calc(this._type,this._time,c,a,this._duration);if(e<0){e=0}if(e>d){e=d}var b=this._div.style;var g=Math.floor(e*this._ratio),f=this._direction;if(this._up&&(f<2||f==3)){b.marginTop=(this._iTop+d-e)+"px"}if(this._right&&f>1){b.marginLeft=(this._iLeft+this._width-g)+"px"}if(f<2||f==3){b.height=e+"px"}if(f>1){b.width=g+"px"}if((c<a&&e>=a)||(c>a&&e<=a)){this.stop()}},stop:function(){var d=this._element,c=this._div;this._div=null;if(d&&c){if(this._hideOnStop){$util.display(d,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(d.parentNode==c){var a=c.parentNode,b=d.style;b.position=this._pos;b.marginLeft=this._left;b.marginTop=this._top;c.removeChild(d);a.insertBefore(d,c);a.removeChild(c)}}}}if(d&&d._ig_sfa){d._ig_sfa._stop(this)}this._div0=null;$IG.SlideAnimation.callBaseMethod(this,"stop")}};$IG.SlideAnimation.registerClass("Infragistics.Web.UI.SlideAnimation",$IG.AnimationBase);$IG.SlideFadeAnimation=function(b){if(!b){b="300,0,300,0,1,200,0,200,0,1"}this._props=b=b.split(",");for(var a=0;a<10;a++){b[a]=parseInt(b[a])}$IG.SlideFadeAnimation.initializeBase(this)};$IG.SlideFadeAnimation.prototype={play:function(e,h,o,p,k,l,m){var n=this._fade,g=this._slide;if(n){n.dispose()}if(g){g.dispose()}delete this._fade;delete this._slide;if(!e){return false}this._fire=0;this._stopObj=k;this._stopFnc=l;this._custom=m;this._show=h;var b=this._fadeParent?e.parentNode:e;if(h){$util.display(e);$util.display(b)}var j=false,q=this._props;var f=h?0:5;var a=q[f];if(a>0){b._ig_sfa=this;this._fade=n=new $IG.OpacityAnimation(b,q[f+1]);this._fire=1;n.set_duration(a);n.play(h?0:100,h?100:0,false,!this._fadeParent&&!h);j=true}else{if(h&&q[5]>0){$util.setOpacity(b,100)}}a=q[f+2];if(a>0){e._ig_sfa=this;this._slide=g=new $IG.SlideAnimation(e);g._div0=this._div;this._fire+=2;g.set_duration(a);var d="",c=null;if(h){if(!(c=this._div)){c=e}if(c){c=c.style;if((d=c.position)=="absolute"){c=null}else{c.position="absolute"}}}g.play(h,q[f+3],a,q[f+4],o);if(c){g._setProp(c,"position",d)}j=true}if(!h&&!j){$util.display(e,true)}return j},_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();