// Combined /fileadmin/jslib/scriptaculous1.8.2/effects.js
String.prototype.parseColor=function(){var a="#";if(this.slice(0,4)=="rgb("){var c=this.slice(4,this.length-1).split(",");var b=0;do{a+=parseInt(c[b]).toColorPart()}while(++b<3)}else{if(this.slice(0,1)=="#"){if(this.length==4){for(var b=1;b<4;b++){a+=(this.charAt(b)+this.charAt(b)).toLowerCase()}}if(this.length==7){a=this.toLowerCase()}}}return(a.length==7?a:(arguments[0]||this))};Element.collectTextNodes=function(a){return $A($(a).childNodes).collect(function(b){return(b.nodeType==3?b.nodeValue:(b.hasChildNodes()?Element.collectTextNodes(b):""))}).flatten().join("")};Element.collectTextNodesIgnoreClass=function(a,b){return $A($(a).childNodes).collect(function(c){return(c.nodeType==3?c.nodeValue:((c.hasChildNodes()&&!Element.hasClassName(c,b))?Element.collectTextNodesIgnoreClass(c,b):""))}).flatten().join("")};Element.setContentZoom=function(a,b){a=$(a);a.setStyle({fontSize:(b/100)+"em"});if(Prototype.Browser.WebKit){window.scrollBy(0,0)}return a};Element.getInlineOpacity=function(a){return $(a).style.opacity||""};Element.forceRerendering=function(a){try{a=$(a);var c=document.createTextNode(" ");a.appendChild(c);a.removeChild(c)}catch(b){}};var Effect={_elementDoesNotExistError:{name:"ElementDoesNotExistError",message:"The specified DOM element does not exist, but is required for this effect to operate"},Transitions:{linear:Prototype.K,sinoidal:function(a){return(-Math.cos(a*Math.PI)/2)+0.5},reverse:function(a){return 1-a},flicker:function(a){var a=((-Math.cos(a*Math.PI)/4)+0.75)+Math.random()/4;return a>1?1:a},wobble:function(a){return(-Math.cos(a*Math.PI*(9*a))/2)+0.5},pulse:function(b,a){return(-Math.cos((b*((a||5)-0.5)*2)*Math.PI)/2)+0.5},spring:function(a){return 1-(Math.cos(a*4.5*Math.PI)*Math.exp(-a*6))},none:function(a){return 0},full:function(a){return 1}},DefaultOptions:{duration:1,fps:100,sync:false,from:0,to:1,delay:0,queue:"parallel"},tagifyText:function(a){var b="position:relative";if(Prototype.Browser.IE){b+=";zoom:1"}a=$(a);$A(a.childNodes).each(function(c){if(c.nodeType==3){c.nodeValue.toArray().each(function(d){a.insertBefore(new Element("span",{style:b}).update(d==" "?String.fromCharCode(160):d),c)});Element.remove(c)}})},multiple:function(b,c){var e;if(((typeof b=="object")||Object.isFunction(b))&&(b.length)){e=b}else{e=$(b).childNodes}var a=Object.extend({speed:0.1,delay:0},arguments[2]||{});var d=a.delay;$A(e).each(function(g,f){new c(g,Object.extend(a,{delay:f*a.speed+d}))})},PAIRS:{slide:["SlideDown","SlideUp"],blind:["BlindDown","BlindUp"],appear:["Appear","Fade"]},toggle:function(b,c){b=$(b);c=(c||"appear").toLowerCase();var a=Object.extend({queue:{position:"end",scope:(b.id||"global"),limit:1}},arguments[2]||{});Effect[b.visible()?Effect.PAIRS[c][1]:Effect.PAIRS[c][0]](b,a)}};Effect.DefaultOptions.transition=Effect.Transitions.sinoidal;Effect.ScopedQueue=Class.create(Enumerable,{initialize:function(){this.effects=[];this.interval=null},_each:function(a){this.effects._each(a)},add:function(b){var c=new Date().getTime();var a=Object.isString(b.options.queue)?b.options.queue:b.options.queue.position;switch(a){case"front":this.effects.findAll(function(d){return d.state=="idle"}).each(function(d){d.startOn+=b.finishOn;d.finishOn+=b.finishOn});break;case"with-last":c=this.effects.pluck("startOn").max()||c;break;case"end":c=this.effects.pluck("finishOn").max()||c;break}b.startOn+=c;b.finishOn+=c;if(!b.options.queue.limit||(this.effects.length<b.options.queue.limit)){this.effects.push(b)}if(!this.interval){this.interval=setInterval(this.loop.bind(this),15)}},remove:function(a){this.effects=this.effects.reject(function(b){return b==a});if(this.effects.length==0){clearInterval(this.interval);this.interval=null}},loop:function(){var c=new Date().getTime();for(var b=0,a=this.effects.length;b<a;b++){this.effects[b]&&this.effects[b].loop(c)}}});Effect.Queues={instances:$H(),get:function(a){if(!Object.isString(a)){return a}return this.instances.get(a)||this.instances.set(a,new Effect.ScopedQueue())}};Effect.Queue=Effect.Queues.get("global");Effect.Base=Class.create({position:null,start:function(a){function b(d,c){return((d[c+"Internal"]?"this.options."+c+"Internal(this);":"")+(d[c]?"this.options."+c+"(this);":""))}if(a&&a.transition===false){a.transition=Effect.Transitions.linear}this.options=Object.extend(Object.extend({},Effect.DefaultOptions),a||{});this.currentFrame=0;this.state="idle";this.startOn=this.options.delay*1000;this.finishOn=this.startOn+(this.options.duration*1000);this.fromToDelta=this.options.to-this.options.from;this.totalTime=this.finishOn-this.startOn;this.totalFrames=this.options.fps*this.options.duration;this.render=(function(){function c(e,d){if(e.options[d+"Internal"]){e.options[d+"Internal"](e)}if(e.options[d]){e.options[d](e)}}return function(d){if(this.state==="idle"){this.state="running";c(this,"beforeSetup");if(this.setup){this.setup()}c(this,"afterSetup")}if(this.state==="running"){d=(this.options.transition(d)*this.fromToDelta)+this.options.from;this.position=d;c(this,"beforeUpdate");if(this.update){this.update(d)}c(this,"afterUpdate")}}})();this.event("beforeStart");if(!this.options.sync){Effect.Queues.get(Object.isString(this.options.queue)?"global":this.options.queue.scope).add(this)}},loop:function(c){if(c>=this.startOn){if(c>=this.finishOn){this.render(1);this.cancel();this.event("beforeFinish");if(this.finish){this.finish()}this.event("afterFinish");return}var b=(c-this.startOn)/this.totalTime,a=(b*this.totalFrames).round();if(a>this.currentFrame){this.render(b);this.currentFrame=a}}},cancel:function(){if(!this.options.sync){Effect.Queues.get(Object.isString(this.options.queue)?"global":this.options.queue.scope).remove(this)}this.state="finished"},event:function(a){if(this.options[a+"Internal"]){this.options[a+"Internal"](this)}if(this.options[a]){this.options[a](this)}},inspect:function(){var a=$H();for(property in this){if(!Object.isFunction(this[property])){a.set(property,this[property])}}return"#<Effect:"+a.inspect()+",options:"+$H(this.options).inspect()+">"}});Effect.Parallel=Class.create(Effect.Base,{initialize:function(a){this.effects=a||[];this.start(arguments[1])},update:function(a){this.effects.invoke("render",a)},finish:function(a){this.effects.each(function(b){b.render(1);b.cancel();b.event("beforeFinish");if(b.finish){b.finish(a)}b.event("afterFinish")})}});Effect.Tween=Class.create(Effect.Base,{initialize:function(c,f,e){c=Object.isString(c)?$(c):c;var b=$A(arguments),d=b.last(),a=b.length==5?b[3]:null;this.method=Object.isFunction(d)?d.bind(c):Object.isFunction(c[d])?c[d].bind(c):function(g){c[d]=g};this.start(Object.extend({from:f,to:e},a||{}))},update:function(a){this.method(a)}});Effect.Event=Class.create(Effect.Base,{initialize:function(){this.start(Object.extend({duration:0},arguments[0]||{}))},update:Prototype.emptyFunction});Effect.Opacity=Class.create(Effect.Base,{initialize:function(b){this.element=$(b);if(!this.element){throw (Effect._elementDoesNotExistError)}if(Prototype.Browser.IE&&(!this.element.currentStyle.hasLayout)){this.element.setStyle({zoom:1})}var a=Object.extend({from:this.element.getOpacity()||0,to:1},arguments[1]||{});this.start(a)},update:function(a){this.element.setOpacity(a)}});Effect.Move=Class.create(Effect.Base,{initialize:function(b){this.element=$(b);if(!this.element){throw (Effect._elementDoesNotExistError)}var a=Object.extend({x:0,y:0,mode:"relative"},arguments[1]||{});this.start(a)},setup:function(){this.element.makePositioned();this.originalLeft=parseFloat(this.element.getStyle("left")||"0");this.originalTop=parseFloat(this.element.getStyle("top")||"0");if(this.options.mode=="absolute"){this.options.x=this.options.x-this.originalLeft;this.options.y=this.options.y-this.originalTop}},update:function(a){this.element.setStyle({left:(this.options.x*a+this.originalLeft).round()+"px",top:(this.options.y*a+this.originalTop).round()+"px"})}});Effect.MoveBy=function(b,a,c){return new Effect.Move(b,Object.extend({x:c,y:a},arguments[3]||{}))};Effect.Scale=Class.create(Effect.Base,{initialize:function(b,c){this.element=$(b);if(!this.element){throw (Effect._elementDoesNotExistError)}var a=Object.extend({scaleX:true,scaleY:true,scaleContent:true,scaleFromCenter:false,scaleMode:"box",scaleFrom:100,scaleTo:c},arguments[2]||{});this.start(a)},setup:function(){this.restoreAfterFinish=this.options.restoreAfterFinish||false;this.elementPositioning=this.element.getStyle("position");this.originalStyle={};["top","left","width","height","fontSize"].each(function(b){this.originalStyle[b]=this.element.style[b]}.bind(this));this.originalTop=this.element.offsetTop;this.originalLeft=this.element.offsetLeft;var a=this.element.getStyle("font-size")||"100%";["em","px","%","pt"].each(function(b){if(a.indexOf(b)>0){this.fontSize=parseFloat(a);this.fontSizeType=b}}.bind(this));this.factor=(this.options.scaleTo-this.options.scaleFrom)/100;this.dims=null;if(this.options.scaleMode=="box"){this.dims=[this.element.offsetHeight,this.element.offsetWidth]}if(/^content/.test(this.options.scaleMode)){this.dims=[this.element.scrollHeight,this.element.scrollWidth]}if(!this.dims){this.dims=[this.options.scaleMode.originalHeight,this.options.scaleMode.originalWidth]}},update:function(a){var b=(this.options.scaleFrom/100)+(this.factor*a);if(this.options.scaleContent&&this.fontSize){this.element.setStyle({fontSize:this.fontSize*b+this.fontSizeType})}this.setDimensions(this.dims[0]*b,this.dims[1]*b)},finish:function(a){if(this.restoreAfterFinish){this.element.setStyle(this.originalStyle)}},setDimensions:function(a,e){var f={};if(this.options.scaleX){f.width=e.round()+"px"}if(this.options.scaleY){f.height=a.round()+"px"}if(this.options.scaleFromCenter){var c=(a-this.dims[0])/2;var b=(e-this.dims[1])/2;if(this.elementPositioning=="absolute"){if(this.options.scaleY){f.top=this.originalTop-c+"px"}if(this.options.scaleX){f.left=this.originalLeft-b+"px"}}else{if(this.options.scaleY){f.top=-c+"px"}if(this.options.scaleX){f.left=-b+"px"}}}this.element.setStyle(f)}});Effect.Highlight=Class.create(Effect.Base,{initialize:function(b){this.element=$(b);if(!this.element){throw (Effect._elementDoesNotExistError)}var a=Object.extend({startcolor:"#ffff99"},arguments[1]||{});this.start(a)},setup:function(){if(this.element.getStyle("display")=="none"){this.cancel();return}this.oldStyle={};if(!this.options.keepBackgroundImage){this.oldStyle.backgroundImage=this.element.getStyle("background-image");this.element.setStyle({backgroundImage:"none"})}if(!this.options.endcolor){this.options.endcolor=this.element.getStyle("background-color").parseColor("#ffffff")}if(!this.options.restorecolor){this.options.restorecolor=this.element.getStyle("background-color")}this._base=$R(0,2).map(function(a){return parseInt(this.options.startcolor.slice(a*2+1,a*2+3),16)}.bind(this));this._delta=$R(0,2).map(function(a){return parseInt(this.options.endcolor.slice(a*2+1,a*2+3),16)-this._base[a]}.bind(this))},update:function(a){this.element.setStyle({backgroundColor:$R(0,2).inject("#",function(b,c,d){return b+((this._base[d]+(this._delta[d]*a)).round().toColorPart())}.bind(this))})},finish:function(){this.element.setStyle(Object.extend(this.oldStyle,{backgroundColor:this.options.restorecolor}))}});Effect.ScrollTo=function(c){var b=arguments[1]||{},a=document.viewport.getScrollOffsets(),d=$(c).cumulativeOffset();if(b.offset){d[1]+=b.offset}return new Effect.Tween(null,a.top,d[1],b,function(e){scrollTo(a.left,e.round())})};Effect.Fade=function(c){c=$(c);var a=c.getInlineOpacity();var b=Object.extend({from:c.getOpacity()||1,to:0,afterFinishInternal:function(d){if(d.options.to!=0){return}d.element.hide().setStyle({opacity:a})}},arguments[1]||{});return new Effect.Opacity(c,b)};Effect.Appear=function(b){b=$(b);var a=Object.extend({from:(b.getStyle("display")=="none"?0:b.getOpacity()||0),to:1,afterFinishInternal:function(c){c.element.forceRerendering()},beforeSetup:function(c){c.element.setOpacity(c.options.from).show()}},arguments[1]||{});return new Effect.Opacity(b,a)};Effect.Puff=function(b){b=$(b);var a={opacity:b.getInlineOpacity(),position:b.getStyle("position"),top:b.style.top,left:b.style.left,width:b.style.width,height:b.style.height};return new Effect.Parallel([new Effect.Scale(b,200,{sync:true,scaleFromCenter:true,scaleContent:true,restoreAfterFinish:true}),new Effect.Opacity(b,{sync:true,to:0})],Object.extend({duration:1,beforeSetupInternal:function(c){Position.absolutize(c.effects[0].element)},afterFinishInternal:function(c){c.effects[0].element.hide().setStyle(a)}},arguments[1]||{}))};Effect.BlindUp=function(a){a=$(a);a.makeClipping();return new Effect.Scale(a,0,Object.extend({scaleContent:false,scaleX:false,restoreAfterFinish:true,afterFinishInternal:function(b){b.element.hide().undoClipping()}},arguments[1]||{}))};Effect.BlindDown=function(b){b=$(b);var a=b.getDimensions();return new Effect.Scale(b,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:0,scaleMode:{originalHeight:a.height,originalWidth:a.width},restoreAfterFinish:true,afterSetup:function(c){c.element.makeClipping().setStyle({height:"0px"}).show()},afterFinishInternal:function(c){c.element.undoClipping()}},arguments[1]||{}))};Effect.SwitchOff=function(b){b=$(b);var a=b.getInlineOpacity();return new Effect.Appear(b,Object.extend({duration:0.4,from:0,transition:Effect.Transitions.flicker,afterFinishInternal:function(c){new Effect.Scale(c.element,1,{duration:0.3,scaleFromCenter:true,scaleX:false,scaleContent:false,restoreAfterFinish:true,beforeSetup:function(d){d.element.makePositioned().makeClipping()},afterFinishInternal:function(d){d.element.hide().undoClipping().undoPositioned().setStyle({opacity:a})}})}},arguments[1]||{}))};Effect.DropOut=function(b){b=$(b);var a={top:b.getStyle("top"),left:b.getStyle("left"),opacity:b.getInlineOpacity()};return new Effect.Parallel([new Effect.Move(b,{x:0,y:100,sync:true}),new Effect.Opacity(b,{sync:true,to:0})],Object.extend({duration:0.5,beforeSetup:function(c){c.effects[0].element.makePositioned()},afterFinishInternal:function(c){c.effects[0].element.hide().undoPositioned().setStyle(a)}},arguments[1]||{}))};Effect.Shake=function(d){d=$(d);var b=Object.extend({distance:20,duration:0.5},arguments[1]||{});var e=parseFloat(b.distance);var c=parseFloat(b.duration)/10;var a={top:d.getStyle("top"),left:d.getStyle("left")};return new Effect.Move(d,{x:e,y:0,duration:c,afterFinishInternal:function(f){new Effect.Move(f.element,{x:-e*2,y:0,duration:c*2,afterFinishInternal:function(g){new Effect.Move(g.element,{x:e*2,y:0,duration:c*2,afterFinishInternal:function(h){new Effect.Move(h.element,{x:-e*2,y:0,duration:c*2,afterFinishInternal:function(i){new Effect.Move(i.element,{x:e*2,y:0,duration:c*2,afterFinishInternal:function(j){new Effect.Move(j.element,{x:-e,y:0,duration:c,afterFinishInternal:function(k){k.element.undoPositioned().setStyle(a)}})}})}})}})}})}})};Effect.SlideDown=function(c){c=$(c).cleanWhitespace();var a=c.down().getStyle("bottom");var b=c.getDimensions();return new Effect.Scale(c,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:window.opera?0:1,scaleMode:{originalHeight:b.height,originalWidth:b.width},restoreAfterFinish:true,afterSetup:function(d){d.element.makePositioned();d.element.down().makePositioned();if(window.opera){d.element.setStyle({top:""})}d.element.makeClipping().setStyle({height:"0px"}).show()},afterUpdateInternal:function(d){d.element.down().setStyle({bottom:(d.dims[0]-d.element.clientHeight)+"px"})},afterFinishInternal:function(d){d.element.undoClipping().undoPositioned();d.element.down().undoPositioned().setStyle({bottom:a})}},arguments[1]||{}))};Effect.SlideUp=function(c){c=$(c).cleanWhitespace();var a=c.down().getStyle("bottom");var b=c.getDimensions();return new Effect.Scale(c,window.opera?0:1,Object.extend({scaleContent:false,scaleX:false,scaleMode:"box",scaleFrom:100,scaleMode:{originalHeight:b.height,originalWidth:b.width},restoreAfterFinish:true,afterSetup:function(d){d.element.makePositioned();d.element.down().makePositioned();if(window.opera){d.element.setStyle({top:""})}d.element.makeClipping().show()},afterUpdateInternal:function(d){d.element.down().setStyle({bottom:(d.dims[0]-d.element.clientHeight)+"px"})},afterFinishInternal:function(d){d.element.hide().undoClipping().undoPositioned();d.element.down().undoPositioned().setStyle({bottom:a})}},arguments[1]||{}))};Effect.Squish=function(a){return new Effect.Scale(a,window.opera?1:0,{restoreAfterFinish:true,beforeSetup:function(b){b.element.makeClipping()},afterFinishInternal:function(b){b.element.hide().undoClipping()}})};Effect.Grow=function(c){c=$(c);var b=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.full},arguments[1]||{});var a={top:c.style.top,left:c.style.left,height:c.style.height,width:c.style.width,opacity:c.getInlineOpacity()};var g=c.getDimensions();var h,f;var e,d;switch(b.direction){case"top-left":h=f=e=d=0;break;case"top-right":h=g.width;f=d=0;e=-g.width;break;case"bottom-left":h=e=0;f=g.height;d=-g.height;break;case"bottom-right":h=g.width;f=g.height;e=-g.width;d=-g.height;break;case"center":h=g.width/2;f=g.height/2;e=-g.width/2;d=-g.height/2;break}return new Effect.Move(c,{x:h,y:f,duration:0.01,beforeSetup:function(i){i.element.hide().makeClipping().makePositioned()},afterFinishInternal:function(i){new Effect.Parallel([new Effect.Opacity(i.element,{sync:true,to:1,from:0,transition:b.opacityTransition}),new Effect.Move(i.element,{x:e,y:d,sync:true,transition:b.moveTransition}),new Effect.Scale(i.element,100,{scaleMode:{originalHeight:g.height,originalWidth:g.width},sync:true,scaleFrom:window.opera?1:0,transition:b.scaleTransition,restoreAfterFinish:true})],Object.extend({beforeSetup:function(j){j.effects[0].element.setStyle({height:"0px"}).show()},afterFinishInternal:function(j){j.effects[0].element.undoClipping().undoPositioned().setStyle(a)}},b))}})};Effect.Shrink=function(c){c=$(c);var b=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.none},arguments[1]||{});var a={top:c.style.top,left:c.style.left,height:c.style.height,width:c.style.width,opacity:c.getInlineOpacity()};var f=c.getDimensions();var e,d;switch(b.direction){case"top-left":e=d=0;break;case"top-right":e=f.width;d=0;break;case"bottom-left":e=0;d=f.height;break;case"bottom-right":e=f.width;d=f.height;break;case"center":e=f.width/2;d=f.height/2;break}return new Effect.Parallel([new Effect.Opacity(c,{sync:true,to:0,from:1,transition:b.opacityTransition}),new Effect.Scale(c,window.opera?1:0,{sync:true,transition:b.scaleTransition,restoreAfterFinish:true}),new Effect.Move(c,{x:e,y:d,sync:true,transition:b.moveTransition})],Object.extend({beforeStartInternal:function(g){g.effects[0].element.makePositioned().makeClipping()},afterFinishInternal:function(g){g.effects[0].element.hide().undoClipping().undoPositioned().setStyle(a)}},b))};Effect.Pulsate=function(c){c=$(c);var b=arguments[1]||{},a=c.getInlineOpacity(),e=b.transition||Effect.Transitions.linear,d=function(f){return 1-e((-Math.cos((f*(b.pulses||5)*2)*Math.PI)/2)+0.5)};return new Effect.Opacity(c,Object.extend(Object.extend({duration:2,from:0,afterFinishInternal:function(f){f.element.setStyle({opacity:a})}},b),{transition:d}))};Effect.Fold=function(b){b=$(b);var a={top:b.style.top,left:b.style.left,width:b.style.width,height:b.style.height};b.makeClipping();return new Effect.Scale(b,5,Object.extend({scaleContent:false,scaleX:false,afterFinishInternal:function(c){new Effect.Scale(b,1,{scaleContent:false,scaleY:false,afterFinishInternal:function(d){d.element.hide().undoClipping().setStyle(a)}})}},arguments[1]||{}))};Effect.Morph=Class.create(Effect.Base,{initialize:function(c){this.element=$(c);if(!this.element){throw (Effect._elementDoesNotExistError)}var a=Object.extend({style:{}},arguments[1]||{});if(!Object.isString(a.style)){this.style=$H(a.style)}else{if(a.style.include(":")){this.style=a.style.parseStyle()}else{this.element.addClassName(a.style);this.style=$H(this.element.getStyles());this.element.removeClassName(a.style);var b=this.element.getStyles();this.style=this.style.reject(function(d){return d.value==b[d.key]});a.afterFinishInternal=function(d){d.element.addClassName(d.options.style);d.transforms.each(function(e){d.element.style[e.style]=""})}}}this.start(a)},setup:function(){function a(b){if(!b||["rgba(0, 0, 0, 0)","transparent"].include(b)){b="#ffffff"}b=b.parseColor();return $R(0,2).map(function(c){return parseInt(b.slice(c*2+1,c*2+3),16)})}this.transforms=this.style.map(function(g){var f=g[0],e=g[1],d=null;if(e.parseColor("#zzzzzz")!="#zzzzzz"){e=e.parseColor();d="color"}else{if(f=="opacity"){e=parseFloat(e);if(Prototype.Browser.IE&&(!this.element.currentStyle.hasLayout)){this.element.setStyle({zoom:1})}}else{if(Element.CSS_LENGTH.test(e)){var c=e.match(/^([\+\-]?[0-9\.]+)(.*)$/);e=parseFloat(c[1]);d=(c.length==3)?c[2]:null}}}var b=this.element.getStyle(f);return{style:f.camelize(),originalValue:d=="color"?a(b):parseFloat(b||0),targetValue:d=="color"?a(e):e,unit:d}}.bind(this)).reject(function(b){return((b.originalValue==b.targetValue)||(b.unit!="color"&&(isNaN(b.originalValue)||isNaN(b.targetValue))))})},update:function(a){var d={},b,c=this.transforms.length;while(c--){d[(b=this.transforms[c]).style]=b.unit=="color"?"#"+(Math.round(b.originalValue[0]+(b.targetValue[0]-b.originalValue[0])*a)).toColorPart()+(Math.round(b.originalValue[1]+(b.targetValue[1]-b.originalValue[1])*a)).toColorPart()+(Math.round(b.originalValue[2]+(b.targetValue[2]-b.originalValue[2])*a)).toColorPart():(b.originalValue+(b.targetValue-b.originalValue)*a).toFixed(3)+(b.unit===null?"":b.unit)}this.element.setStyle(d,true)}});Effect.Transform=Class.create({initialize:function(a){this.tracks=[];this.options=arguments[1]||{};this.addTracks(a)},addTracks:function(a){a.each(function(b){b=$H(b);var c=b.values().first();this.tracks.push($H({ids:b.keys().first(),effect:Effect.Morph,options:{style:c}}))}.bind(this));return this},play:function(){return new Effect.Parallel(this.tracks.map(function(a){var d=a.get("ids"),c=a.get("effect"),b=a.get("options");var e=[$(d)||$$(d)].flatten();return e.map(function(f){return new c(f,Object.extend({sync:true},b))})}).flatten(),this.options)}});Element.CSS_PROPERTIES=$w("backgroundColor backgroundPosition borderBottomColor borderBottomStyle borderBottomWidth borderLeftColor borderLeftStyle borderLeftWidth borderRightColor borderRightStyle borderRightWidth borderSpacing borderTopColor borderTopStyle borderTopWidth bottom clip color fontSize fontWeight height left letterSpacing lineHeight marginBottom marginLeft marginRight marginTop markerOffset maxHeight maxWidth minHeight minWidth opacity outlineColor outlineOffset outlineWidth paddingBottom paddingLeft paddingRight paddingTop right textIndent top width wordSpacing zIndex");Element.CSS_LENGTH=/^(([\+\-]?[0-9\.]+)(em|ex|px|in|cm|mm|pt|pc|\%))|0$/;String.__parseStyleElement=document.createElement("div");String.prototype.parseStyle=function(){var b,a=$H();if(Prototype.Browser.WebKit){b=new Element("div",{style:this}).style}else{String.__parseStyleElement.innerHTML='<div style="'+this+'"></div>';b=String.__parseStyleElement.childNodes[0].style}Element.CSS_PROPERTIES.each(function(c){if(b[c]){a.set(c,b[c])}});if(Prototype.Browser.IE&&this.include("opacity")){a.set("opacity",this.match(/opacity:\s*((?:0|1)?(?:\.\d*)?)/)[1])}return a};if(document.defaultView&&document.defaultView.getComputedStyle){Element.getStyles=function(b){var a=document.defaultView.getComputedStyle($(b),null);return Element.CSS_PROPERTIES.inject({},function(c,d){c[d]=a[d];return c})}}else{Element.getStyles=function(b){b=$(b);var a=b.currentStyle,c;c=Element.CSS_PROPERTIES.inject({},function(d,e){d[e]=a[e];return d});if(!c.opacity){c.opacity=b.getOpacity()}return c}}Effect.Methods={morph:function(a,b){a=$(a);new Effect.Morph(a,Object.extend({style:b},arguments[2]||{}));return a},visualEffect:function(c,e,b){c=$(c);var d=e.dasherize().camelize(),a=d.charAt(0).toUpperCase()+d.substring(1);new Effect[a](c,b);return c},highlight:function(b,a){b=$(b);new Effect.Highlight(b,a);return b}};$w("fade appear grow shrink fold blindUp blindDown slideUp slideDown pulsate shake puff squish switchOff dropOut").each(function(a){Effect.Methods[a]=function(c,b){c=$(c);Effect[a.charAt(0).toUpperCase()+a.substring(1)](c,b);return c}});$w("getInlineOpacity forceRerendering setContentZoom collectTextNodes collectTextNodesIgnoreClass getStyles").each(function(a){Effect.Methods[a]=Element[a]});Element.addMethods(Effect.Methods);
// Combined /fileadmin/jslib/scriptaculous1.8.2/slider.js
if(!Control){var Control={}}Control.Slider=Class.create({initialize:function(d,a,b){var c=this;if(Object.isArray(d)){this.handles=d.collect(function(f){return $(f)})}else{this.handles=[$(d)]}this.track=$(a);this.options=b||{};this.axis=this.options.axis||"horizontal";this.increment=this.options.increment||1;this.step=parseInt(this.options.step||"1");this.range=this.options.range||$R(0,1);this.value=0;this.values=this.handles.map(function(){return 0});this.spans=this.options.spans?this.options.spans.map(function(e){return $(e)}):false;this.options.startSpan=$(this.options.startSpan||null);this.options.endSpan=$(this.options.endSpan||null);this.restricted=this.options.restricted||false;this.maximum=this.options.maximum||this.range.end;this.minimum=this.options.minimum||this.range.start;this.alignX=parseInt(this.options.alignX||"0");this.alignY=parseInt(this.options.alignY||"0");this.trackLength=this.maximumOffset()-this.minimumOffset();this.handleLength=this.isVertical()?(this.handles[0].offsetHeight!=0?this.handles[0].offsetHeight:this.handles[0].style.height.replace(/px$/,"")):(this.handles[0].offsetWidth!=0?this.handles[0].offsetWidth:this.handles[0].style.width.replace(/px$/,""));this.active=false;this.dragging=false;this.disabled=false;if(this.options.disabled){this.setDisabled()}this.allowedValues=this.options.values?this.options.values.sortBy(Prototype.K):false;if(this.allowedValues){this.minimum=this.allowedValues.min();this.maximum=this.allowedValues.max()}this.eventMouseDown=this.startDrag.bindAsEventListener(this);this.eventMouseUp=this.endDrag.bindAsEventListener(this);this.eventMouseMove=this.update.bindAsEventListener(this);this.handles.each(function(f,e){e=c.handles.length-1-e;c.setValue(parseFloat((Object.isArray(c.options.sliderValue)?c.options.sliderValue[e]:c.options.sliderValue)||c.range.start),e);f.makePositioned().observe("mousedown",c.eventMouseDown)});this.track.observe("mousedown",this.eventMouseDown);document.observe("mouseup",this.eventMouseUp);document.observe("mousemove",this.eventMouseMove);this.initialized=true},dispose:function(){var a=this;Event.stopObserving(this.track,"mousedown",this.eventMouseDown);Event.stopObserving(document,"mouseup",this.eventMouseUp);Event.stopObserving(document,"mousemove",this.eventMouseMove);this.handles.each(function(b){Event.stopObserving(b,"mousedown",a.eventMouseDown)})},setDisabled:function(){this.disabled=true},setEnabled:function(){this.disabled=false},getNearestValue:function(a){if(this.allowedValues){if(a>=this.allowedValues.max()){return(this.allowedValues.max())}if(a<=this.allowedValues.min()){return(this.allowedValues.min())}var c=Math.abs(this.allowedValues[0]-a);var b=this.allowedValues[0];this.allowedValues.each(function(d){var e=Math.abs(d-a);if(e<=c){b=d;c=e}});return b}if(a>this.range.end){return this.range.end}if(a<this.range.start){return this.range.start}return a},setValue:function(b,a){if(!this.active){this.activeHandleIdx=a||0;this.activeHandle=this.handles[this.activeHandleIdx];this.updateStyles()}a=a||this.activeHandleIdx||0;if(this.initialized&&this.restricted){if((a>0)&&(b<this.values[a-1])){b=this.values[a-1]}if((a<(this.handles.length-1))&&(b>this.values[a+1])){b=this.values[a+1]}}b=this.getNearestValue(b);this.values[a]=b;this.value=this.values[0];this.handles[a].style[this.isVertical()?"top":"left"]=this.translateToPx(b);this.drawSpans();if(!this.dragging||!this.event){this.updateFinished()}},setValueBy:function(b,a){this.setValue(this.values[a||this.activeHandleIdx||0]+b,a||this.activeHandleIdx||0)},translateToPx:function(a){return Math.round(((this.trackLength-this.handleLength)/(this.range.end-this.range.start))*(a-this.range.start))+"px"},translateToValue:function(a){return((a/(this.trackLength-this.handleLength)*(this.range.end-this.range.start))+this.range.start)},getRange:function(b){var a=this.values.sortBy(Prototype.K);b=b||0;return $R(a[b],a[b+1])},minimumOffset:function(){return(this.isVertical()?this.alignY:this.alignX)},maximumOffset:function(){return(this.isVertical()?(this.track.offsetHeight!=0?this.track.offsetHeight:this.track.style.height.replace(/px$/,""))-this.alignY:(this.track.offsetWidth!=0?this.track.offsetWidth:this.track.style.width.replace(/px$/,""))-this.alignX)},isVertical:function(){return(this.axis=="vertical")},drawSpans:function(){var a=this;if(this.spans){$R(0,this.spans.length-1).each(function(b){a.setSpan(a.spans[b],a.getRange(b))})}if(this.options.startSpan){this.setSpan(this.options.startSpan,$R(0,this.values.length>1?this.getRange(0).min():this.value))}if(this.options.endSpan){this.setSpan(this.options.endSpan,$R(this.values.length>1?this.getRange(this.spans.length-1).max():this.value,this.maximum))}},setSpan:function(b,a){if(this.isVertical()){b.style.top=this.translateToPx(a.start);b.style.height=this.translateToPx(a.end-a.start+this.range.start)}else{b.style.left=this.translateToPx(a.start);b.style.width=this.translateToPx(a.end-a.start+this.range.start)}},updateStyles:function(){this.handles.each(function(a){Element.removeClassName(a,"selected")});Element.addClassName(this.activeHandle,"selected")},startDrag:function(c){if(Event.isLeftClick(c)){if(!this.disabled){this.active=true;var d=Event.element(c);var e=[Event.pointerX(c),Event.pointerY(c)];var a=d;if(a==this.track){var b=Position.cumulativeOffset(this.track);this.event=c;this.setValue(this.translateToValue((this.isVertical()?e[1]-b[1]:e[0]-b[0])-(this.handleLength/2)));var b=Position.cumulativeOffset(this.activeHandle);this.offsetX=(e[0]-b[0]);this.offsetY=(e[1]-b[1])}else{while((this.handles.indexOf(d)==-1)&&d.parentNode){d=d.parentNode}if(this.handles.indexOf(d)!=-1){this.activeHandle=d;this.activeHandleIdx=this.handles.indexOf(this.activeHandle);this.updateStyles();var b=Position.cumulativeOffset(this.activeHandle);this.offsetX=(e[0]-b[0]);this.offsetY=(e[1]-b[1])}}}Event.stop(c)}},update:function(a){if(this.active){if(!this.dragging){this.dragging=true}this.draw(a);if(Prototype.Browser.WebKit){window.scrollBy(0,0)}Event.stop(a)}},draw:function(b){var c=[Event.pointerX(b),Event.pointerY(b)];var a=Position.cumulativeOffset(this.track);c[0]-=this.offsetX+a[0];c[1]-=this.offsetY+a[1];this.event=b;this.setValue(this.translateToValue(this.isVertical()?c[1]:c[0]));if(this.initialized&&this.options.onSlide){this.options.onSlide(this.values.length>1?this.values:this.value,this)}},endDrag:function(a){if(this.active&&this.dragging){this.finishDrag(a,true);Event.stop(a)}this.active=false;this.dragging=false},finishDrag:function(a,b){this.active=false;this.dragging=false;this.updateFinished()},updateFinished:function(){if(this.initialized&&this.options.onChange){this.options.onChange(this.values.length>1?this.values:this.value,this)}this.event=null}});
// Combined /fileadmin/jslib/widgets/scroller.js
var Scroller=Class.create();Scroller.ids={};Scroller.i=0;Scroller.prototype={initialize:function(a){this.outerBox=a;this.decorate()},decorate:function(){$(this.outerBox).makePositioned();Scroller.i=Scroller.i+1;this.myIndex=Scroller.i;this.innerBox=document.createElement("DIV");this.innerBox.className="scroll-innerBox";$(this.innerBox).makePositioned();this.innerBox.style.cssFloat=this.innerBox.style.styleFloat="left";this.innerBox.id="scroll-innerBox-"+Scroller.i;this.innerBox.style.top="0px";while(this.outerBox.hasChildNodes()){this.innerBox.appendChild(this.outerBox.firstChild)}this.innerBox.style.overflow="hidden";this.outerBox.style.overflow="hidden";this.track=document.createElement("div");this.track.className="scroll-track";$(this.track).makePositioned();this.track.style.cssFloat=this.track.style.styleFloat="left";this.track.id="scroll-track-"+Scroller.i;this.track.appendChild(document.createComment(""));this.tracktop=document.createElement("div");this.tracktop.className="scroll-track-top";$(this.tracktop).makePositioned();this.tracktop.style.cssFloat=this.tracktop.style.styleFloat="left";this.tracktop.id="scroll-track-top-"+Scroller.i;this.tracktop.appendChild(document.createComment(""));this.trackbot=document.createElement("div");this.trackbot.className="scroll-track-bot";$(this.trackbot).makePositioned();this.trackbot.style.cssFloat=this.trackbot.style.styleFloat="left";this.trackbot.id="scroll-track-bot-"+Scroller.i;this.trackbot.appendChild(document.createComment(""));this.handle=document.createElement("div");this.handle.className="scroll-handle-container";this.handle.id="scroll-handle-container"+Scroller.i;this.handle_middle=document.createElement("div");this.handle_middle.className="scroll-handle";$(this.handle_middle).makePositioned();this.handle_middle.id="scroll-handle-"+Scroller.i;this.handle_middle.appendChild(document.createComment(""));this.handletop=document.createElement("div");this.handletop.className="scroll-handle-top";$(this.handletop).makePositioned();this.handletop.id="scroll-handle-top-"+Scroller.i;this.handletop.appendChild(document.createComment(""));this.handlebot=document.createElement("div");this.handlebot.className="scroll-handle-bot";$(this.handlebot).makePositioned();this.handlebot.id="scroll-handle-bot-"+Scroller.i;this.handlebot.appendChild(document.createComment(""));this.track.hide();this.tracktop.hide();this.trackbot.hide();this.outerBox.appendChild(this.innerBox);this.outerBox.appendChild(this.tracktop);this.handle.appendChild(this.handletop);this.handle.appendChild(this.handle_middle);this.handle.appendChild(this.handlebot);this.track.appendChild(this.handle);this.outerBox.appendChild(this.track);this.outerBox.appendChild(this.trackbot);this.slider=new Control.Slider($(this.handle).id,$(this.track).id,{axis:"vertical",minimum:0,maximum:$(this.outerBox).clientHeight});this.slider.options.onSlide=this.slider.options.onChange=this.onChange.bind(this);window.setTimeout(this.resetScrollbar.bind(this,false),10);this.domMouseCB=this.MouseWheelEvent.bindAsEventListener(this,this.slider);this.mouseWheelCB=this.MouseWheelEvent.bindAsEventListener(this,this.slider);this.trackTopCB=this.tracktopEvent.bindAsEventListener(this,this.slider);this.trackBotCB=this.trackbotEvent.bindAsEventListener(this,this.slider);$(this.outerBox).observe("DOMMouseScroll",this.domMouseCB);$(this.outerBox).observe("mousewheel",this.mouseWheelCB);$(this.tracktop).observe("mousedown",this.trackTopCB);$(this.trackbot).observe("mousedown",this.trackBotCB)},release:function(){$(this.outerBox).stopObserving("DOMMouseScroll",this.domMouseCB);$(this.outerBox).stopObserving("mousewheel",this.mouseWheelCB);$(this.tracktop).stopObserving("mousedown",this.trackTopCB);$(this.trackbot).stopObserving("mousedown",this.trackBotCB)},resetScrollbar:function(b,e,h,c,d,i,l){var g,f,k,a,j;this.track.hide();this.tracktop.hide();this.trackbot.hide();this.enableScroll=false;this.innerHeight=e===undefined?$(this.outerBox).clientHeight:e;this.innerBox.style.height=this.innerHeight+"px";g=h===undefined?$(this.outerBox).clientWidth:h;j=c===undefined?this.innerBox.scrollHeight:c;f=d===undefined?Element.getStyle(this.tracktop,"height"):d;if(f){f=f.replace("px","")}else{f=0}k=i===undefined?Element.getStyle(this.handletop,"height"):i;if(k){k=k.replace("px","")}else{k=0}if(this.innerHeight<j){this.viewportHeight=this.innerHeight-f*2;this.scrollPercent=this.viewportHeight/j;this.slider.trackLength=this.viewportHeight;this.track.style.height=this.viewportHeight+"px";this.handleHeight=Math.round(this.viewportHeight*this.innerHeight/j);if(this.handleHeight<(k*2)){this.handleHeight=(k*2)}if(this.handleHeight<10){this.handleHeight=10}this.handle.style.height=this.handleHeight+"px";this.handle_middle.style.height=this.handleHeight-k*2+"px";this.handletop.style.height=k+"px";this.slider.handleLength=this.handleHeight;this.track.style.display="inline";this.tracktop.style.display="inline";this.trackbot.style.display="inline";this.ieDecreaseBy=1;if(this.outerBox.currentStyle){a=this.outerBox.currentStyle.borderWidth.replace("px","");if(!isNaN(a)){this.ieDecreaseBy=(a)*2}}var m=l===undefined?$(this.track).clientWidth:l;g=(g-m-this.ieDecreaseBy);this.enableScroll=true}this.innerBox.style.width=g+"px";if(b){window.setTimeout(this.resetScrollbar.bind(this,false),10)}},MouseWheelEvent:function(b,a){var c=0;if(!b){b=window.event}if(b.wheelDelta){c=b.wheelDelta/120}else{if(b.detail){c=-b.detail/3}}if(c){a.setValueBy(-c/(this.innerBox.scrollHeight-this.innerBox.offsetHeight)*40)}Event.stop(b)},trackbotEvent:function(b,a){if(Event.isLeftClick(b)){a.setValueBy(this.scrollPercent);Event.stop(b)}},tracktopEvent:function(b,a){if(Event.isLeftClick(b)){a.setValueBy(-this.scrollPercent);Event.stop(b)}},onChange:function(a){if(this.enableScroll){this.innerBox.scrollTop=Math.round(a*(this.innerBox.scrollHeight-this.innerBox.offsetHeight))}}};Scroller.setAll=function(){$$(".makeScroll").each(function(a){Scroller.ids[a.id]=new Scroller(a)})};Scroller.reset=function(a){if($(a).className.match(new RegExp("(^|\\s)makeScroll(\\s|$)"))){if(Scroller.ids[a]){Scroller.ids[a].release()}Scroller.ids[a]=new Scroller($(a))}};Scroller.updateAll=function(){$H(Scroller.ids).each(function(a){Scroller.ids[a.key].resetScrollbar(true)})};
// Combined /fileadmin/jslib/widgets/HTMLCombo.js
var HTMLCombo=Class.create({displayElement:null,formElement:null,comboElement:null,listItems:null,renderedItems:[],listContainer:null,itemRenderer:null,displayRenderer:null,highlightRenderer:null,mouseEnabled:false,selectedIndex:null,scrollToTop:false,showingContainer:false,initialize:function(g,e,h,c,a,i,j,f,b,d){this.comboElement=g;this.displayElement=e;this.formElement=h;this.listItems=c;this.itemRenderer=i;this.displayRenderer=j;this.highlightRenderer=f;this.fitToContent=b;this.listContainer=this.createContainer(this.comboElement,a,d);this.renderedItems=this.renderListItems(this.listItems,i,this.listContainer);if(b){this.fitListContainerToContent()}this.setupEventHandlers()},fitListContainerToContent:function(){if(this.calculatedHeight===null){this.calculatedHeight=0;for(var a=0;a<this.renderedItems.length;a=a+1){this.calculatedHeight+=this.renderedItems[a].getHeight()}Element.setStyle(this.listContainer,{height:this.calculatedHeight+"px"})}},getValue:function(){return this.formElement.getValue()},setValue:function(c){var b,a;for(a=0;a<this.listItems.length;a=a+1){b=this.listItems[a];if(b.value===c){this.selectedIndex=a;this.formElement.setValue(b.value);this.displayRenderer(this,b);break}}},getDisplayValue:function(){return this.displayElement.getValue()},setDisplayValue:function(a){if(this.displayElement.setValue){this.displayElement.setValue(a)}else{this.displayElement.update(a)}},isMouseEnabled:function(){return this.mouseEnabled},selectListElement:function(){var a,b;this.displayRenderer(this,this.listItems[this.selectedIndex]);a=this.formElement.getValue();b=this.listItems[this.selectedIndex].value;this.formElement.setValue(b);this.hideContainer();this.displayElement.focus();if(a!==b){this.onChange()}},setContainerPosition:function(a,b){if(a==="left"){this.listContainer.setStyle({left:b+"px"})}else{if(a==="top"){this.listContainer.setStyle({top:b+"px"})}}},setSelectedIndex:function(a){this.selectedIndex=a},onChange:function(){},setScrollToTop:function(a){this.scrollToTop=a},updateListItems:function(a){this.listItems=a;this.listContainer.childElements().each(function(b){b.remove()});this.renderedItems=this.renderListItems(this.listItems,this.itemRenderer,this.listContainer.firstDescendant())},insertListItem:function(a,b){this.listItems.splice(a,0,b);var c=this.itemRenderer(this,b,a);this.renderedItems.splice(a,0,c);this.listContainer.childElements()[a].insert({before:c})},removeListItem:function(a){this.listItems.splice(a,1);this.renderedItems.splice(a,1);this.listContainer.childElements()[a].remove()},renderListItems:function(c,b,e){var a,d;a=0;d=[];this.listItems.each(function(f){var g=b(this,f,a);if(g.style.display===""){g.fastVisible=true}else{g.fastVisible=false}d.push(g);e.appendChild(g);a=a+1}.bind(this));return d},createContainer:function(e,d,b){var a,c;a=e.positionedOffset()[0];c=e.positionedOffset()[1]+e.offsetHeight-1;d.id=e.id+"_list_container";d.style="display: none; position: absolute; top: "+c+"px; left: "+a+"px;";if(!b){b=$$("body")[0]}b.insert({top:new Element("div",d)});return $(d.id)},showContainer:function(){this.listContainer.show();if(this.selectedIndex!==null){this.highlightRenderer(this.renderedItems[this.selectedIndex],true)}if(this.scrollToTop||this.selectedIndex===null){this.updateScrollTop(0);this.scrollToTop=false}else{this.updateScrollTop(this.renderedItems[this.selectedIndex].offsetTop-this.renderedItems[this.selectedIndex].offsetHeight)}},hideContainer:function(){if(this.listContainer.visible()){this.listContainer.hide();this.displayElement.focus()}},keyUpHandler:function(a){if(this.listContainer.visible()||a.findElement()===this.displayElement){switch(a.keyCode){case Event.KEY_TAB:this.showContainer();break;case Event.KEY_ESC:this.hideContainer();break;case Event.KEY_PAGEDOWN:Event.stop(a);break;case Event.KEY_PAGEUP:Event.stop(a);break}}},keyDownHandler:function(a){if(this.listContainer.visible()||a.findElement()===this.displayElement){switch(a.keyCode){case Event.KEY_RETURN:this.selectListElement();this.displayElement.fire("htmlCombo:key_return");break;case Event.KEY_TAB:this.selectListElement();break;case Event.KEY_UP:this.mouseEnabled=false;this.move("single","up");Event.stop(a);break;case Event.KEY_DOWN:this.mouseEnabled=false;this.move("single","down");Event.stop(a);break;case Event.KEY_PAGEUP:this.mouseEnabled=false;this.move("page","up");Event.stop(a);break;case Event.KEY_PAGEDOWN:this.mouseEnabled=false;this.move("page","down");Event.stop(a);break;case Event.KEY_HOME:this.mouseEnabled=false;this.move("max","up");Event.stop(a);break;case Event.KEY_END:this.mouseEnabled=false;this.move("max","down");Event.stop(a);break}}},keyPressHandler:function(a){if(this.listContainer.visible()||a.findElement()===this.displayElement){switch(a.keyCode){case Event.KEY_UP:case Event.KEY_DOWN:case Event.KEY_PAGEUP:case Event.KEY_PAGEDOWN:case Event.KEY_HOME:case Event.KEY_END:Event.stop(a)}}},move:function(a,b){if(!this.listContainer.visible()){this.showContainer();if(this.selectedIndex!==null){this.highlightRenderer(this.renderedItems[this.selectedIndex],true)}return}if(this.selectedIndex!==null){this.highlightRenderer(this.renderedItems[this.selectedIndex],false)}this.selectedIndex=this.getNextPosition(a,b);if(this.selectedIndex!==null){this.highlightRenderer(this.renderedItems[this.selectedIndex],true)}if(b==="down"){this.scrollToSelectedPosition("bottom")}else{this.scrollToSelectedPosition("top")}},getNextPosition:function(b,d){var a,c;a=this.getVisibleListItems(b,d);if(a.length===0){return null}if(this.selectedIndex===null){c=0}else{if(b==="single"){c=1}else{if(b==="page"){c=Math.round((this.listContainer.offsetHeight/this.renderedItems[a[0]].offsetHeight))||0}else{c=a.length-1}}}if(c>=a.length){c=a.length-1}return a[c]},getVisibleListItems:function(b,e){var a,d,c;a=[];d=(b==="single");if(this.selectedIndex===null){for(c=0;c<this.renderedItems.length;c=c+1){if(this.renderedItems[c].style.display===""&&this.listItems[c].value!==undefined){a.push(c);if(d&&a.length>1){break}}}}else{if(e==="down"){for(c=this.selectedIndex;c<this.renderedItems.length;c=c+1){if(this.renderedItems[c].style.display===""&&this.listItems[c].value!==undefined){a.push(c);if(d&&a.length>1){break}}}}else{for(c=this.selectedIndex;c>=0;c=c-1){if(this.renderedItems[c].style.display===""&&this.listItems[c].value!==undefined){a.push(c);if(d&&a.length>1){break}}}}}return a},scrollToSelectedPosition:function(d){var f,e,g,b,a,c;if(this.selectedIndex!==null){f=this.renderedItems[this.selectedIndex];e=f.offsetTop;g=e+f.offsetHeight;b=this.listContainer.offsetHeight;a=this.getScrollableComponent().scrollTop;c=a+b;if(d==="top"){if(e<a||e>c){this.updateScrollTop(e)}}else{if(g<a||g>c){this.updateScrollTop(g-b)}}}},updateScrollTop:function(a){this.listContainer.scrollTop=a},getScrollableComponent:function(){return this.listContainer},mouseOver:function(a){if(this.mouseEnabled){if(this.selectedIndex!==null){this.highlightRenderer(this.renderedItems[this.selectedIndex],false)}this.highlightRenderer(this.renderedItems[a],true);this.selectedIndex=a}},setupEventHandlers:function(){this.listContainer.observe("mousemove",function(){this.mouseEnabled=true}.bind(this));this.comboElement.observe("mousedown",function(a){if(!this.listContainer.visible()){this.showContainer();this.showingContainer=true}else{this.hideContainer()}}.bindAsEventListener(this));Event.observe(document,"keyup",this.keyUpHandler.bindAsEventListener(this));Event.observe(document,"keydown",this.keyDownHandler.bindAsEventListener(this));Event.observe(document,"keypress",this.keyPressHandler.bindAsEventListener(this));Event.observe(document,"mousedown",function(a){if(this.showingContainer||!this.listContainer.visible()){this.showingContainer=false;return}var b=a.findElement();if(b!==this.listContainer&&!b.descendantOf(this.listContainer)&&!b.descendantOf(this.comboElement)){this.hideContainer()}}.bind(this))}});
// Combined /fileadmin/jslib/widgets/SearchHTMLCombo.js
var SearchHTMLCombo=Class.create(HTMLCombo,{searchCallback:null,KEY:{SHIFT:16,CAPSLOCK:20,CTRL:17,ALT:18,BREAK:19,NUMLOCK:144,SCRLOCK:145,LWIN:91,RWIN:92,SEL:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123},initialize:function($super,g,d,h,c,a,i,j,f,k,b,e){$super(g,d,h,c,a,i,j,f,b,e);this.searchCallback=k;this.escape_deselects=false;g.observe("mouseup",function(l){this.displayElement.select()}.bind(this))},keyUpHandler:function(b){if(this.listContainer.visible()||b.findElement()===this.displayElement){var a=this.KEY;switch(b.keyCode){case Event.KEY_TAB:this.showContainer();break;case Event.KEY_ESC:if(this.escape_deselects){this.selectedIndex=null}this.hideContainer();break;case Event.KEY_UP:case Event.KEY_DOWN:case Event.KEY_RETURN:case Event.KEY_HOME:case Event.KEY_END:case Event.KEY_LEFT:case Event.KEY_RIGHT:case Event.KEY_PAGEUP:case Event.KEY_PAGEDOWN:case Event.KEY_INSERT:case a.SHIFT:case a.CAPSLOCK:case a.NUMLOCK:case a.SCRLOCK:case a.CTRL:case a.ALT:case a.BREAK:case a.LWIN:case a.RWIN:case a.SEL:case a.F1:case a.F2:case a.F3:case a.F4:case a.F5:case a.F6:case a.F7:case a.F8:case a.F9:case a.F10:case a.F11:case a.F12:break;default:if(b.findElement()!==this.displayElement){break}this.filterListElements();break}}},keyDownHandler:function(b){if(this.listContainer.visible()||b.findElement()===this.displayElement){var a=this.KEY;switch(b.keyCode){case Event.KEY_RETURN:this.selectListElement();this.displayElement.fire("htmlCombo:key_return");Event.stop(b);break;case Event.KEY_TAB:this.selectListElement();break;case Event.KEY_UP:this.mouseEnabled=false;this.move("single","up");Event.stop(b);break;case Event.KEY_DOWN:this.mouseEnabled=false;this.move("single","down");Event.stop(b);break;case Event.KEY_PAGEUP:this.mouseEnabled=false;this.move("page","up");Event.stop(b);break;case Event.KEY_PAGEDOWN:this.mouseEnabled=false;this.move("page","down");Event.stop(b);break;case Event.KEY_HOME:this.mouseEnabled=false;this.move("max","up");Event.stop(b);break;case Event.KEY_END:this.mouseEnabled=false;this.move("max","down");Event.stop(b);break;case a.SHIFT:case a.CAPSLOCK:case a.NUMLOCK:case a.SCRLOCK:case a.CTRL:case a.ALT:case a.BREAK:case a.LWIN:case a.RWIN:case a.SEL:case a.F1:case a.F2:case a.F3:case a.F4:case a.F5:case a.F6:case a.F7:case a.F8:case a.F9:case a.F10:case a.F11:case a.F12:break;default:this.displayElement.fire("searchHtmlCombo:keyInput")}}},filterListElements:function(){if(!this.listContainer.visible()){this.showContainer()}if(this.selectedIndex!==null){this.highlightRenderer(this.renderedItems[this.selectedIndex],false)}this.updateScrollTop(0);this.searchCallback(this);this.displayElement.fire("searchHtmlCombo:filtered")},resetRenderedItemsVisiblity:function(){var a;this.renderedItems.each(function(b){a=b.fastVisible===undefined?b.style.display!=="none":b.fastVisible;if(!a){b.style.display="";b.fastVisible=true}}.bind(this))},showContainer:function($super){this.resetRenderedItemsVisiblity();$super();this.displayElement.fire("searchHtmlCombo:showContainer")},hideContainer:function($super){if(!this.listContainer.visible()){return}this.highlightRenderer(this.renderedItems[this.selectedIndex],false);$super();this.setValue(this.formElement.getValue());this.displayElement.fire("searchHtmlCombo:hideContainer")}});
// Combined /fileadmin/jslib/widgets/ScrollerSearchHTMLCombo.js
var ScrollerSearchHTMLCombo=Class.create(SearchHTMLCombo,{scroller:null,containerDimensions:null,initialize:function($super,g,d,h,c,a,i,j,f,k,b,e){$super(g,d,h,c,a,i,j,f,k,b,e);this.scroller=new Scroller(this.listContainer);this.containerDimensions=this.listContainer.getDimensions();this.displayElement.observe("searchHtmlCombo:filtered",function(){this.scroller.resetScrollbar(false,this.containerDimensions.height,this.containerDimensions.width,this.calculateScrollableHeight(),this.fastTth,this.fastHth,this.fastTrackWidth)}.bind(this))},calculateScrollableHeight:function(){var c=0;for(var b=0;b<this.renderedItems.length;b++){var d=this.renderedItems[b].fastVisible;if(d===undefined){d=this.renderedItems[b].style.display===""}if(d){var a=this.renderedItems[b].fastHeight;if(a===undefined||a===""){a=this.renderedItems[b].getHeight()}c+=a}}return c},showContainer:function($super){$super();this.scroller.resetScrollbar(false,this.containerDimensions.height,this.containerDimensions.width,this.calculateScrollableHeight(),this.fastTth,this.fastHth,this.fastTrackWidth)},getScrollableComponent:function(){return this.scroller.innerBox},updateScrollTop:function(b){var a=this.calculateScrollableHeight()-this.containerDimensions.height;if(a>0){this.scroller.slider.setValue(b/(a))}},updateListItems:function(a){this.listItems=a;this.listContainer.firstDescendant().childElements().each(function(b){b.remove()});this.renderedItems=this.renderListItems(this.listItems,this.itemRenderer,this.listContainer.firstDescendant())},insertListItem:function(a,b){this.listItems.splice(a,0,b);var c=this.itemRenderer(this,b,a);this.renderedItems.splice(a,0,c);this.listContainer.firstDescendant().childElements()[a].insert({before:c})},removeListItem:function(a){this.listItems.splice(a,1);this.renderedItems.splice(a,1);this.listContainer.firstDescendant().childElements()[a].remove()}});
// Combined /fileadmin/jslib/fxgt/ajax_sanitize.js
function sanitizeString(a){if(a==null){return null}return a.replace(/</g,"&lt;").replace(/>/g,"&gt;")}function recursiveObjectStringSanitize(e){if(e==null){return}for(var d in e){var a=typeof(e[d]);if(a=="string"){e[d]=sanitizeString(e[d])}else{if(a=="object"){if(Object.prototype.toString.apply(e[d])==="[object Array]"){for(var c=0;c<e[d].length;c++){var b=typeof(e[d][c]);if(b=="string"){e[d][c]=sanitizeString(e[d][c])}else{recursiveObjectStringSanitize(e[d][c])}}}else{recursiveObjectStringSanitize(e[d])}}}}}function callAjax(b,d){var a={};for(var c in d){a[c]=d[c]}if(d.onSuccess){a.onSuccess=function(e){jsonObject=String(e.responseText).evalJSON();recursiveObjectStringSanitize(jsonObject);d.onSuccess(jsonObject)}}new Ajax.Request(b,a)};
// Combined /fileadmin/jslib/fxgt/fxgt_currencies.js
var FXGT_currency_longname={AUD:"Australian Dollar",CAD:"Canadian Dollar",CHF:"Swiss Franc",EUR:"Euro",GBP:"British Pound",JPY:"Japanese Yen",USD:"US Dollar",HKD:"Hong Kong Dollar",SGD:"Singapore Dollar",NOK:"Norwegian Kroner",SEK:"Swedish Krona",CZK:"Czech Koruna",DKK:"Danish Krone",HUF:"Hungarian Forint",INR:"Indian Rupee",MXN:"Mexican Peso",NZD:"New Zealand Dollar",PLN:"Polish Zloty",SAR:"Saudi Riyal",THB:"Thai Baht",TRY:"Turkish New Lira",ZAR:"South African Rand"};var FXGT_srcCurrencies=["AUD","CAD","CHF","EUR","GBP","JPY","USD"];var FXGT_dstCurrencies=$H({"Tier 1":["EUR","GBP","USD","JPY","AUD","CAD","CHF","NOK","SEK"],"Tier 2":["CZK","DKK","HKD","HUF","INR","MXN","NZD","PLN","SAR","SGD","THB","TRY","ZAR"]});var FXGT_fees={"Tier 1":{amount:"25",base:"USD"},"Tier 2":{amount:"25",base:"USD"}};function FXGT_get_tier(b){b=b.toUpperCase();var a=undefined;FXGT_dstCurrencies.keys().each(function(c){if(FXGT_dstCurrencies.get(c).indexOf(b)>=0){a=c;throw $break}});return a}function FXGT_get_fee(b){var a=FXGT_get_tier(b);var c=a?FXGT_fees[a]:undefined;return c};
// Combined /fileadmin/jslib/fxgt/calc/calc_data.js
var month=new Array(12);month[0]="January";month[1]="February";month[2]="March";month[3]="April";month[4]="May";month[5]="June";month[6]="July";month[7]="August";month[8]="September";month[9]="October";month[10]="November";month[11]="December";
// Combined /fileadmin/jslib/fxgt/calc/calc_functions.js
var dropdownAmt;Event.observe(window,"load",initialize,false);function initialize(){fixLayout();observeEvents()}function observeEvents(){document.observe("htmlCombo:key_return",function(a){if(a.target.id==="convertCurrency"){$("sendCurrency").focus();$("sendCurrency").select()}else{if(a.target.id==="sendCurrency"){$("amountQuote").focus();$("amountQuote").select()}}updateAmountBox($F("convertCurrency"),$F("sendCurrency"))})}Effect.SlideLeftIn=function(b){b=$(b).cleanWhitespace();if(!b.effectOn){b.effectOn=true;var a=b.getDimensions();var c=Number(b.getStyle("left").replace("px",""));return new Effect.Parallel([new Effect.Move(b,Object.extend({x:-(a.width),sync:true,mode:"relative",afterSetup:function(d){d.element.show()},beforeStartInternal:function(d){if(window.opera){d.element.setStyle({left:""})}d.element.setStyle({left:""+(c+a.width)+"px"})}},arguments[1]||{})),new Effect.Scale(b,100,Object.extend({scaleContent:false,sync:true,scaleY:false,scaleFrom:window.opera?0:1},arguments[1]||{}))],Object.extend({beforeSetup:function(d){d.effects[0].element.makeClipping()},afterFinishInternal:function(d){},afterFinish:function(d){d.effects[0].element.effectOn=false},duration:0.8},arguments[1]||{}))}};Effect.SlideRightOut=function(a){a=$(a).cleanWhitespace();return new Effect.Parallel([new Effect.Move(a,{x:a.getWidth(),sync:true,mode:"relative"}),new Effect.Scale(a,window.opera?0:1,{sync:true,scaleContent:false,scaleY:false,scaleFrom:100,restoreAfterFinish:true})],Object.extend({beforeSetup:function(b){b.effects[0].element.makeClipping()},afterFinishInternal:function(b){b.effects[0].element.undoClipping().hide()},duration:0.8},arguments[1]||{}))};function closeQuoteBox(){Effect.SlideRightOut("live_quote_box");if(detectedIE6()&&$("feeCurr")){$("feeCurr").show()}}function on_convert(a){if(a){$("convert_btn").setStyle({backgroundImage:"url('/fileadmin/images/fxgt/calc/btn_convert_over.gif')"})}else{$("convert_btn").setStyle({backgroundImage:"url('/fileadmin/images/fxgt/calc/btn_convert_reg.gif')"})}}function mouseOverCloseButton(a){if(a){$("close_triangle").setStyle({backgroundImage:"url('/fileadmin/images/fxgt/calc/btn_triangle_over.gif')"})}else{$("close_triangle").setStyle({backgroundImage:"url('/fileadmin/images/fxgt/calc/btn_triangle_reg.gif')"})}}function validConvertCurrency(){var a=false;FXGT_srcCurrencies.each(function(b){if($F("convertCurrency")===b){a=true;throw $break}});return a}function validSendCurrency(){var a=false;FXGT_dstCurrencies.keys().each(function(b){if(FXGT_dstCurrencies.get(b).indexOf($F("sendCurrency"))>=0){a=true;throw $break}});return a}function calculate_quote(){var d=$("quote_currency_input_error");var c=$F("convertCurrency");var f=$F("sendCurrency");var b=$F("amountQuote");var g=$("amountQuote");if(!$("preload_txt").visible()){$("preload_image").show();$("preload_txt").show();$("preload_txt_error").hide()}if(c&&validConvertCurrency()&&validSendCurrency()&&f){if(b){b=g.value.replace(/[,\sa-zA-z]/g,"");b=parseFloat(b);g.value=b}if(!b||isNaN(b)||b<=0){g.value="0";g.select();if(!d.visible()){var e=Number($("quote_currency_click_target_list_container").getStyle("top").replace("px",""));dropdownAmt.setContainerPosition("top",e+16)}d.update("Enter a valid amount.");d.show();return}if(d.visible()){d.hide();var e=Number($("quote_currency_click_target_list_container").getStyle("top").replace("px",""));dropdownAmt.setContainerPosition("top",e-16)}if(!$("live_quote_box").visible()){if(detectedIE6()&&$("feeCurr")){$("feeCurr").hide()}if(window.opera){$("live_quote_box").show()}else{Effect.SlideLeftIn("live_quote_box")}}toggleQuoteBox(1);var a="/cgi/fxgt_calculator.fpl";callAjax(a,{method:"post",parameters:{base:c,quote:f},onSuccess:function(o){if(o.e){$("preload_image").hide();$("preload_txt").hide();$("preload_txt_error").update(o.e);$("preload_txt_error").show()}else{var s=FXGT_get_fee(f);s.amount=o.fee;var l=new Date();l.setTime(o.ts*1000);$("currencies_convert_to").update(f);$("currencies_convert_from").update(c);var p=$("currency_code").innerHTML;$("currencies_convert_to").update(f);$("send_iso_code").update(f);$("currencies_convert_from").update(c);$("convert_iso_code").update(c);$("fee_unit").update(c);$("quote_unit").update(c);var k=splitNum(b,2);$("fee_label").update(s.amount);$("fee_label_unit").update(s.base);if(p===f){$("send_currency").update(commaFormatted(k[0]));$("send_currency_cents").update(padZero(k[1]));var m=splitNum(1/String(o.rate),5);$("rate_base").update(m[0]);$("rate_decimal").update(m[1]);setRateMargin(m[1]);var q=Number(s.amount)/Number(o.rateFee);var i=splitNum(q,2);$("fee").update(commaFormatted(i[0]));$("fee_cents").update(padZero(i[1]));var n=splitNum(b*Number(m[0]+"."+m[1]),2);$("convert_currency").update(commaFormatted(n[0]));$("convert_currency_cents").update(padZero(n[1]))}else{$("convert_currency").update(commaFormatted(k[0]));$("convert_currency_cents").update(padZero(k[1]));var m=splitNum(String((1/o.rate)),5);$("rate_base").update(m[0]);$("rate_decimal").update(m[1]);setRateMargin(m[1]);var q=Number(s.amount)/Number(o.rateFee);var i=splitNum(q,2);$("fee").update(commaFormatted(i[0]));$("fee_cents").update(padZero(i[1]));var n=splitNum(b/Number(m[0]+"."+m[1]),2);$("send_currency").update(commaFormatted(n[0]));$("send_currency_cents").update(padZero(n[1]))}if(f===c){$("rate_base").update("1");$("rate_decimal").update("0000");setRateMargin("0000")}var h=Number($("convert_currency").innerHTML.replace(/,/g,"")+"."+$("convert_currency_cents").innerHTML);var j=h+q;j=splitNum(j,2);$("pay_total").update(commaFormatted(j[0]));$("pay_total_cents").update(padZero(j[1]));var r=(l.getTimezoneOffset()/60)*(-1)+"";if(r.length==2){r=r.charAt(0)+"0"+r.charAt(1)}$("quote_timezone").update("GMT/UTC "+r+":00");$("quote_datetime").update(month[l.getMonth()]+" "+l.getDate()+" "+l.getHours()+":"+l.getMinutes()+":"+l.getSeconds()+" "+l.getUTCFullYear()+" ");toggleQuoteBox(0)}},on500:function(h){}})}}function setRateMargin(b){var a=["12px","20px"];if(navigator.appName==="Microsoft Internet Explorer"&&parseFloat(navigator.appVersion)===4&&!window.XMLHttpRequest){a[0]="8px";a[1]="12px"}if(b.length==4){$("rate_decimal").setStyle({marginRight:a[0]})}else{if(b.length==3){$("rate_decimal").setStyle({marginRight:a[1]})}else{$("rate_decimal").setStyle({marginRight:""})}}}function padZero(a){if(a==null){return"00"}else{if(a.length>=2){return a}else{return a+"0"}}}function FXGT_quote_big_direction(a,b){if(($("currency_code").innerHTML)===$F("convertCurrency")){return a}else{if(($("currency_code").innerHTML)===$F("sendCurrency")){return b}}}function FXGT_quote_big_rate(a){return FXGT_quote_big_direction(a,parseFloat(1/a))}function splitNum(d,a){var c=d.toString().split(".");var e=Math.pow(10,a);if(c[1]!=null&&c[1].length>2){var b=(String(Math.round(Number("0."+c[1])*e)/e)).split(".");c[1]=b[1];c[0]=Number(c[0])+Number(b[0])}c[1]=padZero(c[1]);return c}function toggleQuoteBox(a){if(a){$("box_middle").hide();$("box_middle_loading").show()}else{$("box_middle_loading").hide();$("box_middle").show()}}function commaFormatted(b){var c="";var a=String(b);while(a.length>3){c=a.substring(a.length-3,a.length)+c;a=a.substring(0,a.length-3);if(a.length>0){c=","+c}}c=a+c;return c}function updateAmountBox(d,c){var a=[];a.push({value:d,search:"",display:d});a.push({value:c,search:"",display:c});if($("quote_currency_click_target_list_container")!==null){$("quote_currency_click_target_list_container").remove()}dropdownAmt=new AmountDropdown().create($("quote_currency_click_target"),$("currency_code"),$("txtboxinput3"),$("quote_currency_click_target"),a,3,"currency_list_amt",0);var b=$("calc_body").getStyle("paddingLeft").replace("px","");dropdownAmt.setContainerPosition("left",b);$("currency_code").update(c);$("txtboxinput3").value=c}function submitenter(f,d,c){var a;if(window.event){a=window.event.keyCode}else{if(d){a=d.which}else{return true}}if(a==13){if(c){var b=new Function(c);b()}else{f.form.submit()}return false}else{return true}}function fixLayout(){var e=$("left");var b=$("live_quote_box");if(b!==null){var c=$("calculator").positionedOffset();if(e!==null){var f=e.getHeight();var a=e.positionedOffset();var d=c[1]-a[1]-3;e.setStyle({height:f+"px"});if(detectedIE6()){$("live_quote_box").setStyle({top:(d+19)+"px",left:"460px"})}else{if(detectedIE7()){$("live_quote_box").setStyle({top:(c[1]-184)+"px",left:"460px"})}else{$("live_quote_box").setStyle({top:(c[1]-184)+"px",left:"460px"})}}}else{if(detectedIE6()){$("live_quote_box").setStyle({top:"123px",left:"10px"})}else{if(detectedIE7()){$("live_quote_box").setStyle({top:"16px",left:"10px"})}else{$("live_quote_box").setStyle({top:"18px",left:"10px"})}}}}}function detectedIE7(){if(navigator.appVersion.indexOf("MSIE 7.")===-1){return false}else{return true}}function detectedIE6(){if(navigator.appName==="Microsoft Internet Explorer"&&parseFloat(navigator.appVersion)===4&&!window.XMLHttpRequest){return true}else{return false}}function init(){if($("calculator")===null){return}var c=[];var a;var b=FXGT_srcCurrencies.length;for(a=0;a<b;a=a+1){c.push({value:FXGT_srcCurrencies[a],search:FXGT_currency_longname[FXGT_srcCurrencies[a]]+" "+FXGT_srcCurrencies[a],display:FXGT_currency_longname[FXGT_srcCurrencies[a]]+" ("+FXGT_srcCurrencies[a]+")"})}var d=[];FXGT_dstCurrencies.each(function(e){d.push({value:undefined,label:"yes",search:"",display:e.key});b=e.value.length;for(a=0;a<b;a=a+1){d.push({value:e.value[a],search:FXGT_currency_longname[e.value[a]]+" "+e.value[a],display:FXGT_currency_longname[e.value[a]]+" ("+e.value[a]+")"})}});new CurrencyConverter().create($("quote_currency"),$("convertCurrency"),$("txtboxinput"),$("quote_currency_container"),c,1,"currency_list",6);new CurrencyConverter().create($("quote_currency2"),$("sendCurrency"),$("txtboxinput2"),$("quote_currency2_container"),d,2,"currency_list",1);updateAmountBox($F("convertCurrency"),$F("sendCurrency"))};
// Combined /fileadmin/jslib/fxgt/calc/calc_dropdown.js
var CurrencyConverter=Class.create({currencyListContainerAttributes:null,initialize:function(){this.currencyListContainerAttributes={}},create:function(j,i,k,g,e,h,d,b){var c;var f;switch(h){case 1:c=this.itemSelectedDisplayRendererConvert;f=this.listItemRendererConvert;break;case 2:c=this.itemSelectedDisplayRendererTo;f=this.listItemRendererTo;break;case 3:c=this.itemSelectedDisplayRenderer;f=this.listItemRenderer;break;default:}this.currencyListContainerAttributes={"class":d};var a=new ScrollerSearchHTMLCombo(j,i,k,e,this.currencyListContainerAttributes,f,c,this.itemHighlightDisplayRenderer,this.searchCallback,false,g);a.setSelectedIndex(b);return a},listItemRendererConvert:function(e,d,a){var g=document.createElement("div");var c="currency_list_item";var b=a;g.fastVisible=true;g.fastHeight=15;if(d.label==="yes"){c+=" currency_list_item_heading";b=b+1}g.className=c;var f=new Element("span",{}).update(d.display);f.id="convert_currency_item_"+a;g.appendChild(f);g.onmouseover=function(){e.mouseOver(b)};g.onclick=function(){e.selectListElement();$("currency_code").update(d.value);updateAmountBox(d.value,$("sendCurrency").value)};return g},listItemRendererTo:function(e,d,a){var g=document.createElement("div");var c="currency_list_item";var b=a;g.fastVisible=true;g.fastHeight=19;if(d.label==="yes"){c="currency_list_item_heading label";b=b+1;g.fastHeight=25}g.className=c;var f=new Element("span",{}).update(d.display);f.id="to_send_currency_item_"+a;g.appendChild(f);g.onmouseover=function(){e.mouseOver(b)};if(d.label!=="yes"){g.onclick=function(){e.selectListElement();updateAmountBox($("convertCurrency").value,d.value);$("amountQuote").focus()}}return g},itemSelectedDisplayRendererConvert:function(b,a){if(b&&a){b.setDisplayValue(a.value)}else{b.setDisplayValue("USD")}},itemSelectedDisplayRendererTo:function(b,a){if(b&&a){b.setDisplayValue(a.value)}else{b.setDisplayValue("EUR")}},itemHighlightDisplayRenderer:function(b,a){if(a){Element.addClassName(b,"list_item_hover")}else{Element.removeClassName(b,"list_item_hover")}},searchCallback:function(c){if(c.beforeSearch){return}var a=0;var d=false;var b=c.displayElement.getValue().toLowerCase();b=b.replace(/^[ ]*/,"");b=b.replace(/[ ]*$/,"");c.listItems.each(function(g){var f=g.search.toLowerCase();f=f.split(",");var h=false;for(var e=0;e<f.length;e++){if(f[e].indexOf(b)>=0){h=true;break}}if(!h){c.renderedItems[a].style.display="none";c.renderedItems[a].fastVisible=false}else{c.renderedItems[a].style.display="";c.renderedItems[a].fastVisible=true;if(!d&&!Element.hasClassName(c.renderedItems[a],"label")){d=true;c.selectedIndex=a;c.highlightRenderer(c.renderedItems[c.selectedIndex],true)}}a++})}});var AmountDropdown=Class.create({currencyListContainerAttributes:null,initialize:function(){this.currencyListContainerAttributes={}},create:function(h,g,i,e,d,f,c,b){this.currencyListContainerAttributes={"class":c};var a=new HTMLCombo(h,g,i,d,this.currencyListContainerAttributes,this.listItemRenderer,this.itemSelectedDisplayRenderer,this.itemHighlightDisplayRenderer,false,e);a.setSelectedIndex(b);return a},itemSelectedDisplayRenderer:function(b,a){if(b&&a){b.setDisplayValue(a.value)}else{b.setDisplayValue("")}},listItemRenderer:function(e,d,a){var g=document.createElement("div");var c="currency_list_item";var b=a;g.className=c;var f=new Element("span",{}).update(d.display);f.id="amount_currency_code_item_"+a;g.appendChild(f);g.onmouseover=function(){e.mouseOver(b)};g.onclick=function(){e.selectListElement()};g.onmousedown=function(){e.selectListElement()};return g},itemHighlightDisplayRenderer:function(b,a){if(a){Element.addClassName(b,"list_item_hover")}else{Element.removeClassName(b,"list_item_hover")}}});
