﻿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);
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.RadSlider=function(_3){
Telerik.Web.UI.RadSlider.initializeBase(this,[_3]);
this._minimumValue=0;
this._maximumValue=100;
this._value=0;
this._orientation=Telerik.Web.UI.Orientation.Horizontal;
this._isHorizontal=true;
this._animationDuration=0.1;
this._useAnimation=true;
this._showDecreaseHandle=true;
this._showIncreaseHandle=true;
this._showDragHandle=true;
this._enabled=true;
this._slideStep=1;
this._clickOffset=0;
this._trackMouseWheel=true;
this._length=200;
this._skin="Default";
this._trackMouseDownDone=false;
this._autoPostBack=false;
this._wrapperElement=null;
this._dragHandleElement=null;
this._mouseupHandler=null;
this._selectstartHandler=null;
this._animationPending=false;
this._selectstartPending=false;
this._inSlidingMode=false;
this._inRedrawMode=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.repaint=this.redraw;
};
Telerik.Web.UI.RadSlider.prototype={updated:function(){
if(this._isSelectionRangeEnabled){
if(this._value>this._selectionEnd){
this._switchDragHanldes();
var _4=this._value;
this._value=this._selectionEnd;
this._selectionEnd=_4;
}
this.set_selectionEnd(this._selectionEnd);
}
this.set_value(this._value);
Telerik.Web.UI.RadSlider.callBaseMethod(this,"updated");
},initialize:function(){
Telerik.Web.UI.RadSlider.callBaseMethod(this,"initialize");
if(this._minimumValue>this._maximumValue){
throw Error.argumentOutOfRange("_minimumValue",this._minimumValue,"MinimumValue should be smaller than MaximumValue");
}
this._initializeLayout();
this._initializeSlider();
},_initializeLayout:function(){
var _5=this.get_element();
this._wrapperElement=document.createElement("DIV");
var _6="RadSliderWrapper_"+this.get_id();
var _7="RadSliderDecrease_"+this.get_id();
var _8="RadSliderIncrease_"+this.get_id();
var _9="RadSliderTrack_"+this.get_id();
var _a="RadSliderSelected_"+this.get_id();
var _b="RadSliderDrag_"+this.get_id();
var _c="RadSliderEndDrag_"+this.get_id();
var _d=(this._isHorizontal)?"horizontal":"vertical";
var _e=(!this._enabled)?"disabled":"";
this._wrapperElement.id=_6;
this._wrapperElement.className="radslider RadSlider_"+this._skin+" "+_d+" "+_e;
this._wrapperElement.setAttribute("unselectable","on");
var _f="<a onmouseup=\"this.blur();\" id=\""+_b+"\" href=\"javascript: void(0);\" class=\"draghandle\" title=\""+this._dragText+"\"><span>"+this._dragText+"</span></a>";
var _10=_f+"<a onmouseup=\"this.blur();\" id=\""+_c+"\" href=\"javascript: void(0);\" class=\"draghandle\" title=\""+this._dragText+"\"><span>"+this._dragText+"</span></a>";
this._wrapperElement.innerHTML=((this._showDecreaseHandle)?"<a onmouseup=\"this.blur();\"\tid=\""+_7+"\" href=\"javascript: void(0);\" class=\"handle decrease\" title=\""+this._decreaseText+"\"><span>"+this._decreaseText+"</span></a>":"")+"<span unselectable=\"on\" id=\""+_9+"\"  class=\"track\">"+"<div id=\""+_a+"\" class=\"selectedregion\"><!-- --></div>"+((this._showDragHandle)?((this._isSelectionRangeEnabled)?_10:_f):"")+"</span>"+((this._showIncreaseHandle)?"<a onmouseup=\"this.blur();\" id=\""+_8+"\" href=\"javascript: void(0);\" class=\"handle increase\" title=\""+this._increaseText+"\"><span>"+this._increaseText+"</span></a>":"");
_5.parentNode.insertBefore(this._wrapperElement,_5);
_5.style.display="none";
this._dragHandleElement=$get(_b);
this._endDragHandleElement=$get(_c);
this._decreaseHandleElement=$get(_7);
this._increaseHandleElement=$get(_8);
this._trackElement=$get(_9);
this._selectedRegionElement=$get(_a);
var _11=(this._isHorizontal)?"left":"top";
var _12=(this._isHorizontal)?"width":"height";
if(!this._showDecreaseHandle){
this._trackElement.style[_11]="0px";
}
this._wrapperElement.style[_12]=this.get_length()+"px";
var _13=(this._showIncreaseHandle)?this._getIncreaseHandleBounds().width:0;
var _14=(this._showDecreaseHandle)?this._getDecreaseHandleBounds().width:0;
var _15=this.get_length()-_14-_13;
var _16=$telerik.getBounds(this._trackElement);
var _17=(this._isHorizontal)?_15:_16.width;
var _18=(!this._isHorizontal)?_15:_16.height;
if(_17>0&&_18>0){
$telerik.setSize(this._trackElement,{width:_17,height:_18});
}
},_initializeSlider:function(){
if(this._enabled){
this._initializeEventHandlers();
this._initializeAnimation();
var _19=($telerik.isIE)?"hand":"pointer";
if(this._dragHandleElement){
var _1a={};
_1a[_19]=this._dragHandleElement;
this._resizeExtender=new Telerik.Web.UI.ResizeExtender(this,this._dragHandleElement,_1a,null,null,_19);
}
if(this._endDragHandleElement){
_1a={};
_1a[_19]=this._endDragHandleElement;
this._endResizeExtender=new Telerik.Web.UI.ResizeExtender(this,this._endDragHandleElement,_1a,null,null,_19);
}
}
if(!this._inRedrawMode){
this.raiseEvent("loaded");
}
},_initializeEventHandlers:function(){
this._selectstartHandler=Function.createDelegate(this,this._onSelectStart);
this._mouseupHandler=Function.createDelegate(this,this._onMouseUp);
$addHandler(document,"mouseup",this._mouseupHandler);
if(this._showDragHandle){
$addHandlers(this._dragHandleElement,{"mousedown":this._onMouseDown,"dragstart":this._IEDragDropHandler,"drag":this._IEDragDropHandler,"dragend":this._IEDragDropHandler},this);
}
$addHandlers(this._trackElement,{"mousedown":this._onTrackMouseDown},this);
if(this._trackMouseWheel&&!this._isSelectionRangeEnabled){
$addHandlers(this._trackElement,{"mousewheel":this._onMouseWheel},this);
if($telerik.isFirefox){
$addHandlers(this._trackElement,{"DOMMouseScroll":this._onMouseWheel},this);
}
}
if(this._showDecreaseHandle){
$addHandlers(this._decreaseHandleElement,{"mousedown":this._onDecreaseMouseDown},this);
}
if(this._showIncreaseHandle){
$addHandlers(this._increaseHandleElement,{"mousedown":this._onIncreaseMouseDown},this);
}
},dispose:function(){
this._disposeSlider();
Telerik.Web.UI.RadSlider.callBaseMethod(this,"dispose");
},_disposeSlider:function(){
this._disposeHandlers();
if(this._dragHandleAnimation){
this._dragHandleAnimation.dispose();
this._dragHandleAnimation=null;
}
if(this._dragHandleEndAnimation){
this._dragHandleEndAnimation.dispose();
this._dragHandleEndAnimation=null;
}
if(this._selectedRegionAnimation){
this._selectedRegionAnimation.dispose();
this._selectedRegionAnimation=null;
}
if(this._resizeExtender){
this._resizeExtender.dispose();
this._resizeExtender=null;
}
if(this._endResizeExtender){
this._endResizeExtender.dispose();
this._endResizeExtender=null;
}
clearTimeout(this._increaseMDownInterval);
clearTimeout(this._decreaseMDownInterval);
clearTimeout(this._mDownInterval);
if(this._wrapperElement){
this._wrapperElement.parentNode.removeChild(this._wrapperElement);
this._wrapperElement=null;
}
this._dragHandleElement=null;
this._endDragHandleElement=null;
this._decreaseHandleElement=null;
this._increaseHandleElement=null;
this._trackElement=null;
this._selectedRegionElement=null;
},_disposeHandlers:function(){
try{
$clearHandlers(this._dragHandleElement);
$clearHandlers(this._trackElement);
$clearHandlers(this._decreaseHandleElement);
$clearHandlers(this._increaseHandleElement);
$clearHandlers(this._selectedRegionElement);
$removeHandler(document,"mouseup",this._mouseupHandler);
this._mouseupHandler=null;
this._selectstartHandler=null;
}
catch(e){
}
},onDragStart:function(_1b){
var _1c=_1b.element;
this._valueOnSlideStart=this._getActiveDragHandleValue(_1c);
this._handleInSlidingMode=_1c;
this._inSlidingMode=true;
var _1d=this._cachedDragHandleBounds=$telerik.getBounds(_1c);
var _1e=$telerik.getBounds(this._trackElement);
var _1f=this._isHorizontal;
this._cachedSliderBounds=new Sys.UI.Bounds(0,0,(_1f)?_1e.width:_1d.width,(!_1f)?_1e.height:_1d.height);
this.raiseEvent("slideStart");
return true;
},onDragEnd:function(_20){
this._cachedSliderBounds=null;
this._cachedDragHandleBounds=null;
this._handleInSlidingMode=null;
this._inSlidingMode=false;
this.raiseEvent("slideEnd");
if(this._autoPostBack&&this._valueOnSlideStart!=this._getActiveDragHandleValue(_20.element)){
this._raiseValueChangedServerEvent();
}
},onDrag:function(_21){
var _22=this._cachedDragHandleBounds;
var _23=this._cachedSliderBounds;
if(_23.width<1||_23.height<1){
return false;
}
_21.width=_22.width;
_21.height=_22.height;
var _24=Telerik.Web.UI.ResizeExtender.containsBounds(_23,_21);
if(!_24){
if(_21.x<=_23.x){
_21.x=_23.x;
}else{
if(_23.x+_23.width<=_21.x+_22.width){
_21.x=_23.x+_23.width-_22.width;
}
}
if(_21.y<=_23.y){
_21.y=_23.y;
}else{
if(_23.y+_23.height<=_21.y+_22.height){
_21.y=_23.y+_23.height-_22.height;
}
}
_24=true;
}
var _25=_21.element;
var _26=this._calcValue(null,null,_21,_25);
if(this._getActiveDragHandleValue(_25)!=_26){
this._setActiveDragHandleValue(_26,_25);
this._calculateDragHandleLocation(_26,_21,_25);
}else{
_24=false;
}
this.raiseEvent("slide");
return _24;
},_calculateDragHandleLocation:function(_27,_28,_29){
var _2a=this._calculateDragHandleOffset(_27);
var _2b=this._isHorizontal;
var _2c=0;
var _2d=null;
if(this._showDragHandle){
if(!_29){
_29=this._dragHandleElement;
}
if(!_28){
_28=$telerik.getBounds(_29);
}
_28[_2b?"x":"y"]=_2a;
_2c=_28[_2b?"width":"height"]/2;
_2d=_29.id;
}
this._updateSelectedRegion(_2d,_2a+_2c);
return _28;
},_calculateDragHandleOffset:function(_2e){
var _2f=this._minimumValue;
var _30=this._maximumValue;
var _31=this._getTrackBounds();
var _32=this._getDragHandleBounds();
var _33=_30-_2f;
var _34=(_2e-_2f)/_33;
var _35=parseInt(_34*(_31.width-_32.width));
var _36=(_2e==_2f)?0:(_2e==_30)?(_31.width-_32.width):_35;
return _36;
},get_activeHandle:function(){
return this._handleInSlidingMode;
},get_dragHandles:function(){
return [this._dragHandleElement,this._endDragHandleElement];
},_initializeAnimation:function(){
var fps=100;
if(this._showDragHandle){
this._dragHandleAnimation=new Telerik.Web.Animation.LengthAnimation(this._dragHandleElement,this._animationDuration,fps,"style");
this._dragHandleEndAnimation=new Telerik.Web.Animation.LengthAnimation(this._endDragHandleElement,this._animationDuration,fps,"style");
}
this._selectedRegionAnimation=new Telerik.Web.UI.Animations.SimpleResizeAnimation(this,this._animationDuration,null,this._selectedRegionElement,null,null);
},_getSelectionAnimationStartBounds:function(){
return this._getSelectedRegionBounds();
},_getSelectionAnimationEndBounds:function(_38,_39,_3a){
var _3b=this._getSelectedRegionBounds();
var _3c=this._getDragHandleBounds(_39);
var _3d=_38+Math.floor(_3c.width/2);
var _3e=this._isHorizontal;
if(this._isSelectionRangeEnabled&&(_39||_3a!=null)){
var _3f=_3e?"x":"y";
var _40=_3b[_3f];
var _41=_40+(_3e?_3b.width:_3b.height);
if((this._showDragHandle&&_39.id==this._dragHandleElement.id)||(!this._showDragHandle&&_3a)){
_3b[_3f]=_3d;
_40=_3d;
}else{
_41=_3d;
}
_3d=_41-_40;
}
if(_3e){
_3b.width=_3d;
}else{
_3b.height=_3d;
}
return _3b;
},_getBoundsInternal:function(_42){
var _43=$telerik.getBounds(_42);
if(this._orientation==Telerik.Web.UI.Orientation.Vertical){
_43={x:_43.y,y:_43.x,height:_43.width,width:_43.height,right:_43.right,bottom:_43.bottom,location:{x:_43.y,y:_43.x},size:{width:_43.height,height:_43.width}};
}
return _43;
},_getTrackBounds:function(){
return this._getBoundsInternal(this._trackElement);
},_getSelectedRegionBounds:function(){
var _44=$telerik.getContentSize(this._selectedRegionElement);
_44.y=0;
_44.x=0;
if(this._isSelectionRangeEnabled){
var _45=this._getElementLocation(this._selectedRegionElement);
var _46=(this._isHorizontal)?"x":"y";
_44[_46]=_45;
}
return _44;
},_getDragHandleBounds:function(_47){
if(!this._showDragHandle){
var _48={x:0,y:0,height:0,width:0,right:0,bottom:0,location:{x:0,y:0},size:{width:0,height:0}};
return _48;
}
var _49=_47;
if(!_49){
_49=this._dragHandleElement;
if(this._isSelectionRangeEnabled&&this._handleInSlidingMode){
_49=this._handleInSlidingMode;
}
}
return this._getBoundsInternal(_49);
},_getDecreaseHandleBounds:function(){
return this._getBoundsInternal(this._decreaseHandleElement);
},_getIncreaseHandleBounds:function(){
return this._getBoundsInternal(this._increaseHandleElement);
},_doSmallStep:function(_4a){
var _4b=this._slideStep;
if(!_4a){
_4b*=-1;
}
this._animationPending=true;
var _4c=true;
if(this._isSelectionRangeEnabled&&_4a){
_4c=false;
}
var _4d=this._calcValue(this._getActiveDragHandleValue(null,_4c)+_4b);
this._setHandlePosition(_4d,null,_4c);
},_calcValue:function(_4e,_4f,_50,_51){
var _52;
if(_4e!=null){
if(!Number.isInstanceOfType(_4e)){
try{
_4e=parseFloat(_4e);
}
catch(ex){
_4e=Number.NaN;
}
}
if(isNaN(_4e)){
_4e=this._minimumValue;
}
_52=(_4e<this._minimumValue)?this._minimumValue:(_4e>this._maximumValue)?this._maximumValue:_4e;
}else{
var _53=this._minimumValue;
var _54=this._maximumValue;
var _55=this._getTrackBounds();
var _56=this._getDragHandleBounds(_51);
if(_50){
_56.x=((this._isHorizontal)?_50.x:_50.y)+_55.x;
}
var _57=(_4f)?_4f-_56.width/2:_56.x-_55.x;
var _58=_55.width-_56.width;
var _59=_57/_58;
_52=(_57==0)?_53:(_57==(_55.width-_56.width))?_54:_53+_59*(_54-_53);
}
_52=this._getNearestStepValue(_52);
_52=(_52<this._minimumValue)?this._minimumValue:(_52>this._maximumValue)?this._maximumValue:_52;
return _52;
},_setHandlePosition:function(_5a,_5b,_5c){
var _5d=_5b;
if(!_5d){
_5d=this._handleInSlidingMode;
}
var _5e=this._isHorizontal;
var _5f=_5c;
if(this._useAnimation&&this._animationPending){
var _60=this._calculateDragHandleOffset(_5a);
if(!this._showDragHandle&&_5f==null){
_5f=this._updateSelectionStart(_60);
}
this._selectedRegionAnimation.stop();
var _61=this._getSelectionAnimationStartBounds();
this._selectedRegionAnimation.set_startBounds(_61);
var _62=this._getSelectionAnimationEndBounds(_60,_5d,_5f);
this._selectedRegionAnimation.set_endBounds(_62);
this._selectedRegionAnimation.onShowEnd=function(){
this.controller._setActiveDragHandleValue(_5a,_5d,_5f);
};
this._selectedRegionAnimation.play();
if(this._showDragHandle){
var _63=this._dragHandleAnimation;
if(this._isSelectionRangeEnabled&&_5d&&_5d.id==this._endDragHandleElement.id){
_63=this._dragHandleEndAnimation;
}
var _64=this._getTrackBounds();
var _65=this._getDragHandleBounds(_5d);
var _66=_65.x-_64.x;
_63.stop();
_63.set_startValue(_66);
_63.set_endValue(_60);
_63.set_propertyKey((_5e)?"left":"top");
_63.play();
}
this._animationPending=false;
}else{
var _67=this._calculateDragHandleLocation(_5a,null,_5d);
if(this._showDragHandle){
if(_5e){
_5d.style.left=_67.x+"px";
}else{
_5d.style.top=_67.y+"px";
}
}else{
if(_5f==null){
var _60=this._calculateDragHandleOffset(_5a);
_5f=this._updateSelectionStart(_60);
}
}
this._setActiveDragHandleValue(_5a,_5d,_5f);
}
},_getNearestStepValue:function(_68){
var _69=this._maximumValue-this._minimumValue;
if(_69==0){
return _68;
}
if(_68>=this._maximumValue){
return this._maximumValue;
}
if(_68<=this._minimumValue){
return this._minimumValue;
}
_68-=this._minimumValue;
var _6a=(_68-parseInt(_68/this._slideStep)*this._slideStep);
if(_6a==0){
return (_68+this._minimumValue);
}
var _6b=this._slideStep-_6a;
if(_6a<this._slideStep/2){
_6b=-1*_6a;
}
var _6c=_68+_6b+this._minimumValue;
return _6c;
},_getNearestDragHandle:function(_6d){
var _6e=this._dragHandleElement;
if(this._isSelectionRangeEnabled&&_6d){
var _6f=(this._isHorizontal)?"left":"top";
var _70=this._getElementLocation(this._selectedRegionElement);
var _71=_70+this._getSelectedRegionBounds().width;
if((Math.abs(_6d-_70)>Math.abs(_6d-_71))||_6d>_71){
_6e=this._endDragHandleElement;
}
}
return _6e;
},_getElementLocation:function(_72){
var _73=(this._isHorizontal)?"left":"top";
var _74=parseInt(_72.style[_73]);
if(isNaN(_74)){
_74=0;
}
return _74;
},_getActiveDragHandleValue:function(_75,_76){
var _77=_75;
if(!_77){
_77=this._handleInSlidingMode;
}
if(!_77&&this._showDragHandle){
return this._minimumValue;
}
var _78=((this._showDragHandle&&_77.id==this._dragHandleElement.id)||(!this._showDragHandle&&_76));
if(_78){
return this._value;
}else{
return this._selectionEnd;
}
},_setActiveDragHandleValue:function(_79,_7a,_7b){
var _7c=_7a;
if(!_7c){
_7c=this._handleInSlidingMode;
}
if(!_7c&&this._showDragHandle){
return;
}
var _7d=this._getActiveDragHandleValue(_7c,_7b);
var _7e=((this._showDragHandle&&_7c.id==this._dragHandleElement.id)||(!this._showDragHandle&&_7b));
if(_7e){
if(_79>this._selectionEnd&&this._isSelectionRangeEnabled){
this._switchDragHanldes();
this._selectionEnd=_79;
}else{
this._value=_79;
}
}else{
if(_79<this._value&&this._isSelectionRangeEnabled){
this._switchDragHanldes();
this._value=_79;
}else{
this._selectionEnd=_79;
}
}
this.updateClientState();
if(this._getActiveDragHandleValue(_7c,_7b)!=_7d){
var _7f=new Telerik.Web.UI.SliderValueChangeEventArgs(_7d,(_7e?this._value:this._selectionEnd));
this.raiseEvent("valueChange",_7f);
if(!this._inSlidingMode&&this._autoPostBack){
this._raiseValueChangedServerEvent();
}
}
},_setNewValue:function(_80,_81,_82){
if(isNaN(parseInt(_80,10))){
return;
}
if(_80<this._minimumValue){
_80=this._minimumValue;
}
if(_80>this._maximumValue){
_80=this._maximumValue;
}
if(!this._initialized){
if(_82){
this._value=_80;
}else{
this._selectionEnd=_80;
}
return;
}
var _83=_80;
_83=this._calcValue(_80);
_83=_83.toFixed(0);
if(!Number.isInstanceOfType(_83)){
try{
_83=parseFloat(_83);
}
catch(ex){
_83=Number.NaN;
}
}
if(this._isSelectionRangeEnabled){
if(_80<this._value){
_81=this._dragHandleElement;
_82=true;
}else{
if(_80>this._selectionEnd){
_81=this._endDragHandleElement;
_82=false;
}
}
}
this._setHandlePosition(_83,_81,_82);
},_switchDragHanldes:function(){
if(!this._isSelectionRangeEnabled){
return;
}
var _84=this._dragHandleElement;
this._dragHandleElement=this._endDragHandleElement;
this._endDragHandleElement=_84;
_84=this._dragHandleAnimation;
this._dragHandleAnimation=this._dragHandleEndAnimation;
this._dragHandleEndAnimation=_84;
_84=null;
},_updateSelectionStart:function(_85){
if(!this._isSelectionRangeEnabled){
return true;
}
var _86=this._selectedRegionElement;
var _87=this._getElementLocation(_86);
var _88=parseInt(_86.style[this._isHorizontal?"width":"height"]);
if(isNaN(_88)){
_88=0;
}
return (Math.abs(_85-_87)<Math.abs(_85-_87-_88));
},_updateSelectedRegion:function(_89,_8a){
var _8b=this._selectedRegionElement;
var _8c=this._isHorizontal;
var _8d=_8a;
var _8e="width";
if(!_8c){
_8e="height";
}
if(this._isSelectionRangeEnabled){
var _8f="left";
if(!_8c){
_8f="top";
}
var _90=this._getElementLocation(_8b);
_8d=parseInt(_8b.style[_8e]);
if(isNaN(_8d)){
_8d=0;
}
if((this._showDragHandle&&_89==this._dragHandleElement.id)||(!this._showDragHandle&&this._updateSelectionStart(_8a))){
_8b.style[_8f]=_8a+"px";
_8d=_8d+(_90-Math.floor(_8a));
}else{
_8d=(Math.floor(_8a)-_90);
}
}
if(!isNaN(_8d)&&_8d>=0){
_8b.style[_8e]=_8d+"px";
}
},_raiseValueChangedServerEvent:function(){
setTimeout(Function.createDelegate(this,function(){
__doPostBack(this._uniqueID);
}),0);
},_onMouseDown:function(evt){
if(evt.button!=0){
return;
}
window._event=evt;
evt.preventDefault();
if(!Telerik.Web.UI.RadSlider.DropPending){
Telerik.Web.UI.RadSlider.DropPending=this;
$addHandler(document,"selectstart",this._selectstartHandler);
this._selectstartPending=true;
}
},_onMouseUp:function(evt){
this._trackMouseDownDone=true;
this._incdecreaseMouseDownDone=true;
if(Telerik.Web.UI.RadSlider.DropPending==this){
Telerik.Web.UI.RadSlider.DropPending=null;
if(this._selectstartPending){
$removeHandler(document,"selectstart",this._selectstartHandler);
}
if(this._dragHandleElement){
this._dragHandleElement.blur();
}
if(this._decreaseHandleElement){
this._decreaseHandleElement.blur();
}
if(this._increaseHandleElement){
this._increaseHandleElement.blur();
}
}
},_IEDragDropHandler:function(evt){
evt.preventDefault();
},_onSelectStart:function(evt){
evt.preventDefault();
},_onTrackMouseDown:function(evt){
if(evt.button!=0){
return;
}
var _96=(evt.target==this._selectedRegionElement);
if(evt.target!=this._trackElement&&!_96){
return;
}
var _97=this._isHorizontal;
this._animationPending=true;
var _98=this._getDragHandleBounds();
var _99=this._getTrackBounds();
var _9a=(_97)?evt.offsetX:evt.offsetY;
var _9b=_98.width/2;
var _9c=_99.width-_9b;
var _9d=this._isSelectionRangeEnabled;
if(_96&&_9d){
var _9e=this._getElementLocation(this._selectedRegionElement);
_9a+=_9e;
}
_9a=(_9a<_9b)?_9b:(_9a>_9c)?_9c:_9a;
var _9f=this._getNearestDragHandle(_9a);
var _a0=this._updateSelectionStart(_9a);
if(this._clickOffset==0){
var _a1=this._calcValue(null,_9a,null,_9f);
this._setHandlePosition(_a1,_9f,_a0);
}else{
this._trackMouseDownDone=false;
var _a2=this._getSelectedRegionBounds();
var _a3=(this._showDragHandle&&_9f.id==this._dragHandleElement.id)||(!this._showDragHandle&&_a0);
var _a4=(this._showDragHandle&&_9d&&_9f.id==this._endDragHandleElement.id)||(!this._showDragHandle&&_a0==false);
var _a5=this._getElementLocation(this._selectedRegionElement);
var _a6=(!_9d&&(_9a<(_a5+_a2.width)))||(_9d&&(((_9a<(_a5+_a2.width))&&_a4)||((_9a<_a5)&&_a3)));
var _a7=this;
function _tmp(_a8){
_a5=_a7._getElementLocation(_a7._selectedRegionElement);
var _a9=_a7._getSelectedRegionBounds();
var _aa=(!_9d&&(_9a<(_a5+_a9.width)))||(_9d&&(((_9a<(_a5+_a9.width))&&_a4)||((_9a<_a5)&&_a3)));
if(_a7._trackMouseDownDone||_aa!=_a6){
clearTimeout(this._mDownInterval);
_a7._trackMouseDownDone=true;
return;
}
var _ab=_a7._clickOffset;
if(_a6){
_ab*=-1;
}
var _ac=_a7._getActiveDragHandleValue(_9f,_a0)+_ab;
_ac=_a7._calcValue(_ac,null,null,_9f);
_a7._setHandlePosition(_ac,_9f,_a0);
_a7._mDownInterval=setTimeout(_tmp,(_a8)?_a8:100);
}
_tmp(300);
}
},_onMouseWheel:function(evt){
var _ae=this._getTrackBounds();
if(_ae.width<1||_ae.height<1){
return;
}
this._animationPending=true;
var _af=this._value;
var _b0=evt.rawEvent;
var _b1=(_b0.wheelDelta)?_b0.wheelDelta:_b0.detail;
if(Sys.Browser.agent==Sys.Browser.InternetExplorer){
_b1*=-1;
}
var _b2=_af+((_b1>0)?this._slideStep:(-1)*this._slideStep);
_b2=this._calcValue(_b2);
this._setHandlePosition(_b2,this._dragHandleElement);
evt.preventDefault();
},_onDecreaseMouseDown:function(evt){
this._onIncreaseDecreaseMDown(evt,false);
},_onIncreaseMouseDown:function(evt){
this._onIncreaseDecreaseMDown(evt,true);
},_onIncreaseDecreaseMDown:function(evt,_b6){
if(evt.button!=0){
return;
}
this._handleInSlidingMode=this._dragHandleElement;
var _b7=true;
if(this._isSelectionRangeEnabled&&_b6){
this._handleInSlidingMode=this._endDragHandleElement;
_b7=false;
}
this._incdecreaseMouseDownDone=false;
this._inSlidingMode=true;
this._valueOnSlideStart=this._getActiveDragHandleValue(null,_b7);
var _b8=this;
function _tmp(_b9){
if(_b8._incdecreaseMouseDownDone){
_b8._inSlidingMode=false;
clearTimeout(_b8._increaseMDownInterval);
if(_b8._valueOnSlideStart!=_b8._getActiveDragHandleValue(null,_b7)&&_b8._autoPostBack){
_b8._raiseValueChangedServerEvent();
}
return;
}
_b8._doSmallStep(_b6);
_b8._increaseMDownInterval=setTimeout(_tmp,(_b9)?_b9:50);
}
_tmp(300);
},add_loaded:function(_ba){
this.get_events().addHandler("loaded",_ba);
},remove_loaded:function(_bb){
this.get_events().removeHandler("loaded",_bb);
},add_slideStart:function(_bc){
this.get_events().addHandler("slideStart",_bc);
},remove_slideStart:function(_bd){
this.get_events().removeHandler("slideStart",_bd);
},add_slide:function(_be){
this.get_events().addHandler("slide",_be);
},remove_slide:function(_bf){
this.get_events().removeHandler("slide",_bf);
},add_slideEnd:function(_c0){
this.get_events().addHandler("slideEnd",_c0);
},remove_slideEnd:function(_c1){
this.get_events().removeHandler("slideEnd",_c1);
},add_valueChange:function(_c2){
this.get_events().addHandler("valueChange",_c2);
},remove_valueChange:function(_c3){
this.get_events().removeHandler("valueChange",_c3);
},get_value:function(){
return this._value;
},set_value:function(_c4){
var _c5=null;
if(!this._showDragHandle||!this._initialized){
_c5=true;
}
this._setNewValue(_c4,this._dragHandleElement,_c5);
},get_selectionStart:function(){
return this.get_value();
},set_selectionStart:function(_c6){
if(this._isSelectionRangeEnabled){
this.set_value(_c6);
}
},get_selectionEnd:function(){
return this._selectionEnd;
},set_selectionEnd:function(_c7){
var _c8=null;
if(!this._showDragHandle||!this._initialized){
_c8=false;
}
this._setNewValue(_c7,this._endDragHandleElement,_c8);
},get_isSelectionRangeEnabled:function(){
return this._isSelectionRangeEnabled;
},set_isSelectionRangeEnabled:function(_c9){
this._isSelectionRangeEnabled=_c9;
this.updateClientState();
},get_minimumValue:function(){
return this._minimumValue;
},set_minimumValue:function(_ca){
if(isNaN(parseInt(_ca,10))){
return;
}
this._minimumValue=_ca;
this.updateClientState();
},get_maximumValue:function(){
return this._maximumValue;
},set_maximumValue:function(_cb){
if(isNaN(parseInt(_cb,10))){
return;
}
this._maximumValue=_cb;
this.updateClientState();
},get_orientation:function(){
return this._orientation;
},set_orientation:function(_cc){
this._orientation=_cc;
this._isHorizontal=(this._orientation==Telerik.Web.UI.Orientation.Horizontal);
this.updateClientState();
},get_animationDuration:function(){
return this._animationDuration*1000;
},set_animationDuration:function(_cd){
if(isNaN(parseInt(_cd,10))||_cd<0){
throw Error.argumentOutOfRange("value",_cd,"AnimationDuration should be positive integer");
}
_cd=_cd/1000;
this._animationDuration=_cd;
this._useAnimation=(this._animationDuration>0);
this.updateClientState();
},get_length:function(){
return this._length;
},set_length:function(_ce){
if(isNaN(parseInt(_ce,10))||_ce<1){
throw Error.argumentOutOfRange("value",_ce,"Length should be an integer bigger than 1");
}
this._length=_ce;
this.updateClientState();
},get_showDecreaseHandle:function(){
return this._showDecreaseHandle;
},set_showDecreaseHandle:function(_cf){
this._showDecreaseHandle=_cf;
this.updateClientState();
},get_showIncreaseHandle:function(){
return this._showIncreaseHandle;
},set_showIncreaseHandle:function(_d0){
this._showIncreaseHandle=_d0;
this.updateClientState();
},get_showDragHandle:function(){
return this._showDragHandle;
},set_showDragHandle:function(_d1){
this._showDragHandle=_d1;
this.updateClientState();
},get_trackMouseWheel:function(){
return this._trackMouseWheel;
},set_trackMouseWheel:function(_d2){
this._trackMouseWheel=_d2;
this.updateClientState();
},get_clickOffset:function(){
return this._clickOffset;
},set_clickOffset:function(_d3){
if(isNaN(parseInt(_d3,10))||_d3<0){
throw Error.argumentOutOfRange("value",_d3,"ClickOffset should be positive integer");
}
this._clickOffset=_d3;
this.updateClientState();
},get_slideStep:function(){
return this._slideStep;
},set_slideStep:function(_d4){
if(isNaN(parseInt(_d4,10))||_d4<1){
throw Error.argumentOutOfRange("value",_d4,"SlideStep should be integer bigger than 1");
}
this._slideStep=_d4;
this.updateClientState();
},get_enabled:function(){
return this._enabled;
},set_enabled:function(_d5){
this._enabled=_d5;
this.updateClientState();
},Redraw:function(){
this.redraw();
},redraw:function(){
this._inRedrawMode=true;
this._disposeSlider();
this._initializeLayout();
this._initializeSlider();
this.set_value(this._value);
this._inRedrawMode=false;
},saveClientState:function(){
var _d6=["value","selectionStart","selectionEnd","isSelectionRangeEnabled","enabled","slideStep","clickOffset","trackMouseWheel","showDragHandle","showDecreaseHandle","showIncreaseHandle","length","animationDuration","minimumValue","maximumValue","orientation"];
var _d7={};
for(var i=0;i<_d6.length;i++){
_d7[_d6[i]]=this["get_"+_d6[i]]();
}
return Sys.Serialization.JavaScriptSerializer.serialize(_d7);
}};
Telerik.Web.UI.RadSlider.DropPending=null;
Telerik.Web.UI.RadSlider.registerClass("Telerik.Web.UI.RadSlider",Telerik.Web.UI.RadWebControl);


if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();