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