Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.RadRotator=function(_1){
Telerik.Web.UI.RadRotator.initializeBase(this,[_1]);
this._skin="Default";
this._postBackReference=null;
this._items=null;
this._webServiceSettings=new Telerik.Web.UI.WebServiceSettings({});
this._webServiceLoader=null;
this._containerElement=null;
this._clickDelegate=null;
this._mouseOutDelegate=null;
this._mouseOverDelegate=null;
this._useRandomSlide=false;
this._pauseOnMouseOver=true;
var _2=Telerik.Web.UI.RotatorScrollDirection;
this._scrollDirection=_2.Left+_2.Right;
this._slideShowAnimationSettings={};
this._rotatorType=Telerik.Web.UI.RotatorType.AutomaticAdvance;
this._scrollDuration=500;
this._frameDuration=2000;
this._initialItemIndex=0;
this._wrapFrames=true;
this._controlButtons={};
this._relativeWrapper=null;
this._clipElement=null;
this._itemsElement=null;
this._animationDirection=_2.Left;
this._rightButton=null;
this._leftButton=null;
this._downButton=null;
this._upButton=null;
};
Telerik.Web.UI.RadRotator.prototype={initialize:function(){
Telerik.Web.UI.RadRotator.callBaseMethod(this,"initialize");
this._setChildElements();
this._createUI();
this._createChildItems();
this._attachEvents(true);
this._initialItemSet=false;
this._loadInitialFrame();
this._enableDisableButtons();
this._fixVisibilityProblems(true);
if(this.isAutomaticAdvance()){
var _3=this.get_frameDuration();
if(_3>0){
window.setTimeout(Function.createDelegate(this,this.startAutoPlay),_3);
}else{
this.startAutoPlay();
}
}
},dispose:function(){
this._fixVisibilityProblems(false);
this._attachEvents(false);
this._containerElement=null;
if(this._animation){
this._animation.dispose();
this._animation=null;
}
if(this._slideShowAnimation){
this._slideShowAnimation.dispose();
this._slideShowAnimation=null;
}
if(this._rightButton){
$clearHandlers(this._rightButton);
}
if(this._leftButton){
$clearHandlers(this._leftButton);
}
if(this._downButton){
$clearHandlers(this._downButton);
}
if(this._upButton){
$clearHandlers(this._upButton);
}
Telerik.Web.UI.RadRotator.callBaseMethod(this,"dispose");
},_createChildItems:function(){
var _4=$telerik.getChildrenByTagName(this.get_containerElement(),"li");
for(var i=0;i<_4.length;i++){
var _6=$create(Telerik.Web.UI.RadRotatorItem,this.get_items()[i],null,null,_4[i]);
var _7=_6.get_index();
_4[i]._item=_6;
this.get_items()[i]=_6;
}
},_getNextItemToShow:function(){
var _8=this.getItemHtmlElements();
var _9=this.isScrollingForward();
if(this._nextItemIndex==null){
var _a=_9?0:_8.length-1;
this._nextItemIndex=_a;
}
if(this._nextItemIndex<0){
return null;
}
var li=_8[this._nextItemIndex];
if(_9){
this._nextItemIndex++;
}else{
this._nextItemIndex--;
}
if(this._nextItemIndex>_8.length-1||this._nextItemIndex<0){
this._nextItemIndex=null;
}
return li;
},get_currentItem:function(){
var _c=this._currentItem;
if(!_c){
var _d=this._itemsElement;
var _e=this.getItemHtmlElements();
_c=this.isScrollingForward()?_e[0]:_e[_e.length-1];
}
return _c;
},_needsShift:function(_f){
if(null==_f){
_f=this.get_animationDirection();
}
var _10=this._itemsElement;
var _11=this._clipElement;
var _12=parseInt(_10.style.left);
var _13=parseInt(_10.style.top);
var _14=$telerik.getOuterSize(_10);
var _15=$telerik.getContentSize(_11);
var _16=this.get_currentItem();
if(!_16){
return false;
}
var _17=$telerik.getOuterSize(_16);
var _18=false;
var _19=Telerik.Web.UI.RotatorScrollDirection;
switch(_f){
case _19.Left:
_18=_12+_14.width<_15.width+_17.width;
break;
case _19.Up:
_18=_13+_14.height<_15.height+_17.height;
break;
case _19.Right:
_18=_12*-1<_17.width;
break;
case _19.Down:
_18=_13*-1<_15.height;
break;
}
return _18;
},_getMoveAnimation:function(){
if(this._animation){
return this._animation;
}
var _1a=this._itemsElement;
var _1b=this._getCalculatedAnimationDuration();
var fps=25;
this._animation=new Telerik.Web.Animation.MoveAnimation(_1a,_1b,fps,true,false,false,"px");
function returnZeroPixels(_1d,end,_1f){
return 0;
}
if(this.get_vertical()){
this._animation._horizontalAnimation.interpolate=returnZeroPixels;
}else{
this._animation._verticalAnimation.interpolate=returnZeroPixels;
}
return this._animation;
},scrollViewport:function(){
var _20=this._itemsElement;
if(!this._animation){
var _21=this._getMoveAnimation();
var _22=Function.createDelegate(this,function(){
var _23=this._hasViewportWidth();
if(!_23&&this.get_wrapFrames()){
var _24=this.getItemHtmlElements().length;
for(var i=0;i<_24;i++){
this._shiftItemInList();
_23=this._hasViewportWidth();
if(_23){
break;
}
}
}
var _26=this._getViewPortPixelsToScroll();
var _27=this.isScrollingForward();
if(this.get_vertical()){
var _28=parseInt(_20.style.top)+(_27?-_26:_26);
_21.set_vertical(_28);
}else{
var _28=parseInt(_20.style.left)+(_27?-_26:_26);
_21.set_horizontal(_28);
}
});
_21.add_started(Function.createDelegate(this,function(){
this.stopViewportAnimation();
var _29=null;
var _2a=new Telerik.Web.UI.RadRotatorCancelEventArgs(_29);
this.raiseEvent("itemShowing",_2a);
if(_2a.get_cancel&&_2a.get_cancel()){
return false;
}
if(this.isSlideShow()){
_20.style.visibility="hidden";
}
_22();
}));
_21.add_ended(Function.createDelegate(this,function(){
this._enableDisableButtons();
if(this.isSlideShow()){
_20.style.visibility="visible";
this.runSlideShowAnimation();
}else{
var _2b=null;
this.raiseEvent("itemShown",new Telerik.Web.UI.RadRotatorEventArgs(_2b));
}
}));
}
this._animation.play();
},scrollItem:function(){
var _2c=this._clipElement;
var _2d=this._itemsElement;
if(!this._animation){
this._animation=this._getMoveAnimation();
var _2e=this._animation;
var _2f=Function.createDelegate(this,function(){
var _30=this._getNextItemToShow();
if(!_30){
return;
}
this._currentItem=_30;
var _31=$telerik.getOuterSize(_30);
if(this.isScrollingForward()){
_31.width*=-1;
_31.height*=-1;
}
if(this.get_vertical()){
var _32=parseInt(_2d.style.top)+_31.height;
_2e.set_vertical(_32);
}else{
var _32=parseInt(_2d.style.left)+_31.width;
_2e.set_horizontal(_32);
}
});
_2e.add_started(Function.createDelegate(this,function(){
var _33=null;
var _34=new Telerik.Web.UI.RadRotatorCancelEventArgs(_33);
this.raiseEvent("itemShowing",_34);
if(_34.get_cancel&&_34.get_cancel()){
return false;
}
var _35=this._needsShift();
if(_35){
this._shiftItemInList();
}
if(this._stopAnimationButtonOver){
return;
}
_2f();
}));
_2e.add_ended(Function.createDelegate(this,function(){
var _36=null;
this.raiseEvent("itemShown",new Telerik.Web.UI.RadRotatorEventArgs(_36));
if(this._stopAnimationButtonOver){
return;
}
if(this.get_frameDuration()>0){
this.pause(this.get_frameDuration());
}else{
this._animation.play();
}
}));
}
this._animation.stop();
this._animation.play();
},_shiftItemInList:function(){
var _37=this._itemsElement;
var lis=this.getItemHtmlElements();
var _39=this.get_vertical();
var _3a=this.isScrollingForward();
var _3b=parseInt(_37.style.left);
var _3c=parseInt(_37.style.top);
var _3d=_3a?lis[0]:lis[lis.length-1];
var _3e=$telerik.getOuterSize(_3d);
_3d.parentNode.removeChild(_3d);
if(!_3a){
_37.insertBefore(_3d,_37.firstChild);
}
if(_39){
_37.style.top=(_3c+(_3a?_3e.height:-_3e.height))+"px";
}else{
_37.style.left=(_3b+(_3a?_3e.width:-_3e.width))+"px";
}
if(_3a){
_37.appendChild(_3d);
}
this._nextItemIndex=_3a?lis.length-1:0;
return _3d;
},_loadInitialFrame:function(){
var _3f=this.get_initialItemIndex();
var _40=this.get_defaultAnimationDirection();
var _41=Telerik.Web.UI.RotatorScrollDirection;
var _42=this.isVertical();
var _43=this._itemsElement;
var _44=$telerik.getOuterSize(_43);
var _45=$telerik.getContentSize(this._clipElement);
var x=0;
var y=0;
if(_3f>=0){
if(_42){
y=(_40==_41.Up)?0:-_44.height+_45.height;
}else{
x=(_40==_41.Left)?0:-_44.width+_45.width;
}
}else{
if(_3f==-1){
if(_42){
y=(_40==_41.Down)?-_44.height:_45.height;
}else{
x=(_40==_41.Right)?-_44.width:_45.width;
}
}
}
_43.style.left=x+"px";
_43.style.top=y+"px";
if(_3f>0&&!this._initialItemSet){
for(var i=0;i<_3f;i++){
this._shiftItemInList();
}
_43.style.left=x+"px";
_43.style.top=y+"px";
this._initialItemSet=true;
}
},pause:function(_49){
this._clearAnimationTimeout();
if(this._animation){
this._animation.pause();
}
if(_49){
this._setAnimationTimeout(_49);
}
},resume:function(){
this._clearAnimationTimeout();
if(this._animation){
this._animation.play();
}
},isViewportScrollMode:function(){
var _4a=Telerik.Web.UI.RotatorType;
if(this._isRotatorTypeEnabled(_4a.AutomaticAdvance)||this._isRotatorTypeEnabled(_4a.ButtonsOver)){
return false;
}
return true;
},_getButtonScrollDirection:function(_4b){
var _4c=Telerik.Web.UI.RotatorScrollDirection;
var _4d=_4c.Left;
switch(_4b){
case this._rightButton:
_4d=_4c.Left;
break;
case this._leftButton:
_4d=_4c.Right;
break;
case this._downButton:
_4d=_4c.Up;
break;
case this._upButton:
_4d=_4c.Down;
break;
}
return _4d;
},_buttonClicked:function(e){
var _4f=e.target;
if(this._isButtonDisabled(_4f)){
return;
}
var _50=this._getButtonScrollDirection(_4f);
this.set_animationDirection(_50);
this.scrollViewport();
return $telerik.cancelRawEvent(e);
},_buttonOver:function(e){
var _52=e.target;
if(this._isButtonDisabled(_52)){
return;
}
var _53=this._getButtonScrollDirection(_52);
this.set_animationDirection(_53);
this._stopAnimationButtonOver=false;
this.scrollItem();
return $telerik.cancelRawEvent(e);
},_buttonOut:function(e){
var _55=e.target;
if(this._isButtonDisabled(_55)){
return;
}
var _56=this._getButtonScrollDirection(_55);
this.set_animationDirection(_56);
this._stopAnimationButtonOver=true;
return $telerik.cancelRawEvent(e);
},_initializeButtonsRotatorType:function(){
var _57=this.get_controlButtons();
this._rightButton=$telerik.getElementsByClassName(this._rotatorRightClass,this._rootElement)[0];
this._leftButton=$telerik.getElementsByClassName(this._rotatorLeftClass,this._rootElement)[0];
this._downButton=$telerik.getElementsByClassName(this._rotatorDownClass,this._rootElement)[0];
this._upButton=$telerik.getElementsByClassName(this._rotatorUpClass,this._rootElement)[0];
var _58=Telerik.Web.UI.RotatorScrollDirection;
var _59=[_58.Right,_58.Left,_58.Down,_58.Up];
var _5a=[this._leftButton,this._rightButton,this._upButton,this._downButton];
var _5b=[_57.LeftButtonID?$get(_57.LeftButtonID):null,_57.RightButtonID?$get(_57.RightButtonID):null,_57.UpButtonID?$get(_57.UpButtonID):null,_57.DownButtonID?$get(_57.DownButtonID):null];
var _5c=[this._rotatorLeftClass,this._rotatorRightClass,this._rotatorUpClass,this._rotatorDownClass];
var _5d=["marginLeft","marginRight","marginTop","marginBottom"];
var _5e=["paddingLeft","paddingRight","paddingTop","paddingBottom"];
var _5f=["width","width","height","height"];
var _60=this._relativeWrapper;
var _61=this.get_element();
for(var i=0;i<_5a.length;i++){
var _63=_5a[i];
var _64=(null!=_5b[i])?_5b[i]:_63;
this._createButton(_63,_5c[i]);
if(this._isScrollDirectionEnabled(_59[i])&&null==_5b[i]){
_63.style.display="block";
var _65=_5f[i];
var _66=parseInt($telerik.getCurrentStyle(_63,_65));
_60.style[_65]=(parseInt(_60.style[_65])-_66)+"px";
_61.style[_65]=(parseInt(_61.style[_65])-_66)+"px";
_61.style[_5e[i]]=_66+"px";
}
if(this._isRotatorTypeEnabled(Telerik.Web.UI.RotatorType.Buttons)||this._isRotatorTypeEnabled(Telerik.Web.UI.RotatorType.SlideShowButtons)){
$addHandlers(_64,{"click":this._buttonClicked},this);
}else{
$addHandlers(_64,{"mouseover":this._buttonOver,"mouseout":this._buttonOut},this);
}
}
this._rightButton=_5b[1]||this._rightButton;
this._leftButton=_5b[0]||this._leftButton;
this._downButton=_5b[3]||this._downButton;
this._upButton=_5b[2]||this._upButton;
var _67=false;
for(var i=0;i<_5b.length;i++){
if(_5b[i]){
_67=true;
}
break;
}
return _67;
},runSlideShowAnimation:function(){
if(!this._slideShowAnimation){
var _68=this._itemsElement;
var _69=this.get_slideShowAnimationSettings().duration||500;
_69=_69/1000;
var _6a=this.get_slideShowAnimationSettings().type||Telerik.Web.UI.RotatorAnimationType.None;
var _6b=Function.createDelegate(this,function(){
var _6c=null;
this.raiseEvent("itemShown",new Telerik.Web.UI.RadRotatorEventArgs(_6c));
if(this.get_frameDuration()>0&&this.isAutomaticAdvance()){
this.pause(this.get_frameDuration());
}
});
switch(_6a){
case Telerik.Web.UI.RotatorAnimationType.Fade:
this._slideShowAnimation=new Telerik.Web.Animation.FadeInAnimation(_68,_69);
this._slideShowAnimation.add_ended(_6b);
break;
case Telerik.Web.UI.RotatorAnimationType.Pulse:
this._slideShowAnimation=new Telerik.Web.Animation.PulseAnimation(_68,null);
this._slideShowAnimation.set_iterations(1);
this._slideShowAnimation.set_duration(_69);
this._slideShowAnimation.add_ended(_6b);
break;
case Telerik.Web.UI.RotatorAnimationType.Pulse:
default:
this._slideShowAnimation={};
this._slideShowAnimation.play=_6b;
this._slideShowAnimation.dispose=function(){
};
break;
}
}
this._slideShowAnimation.play();
},_hasViewportWidth:function(_6d){
if(null==_6d){
_6d=this.get_animationDirection();
}
var _6e=this._itemsElement;
var _6f=this._clipElement;
var _70=parseInt(_6e.style.left);
var _71=parseInt(_6e.style.top);
var _72=$telerik.getOuterSize(_6e);
var _73=$telerik.getContentSize(_6f);
var _74=false;
var _75=Telerik.Web.UI.RotatorScrollDirection;
switch(_6d){
case _75.Left:
_74=_72.width+_70>_73.width*2;
break;
case _75.Up:
_74=_72.height+_71>_73.height*2;
break;
case _75.Right:
_74=(_70*-1>_73.width);
break;
case _75.Down:
_74=(_71*-1>_73.height);
break;
}
return _74;
},stopViewportAnimation:function(){
var _76=this._animation;
if(!_76){
return;
}
if(_76.get_isPlaying()){
_76.stop();
var _77=this.get_vertical();
var _78=_77?_76.get_vertical():_76.get_horizontal();
if(null!=_78){
this._itemsElement.style[_77?"top":"left"]=_78+"px";
}
}
},_getViewPortPixelsToScroll:function(){
var _79=this.get_vertical();
var _7a=$telerik.getContentSize(this._clipElement);
var _7b=_79?_7a.height:_7a.width;
return _7b;
},showNext:function(_7c){
this.set_animationDirection(_7c);
if(this.isViewportScrollMode()){
this.scrollViewport();
}else{
this.scrollItem();
}
},getItemHtmlElements:function(){
var _7d=this._itemsElement;
if(!this._hasCleanedList){
var _7e=_7d.childNodes;
for(var i=0;i<_7e.length;i++){
var _80=_7e[i];
if(_80&&_80.tagName!="LI"){
_7d.removeChild(_80);
i--;
}
}
this._hasCleanedList=true;
}
return _7d.childNodes;
},_getCalculatedAnimationDuration:function(_81){
var _82=this.get_scrollDuration()/1000;
return _82;
},_setAnimationTimeout:function(_83){
this._clearAnimationTimeout();
this._currentAnimationTimeout=window.setTimeout(Function.createDelegate(this,this.resume),_83);
},_clearAnimationTimeout:function(){
if(this._currentAnimationTimeout){
window.clearTimeout(this._currentAnimationTimeout);
}
this._currentAnimationTimeout=0;
},isAutomaticAdvance:function(){
var _84=Telerik.Web.UI.RotatorType;
if(this._isRotatorTypeEnabled(_84.AutomaticAdvance)||this._isRotatorTypeEnabled(_84.SlideShow)){
return true;
}
return false;
},isSlideShow:function(){
var _85=Telerik.Web.UI.RotatorType;
if(this._isRotatorTypeEnabled(_85.SlideShow)||this._isRotatorTypeEnabled(_85.SlideShowButtons)){
return true;
}
return false;
},isScrollingForward:function(){
return this.isScrollingLeft()||this.isScrollingUp();
},isScrollingLeft:function(){
return this._isAnimationDirectionOn(Telerik.Web.UI.RotatorScrollDirection.Left);
},isScrollingUp:function(){
return this._isAnimationDirectionOn(Telerik.Web.UI.RotatorScrollDirection.Up);
},_isAnimationDirectionOn:function(_86){
return _86==this.get_animationDirection()?true:false;
},_enableDisableButtons:function(){
if(this._rotatorType==Telerik.Web.UI.RotatorType.AutomaticAdvance){
return;
}
var _87=this.get_wrapFrames();
var _88=Telerik.Web.UI.RotatorScrollDirection;
this._enableButton(this._rightButton,_87||this._canSlideMore(_88.Left));
this._enableButton(this._leftButton,_87||this._canSlideMore(_88.Right));
this._enableButton(this._downButton,_87||this._canSlideMore(_88.Up));
this._enableButton(this._upButton,_87||this._canSlideMore(_88.Down));
},_enableButton:function(_89,_8a){
if(!_89){
return;
}
if(_8a){
Sys.UI.DomElement.removeCssClass(_89,this._rotatorButtonDisabledClass);
_89.removeAttribute("disabled");
}else{
Sys.UI.DomElement.addCssClass(_89,this._rotatorButtonDisabledClass);
_89.setAttribute("disabled","disabled");
}
},_canSlideMore:function(_8b){
if(null==_8b){
_8b=this.get_animationDirection();
}
var _8c=false;
var _8d=this._itemsElement;
var _8e=this._clipElement;
var _8f=Telerik.Web.UI.RotatorScrollDirection;
var _90=parseInt(_8d.style.left);
var _91=parseInt(_8d.style.top);
var _92=$telerik.getBounds(_8d);
var _93=$telerik.getBounds(_8e);
if(_8b==_8f.Left){
_8c=(_92.width+_90)>_93.width;
}else{
if(_8b==_8f.Up){
_8c=(_92.height+_91)>_93.height;
}else{
if(_8b==_8f.Right){
_8c=(_90<0);
}else{
if(_8b==_8f.Down){
_8c=(_91<0);
}
}
}
}
return _8c;
},_getCalculatedAnimationDirection:function(){
var _94=this.get_animationDirection();
var _95=Telerik.Web.UI.RotatorScrollDirection;
var _96=23;
switch(_94){
case _95.Left:
_96=21;
break;
case _95.Down:
_96=32;
break;
case _95.Up:
_96=12;
break;
default:
_96=23;
}
return _96;
},startAutoPlay:function(){
this._loadInitialFrame();
this.showNext(this.get_defaultAnimationDirection());
},get_defaultAnimationDirection:function(){
var _97=Telerik.Web.UI.RotatorScrollDirection;
var dir=0;
if(this._isScrollDirectionEnabled(_97.Left)){
dir=_97.Left;
}else{
if(this._isScrollDirectionEnabled(_97.Up)){
dir=_97.Up;
}else{
if(this._isScrollDirectionEnabled(_97.Right)){
dir=_97.Right;
}else{
if(this._isScrollDirectionEnabled(_97.Down)){
dir=_97.Down;
}
}
}
}
if(!dir){
dir=_97.Left;
}
return dir;
},get_containerElement:function(){
return this._itemsElement;
},_setChildElements:function(){
this._rotatorListClass="radr_itemsList";
this._rotatorVerticalClass="radr_verticalList";
this._rotatorRelativeWrapperClass="radr_relativeWrapper";
this._rotatorClipRegionClass="radr_clipRegion";
this._rotatorRightClass="radr_buttonRight";
this._rotatorLeftClass="radr_buttonLeft";
this._rotatorDownClass="radr_buttonDown";
this._rotatorUpClass="radr_buttonUp";
this._rotatorButtonDisabledClass="radr_buttonDisabled";
this._rootElement=this.get_element();
this._relativeWrapper=$telerik.getElementsByClassName(this._rotatorRelativeWrapperClass,this._rootElement)[0];
this._clipElement=$telerik.getElementsByClassName(this._rotatorClipRegionClass,this._rootElement)[0];
this._itemsElement=$telerik.getElementsByClassName(this._rotatorListClass,this._rootElement)[0];
},_createUI:function(){
if(!this.isVisible()){
return;
}
var _99=this.get_element();
var _9a=this._relativeWrapper;
var _9b=this._clipElement;
_9a.style.height=_99.offsetHeight+"px";
_9a.style.width=_99.offsetWidth+"px";
var _9c=true;
if(this._isRotatorTypeEnabled(Telerik.Web.UI.RotatorType.Buttons)||this._isRotatorTypeEnabled(Telerik.Web.UI.RotatorType.ButtonsOver)||this._isRotatorTypeEnabled(Telerik.Web.UI.RotatorType.SlideShowButtons)){
_9c=this._initializeButtonsRotatorType();
}
if(_9c){
Sys.UI.DomElement.addCssClass(_99,"radr_noBorder");
}
if(this.get_vertical()){
this.set_vertical(true);
}
_9a.style.overflow="auto";
_9b.style.overflow="auto";
_9b.style.width="10000px";
_9b.style.height="10000px";
this._itemsElement.style.width=this.get_vertical()?_9a.style.width:this._itemsElement.offsetWidth+"px";
this._itemsElement.style.height=this._itemsElement.offsetHeight+"px";
_9a.style.overflow="";
_9b.style.width=_9a.style.width;
_9b.style.height=_9a.style.height;
_9b.style.overflow="hidden";
_9b.style.position="relative";
this._itemsElement.style.position="relative";
_99.style.visibility="visible";
},_createButton:function(_9d,_9e){
var _9f=_9d;
if(!_9f){
_9f=document.createElement("div");
}
if(!_9f.className){
_9f.className=this._rotatorDownClass;
}
return _9f;
},_isButtonDisabled:function(_a0){
if(!_a0){
return true;
}
return Sys.UI.DomElement.containsCssClass(_a0,this._rotatorButtonDisabledClass);
},_isScrollDirectionEnabled:function(_a1){
return _a1&this._scrollDirection?true:false;
},_isRotatorTypeEnabled:function(_a2){
return _a2==this._rotatorType?true:false;
},get_rotatorType:function(){
return this._rotatorType;
},set_rotatorType:function(_a3){
this._rotatorType=_a3;
},get_wrapFrames:function(){
return this._wrapFrames;
},set_wrapFrames:function(_a4){
this._wrapFrames=_a4;
},get_scrollDuration:function(){
if(this.isSlideShow()){
return 1;
}else{
return this._scrollDuration;
}
},set_scrollDuration:function(_a5){
this._scrollDuration=_a5;
},set_vertical:function(_a6){
if(this._itemsElement){
Sys.UI.DomElement.addCssClass(this._itemsElement,this._rotatorVerticalClass);
}
},get_vertical:function(){
var _a7=Telerik.Web.UI.RotatorScrollDirection;
return (this._isScrollDirectionEnabled(_a7.Down)||this._isScrollDirectionEnabled(_a7.Up));
},isVertical:function(){
if(this._itemsElement){
return Sys.UI.DomElement.containsCssClass(this._itemsElement,this._rotatorVerticalClass);
}
return false;
},get_height:function(){
return this.get_element().style.height;
},set_height:function(_a8){
this.get_element().style.height=_a8;
},get_width:function(){
return this.get_element().style.width;
},set_width:function(_a9){
this.get_element().style.width=_a9;
},get_scrollDirection:function(){
return this._scrollDirection;
},set_scrollDirection:function(_aa){
this._scrollDirection=_aa;
},get_frameDuration:function(){
return this._frameDuration;
},set_frameDuration:function(_ab){
this._frameDuration=_ab;
},get_controlButtons:function(){
return this._controlButtons;
},set_controlButtons:function(_ac){
this._controlButtons=_ac;
},get_initialItemIndex:function(){
return this._initialItemIndex;
},set_initialItemIndex:function(_ad){
this._initialItemIndex=_ad;
},get_slideShowAnimationSettings:function(){
return this._slideShowAnimationSettings;
},set_slideShowAnimationSettings:function(_ae){
this._slideShowAnimationSettings=_ae;
},set_animationDirection:function(_af){
this._animationDirection=_af?_af:Telerik.Web.UI.RotatorScrollDirection.Left;
},get_animationDirection:function(){
return this._animationDirection;
},_attachEvents:function(_b0){
var _b1=this.get_containerElement();
if(null==_b1){
return;
}
if(_b0!=false){
this._clickDelegate=Function.createDelegate(this,this._mouseClickHandler);
this._mouseOutDelegate=Function.createDelegate(this,this._mouseOutHandler);
this._mouseOverDelegate=Function.createDelegate(this,this._mouseOverHandler);
$addHandler(_b1,"mouseover",this._mouseOverDelegate);
$addHandler(_b1,"mouseout",this._mouseOutDelegate);
$addHandler(_b1,"click",this._clickDelegate);
}else{
$removeHandler(_b1,"mouseover",this._mouseOverDelegate);
$removeHandler(_b1,"mouseout",this._mouseOutDelegate);
$removeHandler(_b1,"click",this._clickDelegate);
this._clickDelegate=null;
this._mouseOutDelegate=null;
this._mouseOverDelegate=null;
}
},_mouseOverHandler:function(_b2){
if(this.isAutomaticAdvance()){
this.pause();
}
var _b3=this._getItemFromEvent(_b2.target);
if(null!=_b3){
this.raiseEvent("mouseOver",new Telerik.Web.UI.RadRotatorEventArgs(_b3));
}
},_mouseOutHandler:function(_b4){
if(this.isAutomaticAdvance()){
this.resume();
}
var _b5=this._getItemFromEvent(_b4.target);
if(null!=_b5){
this.raiseEvent("mouseOut",new Telerik.Web.UI.RadRotatorEventArgs(_b5));
}
},_mouseClickHandler:function(_b6){
var _b7=this._getItemFromEvent(_b6.target);
if(null!=_b7){
var _b8=new Telerik.Web.UI.RadRotatorCancelEventArgs(_b7);
this.raiseEvent("itemClicking",_b8);
if(_b8.get_cancel&&_b8.get_cancel()){
$telerik.cancelRawEvent(_b6.rawEvent);
return false;
}
window.setTimeout(Function.createDelegate(this,function(){
this.raiseEvent("itemClicked",new Telerik.Web.UI.RadRotatorEventArgs(_b7));
this._postback(_b7.get_index());
}),0);
}
},_postback:function(_b9){
if(!this._postBackReference){
return;
}
var _ba=this._postBackReference.replace("arguments",_b9);
eval(_ba);
},_getItemFromEvent:function(_bb){
var _bc=this.get_containerElement();
var _bd=null;
while(null!=_bb&&_bb!=_bc){
if(_bb.tagName.toLowerCase()=="li"&&null!=_bb._item&&Object.getTypeName(_bb._item)=="Telerik.Web.UI.RadRotatorItem"){
_bd=_bb._item;
}
_bb=_bb.parentNode;
}
return _bd;
},_initializeWebServiceLoader:function(){
this._webServiceLoader=new Telerik.Web.UI.WebServiceLoader(this.get_webServiceSettings());
this._webServiceLoader.add_loadingStarted(Function.createDelegate(this,this._onItemLoadingStarted));
this._webServiceLoader.add_loadingSuccess(Function.createDelegate(this,this._onItemLoadingSuccess));
this._webServiceLoader.add_loadingError(Function.createDelegate(this,this._onItemLoadingError));
},_loadChildrenFromWebService:function(_be,_bf){
if(!this._webServiceLoader){
this._initializeWebServiceLoader();
}
var _c0={itemIndex:_be,itemCount:_bf};
this._webServiceLoader.loadData(_c0,_c0);
},_onItemLoadingStarted:function(_c1,_c2){
},_onItemLoadingSuccess:function(_c3,_c4){
var _c5=_c4.get_data();
if(_c5&&_c5.length>0){
for(var i=0;i<_c5.length;i++){
this.createRotatorItem(_c5[i]);
}
}
},_onItemLoadingError:function(_c7,_c8){
var _c9=_c8.get_message();
alert(_c9);
},createRotatorItem:function(_ca){
var _cb=this.get_containerElement();
var _cc=_cb.ownerDocument.createElement("li");
_cb.appendChild(_cc);
_cc.innerHTML=_ca.Html;
var _cd={cssClass:_ca.CssClass,visible:_ca.Visible};
var _ce=$create(Telerik.Web.UI.RadRotatorItem,_cd,null,null,_cc);
_cc._item=_ce;
Array.add(this.get_items(),_ce);
},_getInvisibleParent:function(){
var _cf=this.get_element();
while(_cf&&_cf!=document){
if("none"==$telerik.getCurrentStyle(_cf,"display","")){
return _cf;
}
_cf=_cf.parentNode;
}
return null;
},isVisible:function(){
return (this._getInvisibleParent()==null);
},_fixVisibilityProblems:function(_d0){
if(_d0){
var _d1=this._getInvisibleParent();
if(_d1){
this._onParentVisibilityChangeDelegate=Function.createDelegate(this,this._onParentVisibilityChange);
this._invisibleParent=_d1;
if($telerik.isIE){
$addHandler(this._invisibleParent,"propertychange",this._onParentVisibilityChangeDelegate);
}else{
this._invisibleParent.addEventListener("DOMAttrModified",this._onParentVisibilityChangeDelegate,false);
}
}
}else{
if(this._invisibleParent&&this._onParentVisibilityChangeDelegate){
if($telerik.isIE){
$removeHandler(this._invisibleParent,"propertychange",this._onParentVisibilityChangeDelegate);
}else{
this._invisibleParent.removeEventListener("DOMAttrModified",this._onParentVisibilityChangeDelegate,false);
}
this._onParentVisibilityChangeDelegate=null;
this._invisibleParent=null;
}
}
},_onParentVisibilityChange:function(e){
if($telerik.isIE){
var e=e.rawEvent;
if(!e){
return;
}
if(e.propertyName=="style.display"||e.propertyName=="className"){
var _d3=$telerik.getCurrentStyle(this._invisibleParent,"display");
if(_d3!="none"){
this.repaint();
}
}
}else{
if(e.attrName=="style"||e.attrName=="class"){
var _d4=e.target;
if((e.currentTarget==e.originalTarget)&&"none"!=$telerik.getCurrentStyle(_d4,"display")){
window.setTimeout(Function.createDelegate(this,function(){
this.repaint();
}),0);
}
}
}
this._fixVisibilityProblems(false);
},repaint:function(){
this._createUI();
},add_itemClicking:function(_d5){
this.get_events().addHandler("itemClicking",_d5);
},remove_itemClicking:function(_d6){
this.get_events().removeHandler("itemClicking",_d6);
},add_itemClicked:function(_d7){
this.get_events().addHandler("itemClicked",_d7);
},remove_itemClicked:function(_d8){
this.get_events().removeHandler("itemClicked",_d8);
},add_mouseOver:function(_d9){
this.get_events().addHandler("mouseOver",_d9);
},remove_mouseOver:function(_da){
this.get_events().removeHandler("mouseOver",_da);
},add_mouseOut:function(_db){
this.get_events().addHandler("mouseOut",_db);
},remove_mouseOut:function(_dc){
this.get_events().removeHandler("mouseOut",_dc);
},add_itemShowing:function(_dd){
this.get_events().addHandler("itemShowing",_dd);
},remove_itemShowing:function(_de){
this.get_events().removeHandler("itemShowing",_de);
},add_itemShown:function(_df){
this.get_events().addHandler("itemShown",_df);
},remove_itemShown:function(_e0){
this.get_events().removeHandler("itemShown",_e0);
},get_items:function(){
return this._items;
},set_items:function(_e1){
this._items=_e1;
},get_webServiceSettings:function(){
return this._webServiceSettings;
},set_webServiceSettings:function(_e2){
var _e3=Sys.Serialization.JavaScriptSerializer.deserialize(_e2);
this._webServiceSettings=new Telerik.Web.UI.WebServiceSettings(_e3);
},get_skin:function(){
return this._skin;
},set_skin:function(_e4){
this._skin=_e4;
}};
Telerik.Web.UI.RadRotator.registerClass("Telerik.Web.UI.RadRotator",Telerik.Web.UI.RadWebControl);
Telerik.Web.UI.RadRotatorEventArgs=function(_e5){
Telerik.Web.UI.RadRotatorEventArgs.initializeBase(this);
this._item=_e5;
};
Telerik.Web.UI.RadRotatorEventArgs.prototype={get_item:function(){
return this._item;
}};
Telerik.Web.UI.RadRotatorEventArgs.registerClass("Telerik.Web.UI.RadRotatorEventArgs",Sys.EventArgs);
Telerik.Web.UI.RadRotatorCancelEventArgs=function(_e6){
Telerik.Web.UI.RadRotatorCancelEventArgs.initializeBase(this);
this._item=_e6;
};
Telerik.Web.UI.RadRotatorCancelEventArgs.prototype={get_item:function(){
return this._item;
}};
Telerik.Web.UI.RadRotatorCancelEventArgs.registerClass("Telerik.Web.UI.RadRotatorCancelEventArgs",Sys.CancelEventArgs);
Telerik.Web.UI.RadRotatorItem=function(_e7){
Telerik.Web.UI.RadRotatorItem.initializeBase(this,[_e7]);
this._visible=null;
this._cssClass=null;
this._index=-1;
};
Telerik.Web.UI.RadRotatorItem.prototype={initialize:function(){
Telerik.Web.UI.RadRotatorItem.callBaseMethod(this,"initialize");
},dispose:function(){
Telerik.Web.UI.RadRotatorItem.callBaseMethod(this,"dispose");
},get_index:function(){
if(this._index==-1){
var _e8=0;
var _e9=this.get_element();
var _ea=_e9.parentNode;
if(null!=_ea){
var _eb=$telerik.getChildrenByTagName(_ea,"li");
if(null!=_eb){
for(_e8=0;_e8<_eb.length&&_eb[_e8]!=_e9;_e8++){
}
if(_e8==_eb.length){
_e8=0;
}
}
}
this._index=_e8;
}
return this._index;
},get_visible:function(){
return this._visible;
},set_visible:function(_ec){
this._visible=_ec;
},get_cssClass:function(){
return this._cssClass;
},set_cssClass:function(_ed){
this._cssClass=_ed;
}};
Telerik.Web.UI.RadRotatorItem.registerClass("Telerik.Web.UI.RadRotatorItem",Sys.UI.Control);
Telerik.Web.UI.RotatorScrollDirection=function(){
throw Error.invalidOperation();
};
Telerik.Web.UI.RotatorScrollDirection.prototype={Left:1,Right:2,Up:4,Down:8};
Telerik.Web.UI.RotatorScrollDirection.registerEnum("Telerik.Web.UI.RotatorScrollDirection",false);
Telerik.Web.UI.RotatorAnimationType=function(){
throw Error.invalidOperation();
};
Telerik.Web.UI.RotatorAnimationType.prototype={None:1,Fade:2,Pulse:3};
Telerik.Web.UI.RotatorAnimationType.registerEnum("Telerik.Web.UI.RotatorAnimationType",false);
Telerik.Web.UI.RotatorType=function(){
throw Error.invalidOperation();
};
Telerik.Web.UI.RotatorType.prototype={AutomaticAdvance:1,ButtonsOver:2,Buttons:3,SlideShow:4,SlideShowButtons:5,FromCode:6};
Telerik.Web.UI.RotatorType.registerEnum("Telerik.Web.UI.RotatorType",false);

