if(!Bs_Objects){
var Bs_Objects=[];
}
function Bs_Slider2(_1){
this._objectId;
this.fieldName;
this._disabled=false;
this.direction=0;
this.width=100;
this.height=20;
this.minVal=0;
this.maxVal=100;
this.minSeparation=5;
this.valueDefault=[0,0];
this.arrowAmount=1;
this.arrowMouseOver=false;
this.arrowKeepFiringTimeout=10;
this._stopFireArrowFlag=false;
this.wheelAmount=5;
this.colorbar;
this.baseZindex=50;
this.moveX=0;
this.moveY=0;
this.imgBasePath;
this.imgDir="../img/slider";
this._bgImgSrc;
this._bgImgRepeat;
this._bgImgCssStyle;
this._bgImgLeftSrc;
this._bgImgLeftWidth;
this._bgImgLeftHeight;
this._bgImgRightSrc;
this._bgImgRightWidth;
this._bgImgRightHeight;
this._sliderImgSrc;
this._sliderImgWidth;
this._sliderImgHeight;
this.styleContainerClass;
this.styleValueFieldClass="smalltxt spanSliderField";
this.styleValueTextClass="smalltxt spanSliderText";
this.bgColor;
this._arrowIconLeftSrc;
this._arrowIconLeftWidth=0;
this._arrowIconLeftHeight=0;
this._arrowIconLeftCssStyle=0;
this._arrowIconRightSrc;
this._arrowIconRightWidth=0;
this._arrowIconRightHeight=0;
this._arrowIconRightCssStyle=0;
this.valueInterval=1;
this.useInputField=2;
this.inputTextFieldEvent="over";
this.ctrl=new Array(2);
this._valueInternal=new Array(2);
this._display=2;
this._arrowLeftContainerId;
this._arrowLeftContainerObj;
this._arrowLeftIconId;
this._arrowLeftIconObj;
this._arrowRightContainerId;
this._arrowRightContainerObj;
this._arrowRightIconId;
this._arrowRightIconObj;
this._valueContainerId;
this._valueContainerObj;
this._handleId;
this._handleObj=new Array(2);
this._valueFieldId;
this._valueFieldObj;
this._valueTextId;
this._valueTextObj;
this._slideBarId;
this._slideBarObj;
this._colorbarId;
this._colorbarObj;
this._posUpperLeftX;
this._posUpperLeftY;
this._posSlideStart;
this._posSlideEnd;
this._slideWidth;
this._attachedEvents;
this.eventOnChange;
this.slideStartCB;
this.slideMoveCB;
this.slideEndCB;
this._constructor=function(_2){
this._id=Bs_Objects.length;
Bs_Objects[this._id]=this;
this._objectId="Bs_Slider2_"+this._id;
this.objectName=this._objectId;
if(typeof (_2)=="string"){
this.fieldName=_2+"_value";
this.objectName=_2;
}
};
this._checkup=function(){
if(typeof (this.minVal)=="undefined"){
this.minVal=0;
}
if(typeof (this.maxVal)=="undefined"){
this.maxVal=10;
}
if(typeof (this.valueDefault)=="undefined"){
this.valueDefault=[this.minVal,this.minVal];
}
this._valueInternal=this.valueDefault;
if(typeof (this.imgBasePath)=="string"){
this.imgDir=this.imgBasePath;
}
};
this.render=function(_3){
this._checkup();
this._containerId="co"+_3;
this._handleId="po"+_3;
this._arrowLeftContainerId="alc"+_3;
this._arrowLeftIconId="ali"+_3;
this._arrowRightContainerId="arc"+_3;
this._arrowRightIconId="ari"+_3;
this._valueContainerId="vc"+_3;
this._valueFieldId="vf"+_3;
if(typeof (this.fieldName)=="undefined"){
this.fieldName=_3+"_value";
}
this._valueTextId="vt"+_3;
this._slideBarId="bar"+_3;
this._colorbarId="cb"+_3;
var _4=this.width;
var _5=this.height;
var _6=new Array();
var _7=0;
var _8=0;
_6[_7++]="<div id=\""+this._containerId+"\"";
if(this.styleContainerClass){
_6[_7++]=" class=\""+this.styleContainerClass+"\"";
}
_6[_7++]=" style=\"position:relative;";
if(this._display==0){
_6[_7++]=" display:none;";
}else{
if(this._display==1){
_6[_7++]=" visibility:hidden;";
}
}
_6[_7++]=" onmousewheel=\"Bs_Objects["+this._id+"].onMouseWheel(); return false;\"";
_6[_7++]="\">";
_6[_7++]="<div";
_6[_7++]=" onmousewheel=\"Bs_Objects["+this._id+"].onMouseWheel(); return false;\"";
_6[_7++]=" style=\"position:absolute; left:"+this.moveX+"px; top:"+this.moveY+"px;\">";
_6[_7++]="<div style=\"position:absolute; display:none; z-index:75;\" id=\""+this._handleId+"0"+"\">";
_6[_7++]="<img style=\"cursor: pointer\" name=\"bsslidericonname0\" src=\""+this.imgDir+this._sliderImgSrc+"\" border=0 width="+this._sliderImgWidth+" height="+this._sliderImgHeight+">";
_6[_7++]="</div>";
_6[_7++]="<div style=\"position:absolute; display:none; z-index:75;\" id=\""+this._handleId+"1"+"\">";
_6[_7++]="<img style=\"cursor: pointer\" name=\"bsslidericonname1\" src=\""+this.imgDir+this._sliderImgSrc+"\" border=0 width="+this._sliderImgWidth+" height="+this._sliderImgHeight+">";
_6[_7++]="</div>";
if((this.arrowAmount>0)&&this._arrowIconLeftSrc){
_6[_7++]="<div id=\""+this._arrowLeftContainerId+"\" style=\"position:absolute; left:"+_8+"px; top:0px;\">";
_6[_7++]="<a href=\"javascript:void(false);\"";
if(this.arrowMouseOver){
_6[_7++]=" onMouseOver=\"Bs_Objects["+this._id+"].onChangeByArrow(false, true); return false;\"";
_6[_7++]=" onMouseOut=\"Bs_Objects["+this._id+"].stopFireArrow(); return false;\"";
}else{
_6[_7++]=" onMouseDown=\"Bs_Objects["+this._id+"].onChangeByArrow(false, true); return false;\"";
_6[_7++]=" onMouseUp=\"Bs_Objects["+this._id+"].stopFireArrow(); return false;\"";
_6[_7++]=" onMouseOut=\"Bs_Objects["+this._id+"].stopFireArrow(); return false;\"";
}
_6[_7++]=">";
_6[_7++]="<img id=\""+this._arrowLeftIconId+"\" src=\""+this.imgDir+this._arrowIconLeftSrc+"\" border=\"0\" width=\""+this._arrowIconLeftWidth+"\" height=\""+this._arrowIconLeftHeight+"\"";
if(typeof (this.arrowIconLeftCssStyle)!="undefined"){
_6[_7++]=" style=\""+this.arrowIconLeftCssStyle+"\"";
}
_6[_7++]=">";
_6[_7++]="</a></div>";
_8+=this._arrowIconLeftWidth;
}
if(typeof (this._bgImgLeftSrc)!="undefined"){
var _9=(this.direction==0)?_8:0;
var _a=(this.direction==0)?0:_8;
_6[_7++]="<div style=\"position:absolute; left:"+_9+"px; top:"+_a+"px;\">";
_6[_7++]="<img src=\""+this.imgDir+this._bgImgLeftSrc+"\" width=\""+this._bgImgLeftWidth+"\" height=\""+this._bgImgLeftHeight+"\" border=\"0\">";
_6[_7++]="</div>";
_8+=(this.direction==0)?this._bgImgLeftWidth:this._bgImgLeftHeight;
}
if(this.colorbar){
_6[_7++]="<div id=\""+this._colorbarId+"\" onClick=\"Bs_Objects["+this._id+"].onChangeByClick(event);\"";
if(this.colorbar["cssClass"]){
_6[_7++]=" class=\""+this.colorbar["cssClass"]+"\"";
}
_6[_7++]=" style=\"position:absolute; z-index:70; width:0px;";
if("undefined"!=typeof (this.colorbar["color"])){
_6[_7++]=" background-color:"+this.colorbar["color"]+";";
}else{
if("undefined"==typeof (this.colorbar["cssClass"])){
_6[_7++]=" background-color:orange;";
}
}
if("undefined"!=typeof (this.colorbar["offsetLeft"])){
_6[_7++]=" left:"+(_8+this.colorbar["offsetLeft"])+"px;";
}
if("undefined"!=typeof (this.colorbar["offsetTop"])){
_6[_7++]=" top:"+this.colorbar["offsetTop"]+"px;";
}
if("undefined"!=typeof (this.colorbar["height"])){
_6[_7++]=" height:"+this.colorbar["height"]+"px;";
}
_6[_7++]="\">";
_6[_7++]="<img src=\"../img/1x1_blank.gif\" width=\"1\" height=\"5\"></div>";
}
_6[_7++]="<div id=\""+this._slideBarId+"\" onClick=\"Bs_Objects["+this._id+"].onChangeByClick(event);\"";
var _9=(this.direction==0)?_8:0;
var _a=(this.direction==0)?0:_8;
_6[_7++]=" style=\"position:absolute; left:"+_9+"px; top:"+_a+"px; width:"+_4+"px; height: "+_5+"px; clip:rect(0px "+_4+"px  "+_5+"px 0px);";
if(this.bgColor){
_6[_7++]="background-color:"+this.bgColor+"; layer-background-color:"+this.bgColor+";";
}
if(this._bgImgSrc){
_6[_7++]=" background-image: url("+this.imgDir+this._bgImgSrc+"); background-repeat:"+this._bgImgRepeat+";";
}
if(this._bgImgCssStyle){
_6[_7++]=this._bgImgCssStyle;
}
_6[_7++]="\"></div>";
_8+=(this.direction==0)?this.width:this.height;
if(typeof (this._bgImgRightSrc)!="undefined"){
var _9=(this.direction==0)?_8:0;
var _a=(this.direction==0)?0:_8;
_6[_7++]="<div style=\"position:absolute; left:"+_9+"px; top:"+_a+"px;\">";
_6[_7++]="<img src=\""+this.imgDir+this._bgImgRightSrc+"\" width=\""+this._bgImgRightWidth+"\" height=\""+this._bgImgRightHeight+"\" border=\"0\">";
_6[_7++]="</div>";
_8+=(this.direction==0)?this._bgImgRightWidth:this._bgImgRightHeight;
}
if((this.arrowAmount>0)&&this._arrowIconRightSrc){
var _9=(this.direction==0)?_8:0;
var _a=(this.direction==0)?0:_8;
_6[_7++]="<div id=\""+this._arrowRightContainerId+"\" style=\"position:absolute; left:"+_9+"px; top:"+_a+"px;\">";
_6[_7++]="<a href=\"javascript:void(false);\"";
if(this.arrowMouseOver){
_6[_7++]=" onMouseOver=\"Bs_Objects["+this._id+"].onChangeByArrow(true, true); return false;\"";
_6[_7++]=" onMouseOut=\"Bs_Objects["+this._id+"].stopFireArrow(); return false;\"";
}else{
_6[_7++]=" onMouseDown=\"Bs_Objects["+this._id+"].onChangeByArrow(true, true); return false;\"";
_6[_7++]=" onMouseUp=\"Bs_Objects["+this._id+"].stopFireArrow(); return false;\"";
_6[_7++]=" onMouseOut=\"Bs_Objects["+this._id+"].stopFireArrow(); return false;\"";
}
_6[_7++]=">";
_6[_7++]="<img id=\""+this._arrowRightIconId+"\" src=\""+this.imgDir+this._arrowIconRightSrc+"\" border=\"0\" width=\""+this._arrowIconRightWidth+"\" height=\""+this._arrowIconRightHeight+"\"";
if(typeof (this.arrowIconRightCssStyle)!="undefined"){
_6[_7++]=" style=\""+this.arrowIconRightCssStyle+"\"";
}
_6[_7++]=">";
_6[_7++]="</a></div>";
_8+=this._arrowIconRightWidth;
}
var _b=(this.styleValueFieldClass)?" class=\""+this.styleValueFieldClass+"\"":"";
var _c=(this.styleValueTextClass)?" class=\""+this.styleValueTextClass+"\"":"";
_6[_7++]="<div id=\""+this._valueContainerId+"\" style=\"position:absolute; left:"+_8+"px; top:0px;\">";
if(this.useInputField==1){
_6[_7++]="<span"+_c+" id=\""+this._valueTextId+"\">"+this.valueDefault+"</span>";
_6[_7++]="<input type=\"hidden\" name=\""+this.fieldName+"\" id=\""+this._valueFieldId+"\" value=\""+this.valueDefault+"\">";
}else{
if(this.useInputField==2){
_6[_7++]="<input type=\"text\""+_b+" onMouseOver=\"bsFormFieldSetFocusAndSelect(this, false);\" name=\""+this.fieldName+"\" id=\""+this._valueFieldId+"\" value=\""+this.valueDefault+"\" size=\"2\"";
if(_b==""){
_6[_7++]=" style=\"vertical-align:text-top; width:30px; height:"+this.height+"px;\"";
}
_6[_7++]=" onKeyUp=\"Bs_Objects["+this._id+"].onChangeByInput(this.value, false);\" onBlur=\"Bs_Objects["+this._id+"].onChangeByInput(this.value, true);\">";
}else{
if(this.useInputField==3){
_6[_7++]="<input type=\"text\""+_b+" onMouseOver=\"bsFormFieldSetFocusAndSelect(this, false);\" name=\""+this.fieldName+"\" id=\""+this._valueFieldId+"\" value=\""+this.valueDefault+"\" size=\"2\"";
if(_b==""){
_6[_7++]=" style=\"display:none; vertical-align:text-top; width:30px; height:"+this.height+"px;\"";
}else{
_6[_7++]=" style=\"display:none;\"";
}
_6[_7++]=" onKeyUp=\"Bs_Objects["+this._id+"].onChangeByInput(this.value, false);\" onBlur=\"var _bss = Bs_Objects["+this._id+"]; _bss.onChangeByInput(this.value, true); _bss.textboxEdit(false)\">";
_6[_7++]="<span"+_c+" style=\"\" id=\""+this._valueTextId+"\" ";
if(this.inputTextFieldEvent=="click"){
_6[_7++]="onClick=\"Bs_Objects["+this._id+"].textboxEdit(true);\"";
}else{
_6[_7++]="onMouseOver=\"Bs_Objects["+this._id+"].textboxEdit(true);\"";
}
_6[_7++]=">"+this.valueDefault+"</span>";
}else{
_6[_7++]="<input type=\"hidden\" name=\""+this.fieldName+"\" id=\""+this._valueFieldId+"\" value=\""+this.valueDefault.join(",")+"\">";
}
}
}
_6[_7++]="</div>";
_6[_7++]="</div>";
_6[_7++]="</div>";
document.getElementById(_3).innerHTML=_6.join("");
//document.write(_6.join(""));
this._containerObj=document.getElementById(this._containerId);
this._handleObj[0]=document.getElementById(this._handleId+"0");
this._handleObj[1]=document.getElementById(this._handleId+"1");
this._valueContainerObj=document.getElementById(this._valueContainerId);
this._arrowLeftContainerObj=document.getElementById(this._arrowLeftContainerId);
this._arrowLeftIconObj=document.getElementById(this._arrowLeftIconId);
this._arrowRightContainerObj=document.getElementById(this._arrowRightContainerId);
this._arrowRightIconObj=document.getElementById(this._arrowRightIconId);
this._valueFieldObj=document.getElementById(this._valueFieldId);
this._valueTextObj=document.getElementById(this._valueTextId);
this._slideBarObj=document.getElementById(this._slideBarId);
this._colorbarObj=document.getElementById(this._colorbarId);
this._posSlideStart=(this.direction==0)?getDivLeft(this._slideBarObj):getDivTop(this._slideBarObj);
this._slideWidth=(this.direction==0)?this.width-this._sliderImgWidth:this.height-this._sliderImgHeight;
this._posSlideEnd=this._posSlideStart+this._slideWidth;
this._currentRelSliderPosX=[this._posSlideStart,this._posSlideStart];
if((this.valueDefault[0]>this.minVal)||(this.valueDefault[1]>this.minVal)){
var _d=this.maxVal-this.minVal;
var _e=(this.valueDefault[0]-this.minVal)*100/_d;
var _f=(this.valueDefault[1]-this.minVal)*100/_d;
this._currentRelSliderPosX[0]+=(_e*this._slideWidth/100);
this._currentRelSliderPosX[1]+=(_f*this._slideWidth/100);
this._updateColorbar(this._currentRelSliderPosX);
}
if(this.direction==0){
this._handleObj[0].style.left=this._currentRelSliderPosX[0]+"px";
this._handleObj[1].style.left=this._currentRelSliderPosX[1]+"px";
}else{
alert("Not implemented");
this._handleObj.style.top=this._currentRelSliderPosX;
}
this._handleObj[0].style.display="block";
this._handleObj[1].style.display="block";
temp=ech_attachMouseDrag(this._handleObj[0],this.slideStart,null,this.slideMove,null,this.slideEnd,null,null,null);
temp=temp.linkCtrl(getDivImage("","bsslidericonname0"));
this.ctrl[0]=temp;
this.ctrl[0].num=0;
this.ctrl[0].sliderObj=this;
temp=ech_attachMouseDrag(this._handleObj[1],this.slideStart,null,this.slideMove,null,this.slideEnd,null,null,null);
temp=temp.linkCtrl(getDivImage("","bsslidericonname1"));
this.ctrl[1]=temp;
this.ctrl[1].num=1;
this.ctrl[1].sliderObj=this;
var x=getDivLeft(this._handleObj[0]);
var y=getDivTop(this._handleObj[0]);
y=0;
if(this.direction==0){
this.ctrl[0].minX=this._posSlideStart;
this.ctrl[0].maxX=this._posSlideEnd;
this.ctrl[0].minY=y;
this.ctrl[0].maxY=y;
this.ctrl[1].minX=this._posSlideStart;
this.ctrl[1].maxX=this._posSlideEnd;
this.ctrl[1].minY=y;
this.ctrl[1].maxY=y;
}
};
this.drawInto=function(_12){
this.render(_12);
if(this._disabled){
this.setDisabled(true);
}
};
this.draw=function(_13){
this.render(_13);
if(this._disabled){
this.setDisabled(true);
}
};
this.attachEvent=function(_14,_15){
if(typeof (this._attachedEvents)=="undefined"){
this._attachedEvents=new Array();
}
if(typeof (this._attachedEvents[_14])=="undefined"){
this._attachedEvents[_14]=new Array(_15);
}else{
this._attachedEvents[_14][this._attachedEvents[_14].length]=_15;
}
};
this.hasEventAttached=function(_16){
return (this._attachedEvents&&this._attachedEvents[_16]);
};
this.fireEvent=function(_17){
if(this._attachedEvents&&this._attachedEvents[_17]){
var e=this._attachedEvents[_17];
if((typeof (e)=="string")||(typeof (e)=="function")){
e=new Array(e);
}
for(var i=0;i<e.length;i++){
if(typeof (e[i])=="function"){
e[i](this);
}else{
if(typeof (e[i])=="string"){
eval(e[i]);
}
}
}
}
};
this.attachOnChange=function(_1a){
this.eventOnChange=_1a;
};
this.attachOnSlideStart=function(_1b){
this.slideStartCB=_1b;
};
this.attachOnSlideMove=function(_1c){
this.slideMoveCB=_1c;
};
this.attachOnSlideEnd=function(_1d){
this.slideEndCB=_1d;
};
this.attachOnArrow=function(_1e){
this.eventOnArrow=_1e;
};
this.attachOnInputChange=function(_1f){
this.eventOnInputChange=_1f;
};
this.attachOnInputBlur=function(_20){
this.eventOnInputBlur=_20;
};
this.setSliderIcon=function(_21,_22,_23){
this._sliderImgSrc=_21;
this._sliderImgWidth=_22;
this._sliderImgHeight=_23;
};
this.setArrowIconLeft=function(_24,_25,_26){
this._arrowIconLeftSrc=_24;
this._arrowIconLeftWidth=_25;
this._arrowIconLeftHeight=_26;
};
this.setArrowIconRight=function(_27,_28,_29){
this._arrowIconRightSrc=_27;
this._arrowIconRightWidth=_28;
this._arrowIconRightHeight=_29;
};
this.setBackgroundImage=function(src,_2b,_2c){
this._bgImgSrc=src;
this._bgImgRepeat=_2b;
this._bgImgCssStyle=_2c;
};
this.setBackgroundImageLeft=function(_2d,_2e,_2f){
this._bgImgLeftSrc=_2d;
this._bgImgLeftWidth=_2e;
this._bgImgLeftHeight=_2f;
};
this.setBackgroundImageRight=function(_30,_31,_32){
this._bgImgRightSrc=_30;
this._bgImgRightWidth=_31;
this._bgImgRightHeight=_32;
};
this.setDisplay=function(_33){
this._display=_33;
if(this._containerObj){
switch(_33){
case 0:
this._containerObj.style.display="none";
break;
case 1:
this._containerObj.style.visibility="hidden";
break;
case 2:
this._containerObj.style.visibility="visible";
this._containerObj.style.display="block";
break;
default:
}
}
};
this.setDisabled=function(b){
if(typeof (b)=="undefined"){
b=!this._disabled;
}
if(b){
var _35="progid:DXImageTransform.Microsoft.BasicImage(grayScale=1); progid:DXImageTransform.Microsoft.BasicImage(opacity=.5)";
var _36="default";
}else{
var _35=null;
var _36="hand";
}
var t=new Array(this._containerId,this._arrowLeftContainerId,this._arrowRightContainerId,this._valueFieldId,this._valueTextId,this._slideBarId,this._colorbarId,this._handleId+"0",this._handleId+"1");
for(var i=0;i<t.length;i++){
var elm=document.getElementById(t[i]);
if(elm!=null){
elm.style.filter=_35;
}
}
var elm=document.getElementById(this._arrowLeftIconId);
if(elm!=null){
elm.style.cursor=_36;
}
var elm=document.getElementById(this._arrowRightIconId);
if(elm!=null){
elm.style.cursor=_36;
}
var elm=document.getElementById(this._valueFieldId);
if(elm!=null){
elm.disabled=b;
}
this._disabled=b;
};
this.getValue=function(){
return this._valueInternal;
};
this.getValueInPercent=function(){
var _3a=new Array(2);
var _3b=Math.abs(this.maxVal-this.minVal);
_3a[0]=this._valueInternal[0]/_3b*100;
_3a[1]=this._valueInternal[1]/_3b*100;
return _3a;
};
this.getSliderPos=function(){
var _3c=getDivLeft(this.ctrl[0].div)-this.ctrl[0].minX;
var _3d=getDivLeft(this.ctrl[1].div)-this.ctrl[1].minX;
var _3e=this.maxVal-this.minVal;
return [(_3c*_3e/this._slideWidth)+this.minVal,(_3d*_3e/this._slideWidth)+this.minVal];
};
this.onChangeBySlide=function(_3f){
if(this._disabled){
return;
}
var _40=this._getNewLocationFromCursor(_3f.num);
var val=this._getValueByPosition(_40);
val=this._roundToGrid(val);
if(val!=this._valueInternal[_3f.num]){
this._valueInternal[_3f.num]=val;
this.updateHandle(_40,_3f.num);
this.updateValueField(this._valueInternal);
this.updateValueText(this._valueInternal);
this._updateColorbar(_40);
if("undefined"!=typeof (this.eventOnChange)){
this.eventOnChange(this,val,_40,true);
}
this.fireEvent("onChange");
}
};
this.onChangeByClick=function(_42){
if(this._disabled){
return;
}
var _43=0;
if("undefined"!=typeof (_42.offsetX)){
_43=(this.direction==0)?_42.offsetX+this._posSlideStart:_42.offsetY+this._posSlideStart;
}else{
if("undefined"!=typeof (_42.layerX)){
_43=(this.direction==0)?_42.layerX+this._posSlideStart:_42.layerY+this._posSlideStart;
}else{
return;
}
}
var val=this._getValueByPosition(_43);
val=this._roundToGrid(val);
if(val!=this._valueInternal[0]&&val!=this._valueInternal[1]){
var _45=(Math.abs(this._currentRelSliderPosX[0]-_43)<=Math.abs(this._currentRelSliderPosX[1]-_43))?0:1;
this._valueInternal[_45]=val;
this.updateHandle(_43,_45);
this.updateValueField(this._valueInternal);
this.updateValueText(this._valueInternal);
this._updateColorbar(_43);
if("undefined"!=typeof (this.eventOnChange)){
this.eventOnChange(this,val,_43,false);
}
this.fireEvent("onChange");
}
};
this.onChangeByInput=function(val,_47){
if(this._disabled){
return;
}
if(val==""){
val=this.minVal;
}
val=this._roundToGrid(val);
var _48=this._getPositionByValue(val);
if(val!=this._valueInternal){
this._valueInternal=val;
this.updateHandle(_48);
this._updateColorbar(_48);
if("undefined"!=typeof (this.eventOnChange)){
this.eventOnChange(this,val,_48,false);
}
this.fireEvent("onChange");
if(_47){
this.updateValueField(val);
this.updateValueText(val);
}
}else{
if(_47){
this.updateValueField(val);
this.updateValueText(val);
}
}
};
this.onChangeByArrow=function(_49,_4a,_4b){
if(!_4b){
this._stopFireArrowFlag=false;
}
if(this._stopFireArrowFlag){
return;
}
if(this._disabled){
return;
}
var val=parseFloat(this._valueInternal);
if(_49){
val+=this.arrowAmount;
}else{
val-=this.arrowAmount;
}
val=this._roundToGrid(val);
if(val!=this._valueInternal){
this._valueInternal=val;
var _4d=this._getPositionByValue(val);
this.updateHandle(_4d);
this.updateValueField(val);
this.updateValueText(val);
this._updateColorbar(_4d);
if("undefined"!=typeof (this.eventOnChange)){
this.eventOnChange(this,val,_4d,false);
}
this.fireEvent("onChange");
}
if(_4a){
if(!this._stopFireArrowFlag&&(this.arrowKeepFiringTimeout>0)){
setTimeout("Bs_Objects["+this._id+"].onChangeByArrow("+_49+", "+_4a+", true);",this.arrowKeepFiringTimeout);
}
}
};
this.onMouseWheel=function(){
return;
if(this._disabled){
return;
}
var val=parseFloat(this._valueInternal);
if(event.wheelDelta>0){
val-=this.wheelAmount;
}else{
val+=this.wheelAmount;
}
val=this._roundToGrid(val);
if(val!=this._valueInternal){
this._valueInternal=val;
var _4f=this._getPositionByValue(val);
this.updateHandle(_4f);
this.updateValueField(val);
this.updateValueText(val);
this._updateColorbar(_4f);
if("undefined"!=typeof (this.eventOnChange)){
this.eventOnChange(this,val,_4f,true);
}
this.fireEvent("onChange");
}
};
this.stopFireArrow=function(){
this._stopFireArrowFlag=true;
};
this.setValue=function(val){
var _51=this._roundToGrid(val[0]);
var _52=this._roundToGrid(val[1]);
var _53=this._getPositionByValue(_51);
var _54=this._getPositionByValue(_52);
if(val[0]!=this._valueInternal[0]||val[1]!=this._valueInternal[1]){
if(val[0]!=this._valueInternal[0]){
this._valueInternal[0]=_51;
this.updateHandle(_53,0);
}
if(val[1]!=this._valueInternal[1]){
this._valueInternal[1]=_52;
this.updateHandle(_54,1);
}
if("undefined"!=typeof (this.eventOnChange)){
this.eventOnChange(this,this._valueInternal,_53,true);
}
this.fireEvent("onChange");
this.updateValueField(this._valueInternal);
this.updateValueText(this._valueInternal);
}
this._updateColorbar(_53);
};
this.onChangeByApi=function(val){
this.setValue(val);
};
this.attachMouseEvents=function(_56){
if(_56){
temp=ech_attachMouseDrag(this._handleObj[0],this.slideStart,null,this.slideMove,null,this.slideEnd,null,null,null);
temp=temp.linkCtrl(getDivImage("","bsslidericonname0"));
temp=ech_attachMouseDrag(this._handleObj[1],this.slideStart,null,this.slideMove,null,this.slideEnd,null,null,null);
temp=temp.linkCtrl(getDivImage("","bsslidericonname1"));
}else{
ech_detachMouseDrag(this._handleObj[0]);
ech_detachMouseDrag(this._handleObj[1]);
}
};
this._updateColorbar=function(_57){
if(this._colorbarObj){
var _58=(this._currentRelSliderPosX[1]-this._currentRelSliderPosX[0])+this.colorbar["widthDifference"];
if(_58<0){
_58=0;
}
this._colorbarObj.style.width=_58+"px";
this._colorbarObj.style.left=this._currentRelSliderPosX[0]+(this._sliderImgWidth/2)+"px";
if(typeof (this.colorbar["color2"])!="undefined"){
var _59=this.getValueInPercent();
var _5a=mixColor(this.colorbar["color"],this.colorbar["color2"],_59);
document.getElementById(this._colorbarId).style.backgroundColor=_5a;
}
}
};
this._getValueByPosition=function(pos){
if(this.direction==0){
pos-=this.ctrl[0].minX;
var _5c=this.ctrl[0].maxX-this.ctrl[0].minX;
}else{
pos-=this.ctrl.minY;
var _5c=this.ctrl.maxY-this.ctrl.minY;
}
var _5d=pos/_5c;
var val=this.minVal+((this.maxVal-this.minVal)*_5d);
return val;
};
this._getPositionByValue=function(val){
val=val-this.minVal;
var _60=this.maxVal-this.minVal;
var _61=val/_60;
if(this.direction==0){
var pos=this.ctrl[0].minX+((this.ctrl[0].maxX-this.ctrl[0].minX)*_61);
}else{
var pos=this.ctrl.minY+((this.ctrl.maxY-this.ctrl.minY)*_61);
}
return pos;
};
this._roundToGrid=function(val){
val=parseFloat(val);
if(isNaN(val)){
return this.minVal;
}
val=Math.round(val/this.valueInterval)*this.valueInterval;
val=Math.round(val*10000)/10000;
if(val<this.minVal){
val=this.minVal;
}
if(val>this.maxVal){
val=this.maxVal;
}
return val;
};
this._getNewLocationFromCursor=function(_64){
var ox=this._posEventSlideStartX;
var oy=this._posEventSlideStartY;
switch(this.direction){
case 0:
var t=this.ctrl[_64].pageX-ox;
var x=parseInt(this._posObjSlideStartX)+t;
if(x>this.ctrl[_64].maxX){
x=this.ctrl[_64].maxX;
}
if(x<this.ctrl[_64].minX){
x=this.ctrl[_64].minX;
}
if(_64==0){
if(this._currentRelSliderPosX[1]-this.minSeparation<x){
x=this._currentRelSliderPosX[1]-this.minSeparation;
}
}else{
if(_64==1){
if(this._currentRelSliderPosX[0]+this.minSeparation>x){
x=this._currentRelSliderPosX[0]+this.minSeparation;
}
}
}
return x;
case 1:
var t=this.ctrl.pageY-oy;
var y=parseInt(this._posObjSlideStartY)+t;
if(y>this.ctrl.maxY){
y=this.ctrl.maxY;
}
if(y<this.ctrl.minY){
y=this.ctrl.minY;
}
return y;
}
};
this.updatePointer=function(_6a){
this.updateHandle(_6a);
};
this.updateHandle=function(_6b,_6c){
if(_6c==null||_6c<0||_6c>1){
return;
}
if(this.direction==0){
this._currentRelSliderPosX[_6c]=_6b;
this.ctrl[_6c].div.style.left=_6b+"px";
}else{
this._currentRelSliderPosX[_6c]=_6b;
this.ctrl[_6c].div.style.top=_6b+"px";
}
return;
};
this.updateValueField=function(val){
if(this._valueFieldObj){
this._valueFieldObj.value=val;
}
};
this.updateValueText=function(val){
if(this._valueTextObj){
this._valueTextObj.innerHTML=val;
}
};
this.arrowOnClick=function(){
};
this.onChange=function(val){
if(this._disabled){
return;
}
this.setValue(val);
};
this.textboxEdit=function(_70){
if(this._disabled){
return;
}
if(_70){
if("undefined"!=typeof (this._valueFieldObj)){
this._valueTextObj.style.display="none";
this._valueFieldObj.style.display="block";
bsFormFieldSetFocusAndSelect(this._valueFieldObj,false);
}
}else{
if("undefined"!=typeof (this._valueTextObj)){
this._valueFieldObj.style.display="none";
this._valueTextObj.style.display="block";
}
}
};
this.slideMove=function(_71,_72){
_71.sliderObj.onChangeBySlide(_71);
};
this.slideStart=function(_73,_74){
_73.sliderObj._posEventSlideStartX=_73.startX;
_73.sliderObj._posEventSlideStartY=_73.startY;
_73.sliderObj._posObjSlideStartX=_73.sliderObj._handleObj[_73.num].style.left;
_73.sliderObj._posObjSlideStartY=_73.sliderObj._handleObj[_73.num].style.top;
var pos=_73.sliderObj.getSliderPos();
_73.sliderObj.setValue(pos);
if("undefined"!=typeof (_73.sliderObj.slideStartCB)){
_73.sliderObj.slideStartCB(_73.sliderObj,_73.sliderObj.getValue(),pos);
}
};
this.slideEnd=function(_76,_77){
if(this._disabled){
return;
}
var pos=_76.sliderObj.getSliderPos();
if("undefined"!=typeof (_76.sliderObj.slideEndCB)){
_76.sliderObj.slideEndCB(_76.sliderObj,_76.sliderObj.getValue(),pos);
}
return;
};
this.getThumb=function(num){
return this.ctrl[num].div;
};
this._constructor(_1);
}
// r9compressed
