function slider(a,c){this.f_setValue=f_sliderSetValue;this.f_getPos=f_sliderGetPos;if(!window.A_SLIDERS){window.A_SLIDERS=[]}this.n_id=window.A_SLIDERS.length;window.A_SLIDERS[this.n_id]=this;var b;if(c){for(b in c){this[b]=c[b]}}for(b in a){this[b]=a[b]}this.n_pix2value=this.n_pathLength/(this.n_maxValue-this.n_minValue);if(this.n_value==null){this.n_value=this.n_minValue}document.write('<div style="width:'+this.n_controlWidth+"px;height:"+this.n_controlHeight+"px;border:0; background-repeat: repeat-x; background-image:url("+this.s_imgControl+')" id="sl'+this.n_id+'base"><img src="'+this.s_imgSlider+'" width="'+this.n_sliderWidth+'" height="'+this.n_sliderHeight+'" border="0" style="position:relative;left:'+this.n_pathLeft+"px;top:"+this.n_pathTop+"px;z-index:"+this.n_zIndex+';cursor:pointer;visibility:hidden;" name="sl'+this.n_id+'slider" id="sl'+this.n_id+'slider" onmousedown="return f_sliderMouseDown('+this.n_id+')"/></div>');this.e_base=get_element("sl"+this.n_id+"base");this.e_slider=get_element("sl"+this.n_id+"slider");if(!window.f_savedMouseMove&&document.onmousemove!=f_sliderMouseMove){window.f_savedMouseMove=document.onmousemove;document.onmousemove=f_sliderMouseMove}if(!window.f_savedMouseUp&&document.onmouseup!=f_sliderMouseUp){window.f_savedMouseUp=document.onmouseup;document.onmouseup=f_sliderMouseUp}var d=this.s_form==null?get_element(this.s_name):document.forms[this.s_form]?document.forms[this.s_form].elements[this.s_name]:null;this.f_setValue(d&&d.value!=""?d.value:null,1);this.e_slider.style.visibility="visible"}function f_sliderSetValue(c,f,a){if(c==null){c=this.n_value==null?this.n_minValue:this.n_value}if(isNaN(c)){return false}if(this.n_step){c=Math.round((c-this.n_minValue)/this.n_step)*this.n_step+this.n_minValue}if(c%1){c=Math.round(c*100000)/100000}if(c<this.n_minValue){c=this.n_minValue}if(c>this.n_maxValue){c=this.n_maxValue}this.n_value=c;doRotate=0;if(this.b_vertical){this.e_slider.style.top=(this.n_pathTop+this.n_pathLength-Math.round((c-this.n_minValue)*this.n_pix2value))+"px"}else{this.e_slider.style.left=(this.n_pathLeft+Math.round((c-this.n_minValue)*this.n_pix2value))+"px";doRotate=1}var e;if(this.s_form==null){e=get_element(this.s_name);if(!e){return f?null:f_sliderError(this.n_id,"Can not find the input with ID='"+this.s_name+"'.")}}else{var b=document.forms[this.s_form];if(!b){return f?null:f_sliderError(this.n_id,"Can not find the form with NAME='"+this.s_form+"'.")}e=b.elements[this.s_name];if(!e){return f?null:f_sliderError(this.n_id,"Can not find the input with NAME='"+this.s_name+"'.")}}if(e.value!=c){if((a==null)&&(doRotate==1)){var d=c;var g=1;if(c==360){d=0;g=0}img_angle=displayNextFrame(d,g);while(img_angle!=d){img_angle=displayNextFrame(d,g)}}}e.value=c}function f_sliderGetPos(d,e){var a=0,f=(d?"Top":"Left");var b=o_elem2=e?this.e_base:this.e_slider;while(b){a+=b["offset"+f];b=b.offsetParent}b=o_elem2;var c;while(b.tagName!="BODY"){c=b["scroll"+f];if(c){a-=b["scroll"+f]}b=b.parentNode}return a}function f_sliderMouseDown(a){window.n_activeSliderId=a;return false}function f_sliderMouseUp(b,c){if(window.n_activeSliderId!=null){var a=window.A_SLIDERS[window.n_activeSliderId];a.f_setValue(a.n_minValue+(a.b_vertical?(a.n_pathLength-parseInt(a.e_slider.style.top)+a.n_pathTop):(parseInt(a.e_slider.style.left)-a.n_pathLeft))/a.n_pix2value);if(c){return}window.n_activeSliderId=null}if(window.f_savedMouseUp){return window.f_savedMouseUp(b)}}function f_sliderMouseMove(b){if(!b&&window.event){b=window.event}if(b){if(b.clientX>window.n_mouseX){animIncdir=1}else{animIncdir=-1}window.n_mouseX=b.clientX+f_scrollLeft();window.n_mouseY=b.clientY+f_scrollTop()}if(window.n_activeSliderId!=null){var a=window.A_SLIDERS[window.n_activeSliderId];var f;var c=window.n_mouseX-a.n_sliderWidth/2-a.f_getPos(0,1)-3;var d=a.n_pathLeft+a.n_pathLength;if((c>a.n_pathLeft)&&(c<d)){animIncrement=animIncdir}if(a.b_vertical){var e=window.n_mouseY-a.n_sliderHeight/2-a.f_getPos(1,1)-3;if(e<a.n_pathTop){e=a.n_pathTop}var d=a.n_pathTop+a.n_pathLength;if(e>d){e=d}a.e_slider.style.top=e+"px";f=a.n_pathLength-e+a.n_pathTop}else{var c=window.n_mouseX-a.n_sliderWidth/2-a.f_getPos(0,1)-3;if(c<a.n_pathLeft){c=a.n_pathLeft}var d=a.n_pathLeft+a.n_pathLength;if(c>d){c=d}a.e_slider.style.left=c+"px";f=c-a.n_pathLeft}if(a.b_watch){f_sliderMouseUp(b,1)}return false}if(window.f_savedMouseMove){return window.f_savedMouseMove(b)}}function f_scrollLeft(){return f_filterResults(window.pageXOffset?window.pageXOffset:0,document.documentElement?document.documentElement.scrollLeft:0,document.body?document.body.scrollLeft:0)}function f_scrollTop(){return f_filterResults(window.pageYOffset?window.pageYOffset:0,document.documentElement?document.documentElement.scrollTop:0,document.body?document.body.scrollTop:0)}function f_filterResults(d,b,a){var c=d?d:0;if(b&&(!c||(c>b))){c=b}return a&&(!c||(c>a))?a:c}function f_sliderError(b,a){alert("Slider #"+b+" Error:\n"+a);window.n_activeSliderId=null}get_element=document.all?function(a){return document.all[a]}:function(a){return document.getElementById(a)};
