function submitRed(){
document.getElementById("submitbutton").className="submit";
}
function getStyleObject(_1){
if(document.getElementById&&document.getElementById(_1)){
return document.getElementById(_1).style;
}else{
if(document.all&&document.all(_1)){
return document.all(_1).style;
}else{
return false;
}
}
}
function changeDiv(_2,_3){
var _4=getStyleObject(_2);
if(_4!=false){
_4.display=_3;
}
}
function checkNumber(_5){
var _6=_5.value;
if(_6.length==0||_6==""||_6==null){
return false;
}
for(var i=0;i<_6.length;i++){
var ch=_6.substring(i,i+1);
if((ch<"0"||"9"<ch)&&ch!="."&&ch!="-"&&ch!=","){
return false;
}
}
return true;
}
function tonum(_9){
var _a="";
for(var i=0;i<_9.length;i++){
var ch=_9.substring(i,i+1);
if((ch>="0"&&ch<="9")||ch=="."||ch=="-"){
_a+=ch;
}
}
return parseFloat(_a);
}
function valueOrDefault(_d,_e){
if(!checkNumber(_d)){
return _e;
}
var _f=tonum(_d.value);
if(_f==0){
return _e;
}
return _f;
}
function calc_discrim(a,b,c){
d=b*b-4*a*c;
return d;
}
function formatQuadOutput(val,len,_15){
var _16=1;
if(_15==null){
_15=1;
}
for(i=0;i<=_15;i++){
_16*=10;
}
var str=""+Math.round(parseFloat(val)*_16);
if(str.length==0||str=="0"){
str="000";
}
i=len-str.length;
if(_16!=1){
i--;
}
while(0<i--){
str=" "+str;
}
if(_16!=1){
var p=len-_15-2;
var a=str.substring(0,p);
var b=str.substring(p,len);
return a+"."+b;
}
return str;
}
function computePositiveQuadratic(a,b,c){
d=b*b-4*a*c;
x1=0;
x2=0;
if(d>=0){
x1=(-b+Math.sqrt(d))/(2*a);
}
return x1;
}
var sliderRecalculate=0;
function slider(_1e,_1f){
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 _20;
if(_1f){
for(_20 in _1f){
this[_20]=_1f[_20];
}
}
for(_20 in _1e){
this[_20]=_1e[_20];
}
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-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:hand;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(document.onmousemove!=f_sliderMouseMove){
window.f_savedMouseMove=document.onmousemove;
document.onmousemove=f_sliderMouseMove;
}
if(document.onmouseup!=f_sliderMouseUp){
window.f_savedMouseUp=document.onmouseup;
document.onmouseup=f_sliderMouseUp;
}
var _21=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(_21&&_21.value!=""?_21.value:null,1);
this.e_slider.style.visibility="visible";
}
function f_sliderSetValue(_22,_23){
if(_22==null){
_22=this.n_value==null?this.n_minValue:this.n_value;
}
if(isNaN(_22)){
return false;
}
if(this.n_step){
_22=Math.round((_22-this.n_minValue)/this.n_step)*this.n_step+this.n_minValue;
}
if(_22%1){
_22=Math.round(_22*100000)/100000;
}
if(_22<this.n_minValue){
_22=this.n_minValue;
}
if(_22>this.n_maxValue){
_22=this.n_maxValue;
}
this.n_value=_22;
if(this.b_vertical){
this.e_slider.style.top=(this.n_pathTop+this.n_pathLength-Math.round((_22-this.n_minValue)*this.n_pix2value))+"px";
}else{
this.e_slider.style.left=(this.n_pathLeft+Math.round((_22-this.n_minValue)*this.n_pix2value))+"px";
}
var _24;
if(this.s_form==null){
_24=get_element(this.s_name);
if(!_24){
return _23?null:f_sliderError(this.n_id,"Can not find the input with ID='"+this.s_name+"'.");
}
}else{
var _25=document.forms[this.s_form];
if(!_25){
return _23?null:f_sliderError(this.n_id,"Can not find the form with NAME='"+this.s_form+"'.");
}
_24=_25.elements[this.s_name];
if(!_24){
return _23?null:f_sliderError(this.n_id,"Can not find the input with NAME='"+this.s_name+"'.");
}
}
_24.value=_22;
}
function f_sliderGetPos(_26,_27){
var _28=0,_29=(_26?"Top":"Left");
var _2a=o_elem2=_27?this.e_base:this.e_slider;
while(_2a){
_28+=_2a["offset"+_29];
_2a=_2a.offsetParent;
}
_2a=o_elem2;
var _2b;
while(_2a.tagName!="BODY"){
_2b=_2a["scroll"+_29];
if(_2b){
_28-=_2a["scroll"+_29];
}
_2a=_2a.parentNode;
}
return _28;
}
function f_sliderMouseDown(_2c){
window.n_activeSliderId=_2c;
return false;
}
function f_sliderMouseUp(_2d,_2e){
if(window.n_activeSliderId!=null){
var _2f=window.A_SLIDERS[window.n_activeSliderId];
_2f.f_setValue(_2f.n_minValue+(_2f.b_vertical?(_2f.n_pathLength-parseInt(_2f.e_slider.style.top)+_2f.n_pathTop):(parseInt(_2f.e_slider.style.left)-_2f.n_pathLeft))/_2f.n_pix2value);
document.getElementById("submitbutton").className="submit";
if(_2e){
return;
}
window.n_activeSliderId=null;
}
if(window.f_savedMouseUp){
return window.f_savedMouseUp(_2d);
}
}
function f_sliderMouseMove(_30){
if(!_30&&window.event){
_30=window.event;
}
if(_30){
window.n_mouseX=_30.clientX+f_scrollLeft();
window.n_mouseY=_30.clientY+f_scrollTop();
}
if(window.n_activeSliderId!=null){
var _31=window.A_SLIDERS[window.n_activeSliderId];
var _32;
if(_31.b_vertical){
var _33=window.n_mouseY-_31.n_sliderHeight/2-_31.f_getPos(1,1)-3;
if(_33<_31.n_pathTop){
_33=_31.n_pathTop;
}
var _34=_31.n_pathTop+_31.n_pathLength;
if(_33>_34){
_33=_34;
}
_31.e_slider.style.top=_33+"px";
_32=_31.n_pathLength-_33+_31.n_pathTop;
}else{
var _35=window.n_mouseX-_31.n_sliderWidth/2-_31.f_getPos(0,1)-3;
if(_35<_31.n_pathLeft){
_35=_31.n_pathLeft;
}
var _34=_31.n_pathLeft+_31.n_pathLength;
if(_35>_34){
_35=_34;
}
_31.e_slider.style.left=_35+"px";
_32=_35-_31.n_pathLeft;
}
if(_31.b_watch){
f_sliderMouseUp(_30,1);
}
return false;
}
if(window.f_savedMouseMove){
return window.f_savedMouseMove(_30);
}
}
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(_36,_37,_38){
var _39=_36?_36:0;
if(_37&&(!_39||(_39>_37))){
_39=_37;
}
return _38&&(!_39||(_39>_38))?_38:_39;
}
function f_sliderError(_3a,_3b){
alert("Slider #"+_3a+" Error:\n"+_3b);
window.n_activeSliderId=null;
}
get_element=document.all?function(_3c){
return document.all[_3c];
}:function(_3d){
return document.getElementById(_3d);
};

