﻿Type.registerNamespace("Telerik.Web");
Telerik.Web.UI.SliderValueChangeEventArgs=function(_1,_2){
Telerik.Web.UI.SliderValueChangeEventArgs.initializeBase(this);
this._oldValue=_1;
this._newValue=_2;
};
Telerik.Web.UI.SliderValueChangeEventArgs.prototype={get_oldValue:function(){
return this._oldValue;
},get_newValue:function(){
return this._newValue;
}};
Telerik.Web.UI.SliderValueChangeEventArgs.registerClass("Telerik.Web.UI.SliderValueChangeEventArgs",Sys.EventArgs);
Telerik.Web.UI.SliderBeforeValueChangeEventArgs=function(_3,_4){
Telerik.Web.UI.SliderBeforeValueChangeEventArgs.initializeBase(this);
this._oldValue=_3;
this._newValue=_4;
};
Telerik.Web.UI.SliderBeforeValueChangeEventArgs.prototype={get_oldValue:function(){
return this._oldValue;
},get_newValue:function(){
return this._newValue;
}};
Telerik.Web.UI.SliderBeforeValueChangeEventArgs.registerClass("Telerik.Web.UI.SliderBeforeValueChangeEventArgs",Sys.CancelEventArgs);
Telerik.Web.UI.SliderItemType=function(){
throw Error.invalidOperation();
};
Telerik.Web.UI.SliderItemType.prototype={None:1,Item:2,Tick:3};
Telerik.Web.UI.SliderItemType.registerEnum("Telerik.Web.UI.SliderItemType",false);
Telerik.Web.UI.SliderTrackPosition=function(){
throw Error.invalidOperation();
};
Telerik.Web.UI.SliderTrackPosition.prototype={Center:1,TopLeft:2,BottomRight:3};
Telerik.Web.UI.SliderTrackPosition.registerEnum("Telerik.Web.UI.SliderTrackPosition",false);
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.RadSlider=function(_5){
Telerik.Web.UI.RadSlider.initializeBase(this,[_5]);
this._minimumValue=0;
this._maximumValue=100;
this._value=0;
this._orientation=Telerik.Web.UI.Orientation.Horizontal;
this._isHorizontal=true;
this._animationDuration=0.1;
this._showDecreaseHandle=true;
this._showIncreaseHandle=true;
this._showDragHandle=true;
this._enabled=true;
this._slideStep=1;
this._smallChange=1;
this._largeChange=0;
this._clickOffset=0;
this._trackMouseWheel=true;
this._length=200;
this._width="";
this._height="";
this._skin="Default";
this._autoPostBack=false;
this._firstValueOffset;
this._firstValueDragHandlePosition;
this._wrapperElement=null;
this._dragHandleElement=null;
this._mouseupHandler=null;
this._mouseWheelHandler=null;
this._animationPending=false;
this._inSlidingMode=false;
this._dragText="";
this._increaseText="";
this._decreaseText="";
this._uniqueID=null;
this._resizeExtender=null;
this._selectionEnd=0;
this._isSelectionRangeEnabled=false;
this._endDragHandleElement=null;
this._endResizeExtender=null;
this._children=null;
this._childControlsCreated=false;
this._itemType=Telerik.Web.UI.SliderItemType.None;
this._smallTickSize=0;
this._largeTickSize=0;
this._renderLargeTicks=false;
this._renderSmallTicks=false;
this._liveDrag=true;
this._liveDragValue;
this._liveDragHandleElement=null;
this._liveDragEndHandleElement=null;
this._trackPosition=Telerik.Web.UI.SliderTrackPosition.Center;
this._isDirectionReversed=false;
this.repaint=this.redraw;
};
Telerik.Web.UI.RadSlider.prototype={initialize:function(){
var _6=this._minimumValue;
if(_6>this._maximumValue){
throw Error.argumentOutOfRange("_minimumValue",_6,"MinimumValue should be smaller than MaximumValue");
}
Telerik.Web.UI.RadSlider.callBaseMethod(this,"initialize");
this._value=this._getValueFromIndex(this._value);
if(this._isSelectionRangeEnabled){
this._selectionEnd=this._getValueFromIndex(this._selectionEnd);
}
this._initializeSliderControl();
if(this.get_itemData().length==0){
this.raiseEvent("loaded");
}
},_initializeSliderControl:function(e){
if(e){
var _8=$telerik.isIE;
if(_8){
e=e.rawEvent;
}
var _9=(_8&&e&&(e.propertyName=="style.display"||e.propertyName=="className"));
var _a=(!_8&&(e.attrName=="style"||e.attrName=="class"));
if(!(_a||_9)){
return;
}
}
this._disposeParentVisibilityChangeHandler();
var _b=$telerik.getInvisibleParent(this.get_element().parentNode);
if(_b){
this._invisibleParent=_b;
this._onParentVisibilityChangeDelegate=Function.createDelegate(this,this._initializeSliderControl);
$telerik.addParentVisibilityChangeHandler(_b,this._onParentVisibilityChangeDelegate);
}else{
if(!this._wrapperElement){
this._initializeLayout();
this._initializeSlider();
this._createChildControls();
this._setValuesForSlider();
}
}
},_disposeParentVisibilityChangeHandler:function(){
if(this._invisibleParent&&this._onParentVisibilityChangeDelegate){
$telerik.removeParentVisibilityChangeHandler(this._invisibleParent,this._onParentVisibilityChangeDelegate);
this._invisibleParent=null;
this._onParentVisibilityChangeDelegate=null;
}
},_initializeLayout:function(){
var _c=this.get_element();
var _d=_c.className;
if(_d==""||_d.indexOf("radslider")==-1){
_d="radslider "+("RadSlider_"+this._skin);
Sys.UI.DomElement.addCssClass(_c,_d);
}
var _e=this.get_id();
var _f=this._wrapperElement=document.createElement("DIV");
_c.appendChild(_f);
_f.id="RadSliderWrapper_"+_e;
_f.setAttribute("unselectable","on");
this._setWidth();
this._setHeight();
this._setOrientation();
this._setEnabled();
this._setTrackPosition();
this._setShowHandle(true);
var _10=this._trackElement=document.createElement("DIV");
_10.setAttribute("unselectable","on");
_10.id="RadSliderTrack_"+_e;
Sys.UI.DomElement.addCssClass(_10,"track");
if(!this._showDecreaseHandle){
_10.style[this._getLocationProperty()]="0px";
}
_f.appendChild(_10);
var _11=this._selectedRegionElement=document.createElement("DIV");
_11.setAttribute("unselectable","on");
_11.id="RadSliderSelected_"+_e;
Sys.UI.DomElement.addCssClass(_11,"selectedregion");
_11.innerHTML="<!-- -->";
_10.appendChild(_11);
this._setShowDragHandle();
this._setShowHandle(false);
this._setSliderElementsSize();
},_createHandleUI:function(_12,_13,_14){
var _15=document.createElement("A");
_15.id=_12;
_15.href="javascript: void(0);";
Sys.UI.DomElement.addCssClass(_15,_14);
_15.title=_13;
_15.onmouseup="this.blur();";
var _16=document.createElement("SPAN");
_16.innerHTML=_13;
_15.appendChild(_16);
return _15;
},_addDragHandleElement:function(_17,_18){
var _19=this._dragText;
var _1a="draghandle";
var _1b=(_18?"RadSliderEndDrag_":"RadSliderDrag_")+this.get_id();
var _1c=this._createHandleUI(_1b,_19,_1a);
_17.appendChild(_1c);
this[_18?"_endDragHandleElement":"_dragHandleElement"]=_1c;
if(!this._liveDrag){
var _1d=this._createHandleUI(("liveDrag_"+_1b),_19,(_1a+" liveDragHandle"));
_17.appendChild(_1d);
this[_18?"_liveDragEndHandleElement":"_liveDragHandleElement"]=_1d;
}
},_setWidth:function(){
var _1e=parseInt(this._width);
if(!isNaN(_1e)&&(_1e>0)){
this._wrapperElement.style.width=_1e+"px";
}
},_setHeight:function(){
var _1f=parseInt(this._height);
if(!isNaN(_1f)&&(_1f>0)){
this._wrapperElement.style.height=_1f+"px";
}
},_setOrientation:function(){
var _20=this._wrapperElement;
var _21=this._isHorizontal;
Sys.UI.DomElement.removeCssClass(_20,(!_21?"horizontal":"vertical"));
Sys.UI.DomElement.addCssClass(_20,(_21?"horizontal":"vertical"));
this._isHorizontal=!_21;
var _22=this._getTrackPositionClass(this._trackPosition);
this._isHorizontal=_21;
Sys.UI.DomElement.removeCssClass(_20,_22);
this._setTrackPosition();
},_setEnabled:function(){
var _23=this._wrapperElement;
var _24=this._isSelectionRangeEnabled;
if(this._enabled){
Sys.UI.DomElement.removeCssClass(_23,"disabled");
this._createDragHandleExtender();
if(_24){
this._createDragHandleExtender(true);
}
}else{
Sys.UI.DomElement.addCssClass(_23,"disabled");
this._disposeDragHandleExtender();
if(_24){
this._disposeDragHandleExtender(true);
}
}
},_getTrackPositionClass:function(_25){
var _26=this._isHorizontal;
var _27=(_26)?"rslMiddle":"rslCenter";
if(_25==Telerik.Web.UI.SliderTrackPosition.TopLeft){
_27=(_26)?"rslTop":"rslLeft";
}else{
if(_25==Telerik.Web.UI.SliderTrackPosition.BottomRight){
_27=(_26)?"rslBottom":"rslRight";
}
}
return _27;
},_setTrackPosition:function(_28){
if(this._itemType==Telerik.Web.UI.SliderItemType.None){
return;
}
var _29=this._wrapperElement;
var _2a;
if(_28!=null){
_2a=this._getTrackPositionClass(_28);
Sys.UI.DomElement.removeCssClass(_29,_2a);
}
_2a=this._getTrackPositionClass(this._trackPosition);
Sys.UI.DomElement.addCssClass(_29,_2a);
},_setShowHandle:function(_2b){
var _2c=_2b?"_showDecreaseHandle":"_showIncreaseHandle";
var _2d=_2b?"_decreaseHandleElement":"_increaseHandleElement";
var _2e=this._getLocationProperty();
var _2f=this._trackElement;
var _30=this._listElement;
var _31=this[_2c];
var _32=this[_2d];
if(_32){
if(!_31){
clearTimeout(this[_2b?"_decreaseMDownInterval":"_increaseMDownInterval"]);
$clearHandlers(_32);
_32.parentNode.removeChild(_32);
this[_2d]=null;
if(_2b){
if(_2f){
_2f.style[_2e]="0";
}
if(_30){
_30.style[_2e]="0";
}
}
}
}else{
if(_31){
if(_2b){
if(_2f){
_2f.style[_2e]="";
}
if(_30){
_30.style[_2e]="";
}
}
var _33=_2b?"decrease":"increase";
var _34=this[_2b?"_decreaseText":"_increaseText"];
var _35=(_2b?"RadSliderDecrease_":"RadSliderIncrease_")+this.get_id();
var _36=this[_2d]=this._createHandleUI(_35,_34,("handle "+_33));
this._wrapperElement.appendChild(_36);
$addHandlers(_36,{"mousedown":this[_2b?"_onDecreaseMouseDown":"_onIncreaseMouseDown"]},this);
}
}
},_initializeDragHandle:function(_37){
this._addDragHandleElement(this._trackElement,_37);
this._createDragHandleExtender(_37);
this._initializeDragHandleAnimation(_37);
},_disposeDragHandle:function(_38){
this._disposeDragHandleExtender(_38);
this._disposeDragHandleAnimation(_38);
var _39=this[_38?"_endDragHandleElement":"_dragHandleElement"];
_39.parentNode.removeChild(_39);
this[_38?"_endDragHandleElement":"_dragHandleElement"]=null;
if(!this._liveDrag){
var _3a=this[_38?"_liveDragEndHandleElement":"_liveDragHandleElement"];
_3a.parentNode.removeChild(_3a);
this[_38?"_liveDragEndHandleElement":"_liveDragHandleElement"]=null;
}
},_setShowEndDragHandle:function(){
var _3b=this._isSelectionRangeEnabled;
var _3c=this._showDragHandle;
var _3d=this._endDragHandleElement;
if(_3d){
if(!_3c||!_3b){
if(!_3b&&(_3d.id=="RadSliderDrag_"+this.get_id())){
this._isSelectionRangeEnabled=true;
this._switchDragHanldes();
this._isSelectionRangeEnabled=false;
}
this._disposeDragHandle(true);
}
}else{
if(_3c&&_3b){
this._initializeDragHandle(true);
}
}
},_setShowDragHandle:function(){
var _3e=this._showDragHandle;
if(this._dragHandleElement){
if(!_3e){
this._disposeDragHandle();
this._setShowEndDragHandle();
}
}else{
if(_3e){
this._initializeDragHandle();
this._setShowEndDragHandle();
}
}
},_createDragHandleExtender:function(_3f){
if(!this._enabled){
return;
}
var _40=this._liveDrag?this[_3f?"_endDragHandleElement":"_dragHandleElement"]:this[_3f?"_liveDragEndHandleElement":"_liveDragHandleElement"];
var _41=_3f?"_endResizeExtender":"_resizeExtender";
if(_40&&!this[_41]){
var _42=($telerik.isIE)?"hand":"pointer";
var _43={};
_43[_42]=_40;
var _44=this[_41]=new Telerik.Web.UI.ResizeExtender(this,_40,_43,null,null,_42,false);
_44.set_hideIframes(false);
}
},_refreshLayout:function(){
this._setSliderElementsSize();
this._setValuesForSlider();
},_setValuesForSlider:function(){
this._setNewValue(this._value,true);
if(this._isSelectionRangeEnabled){
this._setNewValue(this._selectionEnd,false);
}
},_setSliderElementsSize:function(){
if(!this._wrapperElement){
return;
}
var _45=(this._showIncreaseHandle)?this._getIncreaseHandleBounds().width:0;
var _46=(this._showDecreaseHandle)?this._getDecreaseHandleBounds().width:0;
var _47=this.get_length()-_46-_45;
var _48=this._trackElement;
_48.style.width="";
_48.style.height="";
var _49=$telerik.getBounds(_48);
var _4a=this._isHorizontal;
var _4b=(_4a)?_47:_49.width;
var _4c=(!_4a)?_47:_49.height;
if(_4b>0&&_4c>0){
$telerik.setSize(_48,{width:_4b,height:_4c});
}
var _4d=false;
if(this._children&&this._itemType==Telerik.Web.UI.SliderItemType.Tick){
var _4e=this._checkRenderTicks();
var _4f=_4e.renderLargeTicks;
var _50=_4e.renderSmallTicks;
if(this._renderLargeTicks!=_4f||this._renderSmallTicks!=_50){
this._children.clear();
this._itemsUICreated=false;
this._itemData=[];
this._createChildControls();
_4d=true;
}
}
if(!_4d){
this._setItemsSize();
}
this._setFirstValueOffset();
},_setFirstValueOffset:function(){
var _51=Math.floor(this._getHalfDragHandleSize());
if(this._itemType==Telerik.Web.UI.SliderItemType.Tick){
this._firstValueOffset=_51;
this._firstValueDragHandlePosition=0;
}else{
this._firstValueOffset=0;
this._firstValueDragHandlePosition=-_51;
}
},_initializeSlider:function(){
this._initializeEventHandlers();
this._initializeAnimation();
},_initializeEventHandlers:function(){
this._mouseupHandler=Function.createDelegate(this,this._onMouseUp);
$addHandler(document,"mouseup",this._mouseupHandler);
$addHandlers(this._trackElement,{"mousedown":this._onTrackMouseDown},this);
this._setTrackMouseWheel();
},_setTrackMouseWheel:function(){
this._animationPending=false;
var _52=this._trackElement;
this._disposeTrackMouseWheelHandler();
if(!this._trackMouseWheel||this._isSelectionRangeEnabled){
return;
}
this._mouseWheelHandler=Function.createDelegate(this,this._onMouseWheel);
$telerik.addExternalHandler(_52,"mousewheel",this._mouseWheelHandler);
if($telerik.isFirefox){
$telerik.addExternalHandler(_52,"DOMMouseScroll",this._mouseWheelHandler);
}
},_disposeTrackMouseWheelHandler:function(){
var _53=this._trackElement;
if(this._mouseWheelHandler&&_53){
$telerik.removeExternalHandler(_53,"mousewheel",this._mouseWheelHandler);
if($telerik.isFirefox){
$telerik.removeExternalHandler(_53,"DOMMouseScroll",this._mouseWheelHandler);
}
this._mouseWheelHandler=null;
}
},dispose:function(){
this._disposeHandlers();
this._disposeAnimation();
this._disposeSlider();
Telerik.Web.UI.RadSlider.callBaseMethod(this,"dispose");
},_disposeSlider:function(){
this._disposeDragHandleExtender();
this._disposeDragHandleExtender(true);
clearTimeout(this._increaseMDownInterval);
clearTimeout(this._decreaseMDownInterval);
clearTimeout(this._mDownInterval);
this._dragHandleElement=null;
this._endDragHandleElement=null;
this._decreaseHandleElement=null;
this._increaseHandleElement=null;
this._trackElement=null;
this._selectedRegionElement=null;
this._liveDragHandleElement=null;
this._liveDragEndHandleElement=null;
this._listElement=null;
this._wrapperElement=null;
},_disposeHandlers:function(){
if(this._trackElement){
$clearHandlers(this._trackElement);
}
if(this._listElement){
$clearHandlers(this._listElement);
}
if(this._decreaseHandleElement){
$clearHandlers(this._decreaseHandleElement);
}
if(this._increaseHandleElement){
$clearHandlers(this._increaseHandleElement);
}
if(this._selectedRegionElement){
$clearHandlers(this._selectedRegionElement);
}
if(this._mouseupHandler){
$removeHandler(document,"mouseup",this._mouseupHandler);
this._mouseupHandler=null;
}
this._disposeTrackMouseWheelHandler();
this._disposeParentVisibilityChangeHandler();
},_disposeDragHandleExtender:function(_54){
var _55=_54?"_endResizeExtender":"_resizeExtender";
if(this[_55]){
this[_55].dispose();
this[_55]=null;
}
},onDragStart:function(_56){
var _57=_56.element;
if(isNaN(parseInt(_57.style.left))){
_57.style.left="0";
}
if(isNaN(parseInt(_57.style.top))){
_57.style.top="0";
}
if(!this._liveDrag){
Sys.UI.DomElement.removeCssClass(_57,"liveDragHandle");
Sys.UI.DomElement.addCssClass(_57,"liveDragHandleActive");
_57=(_57.id=="liveDrag_"+this._dragHandleElement.id)?this._dragHandleElement:this._endDragHandleElement;
}
this._handleInSlidingMode=_57;
this._valueOnSlideStart=this._getActiveDragHandleValue(this._updateSelectionStart(null,_57));
if(!this._liveDrag){
this._liveDragValue=this._valueOnSlideStart;
}
this._inSlidingMode=true;
var _58=this._cachedDragHandleBounds=$telerik.getBounds(_57);
var _59=$telerik.getBounds(this._trackElement);
var _5a=this._isHorizontal;
var _5b=this._firstValueDragHandlePosition;
this._cachedSliderBounds=new Sys.UI.Bounds((_5a?_5b:0),(!_5a?_5b:0),((_5a)?(_59.width+_58.width):_58.width),((!_5a)?(_59.height+_58.height):_58.height));
this.raiseEvent("slideStart");
return true;
},onDragEnd:function(_5c){
var _5d=_5c.element;
var _5e=this._handleInSlidingMode;
var _5f=this._updateSelectionStart(null,_5e);
if(!this._liveDrag){
Sys.UI.DomElement.removeCssClass(_5d,"liveDragHandleActive");
Sys.UI.DomElement.addCssClass(_5d,"liveDragHandle");
var _60=this._liveDragValue;
var _61=this._calculateDragHandleOffset(_60);
var _62=this._getLocationProperty();
var _63=this._setActiveDragHandleValue(_60,_5f);
if(!_63){
_5e.style[_62]=_61+"px";
this._updateSelectedRegion(_5e,_61);
}else{
this._updateRelativeLiveDragHandlePosition(_5e);
}
}
this._cachedSliderBounds=null;
this._cachedDragHandleBounds=null;
this._handleInSlidingMode=null;
this._inSlidingMode=false;
this.raiseEvent("slideEnd");
if(this._autoPostBack&&this._valueOnSlideStart!=this._getActiveDragHandleValue(_5f)){
this._raiseValueChangedServerEvent();
}
},onDrag:function(_64){
var _65=this._cachedDragHandleBounds;
var _66=this._cachedSliderBounds;
if(_66.width<1||_66.height<1){
return false;
}
_64.width=_65.width;
_64.height=_65.height;
var _67=Telerik.Web.UI.ResizeExtender.containsBounds(_66,_64);
if(!_67){
if(_64.x<=_66.x){
_64.x=_66.x;
}else{
if(_66.x+_66.width<=_64.x+_65.width){
_64.x=_66.x+_66.width-_65.width;
}
}
if(_64.y<=_66.y){
_64.y=_66.y;
}else{
if(_66.y+_66.height<=_64.y+_65.height){
_64.y=_66.y+_66.height-_65.height;
}
}
_67=true;
}
var _68=_64.element;
var _69=this._updateSelectionStart(null,_68);
var _6a=this._calcValue(null,null,_64,_69);
var _6b=this._calculateDragHandleOffset(_6a);
_64[this._getPointProperty()]=_6b;
var _6c=this._liveDrag;
if(_6c&&this._getActiveDragHandleValue(_69)!=_6a){
var _6d=this._setActiveDragHandleValue(_6a,_69);
if(_6d){
_67=false;
}else{
this._updateSelectedRegion(_68,_6b);
}
}else{
if(!_6c&&this._liveDragValue!=_6a){
this._liveDragValue=_6a;
}else{
_67=false;
}
}
this.raiseEvent("slide");
return _67;
},_initializeAnimation:function(){
this._selectedRegionAnimation=new Telerik.Web.UI.Animations.SimpleResizeAnimation(this,this._animationDuration,null,this._selectedRegionElement);
},_initializeDragHandleAnimation:function(_6e){
var _6f=_6e?"_dragHandleEndAnimation":"_dragHandleAnimation";
var fps=100;
var _71=Function.createDelegate(this,this._onDragHandleAnimationEnded);
this[_6f]=new Telerik.Web.Animation.LengthAnimation(this[_6e?"_endDragHandleElement":"_dragHandleElement"],this._animationDuration,fps,"style");
this[_6f].add_ended(_71);
},_disposeAnimation:function(){
this._disposeDragHandleAnimation();
this._disposeDragHandleAnimation(true);
if(this._selectedRegionAnimation){
this._selectedRegionAnimation.dispose();
this._selectedRegionAnimation=null;
}
},_disposeDragHandleAnimation:function(_72){
var _73=_72?"_dragHandleEndAnimation":"_dragHandleAnimation";
if(this[_73]){
this[_73].dispose();
this[_73]=null;
}
},_getSelectionAnimationStartBounds:function(){
return this._getSelectedRegionBounds();
},_getSelectionAnimationEndBounds:function(_74,_75){
var _76=this._getSelectedRegionBounds();
var _77=Math.floor(_74+this._getHalfDragHandleSize());
var _78=this._getSizeProperty();
var _79=this._getPointProperty();
if(this._isSelectionRangeEnabled){
var _7a=_76[_79];
var _7b=_7a+_76[_78];
if(_75){
_76[_79]=_77;
_7a=_77;
}else{
_7b=_77;
}
_77=_7b-_7a;
}else{
if(this._isDirectionReversed){
_76[_79]=_77;
_77=this._getTrackBounds().width-_77;
}
}
_77=(_77<0)?0:_77;
_76[_78]=_77;
return _76;
},_onDragHandleAnimationEnded:function(){
this._updateRelativeLiveDragHandlePosition(this._handleInSlidingMode);
},_createChildControls:function(){
if(this._itemsUICreated){
return;
}
if(!this._children){
this._children=new Telerik.Web.UI.RadSliderItemCollection(this);
}
if(!this._wrapperElement){
return;
}
var _7c=this.get_itemData();
if(!_7c||_7c.length==0){
if(this._itemType==Telerik.Web.UI.SliderItemType.Tick){
this._calculateTickSize();
var _7d=this._largeChange;
if(this._largeChange>0){
this._calculateTickSize(true);
}
if(this._smallTickSize>0&&((this._largeTickSize>0&&_7d>0)||_7d<=0)){
var _7c=this._createItemDataForTicks();
if(!_7c||_7c.length==0){
return;
}
this._createChildControlsUI(_7c);
}
}
}else{
this._createChildControlsUI(_7c);
}
},_createChildControlsUI:function(_7e){
setTimeout(Function.createDelegate(this,function(){
if(this._itemsUICreated){
return;
}
if(!this._listElement){
this._createChildListElement();
}
var _7f=this._listElement;
var _80=this._children;
var _81=_7e.length;
var _82=this._isDirectionReversed;
this._childControlsCreated=true;
this._itemsUICreated=true;
for(var i=0,_84=_7e.length;i<_84;i++){
var _85=new Telerik.Web.UI.RadSliderItem();
_85._loadFromDictionary(_7e[_82?(_81-1-i):i]);
_80.add(_85);
}
this._setItemsSize();
if(this._itemType==Telerik.Web.UI.SliderItemType.Item){
this._updateSelectedItemsStatus();
}
this.raiseEvent("loaded");
}),0);
},_createChildListElement:function(){
var _86=document.createElement("ul");
_86.className="rslItemsWrapper";
_86.unselectable="on";
if(!this._showDecreaseHandle){
_86.style[this._getLocationProperty()]="0px";
}
var _87=this._trackElement;
_87.parentNode.insertBefore(_86,_87);
$addHandlers(_86,{"mousedown":this._onTrackMouseDown},this);
this._listElement=_86;
return _86;
},_logInserted:function(_88){
},_clearSelection:function(){
var _89=this._children;
for(var i=0,_8b=_89.get_count();i<_8b;i++){
_89.getItem(i).set_selected(false);
}
},_getItemOffset:function(_8c,_8d,_8e){
var _8f=_8d;
if(!_8f){
_8f=this._getUlSize()[this._getSizeProperty()];
}
var _90=this._children.get_count();
var _91=0;
if(this._itemType==Telerik.Web.UI.SliderItemType.Tick){
var _92=(this._getDragHandleBounds().width/2);
var _93=_92+Math.floor((_8f-2*_92)/(2*(_90-1)));
var _94=_93;
_91=_93;
if(this._isDirectionReversed){
_91+=_8e;
}else{
_94+=_8e;
}
if(_8c==0){
return {startPoint:0,endPoint:_91};
}else{
if(_8c==(_90-1)){
return {startPoint:(_8f-_94),endPoint:_8f};
}
}
_8f-=(_91+_94);
_90-=2;
_8c-=1;
if(_8f<0||_90<=0){
return {startPoint:0,endPoint:0};
}
}
var _95=_8c/_90;
var _96=(_8c+1)/_90;
var _97=parseInt(_95*_8f)+_91;
var _98=parseInt(_96*_8f)+_91;
return {startPoint:_97,endPoint:_98};
},_checkHitInItem:function(_99,_9a){
var _9b=this._getItemOffset(_99);
if(_9a<_9b.startPoint){
if(_99<=0){
return null;
}
return this._checkHitInItem(_99-1,_9a);
}else{
if(_9a>_9b.endPoint){
if(_99>=this._children.get_count()-1){
return null;
}
return this._checkHitInItem(_99+1,_9a);
}
}
return _99;
},_getItemFromValue:function(_9c){
var _9d=this._calculateDragHandleOffset(_9c)+this._firstValueOffset;
return this._getItemFromOffset(_9d);
},_getItemFromOffset:function(_9e){
var _9f=this._children;
var _a0=_9f.get_count();
var _a1=this._getItemSize(0)[this._getSizeProperty()];
if(_a1>0){
var _a2=Math.floor(_9e/_a1);
_a2=this._checkHitInItem(_a2,_9e);
if(_a2>=_a0){
_a2=_a0-1;
}
if(_a2>=0){
return _9f.getItem(_a2);
}
}
return null;
},_updateSelectedItemsStatus:function(){
var _a3=this._children;
if(_a3.get_count()>0){
this._clearSelection();
var _a4=this._getItemFromValue(this._value);
if(_a4){
_a4.set_selected(true);
}
if(this._isSelectionRangeEnabled){
var _a5=this._getItemFromValue(this._selectionEnd);
if(_a5){
_a5.set_selected(true);
}
}
}
},_getUlSize:function(){
var _a6=this._trackElement;
var _a7=$telerik.getSize(_a6);
var _a8=_a7;
var _a9=this._isHorizontal;
var _aa=parseInt(_a9?this._height:this._width);
var _ab=this._trackPosition;
var _ac=_ab==Telerik.Web.UI.SliderTrackPosition.TopLeft;
if(_ac||_ab==Telerik.Web.UI.SliderTrackPosition.BottomRight){
_aa-=_a7[_a9?"height":"width"];
var _ad=_a9?(_ac?"marginTop":"marginBottom"):(_ac?"marginLeft":"marginRight");
var _ae=parseInt($telerik.getCurrentStyle(_a6,_ad));
if(!isNaN(_ae)){
_aa-=_ae;
}
var _af=parseInt($telerik.getCurrentStyle(this._listElement,_ad));
if(!isNaN(_af)){
_aa-=_af;
}
}
if(_aa>=0){
_a8[_a9?"height":"width"]=_aa;
}
return _a8;
},_getItemSize:function(_b0,_b1,_b2){
var _b3=_b1;
if(!_b3){
_b3=this._getUlSize();
}
var _b4={width:_b3.width,height:_b3.height};
var _b5=this._getSizeProperty();
var _b6=this._getItemOffset(_b0,_b3[_b5],_b2);
_b4[_b5]=_b6.endPoint-_b6.startPoint;
return _b4;
},_setItemsSize:function(){
if(!this._itemsUICreated){
return;
}
var _b7=this._children;
var _b8=_b7.get_count();
if(_b8==0){
return;
}
var _b9=(this._itemType==Telerik.Web.UI.SliderItemType.Tick);
var _ba=this._isHorizontal;
var _bb=this._getSizeProperty();
var _bc=0;
if(_b9){
var _bd=this._isDirectionReversed;
var _be=_bd?0:(_b8-1);
var _bf=_b7.getItem(_be).get_isSmallTick();
var _c0=((this._maximumValue-this._minimumValue)%(_bf?this._smallChange:this._largeChange));
if(_c0!=0){
var _c1=_bd?(this._minimumValue+_c0):(this._maximumValue-_c0);
var _c2=this._calculateDragHandleOffset(_c1);
_bc=this._getTrackBounds().width-_c2-this._getDragHandleBounds().width;
}
}
var _c3=this._getUlSize();
var _c4={lastItemSize:0,asymmetricAddOn:_bc};
var _c5=0;
for(var _c6=0;_c6<_b8;_c6++){
var _c7=_b7.getItem(_c6).get_element();
_c5=this._getItemSize(_c6,_c3,_bc);
$telerik.setSize(_c7,_c5);
if(_c6==_b8-1){
_c4.lastItemSize=_c5[_bb];
}else{
if(_b9&&(_c6>0)){
var _c8=_c7.getElementsByTagName("SPAN");
var _c9=Math.max(_c5[_bb],12)+"px";
for(var i=0,_cb=_c8.length;i<_cb;i++){
if(!_ba){
_c8[i].style.lineHeight=_c9;
}else{
_c8[i].style.lineHeight="";
}
}
}
}
}
this._setEndTicksBackgroundPosition(_c4);
},get_childListElement:function(){
var _cc=this._listElement;
if(!_cc){
_cc=this._createChildListElement();
}
return _cc;
},get_selectedItems:function(){
var _cd=this._children;
var _ce={};
for(var i=0,_d0=_cd.get_count();i<_d0;i++){
var _d1=_cd.getItem(i);
if(_d1.get_selected()){
_ce[_ce.length]=_cd[i];
}
if(_ce.length==2){
break;
}
}
return _ce;
},_calculateDragHandleOffset:function(_d2){
var _d3=this._minimumValue;
var _d4=this._maximumValue;
var _d5=this._getTrackBounds();
var _d6=this._firstValueDragHandlePosition;
if(_d6==0){
_d5.width=(_d5.width-this._getDragHandleBounds().width);
}
var _d7=_d4-_d3;
var _d8=(_d2-_d3)/_d7;
var _d9;
if(this._isDirectionReversed){
_d8=1-_d8;
_d2=_d4+_d3-_d2;
}
var _da=parseInt(_d8*(_d5.width));
var _d9=(_d2==_d3)?_d6:(_d2==_d4)?(_d5.width+_d6):_da+_d6;
return _d9;
},_getBoundsInternal:function(_db){
var _dc=$telerik.getBounds(_db);
if(this._orientation==Telerik.Web.UI.Orientation.Vertical){
_dc={x:_dc.y,y:_dc.x,height:_dc.width,width:_dc.height,right:_dc.right,bottom:_dc.bottom,location:{x:_dc.y,y:_dc.x},size:{width:_dc.height,height:_dc.width}};
}
return _dc;
},_getHalfDragHandleSize:function(){
return (this._getDragHandleBounds().width/2);
},_getTrackBounds:function(){
return this._getBoundsInternal(this._trackElement);
},_getSelectedRegionBounds:function(){
var _dd=$telerik.getContentSize(this._selectedRegionElement);
_dd.y=0;
_dd.x=0;
var _de=this._isSelectionRangeEnabled;
if(_de||(!_de&&this._isDirectionReversed)){
var _df=this._getElementLocation(this._selectedRegionElement);
_dd[this._getPointProperty()]=_df;
}
return _dd;
},_getSelectedRegionPoints:function(){
var _e0=this._getSelectedRegionBounds();
var _e1=_e0[this._getPointProperty()];
var _e2=_e1+_e0[this._getSizeProperty()];
return {startPoint:_e1,endPoint:_e2};
},_getDragHandleBounds:function(_e3){
if(!this._showDragHandle){
var _e4={x:0,y:0,height:0,width:0,right:0,bottom:0,location:{x:0,y:0},size:{width:0,height:0}};
return _e4;
}
var _e5=_e3;
if(!_e5){
_e5=this._dragHandleElement;
if(this._isSelectionRangeEnabled&&this._handleInSlidingMode){
_e5=this._handleInSlidingMode;
}
}
return this._getBoundsInternal(_e5);
},_getDecreaseHandleBounds:function(){
return this._getBoundsInternal(this._decreaseHandleElement);
},_getIncreaseHandleBounds:function(){
return this._getBoundsInternal(this._increaseHandleElement);
},_getLocationProperty:function(){
if(!this._locationProperty){
this._locationProperty=this._isHorizontal?"left":"top";
}
return this._locationProperty;
},_updateLocationProperty:function(){
this._locationProperty=this._isHorizontal?"left":"top";
},_getSizeProperty:function(){
if(!this._sizeProperty){
this._sizeProperty=this._isHorizontal?"width":"height";
}
return this._sizeProperty;
},_updateSizeProperty:function(){
this._sizeProperty=this._isHorizontal?"width":"height";
},_getPointProperty:function(){
if(!this._pointProperty){
this._pointProperty=this._isHorizontal?"x":"y";
}
return this._pointProperty;
},_updatePointProperty:function(){
this._pointProperty=this._isHorizontal?"x":"y";
},_doSmallStep:function(_e6){
var _e7=this._smallChange;
var _e8=this._isDirectionReversed;
if((!_e6&&!_e8)||(_e6&&_e8)){
_e7*=-1;
}
this._animationPending=true;
var _e9=true;
if(this._isSelectionRangeEnabled&&_e6){
_e9=false;
}
var _ea=this._getActiveDragHandleValue(_e9)+_e7;
_ea=this._calcValue(_ea,null,null,_e9);
this._setHandlePosition(_ea,null,_e9);
},_calcValue:function(_eb,_ec,_ed,_ee){
var _ef;
var _f0=this._minimumValue;
var _f1=this._maximumValue;
var _f2=_ee?this._dragHandleElement:this._endDragHandleElement;
if(_eb!=null){
if(!Number.isInstanceOfType(_eb)){
try{
_eb=parseFloat(_eb);
}
catch(ex){
_eb=Number.NaN;
}
}
if(isNaN(_eb)){
_eb=_f0;
}
_ef=(_eb<_f0)?_f0:(_eb>_f1)?_f1:_eb;
}else{
var _f3=this._getTrackBounds();
var _f4=this._getDragHandleBounds(_f2);
if(_ed){
_f4.x=(_ed[this._getPointProperty()])+_f3.x;
}
var _f5=this._firstValueOffset;
var _f6=(_ec!=null)?(_ec-_f5):(_f4.x+(_f4.width/2)-_f3.x-_f5);
if(this._firstValueDragHandlePosition==0){
_f3.width=(_f3.width-_f4.width);
}
var _f7=_f6/_f3.width;
if(this._isDirectionReversed){
_f6=_f3.width+_f5-_f6;
_f7=1-_f7;
}
_ef=(_f6==0)?_f0:(_f6==_f3.width)?_f1:_f0+_f7*(_f1-_f0);
}
_ef=this._getNearestStepValue(_ef);
_ef=(_ef<_f0)?_f0:(_ef>_f1)?_f1:_ef;
if(this._children&&this._children.get_count()>0&&(this._itemType==Telerik.Web.UI.SliderItemType.Item)){
var _f8=this._smallChange;
var _f9=this._getItemFromOffset(_f6);
if(_f9){
_ef=this._getValueFromIndex(_f9.get_index());
}else{
if(_ef%2==0){
if(_ef<this._getActiveDragHandleValue(_ee)){
_ef-=_f8;
}else{
_ef+=_f8;
}
_ef=(_ef<_f0)?_f0+_f8:(_ef>_f1)?_f1-_f8:_ef;
}
}
}
return _ef;
},_setHandlePosition:function(_fa,_fb,_fc,_fd){
if(!_fd&&this.raise_beforeValueChange(this._getActiveDragHandleValue(_fc),_fa)){
return;
}
var _fe=_fb;
if(!_fe){
_fe=this._handleInSlidingMode;
}
if((this._animationDuration>0)&&this._animationPending){
if(this._animationEnded==false){
return;
}
this._animationEnded=false;
this._selectedRegionAnimation.stop();
var _ff=this._getSelectionAnimationStartBounds();
this._selectedRegionAnimation.set_startBounds(_ff);
var _100=this._calculateDragHandleOffset(_fa);
var _101=this._getSelectionAnimationEndBounds(_100,_fc);
this._selectedRegionAnimation.set_endBounds(_101);
this._selectedRegionAnimation.onShowEnd=function(){
var _102=this.controller;
_102._setActiveDragHandleValue(_fa,_fc,false);
_102._animationEnded=true;
};
this._selectedRegionAnimation.play();
if(this._showDragHandle){
var _103=_fc?this._dragHandleAnimation:this._dragHandleEndAnimation;
var _104=this._getTrackBounds();
var _105=this._getDragHandleBounds(_fe);
var _106=_105.x-_104.x;
_103.stop();
_103.set_startValue(_106);
_103.set_endValue(_100);
_103.set_propertyKey(this._getLocationProperty());
_103.play();
}
this._animationPending=false;
}else{
var _100=this._calculateDragHandleOffset(_fa);
if(this._showDragHandle){
_fe.style[this._getLocationProperty()]=_100+"px";
this._updateRelativeLiveDragHandlePosition(_fe);
}
this._setActiveDragHandleValue(_fa,_fc,false);
this._updateSelectedRegion(_fe,_100,_fc);
}
},_getNearestStepValue:function(_107){
var _108=this._minimumValue;
var _109=this._maximumValue;
var _10a=_109-_108;
if(_10a==0){
return _107;
}
if(_107>=_109){
return _109;
}
if(_107<=_108){
return _108;
}
_107-=_108;
var step=this._smallChange;
var _10c=_107%step;
if(_10c==0){
return (_107+_108);
}
var _10d=step-_10c;
if(_10c<step/2){
_10d=-1*_10c;
}
var _10e=_107+_10d+_108;
return _10e;
},_getRelativeLiveDragHandle:function(_10f){
if(this._liveDrag||!this._showDragHandle){
return null;
}
if(this._updateSelectionStart(null,_10f)){
return this._liveDragHandleElement;
}
return this._liveDragEndHandleElement;
},_updateRelativeLiveDragHandlePosition:function(_110){
if(this._liveDrag||!this._showDragHandle){
return;
}
if(_110){
var _111=this._getRelativeLiveDragHandle(_110);
if(_111){
var _112=this._getLocationProperty();
_111.style[_112]=_110.style[_112];
}
}else{
if(this._dragHandleElement){
this._updateRelativeLiveDragHandlePosition(this._dragHandleElement);
if(this._isSelectionRangeEnabled&&this._endDragHandleElement){
this._updateRelativeLiveDragHandlePosition(this._endDragHandleElement);
}
}
}
},_getNearestDragHandle:function(_113){
var _114=this._dragHandleElement;
if(this._isSelectionRangeEnabled&&_113){
var _115=this._getSelectedRegionPoints();
var _116=_115.endPoint;
if((Math.abs(_113-_115.startPoint)>Math.abs(_113-_116))||_113>_116){
_114=this._endDragHandleElement;
}
}
return _114;
},_getElementLocation:function(_117){
var _118=this._getLocationProperty();
var _119=parseInt(_117.style[_118]);
if(isNaN(_119)){
_119=0;
}
return _119;
},_getActiveDragHandleValue:function(_11a){
var _11b=_11a?this._dragHandleElement:this._endDragHandleElement;
if(!_11b&&this._showDragHandle){
return this._minimumValue;
}
var _11c=(_11a!=null)?_11a:this._updateSelectionStart(null,dragHandle);
if(_11c){
return this._value;
}else{
return this._selectionEnd;
}
},_setActiveDragHandleValue:function(_11d,_11e,_11f){
var _120=_11e?this._dragHandleElement:this._endDragHandleElement;
if(!_120&&this._showDragHandle){
return;
}
var _121=this._getActiveDragHandleValue(_11e);
if(_11f!=false&&this.raise_beforeValueChange(_121,_11d)){
return true;
}
var _122=this._isDirectionReversed;
var _123=this._isSelectionRangeEnabled;
if(_11e){
if((_11d>this._selectionEnd&&_123&&!_122)||(_11d<this._selectionEnd&&_123&&_122)){
this._value=this._selectionEnd;
var _124=this._calculateDragHandleOffset(this._value);
this._selectedRegionElement.style[this._getLocationProperty()]=_124+this._getHalfDragHandleSize()+"px";
this._switchDragHanldes();
this._selectionEnd=_11d;
}else{
this._value=_11d;
}
}else{
if((_11d<this._value&&_123&&!_122)||(_11d>this._value&&_123&&_122)){
this._selectionEnd=this._value;
this._selectedRegionElement.style[this._getSizeProperty()]="0px";
this._switchDragHanldes();
this._value=_11d;
}else{
this._selectionEnd=_11d;
}
}
if(this._itemType==Telerik.Web.UI.SliderItemType.Item){
this._updateSelectedItemsStatus();
}
this.updateClientState();
if(_11d!=_121){
this.raise_valueChange(_121,_11d);
if(!this._inSlidingMode&&this._autoPostBack){
this._raiseValueChangedServerEvent();
}
}
},_setNewValue:function(_125,_126,_127){
if(isNaN(parseInt(_125,10))){
return;
}
var _128=this._minimumValue;
var _129=this._maximumValue;
if(_125<_128){
_125=_128;
}else{
if(_125>_129){
_125=_129;
}
}
if(!this._initialized||!this._wrapperElement){
_125=this._getNearestStepValue(_125);
this[_126?"_value":"_selectionEnd"]=_125;
return;
}
if(this._isSelectionRangeEnabled){
var _12a=this._isDirectionReversed;
var _12b=this._value;
var _12c=this._selectionEnd;
if((_125<_12b&&!_126&&!_12a)||(_125>_12b&&!_126&&_12a)){
_126=true;
}else{
if((_125>_12c&&_126&&!_12a)||(_125<_12c&&_126&&_12a)){
_126=false;
}
}
}
var _12d=_125;
_12d=this._calcValue(_125,null,null,_126);
_12d=_12d.toFixed(0);
if(!Number.isInstanceOfType(_12d)){
try{
_12d=parseFloat(_12d);
}
catch(ex){
_12d=Number.NaN;
}
}
var _12e=this[_126?"_dragHandleElement":"_endDragHandleElement"];
this._setHandlePosition(_12d,_12e,_126,_127);
},_getIndexFromValue:function(_12f){
var _130=this._children;
if(!_130){
return _12f;
}
var _131=_130.get_count();
if(_131==0){
_131=this._itemData?this._itemData.length:0;
}
if(_131>0&&(this._itemType==Telerik.Web.UI.SliderItemType.Item)){
var _132=this._minimumValue;
var _133=_131-1;
_12f=(_12f-this._smallChange)/2;
_12f=(_12f<_132)?_132:((_12f>_133)?_133:_12f);
}
return _12f;
},_getValueFromIndex:function(_134){
var _135=this._children;
if(!_135){
return _134;
}
var _136=_135.get_count();
if(_136==0){
_136=this._itemData?this._itemData.length:0;
}
if(_136>0&&(this._itemType==Telerik.Web.UI.SliderItemType.Item)){
var _137=this._smallChange;
var _138=this._minimumValue;
var _139=_136*2-_137;
_134=(2*_134)+_137;
_134=(_134<_138)?_138:((_134>_139)?_139:_134);
}
return _134;
},_switchDragHanldes:function(){
if(!this._isSelectionRangeEnabled){
return;
}
var _13a=this._dragHandleElement;
this._dragHandleElement=this._endDragHandleElement;
this._endDragHandleElement=_13a;
if(!this._liveDrag){
_13a=this._liveDragHandleElement;
this._liveDragHandleElement=this._liveDragEndHandleElement;
this._liveDragEndHandleElement=_13a;
}
_13a=this._dragHandleAnimation;
this._dragHandleAnimation=this._dragHandleEndAnimation;
this._dragHandleEndAnimation=_13a;
if(this._resizeExtender&&this._endResizeExtender){
_13a=this._resizeExtender;
this._resizeExtender=this._endResizeExtender;
this._endResizeExtender=_13a;
}
_13a=null;
},_updateSelectionStart:function(_13b,_13c){
if(!this._isSelectionRangeEnabled){
return true;
}
var _13d=this._showDragHandle;
if(_13d&&_13c!=null){
return (_13c.id==this._dragHandleElement.id);
}else{
if(!_13d&&_13b!=null){
var _13e=this._getSelectedRegionPoints();
return (Math.abs(_13b-_13e.startPoint)<Math.abs(_13b-_13e.endPoint));
}
}
return true;
},_isInIncreaseMode:function(_13f,_140){
var _141=this._getSelectedRegionPoints();
var _142=_141.endPoint;
var _143=this._isSelectionRangeEnabled;
var _144=(!_143&&(_13f<_142))||(_143&&(((_13f<_142)&&!_140)||((_13f<_141.startPoint)&&_140)));
if(this._isDirectionReversed){
if(!_143){
_144=_13f>_141.startPoint;
}else{
_144=!_144;
}
}
return _144;
},_updateSelectedRegion:function(_145,_146,_147){
_146+=this._getHalfDragHandleSize();
var _148=_146;
var _149=this._selectedRegionElement;
var _14a=this._getSizeProperty();
var _14b=this._getLocationProperty();
if(this._isSelectionRangeEnabled){
var _14c=this._getSelectedRegionBounds();
var _14d=_14c[this._getPointProperty()];
_148=_14c[_14a];
if(_147||this._updateSelectionStart(_146,_145)){
_149.style[_14b]=_146+"px";
_148=_148+(_14d-Math.floor(_146));
}else{
_148=(Math.floor(_146)-_14d);
}
}else{
if(this._isDirectionReversed){
_149.style[_14b]=_146+"px";
_148=this._getTrackBounds().width-Math.floor(_146);
}
}
if(!isNaN(_148)&&_148>=0){
_149.style[_14a]=_148+"px";
}else{
_149.style[_14a]="";
}
},_setEndTicksBackgroundPosition:function(_14e){
if(this._itemType==Telerik.Web.UI.SliderItemType.Tick){
var _14f=this._showDragHandle;
var _150=this._largeTickSize;
var _151=this._smallTickSize;
var _152=Math.ceil(this._getHalfDragHandleSize());
var _153=Math.floor(_150/2);
var _154=Math.floor(_151/2);
var _155=this._children;
var _156=_155.getItem(0).get_element();
var _157=_155.getItem(_155.get_count()-1).get_element();
var _158=this._isDirectionReversed;
var _159=_14e.asymmetricAddOn;
var _15a=_158?_159:0;
this._setBackgroundPosition(_156,(_15a+(_14f?(_152-_153):0)),(_15a+(_14f?(_152-_154):0)));
var _15b=Math.ceil(_14e.lastItemSize)-_152-(!_158?_159:0);
this._setBackgroundPosition(_157,(_15b-(_14f?_153:_150)),(_15b-(_14f?_154:_151)));
}
},_setBackgroundPosition:function(_15c,_15d,_15e){
var _15f=(_15c.className.indexOf("Large")>-1);
if((_15f&&_15d<0)||(!_15f&&_15e<0)){
return;
}
var _160;
var _161;
if(this._isHorizontal){
_160=(_15f?_15d:_15e)+"px";
_161=this._getImageBackgroundPosition();
}else{
_161=(_15f?_15d:_15e)+"px";
_160=this._getImageBackgroundPosition();
}
_15c.style.backgroundPosition=_160+" "+_161;
if(_15f){
var _162=this._isHorizontal;
var _163=this._getSizeProperty();
var _164=(_163=="width")?"height":"width";
var _165=_15c.getElementsByTagName("SPAN");
var _166=Math.max((2*_15d+this._largeTickSize),12)+"px";
for(var i=0,_168=_165.length;i<_168;i++){
var span=_165[i];
span.style[_164]="";
span.style[_163]=_166;
if(!_162){
span.style.lineHeight=_166;
}else{
span.style.lineHeight="";
}
}
}
},_getImageBackgroundPosition:function(){
var _16a=this._trackPosition;
var _16b=this._isHorizontal;
var _16c="center";
if(_16a==Telerik.Web.UI.SliderTrackPosition.TopLeft){
_16c=_16b?"top":"left";
}else{
if(_16a==Telerik.Web.UI.SliderTrackPosition.BottomRight){
_16c=_16b?"bottom":"right";
}
}
return _16c;
},_calculateTickSize:function(_16d){
var div=document.createElement("DIV");
div.className=_16d?"rslLargeTick":"rslSmallTick";
div.style.position="absolute";
div.style.top="-9999px";
div.style.left="-9999px";
this._wrapperElement.appendChild(div);
var _16f=this._isHorizontal?div.offsetWidth:div.offsetHeight;
div.parentNode.removeChild(div);
if(_16d){
this._largeTickSize=_16f;
}else{
this._smallTickSize=_16f;
}
},_checkRenderTicks:function(){
var _170=this._largeChange;
var _171=(this._maximumValue-this._minimumValue)/this._smallChange;
var _172=(this._getTrackBounds().width)/_171;
var _173=Math.floor(_172*_170);
_172=Math.floor(_172);
var _174=((_170>0)&&(_173>=this._largeTickSize));
var _175=(_172>=this._smallTickSize);
return {renderLargeTicks:_174,renderSmallTicks:_175};
},_createItemDataForTicks:function(){
var _176=[];
var _177=this._largeChange;
var _178=this._smallChange;
var _179=this._maximumValue;
var _17a=this._minimumValue;
var _17b=this._checkRenderTicks();
var _17c=this._renderLargeTicks=_17b.renderLargeTicks;
var _17d=this._renderSmallTicks=_17b.renderSmallTicks;
if(!_17c){
_177=Math.abs(_17a)+_179+_178;
}
for(var i=_17a;i<=_179;i+=_177){
if(_17c){
_176[_176.length]={"text":i,"value":i,"tooltip":i,"isLargeTick":true};
}
if(_17d){
var j=i+(_17c?_178:0);
var _180=(_17c&&((i+_177)<=_179))?(i+_177):(_179+1);
for(;j<_180;j+=_178){
_176[_176.length]={"text":j,"value":j,"tooltip":j,"isSmallTick":true};
}
}
}
this._itemData=_176;
return _176;
},_clearSizePosition:function(_181){
if(!_181){
return;
}
_181.style.width="";
_181.style.height="";
_181.style.top="";
_181.style.left="";
},_raiseValueChangedServerEvent:function(){
setTimeout(Function.createDelegate(this,function(){
__doPostBack(this._uniqueID);
}),0);
},_onMouseUp:function(evt){
this._trackMouseDownDone=true;
this._incdecreaseMouseDownDone=true;
},_onTrackMouseDown:function(evt){
if(!this._enabled||evt.button!=0){
return;
}
var _184=evt.target;
var _185=(_184==this._selectedRegionElement);
var _186=(_184==this._trackElement);
var _187=_184.parentNode;
var _188=(this._listElement)?((_187&&_187==this._listElement)||(_187.parentNode&&_187.parentNode==this._listElement)):false;
if(!_186&&!_185&&!_188){
return;
}
this._animationPending=true;
var _189=(this._isHorizontal)?evt.offsetX:evt.offsetY;
var _18a=this._getTrackBounds();
if(_188&&!_186){
var _18b=$telerik.getLocation(_184);
var _18c=_18b[this._getPointProperty()]-_18a.x;
if(_18c>0){
_189+=_18c;
}
}
var _18d=0;
if(this._firstValueDragHandlePosition==0){
_18d=this._firstValueOffset;
}
var _18e=_18a.width-_18d;
var _18f=this._isSelectionRangeEnabled;
if(_185&&(_18f||(!_18f&&this._isDirectionReversed))){
var _18c=this._getElementLocation(this._selectedRegionElement);
_189+=_18c;
}
_189=(_189<_18d)?_18d:(_189>_18e)?_18e:_189;
var _190=this._handleInSlidingMode=this._getNearestDragHandle(_189);
var _191=this._updateSelectionStart(_189,_190);
var _192=this._calcValue(null,_189,null,_191);
if(this._largeChange==0){
this._setHandlePosition(_192,_190,_191);
this._handleInSlidingMode=null;
}else{
this._trackMouseDownDone=false;
var _193=this._isInIncreaseMode(_189,_191);
var _194=(this._children.get_count()>0&&(this._itemType==Telerik.Web.UI.SliderItemType.Item));
var self=this;
function _tmp(_196){
var _197=self._isInIncreaseMode(_189,_191);
if(self._trackMouseDownDone||_197!=_193){
clearTimeout(this._mDownInterval);
self._handleInSlidingMode=null;
return;
}
var _198=self._largeChange;
if(_194){
_198*=2;
}
if(_193){
_198*=-1;
}
var _199=self._getActiveDragHandleValue(_191)+_198;
_199=self._calcValue(_199,null,null,_191);
if((!_193&&(_192<_199))||(_193&&(_192>_199))){
_199=_192;
}
self._setHandlePosition(_199,_190,_191);
self._mDownInterval=setTimeout(_tmp,(_196)?_196:100);
}
_tmp(300);
}
},_onMouseWheel:function(evt){
if(!this._enabled){
return;
}
var _19b=this._getTrackBounds();
if(_19b.width<1||_19b.height<1){
return;
}
this._animationPending=true;
var _19c=this._value;
var _19d=(evt.wheelDelta)?evt.wheelDelta:evt.detail;
if(Sys.Browser.agent==Sys.Browser.InternetExplorer){
_19d*=-1;
}
var step=this._smallChange;
var _19f=_19c+((_19d>0)?step:(-1)*step);
_19f=this._calcValue(_19f,null,null,true);
this._setHandlePosition(_19f,this._dragHandleElement,true);
$telerik.cancelRawEvent(evt);
},_onDecreaseMouseDown:function(evt){
this._onIncreaseDecreaseMDown(evt,false);
},_onIncreaseMouseDown:function(evt){
this._onIncreaseDecreaseMDown(evt,true);
},_onIncreaseDecreaseMDown:function(evt,_1a3){
if(!this._enabled){
return;
}
if(evt.button!=0){
return;
}
this._handleInSlidingMode=this._dragHandleElement;
var _1a4=true;
if(this._isSelectionRangeEnabled&&_1a3){
this._handleInSlidingMode=this._endDragHandleElement;
_1a4=false;
}
this._incdecreaseMouseDownDone=false;
this._inSlidingMode=true;
this._valueOnSlideStart=this._getActiveDragHandleValue(_1a4);
var self=this;
function _tmp(_1a6){
if(self._incdecreaseMouseDownDone){
self._inSlidingMode=false;
this._handleInSlidingMode=null;
clearTimeout(self._increaseMDownInterval);
if(self._valueOnSlideStart!=self._getActiveDragHandleValue(_1a4)&&self._autoPostBack){
self._raiseValueChangedServerEvent();
}
return;
}
self._doSmallStep(_1a3);
self._increaseMDownInterval=setTimeout(_tmp,(_1a6)?_1a6:50);
}
_tmp(300);
},add_loaded:function(_1a7){
this.get_events().addHandler("loaded",_1a7);
},remove_loaded:function(_1a8){
this.get_events().removeHandler("loaded",_1a8);
},add_slideStart:function(_1a9){
this.get_events().addHandler("slideStart",_1a9);
},remove_slideStart:function(_1aa){
this.get_events().removeHandler("slideStart",_1aa);
},add_slide:function(_1ab){
this.get_events().addHandler("slide",_1ab);
},remove_slide:function(_1ac){
this.get_events().removeHandler("slide",_1ac);
},add_slideEnd:function(_1ad){
this.get_events().addHandler("slideEnd",_1ad);
},remove_slideEnd:function(_1ae){
this.get_events().removeHandler("slideEnd",_1ae);
},add_valueChange:function(_1af){
this.get_events().addHandler("valueChange",_1af);
},remove_valueChange:function(_1b0){
this.get_events().removeHandler("valueChange",_1b0);
},raise_valueChange:function(_1b1,_1b2){
_1b1=this._getIndexFromValue(_1b1);
_1b2=this._getIndexFromValue(_1b2);
var _1b3=new Telerik.Web.UI.SliderValueChangeEventArgs(_1b1,_1b2);
this.raiseEvent("valueChange",_1b3);
},add_beforeValueChange:function(_1b4){
this.get_events().addHandler("beforeValueChange",_1b4);
},remove_beforeValueChange:function(_1b5){
this.get_events().removeHandler("beforeValueChange",_1b5);
},raise_beforeValueChange:function(_1b6,_1b7){
_1b6=this._getIndexFromValue(_1b6);
_1b7=this._getIndexFromValue(_1b7);
var _1b8=new Telerik.Web.UI.SliderBeforeValueChangeEventArgs(_1b6,_1b7);
this.raiseEvent("beforeValueChange",_1b8);
if(_1b8.get_cancel()){
return true;
}
return false;
},get_activeHandle:function(){
if(!this._liveDrag){
return this._getRelativeLiveDragHandle(this._handleInSlidingMode);
}
return this._handleInSlidingMode;
},get_dragHandles:function(){
return [this._dragHandleElement,this._endDragHandleElement];
},get_value:function(){
var _1b9=this._value;
if(this._isDirectionReversed&&this._isSelectionRangeEnabled){
_1b9=this._selectionEnd;
}
return this._getIndexFromValue(_1b9);
},set_value:function(_1ba){
if(this._initialized&&this._wrapperElement){
_1ba=this._getValueFromIndex(_1ba);
}
this._setNewValue(_1ba,true);
},get_selectionStart:function(){
return this.get_value();
},set_selectionStart:function(_1bb){
if(this._isSelectionRangeEnabled){
this.set_value(_1bb);
}
},get_selectionEnd:function(){
var _1bc=this._selectionEnd;
if(this._isDirectionReversed&&this._isSelectionRangeEnabled){
_1bc=this._value;
}
return this._getIndexFromValue(_1bc);
},set_selectionEnd:function(_1bd){
if(this._initialized&&this._wrapperElement){
_1bd=this._getValueFromIndex(_1bd);
}
this._setNewValue(_1bd,false);
},get_isSelectionRangeEnabled:function(){
return this._isSelectionRangeEnabled;
},set_isSelectionRangeEnabled:function(_1be){
if(this._isSelectionRangeEnabled!=_1be){
this._isSelectionRangeEnabled=_1be;
if(this._initialized&&this._wrapperElement){
this._setShowEndDragHandle();
this._setTrackMouseWheel();
if(this._isSelectionRangeEnabled){
var _1be=this._value;
var _1bf=this._selectionEnd;
var _1c0=this._isDirectionReversed;
if((_1be<_1bf&&_1c0)||(_1be>_1bf&&!_1c0)){
this._switchDragHanldes();
var _1c1=_1be;
this._value=_1bf;
this._selectionEnd=_1c1;
}
}else{
if(this._isDirectionReversed){
var _1c1=this._value;
this._value=this._selectionEnd;
this._selectionEnd=_1c1;
}
}
this._clearSizePosition(this._selectedRegionElement);
this._refreshLayout();
}
this.updateClientState();
}
},get_isDirectionReversed:function(){
return this._isDirectionReversed;
},set_isDirectionReversed:function(_1c2){
if(this._isDirectionReversed!=_1c2){
this._isDirectionReversed=_1c2;
if(this._initialized&&this._wrapperElement){
if(this._isSelectionRangeEnabled){
var _1c3=this._value;
this._value=this._selectionEnd;
this._selectionEnd=_1c3;
}
this.repaint(true);
}
this.updateClientState();
}
},get_liveDrag:function(){
return this._liveDrag;
},set_liveDrag:function(_1c4){
if(this._liveDrag!=_1c4){
this._liveDrag=_1c4;
if(this._initialized&&this._wrapperElement){
this.repaint(true);
}
this.updateClientState();
}
},get_minimumValue:function(){
return this._minimumValue;
},set_minimumValue:function(_1c5){
if(isNaN(parseInt(_1c5,10))){
return;
}
if(this._minimumValue!=_1c5){
this._minimumValue=_1c5;
if(this._initialized&&this._wrapperElement){
this.repaint(true);
}
this.updateClientState();
}
},get_maximumValue:function(){
return this._maximumValue;
},set_maximumValue:function(_1c6){
if(isNaN(parseInt(_1c6,10))){
return;
}
if(this._maximumValue!=_1c6){
this._maximumValue=_1c6;
if(this._initialized&&this._wrapperElement){
this.repaint(true);
}
this.updateClientState();
}
},get_orientation:function(){
return this._orientation;
},set_orientation:function(_1c7){
if(this._orientation!=_1c7){
this._orientation=_1c7;
this._isHorizontal=(this._orientation==Telerik.Web.UI.Orientation.Horizontal);
this._updateLocationProperty();
this._updateSizeProperty();
this._updatePointProperty();
if(this._initialized&&this._wrapperElement){
this._setOrientation();
this._clearSizePosition(this._selectedRegionElement);
this._clearSizePosition(this._dragHandleElement);
this._clearSizePosition(this._endDragHandleElement);
if(!this._liveDrag){
this._clearSizePosition(this._liveDragHandleElement);
this._clearSizePosition(this._liveDragEndHandleElement);
}
this._refreshLayout();
if(!this._showDecreaseHandle){
var _1c8=this._trackElement;
var _1c9=this._listElement;
var _1ca=this._getLocationProperty();
var _1cb=(_1ca=="top")?"left":"top";
if(_1c8){
_1c8.style[_1cb]="";
_1c8.style[_1ca]="0";
}
if(_1c9){
_1c9.style[_1cb]="";
_1c9.style[_1ca]="0";
}
}
}
this.updateClientState();
}
},get_animationDuration:function(){
return this._animationDuration*1000;
},set_animationDuration:function(_1cc){
if(isNaN(parseInt(_1cc,10))||_1cc<0){
throw Error.argumentOutOfRange("value",_1cc,"AnimationDuration should be positive integer");
}
_1cc=_1cc/1000;
if(this._animationDuration!=_1cc){
this._animationDuration=_1cc;
if(this._initialized&&this._wrapperElement){
if(this._selectedRegionAnimation){
this._selectedRegionAnimation.set_duration(_1cc);
}
if(this._dragHandleEndAnimation){
this._dragHandleEndAnimation.set_duration(_1cc);
}
if(this._dragHandleAnimation){
this._dragHandleAnimation.set_duration(_1cc);
}
}
this.updateClientState();
}
},get_length:function(){
var _1cd=parseInt((this._isHorizontal)?this._width:this._height);
if(isNaN(_1cd)){
_1cd=20;
}
return _1cd;
},set_length:function(_1ce){
if(this._isHorizontal){
this.set_width(_1ce);
}else{
this.set_height(_1ce);
}
},get_width:function(){
return this._width;
},set_width:function(_1cf){
if(isNaN(parseInt(_1cf,10))||_1cf<1){
throw Error.argumentOutOfRange("value",_1cf,"Width should be an integer bigger than 1");
}
if(this._width!=_1cf){
this._width=_1cf;
if(this._initialized&&this._wrapperElement){
this._setWidth();
this._refreshLayout();
}
this.updateClientState();
}
},get_height:function(){
return this._height;
},set_height:function(_1d0){
if(isNaN(parseInt(_1d0,10))||_1d0<1){
throw Error.argumentOutOfRange("value",_1d0,"Height should be an integer bigger than 1");
}
if(this._height!=_1d0){
this._height=_1d0;
if(this._initialized&&this._wrapperElement){
this._setHeight();
this._refreshLayout();
}
this.updateClientState();
}
},get_showDecreaseHandle:function(){
return this._showDecreaseHandle;
},set_showDecreaseHandle:function(_1d1){
if(this._showDecreaseHandle!=_1d1){
this._showDecreaseHandle=_1d1;
if(this._initialized&&this._wrapperElement){
this._setShowHandle(true);
this._refreshLayout();
}
this.updateClientState();
}
},get_showIncreaseHandle:function(){
return this._showIncreaseHandle;
},set_showIncreaseHandle:function(_1d2){
if(this._showIncreaseHandle!=_1d2){
this._showIncreaseHandle=_1d2;
if(this._initialized&&this._wrapperElement){
this._setShowHandle(false);
this._refreshLayout();
}
this.updateClientState();
}
},get_showDragHandle:function(){
return this._showDragHandle;
},set_showDragHandle:function(_1d3){
if(this._showDragHandle!=_1d3){
this._showDragHandle=_1d3;
if(this._initialized&&this._wrapperElement){
this._setShowDragHandle();
this._setFirstValueOffset();
if(this._children.get_count()>0){
this._refreshLayout();
}
this._setValuesForSlider();
}
this.updateClientState();
}
},get_trackMouseWheel:function(){
return this._trackMouseWheel;
},set_trackMouseWheel:function(_1d4){
if(this._trackMouseWheel!=_1d4){
this._trackMouseWheel=_1d4;
if(this._initialized&&this._wrapperElement){
this._setTrackMouseWheel();
}
this.updateClientState();
}
},get_largeChange:function(){
return this._largeChange;
},set_largeChange:function(_1d5){
if(isNaN(parseInt(_1d5,10))||_1d5<0){
throw Error.argumentOutOfRange("value",_1d5,"LargeChange should be positive integer");
}
if(this._largeChange!=_1d5){
this._largeChange=_1d5;
if(this._initialized&&this._wrapperElement){
this.repaint(true);
}
this.updateClientState();
}
},get_clickOffset:function(){
return this._largeChange;
},set_clickOffset:function(_1d6){
this.set_largeChange(_1d6);
},get_slideStep:function(){
return this._smallChange;
},set_slideStep:function(_1d7){
this.set_smallChange(_1d7);
},get_smallChange:function(){
return this._smallChange;
},set_smallChange:function(_1d8){
if(isNaN(parseInt(_1d8,10))||_1d8<1){
throw Error.argumentOutOfRange("value",_1d8,"SmallChange should be integer bigger than 1");
}
if(this._smallChange!=_1d8){
this._smallChange=_1d8;
if(this._initialized&&this._wrapperElement){
this.repaint(true);
}
this.updateClientState();
}
},get_itemType:function(){
return this._itemType;
},set_itemType:function(_1d9){
if(this._itemType!=_1d9){
this._itemType=_1d9;
}
},get_trackPosition:function(){
return this._trackPosition;
},set_trackPosition:function(_1da){
var _1db=this._trackPosition;
if(_1db!=_1da){
this._trackPosition=_1da;
if(this._initialized&&this._wrapperElement){
this._setTrackPosition(_1db);
var _1dc=(_1db==Telerik.Web.UI.SliderTrackPosition.Center);
var _1dd=(this._trackPosition==Telerik.Web.UI.SliderTrackPosition.Center);
if((_1dc||_1dd)&&this._itemType==Telerik.Web.UI.SliderItemType.Tick&&this._renderLargeTicks){
var _1de=this._children;
var _1df=this._listElement;
var _1e0=_1df.childNodes;
if($telerik.isIE){
_1e0=_1df.children;
}
for(var i=0,_1e2=_1e0.length;i<_1e2;i++){
var _1e3=_1e0[i];
if(_1e3.nodeType==1&&_1e3.className.indexOf("Large")>-1){
var _1e4=_1e3.getElementsByTagName("SPAN");
if(_1e4.length>1){
var _1e5=_1e4[1];
if(_1dd){
_1e5.style.display="";
}else{
_1e5.style.display="none";
}
}else{
if(_1dd){
var _1e5=document.createElement("SPAN");
_1e5.className="rslBRItemText";
_1e5.innerHTML=_1de.getItem(i).get_value();
_1e3.appendChild(_1e5);
}
}
}
}
}
this._refreshLayout();
}
this.updateClientState();
}
},get_visibleItems:function(){
var _1e6=this._children;
var _1e7=_1e6.get_count();
var _1e8=this._isDirectionReversed;
var _1e9=[];
for(var i=0;i<_1e7;i++){
var item=_1e6.getItem(_1e8?(_1e7-1-i):i);
if(item.get_visible()){
Array.add(_1e9,item);
}
}
return _1e9;
},get_items:function(){
var _1ec=this._getChildren();
var _1ed=_1ec.get_count();
var _1ee=this._isDirectionReversed;
var _1ef=[];
for(var i=0;i<_1ed;i++){
var item=_1ec.getItem(_1ee?(_1ed-1-i):i);
Array.add(_1ef,item);
}
return _1ef;
},set_items:function(_1f2){
this._children=_1f2;
},get_itemData:function(){
return this._itemData;
},set_itemData:function(_1f3){
this._itemData=_1f3;
},get_enabled:function(){
return this._enabled;
},set_enabled:function(_1f4){
if(this._enabled!=_1f4){
this._enabled=_1f4;
if(this._initialized&&this._wrapperElement){
this._setEnabled();
}
this.updateClientState();
}
},Redraw:function(){
this.redraw();
},redraw:function(_1f5){
if(_1f5){
if(this._wrapperElement){
var _1f6=this._wrapperElement;
_1f6.parentNode.removeChild(_1f6);
this._wrapperElement=null;
if(this._children){
this._children.clear();
this._itemsUICreated=false;
if(this._itemType==Telerik.Web.UI.SliderItemType.Tick){
this._itemData=[];
}
}
this._listElement=null;
this._disposeSlider();
}
this._initializeSliderControl();
}else{
if(!this._wrapperElement){
this._initializeSliderControl();
}else{
this._refreshLayout();
}
}
},saveClientState:function(){
var _1f7=["value","selectionStart","selectionEnd","isSelectionRangeEnabled","enabled","slideStep","clickOffset","trackMouseWheel","showDragHandle","showDecreaseHandle","showIncreaseHandle","length","width","height","animationDuration","minimumValue","maximumValue","orientation","liveDrag","smallChange","trackPosition","largeChange"];
var _1f8={};
for(var i=0;i<_1f7.length;i++){
_1f8[_1f7[i]]=this["get_"+_1f7[i]]();
}
return Sys.Serialization.JavaScriptSerializer.serialize(_1f8);
}};
Telerik.Web.UI.RadSlider.registerClass("Telerik.Web.UI.RadSlider",Telerik.Web.UI.ControlItemContainer);


if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();