Type.registerNamespace("Telerik.Web.UI");
$telerik.toRotator=function(a){return a;
};
$telerik.findRotator=$find;
Telerik.Web.UI.RadRotator=function(a){Telerik.Web.UI.RadRotator.initializeBase(this,[a]);
this._enabled=true;
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 b=Telerik.Web.UI.RotatorScrollDirection;
this._scrollDirection=b.Left+b.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=b.Left;
this._rightButton=null;
this._leftButton=null;
this._downButton=null;
this._upButton=null;
this._isMouseOverClipElement=false;
};
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);
if($telerik.isSafari){$addHandler(this.get_containerElement(),"mousewheel",this._mouseWheelHandler);
}this.raiseEvent("load",Sys.EventArgs.Empty);
if(this.isAutomaticAdvance()){var a=this.get_frameDuration();
if(a>0){window.setTimeout(Function.createDelegate(this,this.startAutoPlay),a);
}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($telerik.isSafari){$removeHandler(this.get_containerElement(),"mousewheel",this._mouseWheelHandler);
}if(this._itemsElement){$clearHandlers(this._itemsElement);
}Telerik.Web.UI.RadRotator.callBaseMethod(this,"dispose");
},_createChildItems:function(){var d=$telerik.getChildrenByTagName(this.get_containerElement(),"li");
for(var a=0;
a<d.length;
a++){var b=$create(Telerik.Web.UI.RadRotatorItem,this.get_items()[a],null,null,d[a]);
var c=b.get_index();
d[a]._item=b;
this.get_items()[a]=b;
}},_mouseWheelHandler:function(a){a.preventDefault();
},_getNextItemToShow:function(){var a=this.getItemHtmlElements();
var d=this.isScrollingForward();
if(this._nextItemIndex==null){var b=d?0:a.length-1;
this._nextItemIndex=b;
}if(this._nextItemIndex<0){return null;
}var c=a[this._nextItemIndex];
if(d){this._nextItemIndex++;
}else{this._nextItemIndex--;
}if(this._nextItemIndex>a.length-1||this._nextItemIndex<0){this._nextItemIndex=null;
}return c;
},get_firstItem:function(){var b=this._firstItem;
if(!b){var a=this.getItemHtmlElements();
b=this.isScrollingForward()?a[0]:a[a.length-1];
}return b;
},get_currentItem:function(){var f=this.getItemHtmlElements();
var a=parseInt(f[0].parentNode.style.left),e="left";
if(isNaN(a)||a==0){a=parseInt(f[0].parentNode.style.top);
e="top";
}var b=0,d=f.length;
while(a<0&&b<d){var g=$telerik.getOuterSize(f[b]);
a=a+(e=="top"?g.height:g.width);
b++;
}var c=b<d?f[b].control:null;
return c;
},_needsShift:function(g){if(null==g){g=this.get_animationDirection();
}var c=this._itemsElement;
var f=this._clipElement;
var d=parseInt(c.style.left);
var i=parseInt(c.style.top);
var h=$telerik.getOuterSize(c);
var a=$telerik.getContentSize(f);
var e=this.get_firstItem();
if(!e){return false;
}var j=$telerik.getOuterSize(e);
var b=false;
var k=Telerik.Web.UI.RotatorScrollDirection;
switch(g){case k.Left:b=d+h.width<a.width+j.width;
break;
case k.Up:b=i+h.height<a.height+j.height;
break;
case k.Right:b=d*-1<j.width;
break;
case k.Down:b=i*-1<a.height;
break;
}return b;
},_getMoveAnimation:function(){if(!this._animation){var b=this._itemsElement;
var c=this.get_scrollDuration();
var a=25;
this._animation=new Telerik.Web.UI.Animations.jMove(this,b,c,true,false,(this.get_frameDuration()<5?"easeLinear":null));
this._animation.initialize();
}return this._animation;
},scrollViewport:function(){if(!this.get_enabled()){return;
}var a=this._itemsElement;
if(!this._animation){var b=this._getMoveAnimation();
var c=Function.createDelegate(this,function(){var g=this._hasViewportWidth();
if(!g&&this.get_wrapFrames()){var h=this.getItemHtmlElements().length;
for(var d=0;
d<h;
d++){this._shiftItemInList();
g=this._hasViewportWidth();
if(g){break;
}}}var j=this._getViewPortPixelsToScroll();
var f=this.isScrollingForward();
if(this.get_vertical()){var e=parseInt(a.style.top)+(f?-j:j);
b.set_vertical(e);
}else{var e=parseInt(a.style.left)+(f?-j:j);
b.set_horizontal(e);
}});
b.add_started(Function.createDelegate(this,function(g,i){this.stopViewportAnimation();
var f=!this._hasViewportWidth();
if(f&&!this.get_wrapFrames()){var e=this.get_animationDirection();
if(this._wrapFramesFinished==e){i.set_cancel(true);
return false;
}else{this._wrapFramesFinished=e;
}}else{this._wrapFramesFinished=0;
}var d=this.get_currentItem();
var h=new Telerik.Web.UI.RadRotatorCancelEventArgs(d);
this.raiseEvent("itemShowing",h);
if(h.get_cancel&&h.get_cancel()){i.set_cancel(true);
return false;
}if(this.isSlideShow()){a.style.visibility="hidden";
}c();
}));
b.add_ended(Function.createDelegate(this,function(){this._enableDisableButtons();
if(this.isSlideShow()){a.style.visibility="visible";
this.runSlideShowAnimation();
}else{var d=this.get_currentItem();
this.raiseEvent("itemShown",new Telerik.Web.UI.RadRotatorEventArgs(d));
}}));
}this._animation.play();
},scrollItem:function(){if(!this.get_enabled()){return;
}var b=this._clipElement;
var a=this._itemsElement;
if(!this._animation){var c=this._animation=this._getMoveAnimation();
if(this.isAutomaticAdvance()||this._isRotatorTypeEnabled(Telerik.Web.UI.RotatorType.ButtonsOver)){c.set_isCyclic(true);
}var d=Function.createDelegate(this,function(){var f=this._getNextItemToShow();
if(!f){return;
}this._firstItem=f;
var e=$telerik.getOuterSize(f);
if(this.isScrollingForward()){e.width*=-1;
e.height*=-1;
}if(this.get_vertical()){var g=parseInt(a.style.top)+e.height;
c.set_vertical(g);
}else{var g=parseInt(a.style.left)+e.width;
c.set_horizontal(g);
}});
c.add_started(Function.createDelegate(this,function(h,j){var g=this._needsShift(f);
if(g&&!this.get_wrapFrames()){var f=this.get_animationDirection();
if(this._wrapFramesFinished==f){j.set_cancel(true);
return false;
}else{this._wrapFramesFinished=f;
}}else{this._wrapFramesFinished=0;
}var e=this.get_currentItem();
var i=new Telerik.Web.UI.RadRotatorCancelEventArgs(e);
this.raiseEvent("itemShowing",i);
if(i.get_cancel&&i.get_cancel()){j.set_cancel(true);
return false;
}if(g&&this.get_wrapFrames()){this._shiftItemInList();
}if(this._stopAnimationButtonOver){return;
}d();
}));
c.add_ended(Function.createDelegate(this,function(){this._enableDisableButtons();
var e=this.get_currentItem();
if(e!=null){this.raiseEvent("itemShown",new Telerik.Web.UI.RadRotatorEventArgs(e));
}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 c=$telerik.getOuterSize(this._itemsElement);
var b=this.get_vertical();
var a=(b)?c.height:c.width;
var d=(b)?this.get_height():this.get_width();
return parseInt(a)>parseInt(d);
},_shiftItemInList:function(){var f=this._itemsElement;
var b=this.getItemHtmlElements();
var g=this.get_vertical();
var c=this.isScrollingForward();
var h=parseInt(f.style.left);
var d=parseInt(f.style.top);
var e=c?b[0]:b[b.length-1];
var a=$telerik.getOuterSize(e);
e.parentNode.removeChild(e);
if(!c){f.insertBefore(e,f.firstChild);
}if(g){f.style.top=(d+(c?a.height:-a.height))+"px";
}else{f.style.left=(h+(c?a.width:-a.width))+"px";
}if(c){f.appendChild(e);
}this._nextItemIndex=c?b.length-1:0;
return e;
},_loadInitialFrame:function(){var c=this.get_initialItemIndex();
var h=this.get_defaultAnimationDirection();
var g=Telerik.Web.UI.RotatorScrollDirection;
var k=this.isVertical();
var e=this._itemsElement;
var a=$telerik.getOuterSize(e);
var j=$telerik.getContentSize(this._clipElement);
var b=0;
var d=0;
if(c>=0){if(k){d=(h==g.Up)?0:-a.height+j.height;
}else{b=(h==g.Left)?0:-a.width+j.width;
}}else{if(c==-1){if(k){d=(h==g.Down)?-a.height:j.height;
}else{b=(h==g.Right)?-a.width:j.width;
}}}e.style.left=b+"px";
e.style.top=d+"px";
if(c>0&&!this._initialItemSet){for(var f=0;
f<c;
f++){this._shiftItemInList();
}e.style.left=b+"px";
e.style.top=d+"px";
}if(!this._initialItemSet&&c>=0){this.raiseEvent("itemShown",new Telerik.Web.UI.RadRotatorEventArgs(this.get_items()[c]));
}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 a=Telerik.Web.UI.RotatorType;
if(this._isRotatorTypeEnabled(a.AutomaticAdvance)||this._isRotatorTypeEnabled(a.ButtonsOver)||this._isRotatorTypeEnabled(a.FromCode)){return false;
}return true;
},_getButtonScrollDirection:function(c){var a=Telerik.Web.UI.RotatorScrollDirection;
var b=a.Left;
switch(c){case this._rightButton:b=a.Left;
break;
case this._leftButton:b=a.Right;
break;
case this._downButton:b=a.Up;
break;
case this._upButton:b=a.Down;
break;
}return b;
},_buttonClicked:function(f){if(!this.get_enabled()){$telerik.cancelRawEvent(f);
return false;
}var d=this._animation;
if(d&&d.get_isPlaying()){d.stop();
}var a=f.target;
if(this._isButtonDisabled(a)||this.get_items().length==0){return;
}var c=new Telerik.Web.UI.RadRotatorButtonEventArgs(a);
this.raiseEvent("buttonClick",c);
if(c.get_cancel()){return;
}var b=this._getButtonScrollDirection(a);
this.set_animationDirection(b);
this.scrollViewport();
return $telerik.cancelRawEvent(f);
},_buttonOver:function(d){if(!this.get_enabled()){$telerik.cancelRawEvent(d);
return false;
}var a=d.target;
if(this._isButtonDisabled(a)||this.get_items().length==0){return;
}var c=new Telerik.Web.UI.RadRotatorButtonEventArgs(a);
this.raiseEvent("buttonOver",c);
if(c.get_cancel()){return;
}var b=this._getButtonScrollDirection(a);
this.set_animationDirection(b);
this._stopAnimationButtonOver=false;
this.scrollItem();
return $telerik.cancelRawEvent(d);
},_buttonOut:function(d){if(!this.get_enabled()){$telerik.cancelRawEvent(d);
return false;
}var a=d.target;
if(this._isButtonDisabled(a)){return;
}var c=new Telerik.Web.UI.RadRotatorButtonEventArgs(a);
this.raiseEvent("buttonOut",c);
if(c.get_cancel()){return;
}var b=this._getButtonScrollDirection(a);
this.set_animationDirection(b);
this._stopAnimationButtonOver=true;
return $telerik.cancelRawEvent(d);
},_initializeButtonsRotatorType:function(){var n=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 r=Telerik.Web.UI.RotatorScrollDirection;
var m=[r.Right,r.Left,r.Down,r.Up];
var p=[this._leftButton,this._rightButton,this._upButton,this._downButton];
var g=[n.LeftButtonID?$get(n.LeftButtonID):null,n.RightButtonID?$get(n.RightButtonID):null,n.UpButtonID?$get(n.UpButtonID):null,n.DownButtonID?$get(n.DownButtonID):null];
var h=[this._rotatorLeftClass,this._rotatorRightClass,this._rotatorUpClass,this._rotatorDownClass];
var c=["marginLeft","marginRight","marginTop","marginBottom"];
var b=["paddingLeft","paddingRight","paddingTop","paddingBottom"];
var j=["width","width","height","height"];
var a=this._relativeWrapper;
var d=this.get_element();
for(var k=0;
k<p.length;
k++){var q=p[k];
var f=(null!=g[k])?g[k]:q;
this._createButton(q,h[k]);
if(this._isScrollDirectionEnabled(m[k])&&null==g[k]){q.style.display="block";
var l=j[k];
var o=parseInt($telerik.getCurrentStyle(q,l));
a.style[l]=(parseInt(a.style[l])-o)+"px";
d.style[l]=(parseInt(d.style[l])-o)+"px";
d.style[b[k]]=o+"px";
}if(this._isRotatorTypeEnabled(Telerik.Web.UI.RotatorType.Buttons)||this._isRotatorTypeEnabled(Telerik.Web.UI.RotatorType.SlideShowButtons)){$clearHandlers(f);
$addHandlers(f,{click:this._buttonClicked},this);
}else{$clearHandlers(f);
$addHandlers(f,{mouseover:this._buttonOver,mouseout:this._buttonOut},this);
}}this._rightButton=g[1]||this._rightButton;
this._leftButton=g[0]||this._leftButton;
this._downButton=g[3]||this._downButton;
this._upButton=g[2]||this._upButton;
var e=false;
for(var k=0;
k<g.length;
k++){if(g[k]){e=true;
}break;
}return e;
},runSlideShowAnimation:function(){var b=this._itemsElement;
var d=this.get_slideShowAnimationSettings().duration||500;
var c=this.get_slideShowAnimationSettings().type||Telerik.Web.UI.RotatorAnimationType.None;
var a=Function.createDelegate(this,function(){this._canPause=true;
if(c!=Telerik.Web.UI.RotatorAnimationType.None){$telerik.$(this._itemsElement).css("opacity","1");
}var e=this.get_currentItem();
this.raiseEvent("itemShown",new Telerik.Web.UI.RadRotatorEventArgs(e));
if(!this.get_pauseOnMouseOver()||(!this._isMouseOverClipElement)){if(this.get_frameDuration()>0&&this.isAutomaticAdvance()){this._setAnimationTimeout(this.get_frameDuration());
}}});
switch(c){case Telerik.Web.UI.RotatorAnimationType.Fade:this._canPause=false;
$telerik.$(b).css("opacity","0").fadeTo(d,1,a);
break;
case Telerik.Web.UI.RotatorAnimationType.Pulse:this._canPause=false;
$telerik.$(b).fadeTo(d,0).fadeTo(d,1,a);
break;
default:a();
break;
}},_hasViewportWidth:function(f){if(null==f){f=this.get_animationDirection();
}var c=this._itemsElement;
var e=this._clipElement;
var d=parseInt(c.style.left);
var h=parseInt(c.style.top);
var g=$telerik.getOuterSize(c);
var a=$telerik.getContentSize(e);
var b=false;
var i=Telerik.Web.UI.RotatorScrollDirection;
switch(f){case i.Left:b=g.width+d<a.width*2;
break;
case i.Up:b=g.height+h<a.height*2;
break;
case i.Right:b=(d*-1<a.width);
break;
case i.Down:b=(h*-1<a.height);
break;
}return !b;
},stopViewportAnimation:function(){var c=this._animation;
if(!c){return;
}if(c.get_isPlaying()){c.stop();
var b=this.get_vertical();
var a=b?c.get_vertical():c.get_horizontal();
if(null!=a){this._itemsElement.style[b?"top":"left"]=a+"px";
}}},_getViewPortPixelsToScroll:function(){var a=this.get_vertical();
var c=$telerik.getContentSize(this._clipElement);
var b=a?c.height:c.width;
return b;
},showNext:function(a){this.set_animationDirection(a);
if(!this._checkItemsSize()){return;
}if(this.isViewportScrollMode()){this.scrollViewport();
}else{this.scrollItem();
}},getItemHtmlElements:function(){var b=this._itemsElement;
if(!this._hasCleanedList){var d=b.childNodes;
for(var a=0;
a<d.length;
a++){var c=d[a];
if(c&&c.tagName!="LI"){b.removeChild(c);
a--;
}}this._hasCleanedList=true;
}return b.childNodes;
},_setAnimationTimeout:function(a){this._clearAnimationTimeout();
this._currentAnimationTimeout=window.setTimeout(Function.createDelegate(this,function(){if(!this._isPaused){this.resume();
}this._timeoutPassed=true;
}),a);
},_clearAnimationTimeout:function(){if(this._currentAnimationTimeout){window.clearTimeout(this._currentAnimationTimeout);
}this._currentAnimationTimeout=0;
this._timeoutPassed=false;
},isAutomaticAdvance:function(){var a=Telerik.Web.UI.RotatorType;
if(this._isRotatorTypeEnabled(a.AutomaticAdvance)||this._isRotatorTypeEnabled(a.SlideShow)){return true;
}return false;
},isSlideShow:function(){var a=Telerik.Web.UI.RotatorType;
if(this._isRotatorTypeEnabled(a.SlideShow)||this._isRotatorTypeEnabled(a.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(a){return a==this.get_animationDirection()?true:false;
},_enableDisableButtons:function(){if(this._rotatorType==Telerik.Web.UI.RotatorType.AutomaticAdvance){return;
}var b=this.get_wrapFrames();
var a=Telerik.Web.UI.RotatorScrollDirection;
this._enableButton(this._rightButton,b||this._canSlideMore(a.Left));
this._enableButton(this._leftButton,b||this._canSlideMore(a.Right));
this._enableButton(this._downButton,b||this._canSlideMore(a.Up));
this._enableButton(this._upButton,b||this._canSlideMore(a.Down));
},_enableButton:function(a,b){if(!a){return;
}if(b){Sys.UI.DomElement.removeCssClass(a,this._rotatorButtonDisabledClass);
a.removeAttribute("disabled");
}else{Sys.UI.DomElement.addCssClass(a,this._rotatorButtonDisabledClass);
a.setAttribute("disabled","disabled");
}},_canSlideMore:function(f){if(null==f){f=this.get_animationDirection();
}var g=false;
var c=this._itemsElement;
var d=this._clipElement;
var i=Telerik.Web.UI.RotatorScrollDirection;
var h=parseInt(c.style.left);
var e=parseInt(c.style.top);
var a=$telerik.getBounds(c);
var b=$telerik.getBounds(d);
if(f==i.Left){g=(a.width+h)>b.width;
}else{if(f==i.Up){g=(a.height+e)>b.height;
}else{if(f==i.Right){g=(h<0);
}else{if(f==i.Down){g=(e<0);
}}}}return g;
},_getCalculatedAnimationDirection:function(){var b=this.get_animationDirection();
var a=Telerik.Web.UI.RotatorScrollDirection;
var c=23;
switch(b){case a.Left:c=21;
break;
case a.Down:c=32;
break;
case a.Up:c=12;
break;
default:c=23;
}return c;
},startAutoPlay:function(){if(this._rotatorDisposed){return;
}this._loadInitialFrame();
this.showNext(this.get_defaultAnimationDirection());
},get_defaultAnimationDirection:function(){var b=Telerik.Web.UI.RotatorScrollDirection;
var a=0;
if(this._isScrollDirectionEnabled(b.Left)){a=b.Left;
}else{if(this._isScrollDirectionEnabled(b.Up)){a=b.Up;
}else{if(this._isScrollDirectionEnabled(b.Right)){a=b.Right;
}else{if(this._isScrollDirectionEnabled(b.Down)){a=b.Down;
}}}}if(!a){a=b.Left;
}return a;
},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 d=this.get_element();
var c=this._relativeWrapper;
c.style.height=d.offsetHeight+"px";
c.style.width=d.offsetWidth+"px";
var h=true;
if(this._isRotatorTypeEnabled(Telerik.Web.UI.RotatorType.Buttons)||this._isRotatorTypeEnabled(Telerik.Web.UI.RotatorType.ButtonsOver)||this._isRotatorTypeEnabled(Telerik.Web.UI.RotatorType.SlideShowButtons)){h=this._initializeButtonsRotatorType();
}if(h){Sys.UI.DomElement.addCssClass(d,"rrNoBorder");
}if(this.get_vertical()){this.set_vertical(true);
}c.style.overflow="auto";
var a=this._clipElement;
a.style.overflow="auto";
var b=this._itemsElement;
var f=10000;
try{f=b.offsetWidth*$telerik.getChildrenByTagName(b,"li").length;
}catch(g){f=10000;
}a.style.width=Math.max(f,10000)+"px";
a.style.height="10000px";
b.style.width=this.get_vertical()?c.style.width:b.offsetWidth+"px";
b.style.height=b.offsetHeight+"px";
c.style.overflow="";
a.style.width=c.style.width;
a.style.height=c.style.height;
a.style.overflow="hidden";
a.style.position="relative";
b.style.position="relative";
d.style.visibility="visible";
},_fixRootElementSize:function(){var c=this.get_element();
var b=Telerik.Web.UI.RotatorScrollDirection;
var a=parseInt(c.style.paddingLeft);
if(a&&!isNaN(a)&&this._isScrollDirectionEnabled(b.Left)){c.style.width=(parseInt(c.style.width)+a)+"px";
c.style.paddingLeft="";
}a=parseInt(c.style.paddingRight);
if(a&&!isNaN(a)&&this._isScrollDirectionEnabled(b.Right)){c.style.width=(parseInt(c.style.width)+a)+"px";
c.style.paddingRight="";
}a=parseInt(c.style.paddingTop);
if(a&&!isNaN(a)&&this._isScrollDirectionEnabled(b.Up)){c.style.height=(parseInt(c.style.height)+a)+"px";
c.style.paddingTop="";
}a=parseInt(c.style.paddingBottom);
if(a&&!isNaN(a)&&this._isScrollDirectionEnabled(b.Down)){c.style.height=(parseInt(c.style.height)+a)+"px";
c.style.paddingBottom="";
}},_createButton:function(a,b){var c=a;
if(!c){c=document.createElement("div");
}if(!c.className){c.className=this._rotatorDownClass;
}return c;
},_isButtonDisabled:function(a){if(!a){return true;
}return Sys.UI.DomElement.containsCssClass(a,this._rotatorButtonDisabledClass);
},_isScrollDirectionEnabled:function(a){return a&this._scrollDirection?true:false;
},_isRotatorTypeEnabled:function(a){return a==this._rotatorType?true:false;
},get_rotatorType:function(){return this._rotatorType;
},set_rotatorType:function(a){this._rotatorType=a;
},get_wrapFrames:function(){return this._wrapFrames;
},set_wrapFrames:function(a){this._wrapFrames=a;
},get_scrollDuration:function(){if(this.isSlideShow()){return 1;
}else{return this._scrollDuration;
}},set_scrollDuration:function(a){this._scrollDuration=a;
},set_vertical:function(b){var a=this._itemsElement;
if(a){Sys.UI.DomElement.addCssClass(a,this._rotatorVerticalClass);
}},get_vertical:function(){var a=Telerik.Web.UI.RotatorScrollDirection;
return(this._isScrollDirectionEnabled(a.Down)||this._isScrollDirectionEnabled(a.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(a){this.get_element().style.height=a;
if(this.isVisible()){this.repaint();
}},get_width:function(){return this.get_element().style.width;
},set_width:function(a){this.get_element().style.width=a;
if(this.isVisible()){this.repaint();
}},get_scrollDirection:function(){return this._scrollDirection;
},set_scrollDirection:function(a){this._scrollDirection=a;
},get_frameDuration:function(){return this._frameDuration;
},set_frameDuration:function(a){this._frameDuration=a;
},get_controlButtons:function(){return this._controlButtons;
},set_controlButtons:function(a){this._controlButtons=a;
},get_initialItemIndex:function(){return this._initialItemIndex;
},set_initialItemIndex:function(a){this._initialItemIndex=a;
},get_slideShowAnimationSettings:function(){return this._slideShowAnimationSettings;
},set_slideShowAnimationSettings:function(a){this._slideShowAnimationSettings=a;
},set_animationDirection:function(a){this._animationDirection=a?a:Telerik.Web.UI.RotatorScrollDirection.Left;
},get_animationDirection:function(){return this._animationDirection;
},_attachEvents:function(a){var b=this.get_containerElement();
if(null==b){return;
}if(a!=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(b,"mouseover",this._mouseOverDelegate);
$addHandler(b,"mouseout",this._mouseOutDelegate);
$addHandler(b,"click",this._clickDelegate);
this.add_itemShown(this._itemShownDelegate);
}else{$removeHandler(b,"mouseover",this._mouseOverDelegate);
$removeHandler(b,"mouseout",this._mouseOutDelegate);
$removeHandler(b,"click",this._clickDelegate);
this._clickDelegate=null;
this._mouseOutDelegate=null;
this._mouseOverDelegate=null;
this.remove_itemShown(this._itemShownDelegate);
}},_itemShownHandler:function(b){if(typeof(Telerik.Web.UI.RadTicker)=="undefined"){return;
}var d=this.get_items();
for(var a=0,e=d.length;
a<e;
a++){var c=d[a];
if(this._isItemVisible(c)){this._fireTickersForItem(c);
}else{this._resetTickersForItem(c);
}}},_mouseOverHandler:function(b){if(this._isMouseOverClipElement){return;
}this._isMouseOverClipElement=true;
if(this.isAutomaticAdvance()&&this._canPause&&this.get_pauseOnMouseOver()){this.pause();
}var a=this._getItemFromEvent(b.target);
if(null!=a){this.raiseEvent("mouseOver",new Telerik.Web.UI.RadRotatorEventArgs(a));
}},_mouseOutHandler:function(b){if($telerik.isMouseOverElementEx(this._clipElement,b.rawEvent)){return;
}this._isMouseOverClipElement=false;
if(this.isAutomaticAdvance()&&this._canPause&&this.get_pauseOnMouseOver()){this.resume();
}var a=this._getItemFromEvent(b.target);
if(null!=a){this.raiseEvent("mouseOut",new Telerik.Web.UI.RadRotatorEventArgs(a));
}return false;
},_mouseClickHandler:function(b){if(!this.get_enabled()){$telerik.cancelRawEvent(b.rawEvent);
return false;
}var a=this._getItemFromEvent(b.target);
if(null!=a){var c=new Telerik.Web.UI.RadRotatorCancelEventArgs(a);
this.raiseEvent("itemClicking",c);
if(c.get_cancel&&c.get_cancel()){$telerik.cancelRawEvent(b.rawEvent);
return false;
}window.setTimeout(Function.createDelegate(this,function(){this.raiseEvent("itemClicked",new Telerik.Web.UI.RadRotatorEventArgs(a));
this._postback(a.get_index());
}),0);
}},_postback:function(a){if(!this._postBackReference){return;
}var b=this._postBackReference.replace("arguments",a);
eval(b);
},_isItemVisible:function(f){var d=$telerik.getContentSize(this._clipElement);
var a=$telerik.getLocation(this._clipElement);
d.x=a.x;
d.y=a.y;
var e=$telerik.getOuterSize(f.get_element());
var a=$telerik.getLocation(f.get_element());
e.x=a.x;
e.y=a.y;
var c=($telerik.containsPoint(d,e.x,e.y)&&$telerik.containsPoint(d,e.x+e.width,e.y+e.height));
var b=($telerik.containsPoint(e,d.x,d.y)&&$telerik.containsPoint(e,d.x+d.width,d.y+d.height));
return c||b;
},_fireTickersForItem:function(d){var c=d.get_tickers();
for(var a=0,e=c.length;
a<e;
a++){if(c[a]){var b=$find(c[a]);
if(b){b.startTicker();
}}}},_resetTickersForItem:function(d){var c=d.get_tickers();
for(var a=0,e=c.length;
a<e;
a++){if(c[a]){var b=$find(c[a]);
if(b){b.resetTicker();
}}}},_getItemFromEvent:function(a){var c=this.get_containerElement();
var b=null;
while(null!=a&&a!=c&&a!=document){if(a.tagName.toLowerCase()=="li"&&null!=a._item&&Object.getTypeName(a._item)=="Telerik.Web.UI.RadRotatorItem"){b=a._item;
}a=a.parentNode;
}return b;
},_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(c,a){if(!this._webServiceLoader){this._initializeWebServiceLoader();
}var b={itemIndex:c,itemCount:a};
this._webServiceLoader.loadData(b,b);
},_onItemLoadingStarted:function(a,b){},_onItemLoadingSuccess:function(a,c){var b=c.get_data();
if(b&&b.length>0){for(var d=0;
d<b.length;
d++){this.createRotatorItem(b[d]);
}}},_onItemLoadingError:function(a,c){var b=c.get_message();
alert(b);
},createRotatorItem:function(b){var d=this.get_containerElement();
var a=d.ownerDocument.createElement("li");
d.appendChild(a);
a.innerHTML=b.Html;
var c={cssClass:b.CssClass,visible:b.Visible};
var e=$create(Telerik.Web.UI.RadRotatorItem,c,null,null,a);
a._item=e;
Array.add(this.get_items(),e);
},_getInvisibleParent:function(){var a=this.get_element();
while(a&&a!=document){if("none"==$telerik.getCurrentStyle(a,"display","")){return a;
}a=a.parentNode;
}return null;
},isVisible:function(){return(this._getInvisibleParent()==null);
},_fixVisibilityProblems:function(a){if(a){var b=this._getInvisibleParent();
if(b){this._onParentVisibilityChangeDelegate=Function.createDelegate(this,this._onParentVisibilityChange);
this._invisibleParent=b;
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(c){if($telerik.isIE){var c=c.rawEvent;
if(!c){return;
}if(c.propertyName=="style.display"||c.propertyName=="className"){var a=$telerik.getCurrentStyle(this._invisibleParent,"display");
if(a!="none"){this.repaint();
}}}else{if(c.attrName=="style"||c.attrName=="class"){var b=c.target;
if((c.currentTarget==c.originalTarget)&&"none"!=$telerik.getCurrentStyle(b,"display")){window.setTimeout(Function.createDelegate(this,function(){this.repaint();
}),0);
}}}this._fixVisibilityProblems(false);
},repaint:function(){this._createUI();
},add_itemClicking:function(a){this.get_events().addHandler("itemClicking",a);
},remove_itemClicking:function(a){this.get_events().removeHandler("itemClicking",a);
},add_itemClicked:function(a){this.get_events().addHandler("itemClicked",a);
},remove_itemClicked:function(a){this.get_events().removeHandler("itemClicked",a);
},add_mouseOver:function(a){this.get_events().addHandler("mouseOver",a);
},remove_mouseOver:function(a){this.get_events().removeHandler("mouseOver",a);
},add_mouseOut:function(a){this.get_events().addHandler("mouseOut",a);
},remove_mouseOut:function(a){this.get_events().removeHandler("mouseOut",a);
},add_itemShowing:function(a){this.get_events().addHandler("itemShowing",a);
},remove_itemShowing:function(a){this.get_events().removeHandler("itemShowing",a);
},add_itemShown:function(a){this.get_events().addHandler("itemShown",a);
},remove_itemShown:function(a){this.get_events().removeHandler("itemShown",a);
},add_load:function(a){this.get_events().addHandler("load",a);
},remove_load:function(a){this.get_events().removeHandler("load",a);
},add_buttonOver:function(a){this.get_events().addHandler("buttonOver",a);
},remove_buttonOver:function(a){this.get_events().removeHandler("buttonOver",a);
},add_buttonOut:function(a){this.get_events().addHandler("buttonOut",a);
},remove_buttonOut:function(a){this.get_events().removeHandler("buttonOut",a);
},add_buttonClick:function(a){this.get_events().addHandler("buttonClick",a);
},remove_buttonClick:function(a){this.get_events().removeHandler("buttonClick",a);
},get_items:function(){return this._items;
},set_items:function(a){this._items=a;
},get_webServiceSettings:function(){return this._webServiceSettings;
},set_webServiceSettings:function(b){var a=Sys.Serialization.JavaScriptSerializer.deserialize(b);
this._webServiceSettings=new Telerik.Web.UI.WebServiceSettings(a);
},get_pauseOnMouseOver:function(){return this._pauseOnMouseOver;
},set_pauseOnMouseOver:function(a){this._pauseOnMouseOver=a;
},get_skin:function(){return this._skin;
},set_skin:function(a){this._skin=a;
},get_enabled:function(){return this._enabled;
},set_enabled:function(a){if(a!=this._enabled){this._enabled=a;
if(this.get_isInitialized()){if(a){this.start();
}else{this.stop();
}}}}};
Telerik.Web.UI.RadRotator.registerClass("Telerik.Web.UI.RadRotator",Telerik.Web.UI.RadWebControl);
Telerik.Web.UI.RadRotatorEventArgs=function(a){Telerik.Web.UI.RadRotatorEventArgs.initializeBase(this);
this._item=a;
};
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(a){Telerik.Web.UI.RadRotatorCancelEventArgs.initializeBase(this);
this._item=a;
};
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(a){Telerik.Web.UI.RadRotatorButtonEventArgs.initializeBase(this);
this._button=a;
};
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(a){Telerik.Web.UI.RadRotatorItem.initializeBase(this,[a]);
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 b=0;
var c=this.get_element();
var a=c.parentNode;
if(null!=a){var d=$telerik.getChildrenByTagName(a,"li");
if(null!=d){for(b=0;
b<d.length&&d[b]!=c;
b++){}if(b==d.length){b=0;
}}}this._index=b;
}return this._index;
},get_visible:function(){return this._visible;
},set_visible:function(a){this._visible=a;
},get_cssClass:function(){return this._cssClass;
},set_cssClass:function(a){this._cssClass=a;
},get_tickers:function(){if(null==this._tickers&&typeof(Telerik.Web.UI.RadTicker)!="undefined"){this._tickers=[];
for(var a=0,b=$telerik.radControls.length;
a<b;
a++){var c=$telerik.radControls[a];
if(Telerik.Web.UI.RadTicker.isInstanceOfType(c)&&$telerik.isDescendant(this.get_element(),c.get_element())){Array.add(this._tickers,c.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();