﻿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._canPause=true;
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);
this.raiseEvent("load",Sys.EventArgs.Empty);
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);
}
if(this._itemsElement){
$clearHandlers(this._itemsElement);
}
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._setAnimationTimeout(this.get_frameDuration());
}else{
this._animation.play();
}
}));
}
this._animation.stop();
this._animation.play();
},_checkItemsSize:function(){
var _37=$telerik.getOuterSize(this._itemsElement);
var _38=this.get_vertical();
var _39=(_38)?_37.height:_37.width;
var _3a=(_38)?this.get_height():this.get_width();
return parseInt(_39)>parseInt(_3a);
},_shiftItemInList:function(){
var _3b=this._itemsElement;
var lis=this.getItemHtmlElements();
var _3d=this.get_vertical();
var _3e=this.isScrollingForward();
var _3f=parseInt(_3b.style.left);
var _40=parseInt(_3b.style.top);
var _41=_3e?lis[0]:lis[lis.length-1];
var _42=$telerik.getOuterSize(_41);
_41.parentNode.removeChild(_41);
if(!_3e){
_3b.insertBefore(_41,_3b.firstChild);
}
if(_3d){
_3b.style.top=(_40+(_3e?_42.height:-_42.height))+"px";
}else{
_3b.style.left=(_3f+(_3e?_42.width:-_42.width))+"px";
}
if(_3e){
_3b.appendChild(_41);
}
this._nextItemIndex=_3e?lis.length-1:0;
return _41;
},_loadInitialFrame:function(){
var _43=this.get_initialItemIndex();
var _44=this.get_defaultAnimationDirection();
var _45=Telerik.Web.UI.RotatorScrollDirection;
var _46=this.isVertical();
var _47=this._itemsElement;
var _48=$telerik.getOuterSize(_47);
var _49=$telerik.getContentSize(this._clipElement);
var x=0;
var y=0;
if(_43>=0){
if(_46){
y=(_44==_45.Up)?0:-_48.height+_49.height;
}else{
x=(_44==_45.Left)?0:-_48.width+_49.width;
}
}else{
if(_43==-1){
if(_46){
y=(_44==_45.Down)?-_48.height:_49.height;
}else{
x=(_44==_45.Right)?-_48.width:_49.width;
}
}
}
_47.style.left=x+"px";
_47.style.top=y+"px";
if(_43>0&&!this._initialItemSet){
for(var i=0;i<_43;i++){
this._shiftItemInList();
}
_47.style.left=x+"px";
_47.style.top=y+"px";
this._initialItemSet=true;
}
},pause:function(){
this._isPaused=true;
if(this._animation&&this._animation.get_isActive()){
this._animation.pause();
}
},resume:function(){
if(this._timeoutPassed||!this._isPaused){
if(this._animation){
this._animation.play();
}
}
if(this._isPaused){
this._isPaused=false;
if(this._animation&&this._animation.get_isActive()){
this._animation.play();
}
}
},isViewportScrollMode:function(){
var _4d=Telerik.Web.UI.RotatorType;
if(this._isRotatorTypeEnabled(_4d.AutomaticAdvance)||this._isRotatorTypeEnabled(_4d.ButtonsOver)||this._isRotatorTypeEnabled(_4d.FromCode)){
return false;
}
return true;
},_getButtonScrollDirection:function(_4e){
var _4f=Telerik.Web.UI.RotatorScrollDirection;
var _50=_4f.Left;
switch(_4e){
case this._rightButton:
_50=_4f.Left;
break;
case this._leftButton:
_50=_4f.Right;
break;
case this._downButton:
_50=_4f.Up;
break;
case this._upButton:
_50=_4f.Down;
break;
}
return _50;
},_buttonClicked:function(e){
var _52=e.target;
if(this._isButtonDisabled(_52)){
return;
}
var _53=new Telerik.Web.UI.RadRotatorButtonEventArgs(_52);
this.raiseEvent("buttonClick",_53);
if(_53.get_cancel()){
return;
}
var _54=this._getButtonScrollDirection(_52);
this.set_animationDirection(_54);
this.scrollViewport();
return $telerik.cancelRawEvent(e);
},_buttonOver:function(e){
var _56=e.target;
if(this._isButtonDisabled(_56)){
return;
}
var _57=new Telerik.Web.UI.RadRotatorButtonEventArgs(_56);
this.raiseEvent("buttonOver",_57);
if(_57.get_cancel()){
return;
}
var _58=this._getButtonScrollDirection(_56);
this.set_animationDirection(_58);
this._stopAnimationButtonOver=false;
this.scrollItem();
return $telerik.cancelRawEvent(e);
},_buttonOut:function(e){
var _5a=e.target;
if(this._isButtonDisabled(_5a)){
return;
}
var _5b=new Telerik.Web.UI.RadRotatorButtonEventArgs(_5a);
this.raiseEvent("buttonOut",_5b);
if(_5b.get_cancel()){
return;
}
var _5c=this._getButtonScrollDirection(_5a);
this.set_animationDirection(_5c);
this._stopAnimationButtonOver=true;
return $telerik.cancelRawEvent(e);
},_initializeButtonsRotatorType:function(){
var _5d=this.get_controlButtons();
this._rightButton=$telerik.getElementByClassName(this._rootElement,this._rotatorRightClass);
this._leftButton=$telerik.getElementByClassName(this._rootElement,this._rotatorLeftClass);
this._downButton=$telerik.getElementByClassName(this._rootElement,this._rotatorDownClass);
this._upButton=$telerik.getElementByClassName(this._rootElement,this._rotatorUpClass);
var _5e=Telerik.Web.UI.RotatorScrollDirection;
var _5f=[_5e.Right,_5e.Left,_5e.Down,_5e.Up];
var _60=[this._leftButton,this._rightButton,this._upButton,this._downButton];
var _61=[_5d.LeftButtonID?$get(_5d.LeftButtonID):null,_5d.RightButtonID?$get(_5d.RightButtonID):null,_5d.UpButtonID?$get(_5d.UpButtonID):null,_5d.DownButtonID?$get(_5d.DownButtonID):null];
var _62=[this._rotatorLeftClass,this._rotatorRightClass,this._rotatorUpClass,this._rotatorDownClass];
var _63=["marginLeft","marginRight","marginTop","marginBottom"];
var _64=["paddingLeft","paddingRight","paddingTop","paddingBottom"];
var _65=["width","width","height","height"];
var _66=this._relativeWrapper;
var _67=this.get_element();
for(var i=0;i<_60.length;i++){
var _69=_60[i];
var _6a=(null!=_61[i])?_61[i]:_69;
this._createButton(_69,_62[i]);
if(this._isScrollDirectionEnabled(_5f[i])&&null==_61[i]){
_69.style.display="block";
var _6b=_65[i];
var _6c=parseInt($telerik.getCurrentStyle(_69,_6b));
_66.style[_6b]=(parseInt(_66.style[_6b])-_6c)+"px";
_67.style[_6b]=(parseInt(_67.style[_6b])-_6c)+"px";
_67.style[_64[i]]=_6c+"px";
}
if(this._isRotatorTypeEnabled(Telerik.Web.UI.RotatorType.Buttons)||this._isRotatorTypeEnabled(Telerik.Web.UI.RotatorType.SlideShowButtons)){
$addHandlers(_6a,{"click":this._buttonClicked},this);
}else{
$addHandlers(_6a,{"mouseover":this._buttonOver,"mouseout":this._buttonOut},this);
}
}
this._rightButton=_61[1]||this._rightButton;
this._leftButton=_61[0]||this._leftButton;
this._downButton=_61[3]||this._downButton;
this._upButton=_61[2]||this._upButton;
var _6d=false;
for(var i=0;i<_61.length;i++){
if(_61[i]){
_6d=true;
}
break;
}
return _6d;
},runSlideShowAnimation:function(){
if(!this._slideShowAnimation){
var _6e=this._itemsElement;
var _6f=this.get_slideShowAnimationSettings().duration||500;
_6f=_6f/1000;
var _70=this.get_slideShowAnimationSettings().type||Telerik.Web.UI.RotatorAnimationType.None;
var _71=Function.createDelegate(this,function(){
this._canPause=false;
});
var _72=Function.createDelegate(this,function(){
this._canPause=true;
var _73=null;
this.raiseEvent("itemShown",new Telerik.Web.UI.RadRotatorEventArgs(_73));
if(this.get_frameDuration()>0&&this.isAutomaticAdvance()){
this._setAnimationTimeout(this.get_frameDuration());
}
});
switch(_70){
case Telerik.Web.UI.RotatorAnimationType.Fade:
this._slideShowAnimation=new Telerik.Web.Animation.FadeInAnimation(_6e,_6f);
this._slideShowAnimation.add_started(_71);
this._slideShowAnimation.add_ended(_72);
break;
case Telerik.Web.UI.RotatorAnimationType.Pulse:
this._slideShowAnimation=new Telerik.Web.Animation.PulseAnimation(_6e,null);
this._slideShowAnimation.set_iterations(1);
this._slideShowAnimation.set_duration(_6f);
this._slideShowAnimation.add_ended(_72);
break;
default:
this._slideShowAnimation={};
this._slideShowAnimation.play=_72;
this._slideShowAnimation.dispose=function(){
};
break;
}
}
this._slideShowAnimation.play();
},_hasViewportWidth:function(_74){
if(null==_74){
_74=this.get_animationDirection();
}
var _75=this._itemsElement;
var _76=this._clipElement;
var _77=parseInt(_75.style.left);
var _78=parseInt(_75.style.top);
var _79=$telerik.getOuterSize(_75);
var _7a=$telerik.getContentSize(_76);
var _7b=false;
var _7c=Telerik.Web.UI.RotatorScrollDirection;
switch(_74){
case _7c.Left:
_7b=_79.width+_77>_7a.width*2;
break;
case _7c.Up:
_7b=_79.height+_78>_7a.height*2;
break;
case _7c.Right:
_7b=(_77*-1>_7a.width);
break;
case _7c.Down:
_7b=(_78*-1>_7a.height);
break;
}
return _7b;
},stopViewportAnimation:function(){
var _7d=this._animation;
if(!_7d){
return;
}
if(_7d.get_isPlaying()){
_7d.stop();
var _7e=this.get_vertical();
var _7f=_7e?_7d.get_vertical():_7d.get_horizontal();
if(null!=_7f){
this._itemsElement.style[_7e?"top":"left"]=_7f+"px";
}
}
},_getViewPortPixelsToScroll:function(){
var _80=this.get_vertical();
var _81=$telerik.getContentSize(this._clipElement);
var _82=_80?_81.height:_81.width;
return _82;
},showNext:function(_83){
this.set_animationDirection(_83);
if(!this._checkItemsSize()){
return;
}
if(this.isViewportScrollMode()){
this.scrollViewport();
}else{
this.scrollItem();
}
},getItemHtmlElements:function(){
var _84=this._itemsElement;
if(!this._hasCleanedList){
var _85=_84.childNodes;
for(var i=0;i<_85.length;i++){
var _87=_85[i];
if(_87&&_87.tagName!="LI"){
_84.removeChild(_87);
i--;
}
}
this._hasCleanedList=true;
}
return _84.childNodes;
},_getCalculatedAnimationDuration:function(_88){
var _89=this.get_scrollDuration()/1000;
return _89;
},_setAnimationTimeout:function(_8a){
this._clearAnimationTimeout();
this._timeoutPassed=false;
this._currentAnimationTimeout=window.setTimeout(Function.createDelegate(this,function(){
if(!this._isPaused){
this.resume();
}
this._timeoutPassed=true;
}),_8a);
},_clearAnimationTimeout:function(){
if(this._currentAnimationTimeout){
window.clearTimeout(this._currentAnimationTimeout);
}
this._currentAnimationTimeout=0;
},isAutomaticAdvance:function(){
var _8b=Telerik.Web.UI.RotatorType;
if(this._isRotatorTypeEnabled(_8b.AutomaticAdvance)||this._isRotatorTypeEnabled(_8b.SlideShow)){
return true;
}
return false;
},isSlideShow:function(){
var _8c=Telerik.Web.UI.RotatorType;
if(this._isRotatorTypeEnabled(_8c.SlideShow)||this._isRotatorTypeEnabled(_8c.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(_8d){
return _8d==this.get_animationDirection()?true:false;
},_enableDisableButtons:function(){
if(this._rotatorType==Telerik.Web.UI.RotatorType.AutomaticAdvance){
return;
}
var _8e=this.get_wrapFrames();
var _8f=Telerik.Web.UI.RotatorScrollDirection;
this._enableButton(this._rightButton,_8e||this._canSlideMore(_8f.Left));
this._enableButton(this._leftButton,_8e||this._canSlideMore(_8f.Right));
this._enableButton(this._downButton,_8e||this._canSlideMore(_8f.Up));
this._enableButton(this._upButton,_8e||this._canSlideMore(_8f.Down));
},_enableButton:function(_90,_91){
if(!_90){
return;
}
if(_91){
Sys.UI.DomElement.removeCssClass(_90,this._rotatorButtonDisabledClass);
_90.removeAttribute("disabled");
}else{
Sys.UI.DomElement.addCssClass(_90,this._rotatorButtonDisabledClass);
_90.setAttribute("disabled","disabled");
}
},_canSlideMore:function(_92){
if(null==_92){
_92=this.get_animationDirection();
}
var _93=false;
var _94=this._itemsElement;
var _95=this._clipElement;
var _96=Telerik.Web.UI.RotatorScrollDirection;
var _97=parseInt(_94.style.left);
var _98=parseInt(_94.style.top);
var _99=$telerik.getBounds(_94);
var _9a=$telerik.getBounds(_95);
if(_92==_96.Left){
_93=(_99.width+_97)>_9a.width;
}else{
if(_92==_96.Up){
_93=(_99.height+_98)>_9a.height;
}else{
if(_92==_96.Right){
_93=(_97<0);
}else{
if(_92==_96.Down){
_93=(_98<0);
}
}
}
}
return _93;
},_getCalculatedAnimationDirection:function(){
var _9b=this.get_animationDirection();
var _9c=Telerik.Web.UI.RotatorScrollDirection;
var _9d=23;
switch(_9b){
case _9c.Left:
_9d=21;
break;
case _9c.Down:
_9d=32;
break;
case _9c.Up:
_9d=12;
break;
default:
_9d=23;
}
return _9d;
},startAutoPlay:function(){
this._loadInitialFrame();
this.showNext(this.get_defaultAnimationDirection());
},get_defaultAnimationDirection:function(){
var _9e=Telerik.Web.UI.RotatorScrollDirection;
var dir=0;
if(this._isScrollDirectionEnabled(_9e.Left)){
dir=_9e.Left;
}else{
if(this._isScrollDirectionEnabled(_9e.Up)){
dir=_9e.Up;
}else{
if(this._isScrollDirectionEnabled(_9e.Right)){
dir=_9e.Right;
}else{
if(this._isScrollDirectionEnabled(_9e.Down)){
dir=_9e.Down;
}
}
}
}
if(!dir){
dir=_9e.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.getElementByClassName(this._rootElement,this._rotatorRelativeWrapperClass);
this._clipElement=$telerik.getElementByClassName(this._rootElement,this._rotatorClipRegionClass);
this._itemsElement=$telerik.getElementByClassName(this._rootElement,this._rotatorListClass);
},_createUI:function(){
if(!this.isVisible()){
return;
}
var _a0=this.get_element();
var _a1=this._relativeWrapper;
var _a2=this._clipElement;
_a1.style.height=_a0.offsetHeight+"px";
_a1.style.width=_a0.offsetWidth+"px";
var _a3=true;
if(this._isRotatorTypeEnabled(Telerik.Web.UI.RotatorType.Buttons)||this._isRotatorTypeEnabled(Telerik.Web.UI.RotatorType.ButtonsOver)||this._isRotatorTypeEnabled(Telerik.Web.UI.RotatorType.SlideShowButtons)){
_a3=this._initializeButtonsRotatorType();
}
if(_a3){
Sys.UI.DomElement.addCssClass(_a0,"radr_noBorder");
}
if(this.get_vertical()){
this.set_vertical(true);
}
_a1.style.overflow="auto";
_a2.style.overflow="auto";
_a2.style.width="10000px";
_a2.style.height="10000px";
this._itemsElement.style.width=this.get_vertical()?_a1.style.width:this._itemsElement.offsetWidth+"px";
this._itemsElement.style.height=this._itemsElement.offsetHeight+"px";
_a1.style.overflow="";
_a2.style.width=_a1.style.width;
_a2.style.height=_a1.style.height;
_a2.style.overflow="hidden";
_a2.style.position="relative";
this._itemsElement.style.position="relative";
_a0.style.visibility="visible";
},_createButton:function(_a4,_a5){
var _a6=_a4;
if(!_a6){
_a6=document.createElement("div");
}
if(!_a6.className){
_a6.className=this._rotatorDownClass;
}
return _a6;
},_isButtonDisabled:function(_a7){
if(!_a7){
return true;
}
return Sys.UI.DomElement.containsCssClass(_a7,this._rotatorButtonDisabledClass);
},_isScrollDirectionEnabled:function(_a8){
return _a8&this._scrollDirection?true:false;
},_isRotatorTypeEnabled:function(_a9){
return _a9==this._rotatorType?true:false;
},get_rotatorType:function(){
return this._rotatorType;
},set_rotatorType:function(_aa){
this._rotatorType=_aa;
},get_wrapFrames:function(){
return this._wrapFrames;
},set_wrapFrames:function(_ab){
this._wrapFrames=_ab;
},get_scrollDuration:function(){
if(this.isSlideShow()){
return 1;
}else{
return this._scrollDuration;
}
},set_scrollDuration:function(_ac){
this._scrollDuration=_ac;
},set_vertical:function(_ad){
if(this._itemsElement){
Sys.UI.DomElement.addCssClass(this._itemsElement,this._rotatorVerticalClass);
}
},get_vertical:function(){
var _ae=Telerik.Web.UI.RotatorScrollDirection;
return (this._isScrollDirectionEnabled(_ae.Down)||this._isScrollDirectionEnabled(_ae.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(_af){
this.get_element().style.height=_af;
if(this.isVisible()){
this.repaint();
}
},get_width:function(){
return this.get_element().style.width;
},set_width:function(_b0){
this.get_element().style.width=_b0;
if(this.isVisible()){
this.repaint();
}
},get_scrollDirection:function(){
return this._scrollDirection;
},set_scrollDirection:function(_b1){
this._scrollDirection=_b1;
},get_frameDuration:function(){
return this._frameDuration;
},set_frameDuration:function(_b2){
this._frameDuration=_b2;
},get_controlButtons:function(){
return this._controlButtons;
},set_controlButtons:function(_b3){
this._controlButtons=_b3;
},get_initialItemIndex:function(){
return this._initialItemIndex;
},set_initialItemIndex:function(_b4){
this._initialItemIndex=_b4;
},get_slideShowAnimationSettings:function(){
return this._slideShowAnimationSettings;
},set_slideShowAnimationSettings:function(_b5){
this._slideShowAnimationSettings=_b5;
},set_animationDirection:function(_b6){
this._animationDirection=_b6?_b6:Telerik.Web.UI.RotatorScrollDirection.Left;
},get_animationDirection:function(){
return this._animationDirection;
},_attachEvents:function(_b7){
var _b8=this.get_containerElement();
if(null==_b8){
return;
}
if(_b7!=false){
this._clickDelegate=Function.createDelegate(this,this._mouseClickHandler);
this._mouseOutDelegate=Function.createDelegate(this,this._mouseOutHandler);
this._mouseOverDelegate=Function.createDelegate(this,this._mouseOverHandler);
$addHandler(_b8,"mouseover",this._mouseOverDelegate);
$addHandler(_b8,"mouseout",this._mouseOutDelegate);
$addHandler(_b8,"click",this._clickDelegate);
}else{
$removeHandler(_b8,"mouseover",this._mouseOverDelegate);
$removeHandler(_b8,"mouseout",this._mouseOutDelegate);
$removeHandler(_b8,"click",this._clickDelegate);
this._clickDelegate=null;
this._mouseOutDelegate=null;
this._mouseOverDelegate=null;
}
},_mouseOverHandler:function(_b9){
if(this.isAutomaticAdvance()&&this._canPause){
this.pause();
}
var _ba=this._getItemFromEvent(_b9.target);
if(null!=_ba){
this.raiseEvent("mouseOver",new Telerik.Web.UI.RadRotatorEventArgs(_ba));
}
},_mouseOutHandler:function(_bb){
if(this.isAutomaticAdvance()&&this._canPause){
this.resume();
}
var _bc=this._getItemFromEvent(_bb.target);
if(null!=_bc){
this.raiseEvent("mouseOut",new Telerik.Web.UI.RadRotatorEventArgs(_bc));
}
},_mouseClickHandler:function(_bd){
var _be=this._getItemFromEvent(_bd.target);
if(null!=_be){
var _bf=new Telerik.Web.UI.RadRotatorCancelEventArgs(_be);
this.raiseEvent("itemClicking",_bf);
if(_bf.get_cancel&&_bf.get_cancel()){
$telerik.cancelRawEvent(_bd.rawEvent);
return false;
}
window.setTimeout(Function.createDelegate(this,function(){
this.raiseEvent("itemClicked",new Telerik.Web.UI.RadRotatorEventArgs(_be));
this._postback(_be.get_index());
}),0);
}
},_postback:function(_c0){
if(!this._postBackReference){
return;
}
var _c1=this._postBackReference.replace("arguments",_c0);
eval(_c1);
},_getItemFromEvent:function(_c2){
var _c3=this.get_containerElement();
var _c4=null;
while(null!=_c2&&_c2!=_c3){
if(_c2.tagName.toLowerCase()=="li"&&null!=_c2._item&&Object.getTypeName(_c2._item)=="Telerik.Web.UI.RadRotatorItem"){
_c4=_c2._item;
}
_c2=_c2.parentNode;
}
return _c4;
},_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(_c5,_c6){
if(!this._webServiceLoader){
this._initializeWebServiceLoader();
}
var _c7={itemIndex:_c5,itemCount:_c6};
this._webServiceLoader.loadData(_c7,_c7);
},_onItemLoadingStarted:function(_c8,_c9){
},_onItemLoadingSuccess:function(_ca,_cb){
var _cc=_cb.get_data();
if(_cc&&_cc.length>0){
for(var i=0;i<_cc.length;i++){
this.createRotatorItem(_cc[i]);
}
}
},_onItemLoadingError:function(_ce,_cf){
var _d0=_cf.get_message();
alert(_d0);
},createRotatorItem:function(_d1){
var _d2=this.get_containerElement();
var _d3=_d2.ownerDocument.createElement("li");
_d2.appendChild(_d3);
_d3.innerHTML=_d1.Html;
var _d4={cssClass:_d1.CssClass,visible:_d1.Visible};
var _d5=$create(Telerik.Web.UI.RadRotatorItem,_d4,null,null,_d3);
_d3._item=_d5;
Array.add(this.get_items(),_d5);
},_getInvisibleParent:function(){
var _d6=this.get_element();
while(_d6&&_d6!=document){
if("none"==$telerik.getCurrentStyle(_d6,"display","")){
return _d6;
}
_d6=_d6.parentNode;
}
return null;
},isVisible:function(){
return (this._getInvisibleParent()==null);
},_fixVisibilityProblems:function(_d7){
if(_d7){
var _d8=this._getInvisibleParent();
if(_d8){
this._onParentVisibilityChangeDelegate=Function.createDelegate(this,this._onParentVisibilityChange);
this._invisibleParent=_d8;
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 _da=$telerik.getCurrentStyle(this._invisibleParent,"display");
if(_da!="none"){
this.repaint();
}
}
}else{
if(e.attrName=="style"||e.attrName=="class"){
var _db=e.target;
if((e.currentTarget==e.originalTarget)&&"none"!=$telerik.getCurrentStyle(_db,"display")){
window.setTimeout(Function.createDelegate(this,function(){
this.repaint();
}),0);
}
}
}
this._fixVisibilityProblems(false);
},repaint:function(){
this._createUI();
},add_itemClicking:function(_dc){
this.get_events().addHandler("itemClicking",_dc);
},remove_itemClicking:function(_dd){
this.get_events().removeHandler("itemClicking",_dd);
},add_itemClicked:function(_de){
this.get_events().addHandler("itemClicked",_de);
},remove_itemClicked:function(_df){
this.get_events().removeHandler("itemClicked",_df);
},add_mouseOver:function(_e0){
this.get_events().addHandler("mouseOver",_e0);
},remove_mouseOver:function(_e1){
this.get_events().removeHandler("mouseOver",_e1);
},add_mouseOut:function(_e2){
this.get_events().addHandler("mouseOut",_e2);
},remove_mouseOut:function(_e3){
this.get_events().removeHandler("mouseOut",_e3);
},add_itemShowing:function(_e4){
this.get_events().addHandler("itemShowing",_e4);
},remove_itemShowing:function(_e5){
this.get_events().removeHandler("itemShowing",_e5);
},add_itemShown:function(_e6){
this.get_events().addHandler("itemShown",_e6);
},remove_itemShown:function(_e7){
this.get_events().removeHandler("itemShown",_e7);
},add_load:function(_e8){
this.get_events().addHandler("load",_e8);
},remove_load:function(_e9){
this.get_events().removeHandler("load",_e9);
},add_buttonOver:function(_ea){
this.get_events().addHandler("buttonOver",_ea);
},remove_buttonOver:function(_eb){
this.get_events().removeHandler("buttonOver",_eb);
},add_buttonOut:function(_ec){
this.get_events().addHandler("buttonOut",_ec);
},remove_buttonOut:function(_ed){
this.get_events().removeHandler("buttonOut",_ed);
},add_buttonClick:function(_ee){
this.get_events().addHandler("buttonClick",_ee);
},remove_buttonClick:function(_ef){
this.get_events().removeHandler("buttonClick",_ef);
},get_items:function(){
return this._items;
},set_items:function(_f0){
this._items=_f0;
},get_webServiceSettings:function(){
return this._webServiceSettings;
},set_webServiceSettings:function(_f1){
var _f2=Sys.Serialization.JavaScriptSerializer.deserialize(_f1);
this._webServiceSettings=new Telerik.Web.UI.WebServiceSettings(_f2);
},get_skin:function(){
return this._skin;
},set_skin:function(_f3){
this._skin=_f3;
}};
Telerik.Web.UI.RadRotator.registerClass("Telerik.Web.UI.RadRotator",Telerik.Web.UI.RadWebControl);
Telerik.Web.UI.RadRotatorEventArgs=function(_f4){
Telerik.Web.UI.RadRotatorEventArgs.initializeBase(this);
this._item=_f4;
};
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(_f5){
Telerik.Web.UI.RadRotatorCancelEventArgs.initializeBase(this);
this._item=_f5;
};
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.RadRotatorButtonEventArgs=function(_f6){
Telerik.Web.UI.RadRotatorButtonEventArgs.initializeBase(this);
this._button=_f6;
};
Telerik.Web.UI.RadRotatorButtonEventArgs.prototype={get_button:function(){
return this._button;
}};
Telerik.Web.UI.RadRotatorButtonEventArgs.registerClass("Telerik.Web.UI.RadRotatorButtonEventArgs",Sys.CancelEventArgs);
Telerik.Web.UI.RadRotatorItem=function(_f7){
Telerik.Web.UI.RadRotatorItem.initializeBase(this,[_f7]);
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 _f8=0;
var _f9=this.get_element();
var _fa=_f9.parentNode;
if(null!=_fa){
var _fb=$telerik.getChildrenByTagName(_fa,"li");
if(null!=_fb){
for(_f8=0;_f8<_fb.length&&_fb[_f8]!=_f9;_f8++){
}
if(_f8==_fb.length){
_f8=0;
}
}
}
this._index=_f8;
}
return this._index;
},get_visible:function(){
return this._visible;
},set_visible:function(_fc){
this._visible=_fc;
},get_cssClass:function(){
return this._cssClass;
},set_cssClass:function(_fd){
this._cssClass=_fd;
}};
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);


if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();