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._itemShownDelegate=null;
this._rotatorDisposed=false;
this._useRandomSlide=false;
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._pauseOnMouseOver=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._rotatorDisposed=false;
this._wrapFramesFinished=false;
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._rotatorDisposed=true;
this._fixVisibilityProblems(false);
this._attachEvents(false);
this._containerElement=null;
if(this._animation){
this._animation.dispose();
this._animation=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_firstItem:function(){
var _c=this._firstItem;
if(!_c){
var _d=this.getItemHtmlElements();
_c=this.isScrollingForward()?_d[0]:_d[_d.length-1];
}
return _c;
},get_currentItem:function(){
var _e=this.getItemHtmlElements();
var _f=parseInt(_e[0].parentNode.style.left),_10="left";
if(isNaN(_f)||_f==0){
_f=parseInt(_e[0].parentNode.style.top);
_10="top";
}
var i=0,len=_e.length;
while(_f<0&&i<len){
var _13=$telerik.getOuterSize(_e[i]);
_f=_f+(_10=="top"?_13.height:_13.width);
i++;
}
var _14=i<len?_e[i].control:null;
return _14;
},_needsShift:function(_15){
if(null==_15){
_15=this.get_animationDirection();
}
var _16=this._itemsElement;
var _17=this._clipElement;
var _18=parseInt(_16.style.left);
var _19=parseInt(_16.style.top);
var _1a=$telerik.getOuterSize(_16);
var _1b=$telerik.getContentSize(_17);
var _1c=this.get_firstItem();
if(!_1c){
return false;
}
var _1d=$telerik.getOuterSize(_1c);
var _1e=false;
var _1f=Telerik.Web.UI.RotatorScrollDirection;
switch(_15){
case _1f.Left:
_1e=_18+_1a.width<_1b.width+_1d.width;
break;
case _1f.Up:
_1e=_19+_1a.height<_1b.height+_1d.height;
break;
case _1f.Right:
_1e=_18*-1<_1d.width;
break;
case _1f.Down:
_1e=_19*-1<_1b.height;
break;
}
return _1e;
},_getMoveAnimation:function(){
if(!this._animation){
var _20=this._itemsElement;
var _21=this.get_scrollDuration();
var fps=25;
this._animation=new Telerik.Web.UI.Animations.jMove(this,_20,_21,true,false);
this._animation.initialize();
}
return this._animation;
},scrollViewport:function(){
var _23=this._itemsElement;
if(!this._animation){
var _24=this._getMoveAnimation();
var _25=Function.createDelegate(this,function(){
var _26=this._hasViewportWidth();
if(!_26&&this.get_wrapFrames()){
var _27=this.getItemHtmlElements().length;
for(var i=0;i<_27;i++){
this._shiftItemInList();
_26=this._hasViewportWidth();
if(_26){
break;
}
}
}
var _29=this._getViewPortPixelsToScroll();
var _2a=this.isScrollingForward();
if(this.get_vertical()){
var _2b=parseInt(_23.style.top)+(_2a?-_29:_29);
_24.set_vertical(_2b);
}else{
var _2b=parseInt(_23.style.left)+(_2a?-_29:_29);
_24.set_horizontal(_2b);
}
});
_24.add_started(Function.createDelegate(this,function(_2c,_2d){
this.stopViewportAnimation();
var _2e=!this._hasViewportWidth();
if(_2e&&!this.get_wrapFrames()){
var _2f=this.get_animationDirection();
if(this._wrapFramesFinished==_2f){
_2d.set_cancel(true);
return false;
}else{
this._wrapFramesFinished=_2f;
}
}else{
this._wrapFramesFinished=0;
}
var _30=this.get_currentItem();
var _31=new Telerik.Web.UI.RadRotatorCancelEventArgs(_30);
this.raiseEvent("itemShowing",_31);
if(_31.get_cancel&&_31.get_cancel()){
_2d.set_cancel(true);
return false;
}
if(this.isSlideShow()){
_23.style.visibility="hidden";
}
_25();
}));
_24.add_ended(Function.createDelegate(this,function(){
this._enableDisableButtons();
if(this.isSlideShow()){
_23.style.visibility="visible";
this.runSlideShowAnimation();
}else{
var _32=this.get_currentItem();
this.raiseEvent("itemShown",new Telerik.Web.UI.RadRotatorEventArgs(_32));
}
}));
}
this._animation.play();
},scrollItem:function(){
var _33=this._clipElement;
var _34=this._itemsElement;
if(!this._animation){
var _35=this._animation=this._getMoveAnimation();
if(this.isAutomaticAdvance()||this._isRotatorTypeEnabled(Telerik.Web.UI.RotatorType.ButtonsOver)){
_35.set_isCyclic(true);
}
var _36=Function.createDelegate(this,function(){
var _37=this._getNextItemToShow();
if(!_37){
return;
}
this._firstItem=_37;
var _38=$telerik.getOuterSize(_37);
if(this.isScrollingForward()){
_38.width*=-1;
_38.height*=-1;
}
if(this.get_vertical()){
var _39=parseInt(_34.style.top)+_38.height;
_35.set_vertical(_39);
}else{
var _39=parseInt(_34.style.left)+_38.width;
_35.set_horizontal(_39);
}
});
_35.add_started(Function.createDelegate(this,function(_3a,_3b){
var _3c=this._needsShift(_3d);
if(_3c&&!this.get_wrapFrames()){
var _3d=this.get_animationDirection();
if(this._wrapFramesFinished==_3d){
_3b.set_cancel(true);
return false;
}else{
this._wrapFramesFinished=_3d;
}
}else{
this._wrapFramesFinished=0;
}
var _3e=this.get_currentItem();
var _3f=new Telerik.Web.UI.RadRotatorCancelEventArgs(_3e);
this.raiseEvent("itemShowing",_3f);
if(_3f.get_cancel&&_3f.get_cancel()){
_3b.set_cancel(true);
return false;
}
if(_3c&&this.get_wrapFrames()){
this._shiftItemInList();
}
if(this._stopAnimationButtonOver){
return;
}
_36();
}));
_35.add_ended(Function.createDelegate(this,function(){
this._enableDisableButtons();
var _40=this.get_currentItem();
if(_40!=null){
this.raiseEvent("itemShown",new Telerik.Web.UI.RadRotatorEventArgs(_40));
}
if(this._stopAnimationButtonOver){
return;
}
if(this.isAutomaticAdvance()||this._isRotatorTypeEnabled(Telerik.Web.UI.RotatorType.ButtonsOver)){
if(this.get_frameDuration()>0){
this._setAnimationTimeout(this.get_frameDuration());
}else{
this._animation.play();
}
}
}));
}
this._animation.stop();
this._animation.play();
},_checkItemsSize:function(){
var _41=$telerik.getOuterSize(this._itemsElement);
var _42=this.get_vertical();
var _43=(_42)?_41.height:_41.width;
var _44=(_42)?this.get_height():this.get_width();
return parseInt(_43)>parseInt(_44);
},_shiftItemInList:function(){
var _45=this._itemsElement;
var lis=this.getItemHtmlElements();
var _47=this.get_vertical();
var _48=this.isScrollingForward();
var _49=parseInt(_45.style.left);
var _4a=parseInt(_45.style.top);
var _4b=_48?lis[0]:lis[lis.length-1];
var _4c=$telerik.getOuterSize(_4b);
_4b.parentNode.removeChild(_4b);
if(!_48){
_45.insertBefore(_4b,_45.firstChild);
}
if(_47){
_45.style.top=(_4a+(_48?_4c.height:-_4c.height))+"px";
}else{
_45.style.left=(_49+(_48?_4c.width:-_4c.width))+"px";
}
if(_48){
_45.appendChild(_4b);
}
this._nextItemIndex=_48?lis.length-1:0;
return _4b;
},_loadInitialFrame:function(){
var _4d=this.get_initialItemIndex();
var _4e=this.get_defaultAnimationDirection();
var _4f=Telerik.Web.UI.RotatorScrollDirection;
var _50=this.isVertical();
var _51=this._itemsElement;
var _52=$telerik.getOuterSize(_51);
var _53=$telerik.getContentSize(this._clipElement);
var x=0;
var y=0;
if(_4d>=0){
if(_50){
y=(_4e==_4f.Up)?0:-_52.height+_53.height;
}else{
x=(_4e==_4f.Left)?0:-_52.width+_53.width;
}
}else{
if(_4d==-1){
if(_50){
y=(_4e==_4f.Down)?-_52.height:_53.height;
}else{
x=(_4e==_4f.Right)?-_52.width:_53.width;
}
}
}
_51.style.left=x+"px";
_51.style.top=y+"px";
if(_4d>0&&!this._initialItemSet){
for(var i=0;i<_4d;i++){
this._shiftItemInList();
}
_51.style.left=x+"px";
_51.style.top=y+"px";
}
if(!this._initialItemSet&&_4d>=0){
this.raiseEvent("itemShown",new Telerik.Web.UI.RadRotatorEventArgs(this.get_items()[_4d]));
}
this._initialItemSet=true;
},pause:function(){
if(this._isPaused){
return;
}
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(this._timeoutPassed);
}
}else{
if(this._isPaused){
if(this._animation&&this._animation.get_isActive()){
this._animation.play();
}
}
}
this._isPaused=false;
},stop:function(){
this._clearAnimationTimeout();
this._canPause=false;
this.pause();
},start:function(){
this._canPause=true;
this._isPaused=false;
this.resume();
},isViewportScrollMode:function(){
var _57=Telerik.Web.UI.RotatorType;
if(this._isRotatorTypeEnabled(_57.AutomaticAdvance)||this._isRotatorTypeEnabled(_57.ButtonsOver)||this._isRotatorTypeEnabled(_57.FromCode)){
return false;
}
return true;
},_getButtonScrollDirection:function(_58){
var _59=Telerik.Web.UI.RotatorScrollDirection;
var _5a=_59.Left;
switch(_58){
case this._rightButton:
_5a=_59.Left;
break;
case this._leftButton:
_5a=_59.Right;
break;
case this._downButton:
_5a=_59.Up;
break;
case this._upButton:
_5a=_59.Down;
break;
}
return _5a;
},_buttonClicked:function(e){
var _5c=e.target;
if(this._isButtonDisabled(_5c)){
return;
}
var _5d=new Telerik.Web.UI.RadRotatorButtonEventArgs(_5c);
this.raiseEvent("buttonClick",_5d);
if(_5d.get_cancel()){
return;
}
var _5e=this._getButtonScrollDirection(_5c);
this.set_animationDirection(_5e);
this.scrollViewport();
return $telerik.cancelRawEvent(e);
},_buttonOver:function(e){
var _60=e.target;
if(this._isButtonDisabled(_60)){
return;
}
var _61=new Telerik.Web.UI.RadRotatorButtonEventArgs(_60);
this.raiseEvent("buttonOver",_61);
if(_61.get_cancel()){
return;
}
var _62=this._getButtonScrollDirection(_60);
this.set_animationDirection(_62);
this._stopAnimationButtonOver=false;
this.scrollItem();
return $telerik.cancelRawEvent(e);
},_buttonOut:function(e){
var _64=e.target;
if(this._isButtonDisabled(_64)){
return;
}
var _65=new Telerik.Web.UI.RadRotatorButtonEventArgs(_64);
this.raiseEvent("buttonOut",_65);
if(_65.get_cancel()){
return;
}
var _66=this._getButtonScrollDirection(_64);
this.set_animationDirection(_66);
this._stopAnimationButtonOver=true;
return $telerik.cancelRawEvent(e);
},_initializeButtonsRotatorType:function(){
var _67=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 _68=Telerik.Web.UI.RotatorScrollDirection;
var _69=[_68.Right,_68.Left,_68.Down,_68.Up];
var _6a=[this._leftButton,this._rightButton,this._upButton,this._downButton];
var _6b=[_67.LeftButtonID?$get(_67.LeftButtonID):null,_67.RightButtonID?$get(_67.RightButtonID):null,_67.UpButtonID?$get(_67.UpButtonID):null,_67.DownButtonID?$get(_67.DownButtonID):null];
var _6c=[this._rotatorLeftClass,this._rotatorRightClass,this._rotatorUpClass,this._rotatorDownClass];
var _6d=["marginLeft","marginRight","marginTop","marginBottom"];
var _6e=["paddingLeft","paddingRight","paddingTop","paddingBottom"];
var _6f=["width","width","height","height"];
var _70=this._relativeWrapper;
var _71=this.get_element();
for(var i=0;i<_6a.length;i++){
var _73=_6a[i];
var _74=(null!=_6b[i])?_6b[i]:_73;
this._createButton(_73,_6c[i]);
if(this._isScrollDirectionEnabled(_69[i])&&null==_6b[i]){
_73.style.display="block";
var _75=_6f[i];
var _76=parseInt($telerik.getCurrentStyle(_73,_75));
_70.style[_75]=(parseInt(_70.style[_75])-_76)+"px";
_71.style[_75]=(parseInt(_71.style[_75])-_76)+"px";
_71.style[_6e[i]]=_76+"px";
}
if(this._isRotatorTypeEnabled(Telerik.Web.UI.RotatorType.Buttons)||this._isRotatorTypeEnabled(Telerik.Web.UI.RotatorType.SlideShowButtons)){
$addHandlers(_74,{"click":this._buttonClicked},this);
}else{
$addHandlers(_74,{"mouseover":this._buttonOver,"mouseout":this._buttonOut},this);
}
}
this._rightButton=_6b[1]||this._rightButton;
this._leftButton=_6b[0]||this._leftButton;
this._downButton=_6b[3]||this._downButton;
this._upButton=_6b[2]||this._upButton;
var _77=false;
for(var i=0;i<_6b.length;i++){
if(_6b[i]){
_77=true;
}
break;
}
return _77;
},runSlideShowAnimation:function(){
var _78=this._itemsElement;
var _79=this.get_slideShowAnimationSettings().duration||500;
var _7a=this.get_slideShowAnimationSettings().type||Telerik.Web.UI.RotatorAnimationType.None;
var _7b=Function.createDelegate(this,function(){
this._canPause=true;
var _7c=this.get_currentItem();
this.raiseEvent("itemShown",new Telerik.Web.UI.RadRotatorEventArgs(_7c));
if(this.get_frameDuration()>0&&this.isAutomaticAdvance()){
this._setAnimationTimeout(this.get_frameDuration());
}
});
switch(_7a){
case Telerik.Web.UI.RotatorAnimationType.Fade:
this._canPause=false;
$telerik.$(_78).css("opacity","0").fadeTo(_79,1,_7b);
break;
case Telerik.Web.UI.RotatorAnimationType.Pulse:
this._canPause=false;
$telerik.$(_78).fadeTo(_79,0).fadeTo(_79,1,_7b);
break;
default:
_7b();
break;
}
},_hasViewportWidth:function(_7d){
if(null==_7d){
_7d=this.get_animationDirection();
}
var _7e=this._itemsElement;
var _7f=this._clipElement;
var _80=parseInt(_7e.style.left);
var _81=parseInt(_7e.style.top);
var _82=$telerik.getOuterSize(_7e);
var _83=$telerik.getContentSize(_7f);
var _84=false;
var _85=Telerik.Web.UI.RotatorScrollDirection;
switch(_7d){
case _85.Left:
_84=_82.width+_80<_83.width*2;
break;
case _85.Up:
_84=_82.height+_81<_83.height*2;
break;
case _85.Right:
_84=(_80*-1<_83.width);
break;
case _85.Down:
_84=(_81*-1<_83.height);
break;
}
return !_84;
},stopViewportAnimation:function(){
var _86=this._animation;
if(!_86){
return;
}
if(_86.get_isPlaying()){
_86.stop();
var _87=this.get_vertical();
var _88=_87?_86.get_vertical():_86.get_horizontal();
if(null!=_88){
this._itemsElement.style[_87?"top":"left"]=_88+"px";
}
}
},_getViewPortPixelsToScroll:function(){
var _89=this.get_vertical();
var _8a=$telerik.getContentSize(this._clipElement);
var _8b=_89?_8a.height:_8a.width;
return _8b;
},showNext:function(_8c){
this.set_animationDirection(_8c);
if(!this._checkItemsSize()){
return;
}
if(this.isViewportScrollMode()){
this.scrollViewport();
}else{
this.scrollItem();
}
},getItemHtmlElements:function(){
var _8d=this._itemsElement;
if(!this._hasCleanedList){
var _8e=_8d.childNodes;
for(var i=0;i<_8e.length;i++){
var _90=_8e[i];
if(_90&&_90.tagName!="LI"){
_8d.removeChild(_90);
i--;
}
}
this._hasCleanedList=true;
}
return _8d.childNodes;
},_setAnimationTimeout:function(_91){
this._clearAnimationTimeout();
this._currentAnimationTimeout=window.setTimeout(Function.createDelegate(this,function(){
if(!this._isPaused){
this.resume();
}
this._timeoutPassed=true;
}),_91);
},_clearAnimationTimeout:function(){
if(this._currentAnimationTimeout){
window.clearTimeout(this._currentAnimationTimeout);
}
this._currentAnimationTimeout=0;
this._timeoutPassed=false;
},isAutomaticAdvance:function(){
var _92=Telerik.Web.UI.RotatorType;
if(this._isRotatorTypeEnabled(_92.AutomaticAdvance)||this._isRotatorTypeEnabled(_92.SlideShow)){
return true;
}
return false;
},isSlideShow:function(){
var _93=Telerik.Web.UI.RotatorType;
if(this._isRotatorTypeEnabled(_93.SlideShow)||this._isRotatorTypeEnabled(_93.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(_94){
return _94==this.get_animationDirection()?true:false;
},_enableDisableButtons:function(){
if(this._rotatorType==Telerik.Web.UI.RotatorType.AutomaticAdvance){
return;
}
var _95=this.get_wrapFrames();
var _96=Telerik.Web.UI.RotatorScrollDirection;
this._enableButton(this._rightButton,_95||this._canSlideMore(_96.Left));
this._enableButton(this._leftButton,_95||this._canSlideMore(_96.Right));
this._enableButton(this._downButton,_95||this._canSlideMore(_96.Up));
this._enableButton(this._upButton,_95||this._canSlideMore(_96.Down));
},_enableButton:function(_97,_98){
if(!_97){
return;
}
if(_98){
Sys.UI.DomElement.removeCssClass(_97,this._rotatorButtonDisabledClass);
_97.removeAttribute("disabled");
}else{
Sys.UI.DomElement.addCssClass(_97,this._rotatorButtonDisabledClass);
_97.setAttribute("disabled","disabled");
}
},_canSlideMore:function(_99){
if(null==_99){
_99=this.get_animationDirection();
}
var _9a=false;
var _9b=this._itemsElement;
var _9c=this._clipElement;
var _9d=Telerik.Web.UI.RotatorScrollDirection;
var _9e=parseInt(_9b.style.left);
var _9f=parseInt(_9b.style.top);
var _a0=$telerik.getBounds(_9b);
var _a1=$telerik.getBounds(_9c);
if(_99==_9d.Left){
_9a=(_a0.width+_9e)>_a1.width;
}else{
if(_99==_9d.Up){
_9a=(_a0.height+_9f)>_a1.height;
}else{
if(_99==_9d.Right){
_9a=(_9e<0);
}else{
if(_99==_9d.Down){
_9a=(_9f<0);
}
}
}
}
return _9a;
},_getCalculatedAnimationDirection:function(){
var _a2=this.get_animationDirection();
var _a3=Telerik.Web.UI.RotatorScrollDirection;
var _a4=23;
switch(_a2){
case _a3.Left:
_a4=21;
break;
case _a3.Down:
_a4=32;
break;
case _a3.Up:
_a4=12;
break;
default:
_a4=23;
}
return _a4;
},startAutoPlay:function(){
if(this._rotatorDisposed){
return;
}
this._loadInitialFrame();
this.showNext(this.get_defaultAnimationDirection());
},get_defaultAnimationDirection:function(){
var _a5=Telerik.Web.UI.RotatorScrollDirection;
var dir=0;
if(this._isScrollDirectionEnabled(_a5.Left)){
dir=_a5.Left;
}else{
if(this._isScrollDirectionEnabled(_a5.Up)){
dir=_a5.Up;
}else{
if(this._isScrollDirectionEnabled(_a5.Right)){
dir=_a5.Right;
}else{
if(this._isScrollDirectionEnabled(_a5.Down)){
dir=_a5.Down;
}
}
}
}
if(!dir){
dir=_a5.Left;
}
return dir;
},get_containerElement:function(){
return this._itemsElement;
},_setChildElements:function(){
this._rotatorListClass="rrItemsList";
this._rotatorVerticalClass="rrVerticalList";
this._rotatorRelativeWrapperClass="rrRelativeWrapper";
this._rotatorClipRegionClass="rrClipRegion";
this._rotatorRightClass="rrButtonRight";
this._rotatorLeftClass="rrButtonLeft";
this._rotatorDownClass="rrButtonDown";
this._rotatorUpClass="rrButtonUp";
this._rotatorButtonDisabledClass="rrButtonDisabled";
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;
}
this._fixRootElementSize();
var _a7=this.get_element();
var _a8=this._relativeWrapper;
_a8.style.height=_a7.offsetHeight+"px";
_a8.style.width=_a7.offsetWidth+"px";
var _a9=true;
if(this._isRotatorTypeEnabled(Telerik.Web.UI.RotatorType.Buttons)||this._isRotatorTypeEnabled(Telerik.Web.UI.RotatorType.ButtonsOver)||this._isRotatorTypeEnabled(Telerik.Web.UI.RotatorType.SlideShowButtons)){
_a9=this._initializeButtonsRotatorType();
}
if(_a9){
Sys.UI.DomElement.addCssClass(_a7,"rrNoBorder");
}
if(this.get_vertical()){
this.set_vertical(true);
}
_a8.style.overflow="auto";
var _aa=this._clipElement;
_aa.style.overflow="auto";
_aa.style.width="10000px";
_aa.style.height="10000px";
this._itemsElement.style.width=this.get_vertical()?_a8.style.width:this._itemsElement.offsetWidth+"px";
this._itemsElement.style.height=this._itemsElement.offsetHeight+"px";
_a8.style.overflow="";
_aa.style.width=_a8.style.width;
_aa.style.height=_a8.style.height;
_aa.style.overflow="hidden";
_aa.style.position="relative";
this._itemsElement.style.position="relative";
_a7.style.visibility="visible";
},_fixRootElementSize:function(){
var _ab=this.get_element();
var _ac=Telerik.Web.UI.RotatorScrollDirection;
var _ad=parseInt(_ab.style.paddingLeft);
if(_ad&&!isNaN(_ad)&&this._isScrollDirectionEnabled(_ac.Left)){
_ab.style.width=(parseInt(_ab.style.width)+_ad)+"px";
_ab.style.paddingLeft="";
}
_ad=parseInt(_ab.style.paddingRight);
if(_ad&&!isNaN(_ad)&&this._isScrollDirectionEnabled(_ac.Right)){
_ab.style.width=(parseInt(_ab.style.width)+_ad)+"px";
_ab.style.paddingRight="";
}
_ad=parseInt(_ab.style.paddingTop);
if(_ad&&!isNaN(_ad)&&this._isScrollDirectionEnabled(_ac.Up)){
_ab.style.height=(parseInt(_ab.style.height)+_ad)+"px";
_ab.style.paddingTop="";
}
_ad=parseInt(_ab.style.paddingBottom);
if(_ad&&!isNaN(_ad)&&this._isScrollDirectionEnabled(_ac.Down)){
_ab.style.height=(parseInt(_ab.style.height)+_ad)+"px";
_ab.style.paddingBottom="";
}
},_createButton:function(_ae,_af){
var _b0=_ae;
if(!_b0){
_b0=document.createElement("div");
}
if(!_b0.className){
_b0.className=this._rotatorDownClass;
}
return _b0;
},_isButtonDisabled:function(_b1){
if(!_b1){
return true;
}
return Sys.UI.DomElement.containsCssClass(_b1,this._rotatorButtonDisabledClass);
},_isScrollDirectionEnabled:function(_b2){
return _b2&this._scrollDirection?true:false;
},_isRotatorTypeEnabled:function(_b3){
return _b3==this._rotatorType?true:false;
},get_rotatorType:function(){
return this._rotatorType;
},set_rotatorType:function(_b4){
this._rotatorType=_b4;
},get_wrapFrames:function(){
return this._wrapFrames;
},set_wrapFrames:function(_b5){
this._wrapFrames=_b5;
},get_scrollDuration:function(){
if(this.isSlideShow()){
return 1;
}else{
return this._scrollDuration;
}
},set_scrollDuration:function(_b6){
this._scrollDuration=_b6;
},set_vertical:function(_b7){
if(this._itemsElement){
Sys.UI.DomElement.addCssClass(this._itemsElement,this._rotatorVerticalClass);
}
},get_vertical:function(){
var _b8=Telerik.Web.UI.RotatorScrollDirection;
return (this._isScrollDirectionEnabled(_b8.Down)||this._isScrollDirectionEnabled(_b8.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(_b9){
this.get_element().style.height=_b9;
if(this.isVisible()){
this.repaint();
}
},get_width:function(){
return this.get_element().style.width;
},set_width:function(_ba){
this.get_element().style.width=_ba;
if(this.isVisible()){
this.repaint();
}
},get_scrollDirection:function(){
return this._scrollDirection;
},set_scrollDirection:function(_bb){
this._scrollDirection=_bb;
},get_frameDuration:function(){
return this._frameDuration;
},set_frameDuration:function(_bc){
this._frameDuration=_bc;
},get_controlButtons:function(){
return this._controlButtons;
},set_controlButtons:function(_bd){
this._controlButtons=_bd;
},get_initialItemIndex:function(){
return this._initialItemIndex;
},set_initialItemIndex:function(_be){
this._initialItemIndex=_be;
},get_slideShowAnimationSettings:function(){
return this._slideShowAnimationSettings;
},set_slideShowAnimationSettings:function(_bf){
this._slideShowAnimationSettings=_bf;
},set_animationDirection:function(_c0){
this._animationDirection=_c0?_c0:Telerik.Web.UI.RotatorScrollDirection.Left;
},get_animationDirection:function(){
return this._animationDirection;
},_attachEvents:function(_c1){
var _c2=this.get_containerElement();
if(null==_c2){
return;
}
if(_c1!=false){
this._clickDelegate=Function.createDelegate(this,this._mouseClickHandler);
this._mouseOutDelegate=Function.createDelegate(this,this._mouseOutHandler);
this._mouseOverDelegate=Function.createDelegate(this,this._mouseOverHandler);
this._itemShownDelegate=Function.createDelegate(this,this._itemShownHandler);
$addHandler(_c2,"mouseover",this._mouseOverDelegate);
$addHandler(_c2,"mouseout",this._mouseOutDelegate);
$addHandler(_c2,"click",this._clickDelegate);
this.add_itemShown(this._itemShownDelegate);
}else{
$removeHandler(_c2,"mouseover",this._mouseOverDelegate);
$removeHandler(_c2,"mouseout",this._mouseOutDelegate);
$removeHandler(_c2,"click",this._clickDelegate);
this._clickDelegate=null;
this._mouseOutDelegate=null;
this._mouseOverDelegate=null;
this.remove_itemShown(this._itemShownDelegate);
}
},_itemShownHandler:function(_c3){
if(typeof (Telerik.Web.UI.RadTicker)=="undefined"){
return;
}
var _c4=this.get_items();
for(var i=0,len=_c4.length;i<len;i++){
var _c7=_c4[i];
if(this._isItemVisible(_c7)){
this._fireTickersForItem(_c7);
}else{
this._resetTickersForItem(_c7);
}
}
},_mouseOverHandler:function(_c8){
if(this.isAutomaticAdvance()&&this._canPause&&this.get_pauseOnMouseOver()){
this.pause();
}
var _c9=this._getItemFromEvent(_c8.target);
if(null!=_c9){
this.raiseEvent("mouseOver",new Telerik.Web.UI.RadRotatorEventArgs(_c9));
}
},_mouseOutHandler:function(_ca){
if(this.isAutomaticAdvance()&&this._canPause&&this.get_pauseOnMouseOver()){
if(!$telerik.isMouseOverElementEx(this._clipElement,_ca)||$telerik.isIE){
this.resume();
}
}
var _cb=this._getItemFromEvent(_ca.target);
if(null!=_cb){
this.raiseEvent("mouseOut",new Telerik.Web.UI.RadRotatorEventArgs(_cb));
}
},_mouseClickHandler:function(_cc){
var _cd=this._getItemFromEvent(_cc.target);
if(null!=_cd){
var _ce=new Telerik.Web.UI.RadRotatorCancelEventArgs(_cd);
this.raiseEvent("itemClicking",_ce);
if(_ce.get_cancel&&_ce.get_cancel()){
$telerik.cancelRawEvent(_cc.rawEvent);
return false;
}
window.setTimeout(Function.createDelegate(this,function(){
this.raiseEvent("itemClicked",new Telerik.Web.UI.RadRotatorEventArgs(_cd));
this._postback(_cd.get_index());
}),0);
}
},_postback:function(_cf){
if(!this._postBackReference){
return;
}
var _d0=this._postBackReference.replace("arguments",_cf);
eval(_d0);
},_isItemVisible:function(_d1){
var _d2=$telerik.getContentSize(this._clipElement);
var _d3=$telerik.getLocation(this._clipElement);
_d2.x=_d3.x;
_d2.y=_d3.y;
var _d4=$telerik.getOuterSize(_d1.get_element());
var _d3=$telerik.getLocation(_d1.get_element());
_d4.x=_d3.x;
_d4.y=_d3.y;
var eiv=($telerik.containsPoint(_d2,_d4.x,_d4.y)&&$telerik.containsPoint(_d2,_d4.x+_d4.width,_d4.y+_d4.height));
var vie=($telerik.containsPoint(_d4,_d2.x,_d2.y)&&$telerik.containsPoint(_d4,_d2.x+_d2.width,_d2.y+_d2.height));
return eiv||vie;
},_fireTickersForItem:function(_d7){
var _d8=_d7.get_tickers();
for(var i=0,len=_d8.length;i<len;i++){
if(_d8[i]){
var _db=$find(_d8[i]);
if(_db){
_db.startTicker();
}
}
}
},_resetTickersForItem:function(_dc){
var _dd=_dc.get_tickers();
for(var i=0,len=_dd.length;i<len;i++){
if(_dd[i]){
var _e0=$find(_dd[i]);
if(_e0){
_e0.resetTicker();
}
}
}
},_getItemFromEvent:function(_e1){
var _e2=this.get_containerElement();
var _e3=null;
while(null!=_e1&&_e1!=_e2&&_e1!=document){
if(_e1.tagName.toLowerCase()=="li"&&null!=_e1._item&&Object.getTypeName(_e1._item)=="Telerik.Web.UI.RadRotatorItem"){
_e3=_e1._item;
}
_e1=_e1.parentNode;
}
return _e3;
},_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(_e4,_e5){
if(!this._webServiceLoader){
this._initializeWebServiceLoader();
}
var _e6={itemIndex:_e4,itemCount:_e5};
this._webServiceLoader.loadData(_e6,_e6);
},_onItemLoadingStarted:function(_e7,_e8){
},_onItemLoadingSuccess:function(_e9,_ea){
var _eb=_ea.get_data();
if(_eb&&_eb.length>0){
for(var i=0;i<_eb.length;i++){
this.createRotatorItem(_eb[i]);
}
}
},_onItemLoadingError:function(_ed,_ee){
var _ef=_ee.get_message();
alert(_ef);
},createRotatorItem:function(_f0){
var _f1=this.get_containerElement();
var _f2=_f1.ownerDocument.createElement("li");
_f1.appendChild(_f2);
_f2.innerHTML=_f0.Html;
var _f3={cssClass:_f0.CssClass,visible:_f0.Visible};
var _f4=$create(Telerik.Web.UI.RadRotatorItem,_f3,null,null,_f2);
_f2._item=_f4;
Array.add(this.get_items(),_f4);
},_getInvisibleParent:function(){
var _f5=this.get_element();
while(_f5&&_f5!=document){
if("none"==$telerik.getCurrentStyle(_f5,"display","")){
return _f5;
}
_f5=_f5.parentNode;
}
return null;
},isVisible:function(){
return (this._getInvisibleParent()==null);
},_fixVisibilityProblems:function(_f6){
if(_f6){
var _f7=this._getInvisibleParent();
if(_f7){
this._onParentVisibilityChangeDelegate=Function.createDelegate(this,this._onParentVisibilityChange);
this._invisibleParent=_f7;
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 _f9=$telerik.getCurrentStyle(this._invisibleParent,"display");
if(_f9!="none"){
this.repaint();
}
}
}else{
if(e.attrName=="style"||e.attrName=="class"){
var _fa=e.target;
if((e.currentTarget==e.originalTarget)&&"none"!=$telerik.getCurrentStyle(_fa,"display")){
window.setTimeout(Function.createDelegate(this,function(){
this.repaint();
}),0);
}
}
}
this._fixVisibilityProblems(false);
},repaint:function(){
this._createUI();
},add_itemClicking:function(_fb){
this.get_events().addHandler("itemClicking",_fb);
},remove_itemClicking:function(_fc){
this.get_events().removeHandler("itemClicking",_fc);
},add_itemClicked:function(_fd){
this.get_events().addHandler("itemClicked",_fd);
},remove_itemClicked:function(_fe){
this.get_events().removeHandler("itemClicked",_fe);
},add_mouseOver:function(_ff){
this.get_events().addHandler("mouseOver",_ff);
},remove_mouseOver:function(_100){
this.get_events().removeHandler("mouseOver",_100);
},add_mouseOut:function(_101){
this.get_events().addHandler("mouseOut",_101);
},remove_mouseOut:function(_102){
this.get_events().removeHandler("mouseOut",_102);
},add_itemShowing:function(_103){
this.get_events().addHandler("itemShowing",_103);
},remove_itemShowing:function(_104){
this.get_events().removeHandler("itemShowing",_104);
},add_itemShown:function(_105){
this.get_events().addHandler("itemShown",_105);
},remove_itemShown:function(_106){
this.get_events().removeHandler("itemShown",_106);
},add_load:function(_107){
this.get_events().addHandler("load",_107);
},remove_load:function(_108){
this.get_events().removeHandler("load",_108);
},add_buttonOver:function(_109){
this.get_events().addHandler("buttonOver",_109);
},remove_buttonOver:function(_10a){
this.get_events().removeHandler("buttonOver",_10a);
},add_buttonOut:function(_10b){
this.get_events().addHandler("buttonOut",_10b);
},remove_buttonOut:function(_10c){
this.get_events().removeHandler("buttonOut",_10c);
},add_buttonClick:function(_10d){
this.get_events().addHandler("buttonClick",_10d);
},remove_buttonClick:function(_10e){
this.get_events().removeHandler("buttonClick",_10e);
},get_items:function(){
return this._items;
},set_items:function(_10f){
this._items=_10f;
},get_webServiceSettings:function(){
return this._webServiceSettings;
},set_webServiceSettings:function(_110){
var _111=Sys.Serialization.JavaScriptSerializer.deserialize(_110);
this._webServiceSettings=new Telerik.Web.UI.WebServiceSettings(_111);
},get_pauseOnMouseOver:function(){
return this._pauseOnMouseOver;
},set_pauseOnMouseOver:function(_112){
this._pauseOnMouseOver=_112;
},get_skin:function(){
return this._skin;
},set_skin:function(_113){
this._skin=_113;
}};
Telerik.Web.UI.RadRotator.registerClass("Telerik.Web.UI.RadRotator",Telerik.Web.UI.RadWebControl);
Telerik.Web.UI.RadRotatorEventArgs=function(item){
Telerik.Web.UI.RadRotatorEventArgs.initializeBase(this);
this._item=item;
};
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(item){
Telerik.Web.UI.RadRotatorCancelEventArgs.initializeBase(this);
this._item=item;
};
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(_116){
Telerik.Web.UI.RadRotatorButtonEventArgs.initializeBase(this);
this._button=_116;
};
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(_117){
Telerik.Web.UI.RadRotatorItem.initializeBase(this,[_117]);
this._visible=null;
this._cssClass=null;
this._index=-1;
};
Telerik.Web.UI.RadRotatorItem.prototype={initialize:function(){
Telerik.Web.UI.RadRotatorItem.callBaseMethod(this,"initialize");
this._tickers=null;
},dispose:function(){
Telerik.Web.UI.RadRotatorItem.callBaseMethod(this,"dispose");
},get_index:function(){
if(this._index==-1){
var _118=0;
var _119=this.get_element();
var _11a=_119.parentNode;
if(null!=_11a){
var _11b=$telerik.getChildrenByTagName(_11a,"li");
if(null!=_11b){
for(_118=0;_118<_11b.length&&_11b[_118]!=_119;_118++){
}
if(_118==_11b.length){
_118=0;
}
}
}
this._index=_118;
}
return this._index;
},get_visible:function(){
return this._visible;
},set_visible:function(_11c){
this._visible=_11c;
},get_cssClass:function(){
return this._cssClass;
},set_cssClass:function(_11d){
this._cssClass=_11d;
},get_tickers:function(){
if(null==this._tickers&&typeof (Telerik.Web.UI.RadTicker)!="undefined"){
this._tickers=[];
for(var i=0,_11f=$telerik.radControls.length;i<_11f;i++){
var _120=$telerik.radControls[i];
if(Telerik.Web.UI.RadTicker.isInstanceOfType(_120)&&$telerik.isDescendant(this.get_element(),_120.get_element())){
Array.add(this._tickers,_120.get_id());
}
}
}
return this._tickers;
}};
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();