var Prototype={Version:"1.4.0",ScriptFragment:"(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)",emptyFunction:function(){},K:function(b){return b}};var Class={create:function(){return function(){this.initialize.apply(this,arguments)}}};var Abstract=new Object();Object.extend=function(b,c){for(property in c){b[property]=c[property]}return b};Object.inspect=function(b){try{if(b==undefined){return"undefined"}if(b==null){return"null"}return b.inspect?b.inspect():b.toString()}catch(c){if(c instanceof RangeError){return"..."}throw c}};Function.prototype.bind=function(){var b=this,e=$A(arguments),c=e.shift();return function(){return b.apply(c,e.concat($A(arguments)))}};Function.prototype.bindAsEventListener=function(c){var b=this;return function(e){return b.call(c,e||window.event)}};Object.extend(Number.prototype,{toColorPart:function(){var b=this.toString(16);if(this<16){return"0"+b}return b},succ:function(){return this+1},times:function(b){$R(0,this,true).each(b);return this}});var Try={these:function(){var g;for(var c=0;c<arguments.length;c++){var b=arguments[c];try{g=b();break}catch(h){}}return g}};var PeriodicalExecuter=Class.create();PeriodicalExecuter.prototype={initialize:function(c,b){this.callback=c;this.frequency=b;this.currentlyExecuting=false;this.registerCallback()},registerCallback:function(){setInterval(this.onTimerEvent.bind(this),this.frequency*1000)},onTimerEvent:function(){if(!this.currentlyExecuting){try{this.currentlyExecuting=true;this.callback()}finally{this.currentlyExecuting=false}}}};function $(){var e=new Array();for(var c=0;c<arguments.length;c++){var b=arguments[c];if(typeof b=="string"){b=document.getElementById(b)}if(arguments.length==1){return b}e.push(b)}return e}Object.extend(String.prototype,{stripTags:function(){return this.replace(/<\/?[^>]+>/gi,"")},stripScripts:function(){return this.replace(new RegExp(Prototype.ScriptFragment,"img"),"")},extractScripts:function(){var c=new RegExp(Prototype.ScriptFragment,"img");var b=new RegExp(Prototype.ScriptFragment,"im");return(this.match(c)||[]).map(function(e){return(e.match(b)||["",""])[1]})},evalScripts:function(){return this.extractScripts().map(eval)},escapeHTML:function(){var c=document.createElement("div");var b=document.createTextNode(this);c.appendChild(b);return c.innerHTML},unescapeHTML:function(){var b=document.createElement("div");b.innerHTML=this.stripTags();return b.childNodes[0]?b.childNodes[0].nodeValue:""},toQueryParams:function(){var b=this.match(/^\??(.*)$/)[1].split("&");return b.inject({},function(g,c){var e=c.split("=");g[e[0]]=e[1];return g})},toArray:function(){return this.split("")},camelize:function(){var g=this.split("-");if(g.length==1){return g[0]}var c=this.indexOf("-")==0?g[0].charAt(0).toUpperCase()+g[0].substring(1):g[0];for(var e=1,b=g.length;e<b;e++){var h=g[e];c+=h.charAt(0).toUpperCase()+h.substring(1)}return c},inspect:function(){return"'"+this.replace("\\","\\\\").replace("'","\\'")+"'"}});String.prototype.parseQuery=String.prototype.toQueryParams;var $break=new Object();var $continue=new Object();var Enumerable={each:function(c){var b=0;try{this._each(function(h){try{c(h,b++)}catch(l){if(l!=$continue){throw l}}})}catch(g){if(g!=$break){throw g}}},all:function(c){var b=true;this.each(function(g,e){b=b&&!!(c||Prototype.K)(g,e);if(!b){throw $break}});return b},any:function(c){var b=true;this.each(function(g,e){if(b=!!(c||Prototype.K)(g,e)){throw $break}});return b},collect:function(c){var b=[];this.each(function(g,e){b.push(c(g,e))});return b},detect:function(c){var b;this.each(function(g,e){if(c(g,e)){b=g;throw $break}});return b},findAll:function(c){var b=[];this.each(function(g,e){if(c(g,e)){b.push(g)}});return b},grep:function(e,c){var b=[];this.each(function(l,h){var g=l.toString();if(g.match(e)){b.push((c||Prototype.K)(l,h))}});return b},include:function(b){var c=false;this.each(function(e){if(e==b){c=true;throw $break}});return c},inject:function(b,c){this.each(function(g,e){b=c(b,g,e)});return b},invoke:function(c){var b=$A(arguments).slice(1);return this.collect(function(e){return e[c].apply(e,b)})},max:function(c){var b;this.each(function(g,e){g=(c||Prototype.K)(g,e);if(g>=(b||g)){b=g}});return b},min:function(c){var b;this.each(function(g,e){g=(c||Prototype.K)(g,e);if(g<=(b||g)){b=g}});return b},partition:function(e){var c=[],b=[];this.each(function(h,g){((e||Prototype.K)(h,g)?c:b).push(h)});return[c,b]},pluck:function(c){var b=[];this.each(function(g,e){b.push(g[c])});return b},reject:function(c){var b=[];this.each(function(g,e){if(!c(g,e)){b.push(g)}});return b},sortBy:function(b){return this.collect(function(e,c){return{value:e,criteria:b(e,c)}}).sort(function(h,g){var e=h.criteria,c=g.criteria;return e<c?-1:e>c?1:0}).pluck("value")},toArray:function(){return this.collect(Prototype.K)},zip:function(){var c=Prototype.K,b=$A(arguments);if(typeof b.last()=="function"){c=b.pop()}var e=[this].concat(b).map($A);return this.map(function(h,g){c(h=e.pluck(g));return h})},inspect:function(){return"#<Enumerable:"+this.toArray().inspect()+">"}};Object.extend(Enumerable,{map:Enumerable.collect,find:Enumerable.detect,select:Enumerable.findAll,member:Enumerable.include,entries:Enumerable.toArray});var $A=Array.from=function(e){if(!e){return[]}if(e.toArray){return e.toArray()}else{var c=[];for(var b=0;b<e.length;b++){c.push(e[b])}return c}};Object.extend(Array.prototype,Enumerable);Array.prototype._reverse=Array.prototype.reverse;Object.extend(Array.prototype,{_each:function(c){for(var b=0;b<this.length;b++){c(this[b])}},clear:function(){this.length=0;return this},first:function(){return this[0]},last:function(){return this[this.length-1]},compact:function(){return this.select(function(b){return b!=undefined||b!=null})},flatten:function(){return this.inject([],function(c,b){return c.concat(b.constructor==Array?b.flatten():[b])})},without:function(){var b=$A(arguments);return this.select(function(c){return !b.include(c)})},indexOf:function(b){for(var c=0;c<this.length;c++){if(this[c]==b){return c}}return -1},reverse:function(b){return(b!==false?this:this.toArray())._reverse()},shift:function(){var b=this[0];for(var c=0;c<this.length-1;c++){this[c]=this[c+1]}this.length--;return b},inspect:function(){return"["+this.map(Object.inspect).join(", ")+"]"}});var Hash={_each:function(b){for(key in this){var c=this[key];if(typeof c=="function"){continue}var e=[key,c];e.key=key;e.value=c;b(e)}},keys:function(){return this.pluck("key")},values:function(){return this.pluck("value")},merge:function(b){return $H(b).inject($H(this),function(c,e){c[e.key]=e.value;return c})},toQueryString:function(){return this.map(function(b){return b.map(encodeURIComponent).join("=")}).join("&")},inspect:function(){return"#<Hash:{"+this.map(function(b){return b.map(Object.inspect).join(": ")}).join(", ")+"}>"}};function $H(b){var c=Object.extend({},b||{});Object.extend(c,Enumerable);Object.extend(c,Hash);return c}ObjectRange=Class.create();Object.extend(ObjectRange.prototype,Enumerable);Object.extend(ObjectRange.prototype,{initialize:function(e,b,c){this.start=e;this.end=b;this.exclusive=c},_each:function(b){var c=this.start;do{b(c);c=c.succ()}while(this.include(c))},include:function(b){if(b<this.start){return false}if(this.exclusive){return b<this.end}return b<=this.end}});var $R=function(e,b,c){return new ObjectRange(e,b,c)};var Ajax={getTransport:function(){return Try.these(function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")},function(){return new XMLHttpRequest()})||false},activeRequestCount:0};Ajax.Responders={responders:[],_each:function(b){this.responders._each(b)},register:function(b){if(!this.include(b)){this.responders.push(b)}},unregister:function(b){this.responders=this.responders.without(b)},dispatch:function(g,c,e,b){this.each(function(h){if(h[g]&&typeof h[g]=="function"){try{h[g].apply(h,[c,e,b])}catch(l){}}})}};Object.extend(Ajax.Responders,Enumerable);Ajax.Responders.register({onCreate:function(){Ajax.activeRequestCount++},onComplete:function(){Ajax.activeRequestCount--}});Ajax.Base=function(){};Ajax.Base.prototype={setOptions:function(b){this.options={method:"post",asynchronous:true,parameters:""};Object.extend(this.options,b||{})},responseIsSuccess:function(){return this.transport.status==undefined||this.transport.status==0||(this.transport.status>=200&&this.transport.status<300)},responseIsFailure:function(){return !this.responseIsSuccess()}};Ajax.Request=Class.create();Ajax.Request.Events=["Uninitialized","Loading","Loaded","Interactive","Complete"];Ajax.Request.prototype=Object.extend(new Ajax.Base(),{initialize:function(c,b){this.transport=Ajax.getTransport();this.setOptions(b);this.request(c)},request:function(c){var g=this.options.parameters||"";if(g.length>0){g+="&_="}try{this.url=c;if(this.options.method=="get"&&g.length>0){this.url+=(this.url.match(/\?/)?"&":"?")+g}Ajax.Responders.dispatch("onCreate",this,this.transport);this.transport.open(this.options.method,this.url,this.options.asynchronous);if(this.options.asynchronous){this.transport.onreadystatechange=this.onStateChange.bind(this);setTimeout((function(){this.respondToReadyState(1)}).bind(this),10)}this.setRequestHeaders();var b=this.options.postBody?this.options.postBody:g;this.transport.send(this.options.method=="post"?b:null)}catch(h){this.dispatchException(h)}},setRequestHeaders:function(){var c=["X-Requested-With","XMLHttpRequest","X-Prototype-Version",Prototype.Version];if(this.options.method=="post"){c.push("Content-type","application/x-www-form-urlencoded");if(this.transport.overrideMimeType){c.push("Connection","close")}}if(this.options.requestHeaders){c.push.apply(c,this.options.requestHeaders)}for(var b=0;b<c.length;b+=2){this.transport.setRequestHeader(c[b],c[b+1])}},onStateChange:function(){var b=this.transport.readyState;if(b!=1){this.respondToReadyState(this.transport.readyState)}},header:function(b){try{return this.transport.getResponseHeader(b)}catch(c){}},evalJSON:function(){try{return eval(this.header("X-JSON"))}catch(e){}},evalResponse:function(){try{return eval(this.transport.responseText)}catch(e){this.dispatchException(e)}},respondToReadyState:function(b){var g=Ajax.Request.Events[b];var l=this.transport,c=this.evalJSON();if(g=="Complete"){try{(this.options["on"+this.transport.status]||this.options["on"+(this.responseIsSuccess()?"Success":"Failure")]||Prototype.emptyFunction)(l,c)}catch(h){this.dispatchException(h)}if((this.header("Content-type")||"").match(/^text\/javascript/i)){this.evalResponse()}}try{(this.options["on"+g]||Prototype.emptyFunction)(l,c);Ajax.Responders.dispatch("on"+g,this,l,c)}catch(h){this.dispatchException(h)}if(g=="Complete"){this.transport.onreadystatechange=Prototype.emptyFunction}},dispatchException:function(b){(this.options.onException||Prototype.emptyFunction)(this,b);Ajax.Responders.dispatch("onException",this,b)}});Ajax.Updater=Class.create();Object.extend(Object.extend(Ajax.Updater.prototype,Ajax.Request.prototype),{initialize:function(b,e,c){this.containers={success:b.success?$(b.success):$(b),failure:b.failure?$(b.failure):(b.success?null:$(b))};this.transport=Ajax.getTransport();this.setOptions(c);var g=this.options.onComplete||Prototype.emptyFunction;this.options.onComplete=(function(l,h){this.updateContent();g(l,h)}).bind(this);this.request(e)},updateContent:function(){var c=this.responseIsSuccess()?this.containers.success:this.containers.failure;var b=this.transport.responseText;if(!this.options.evalScripts){b=b.stripScripts()}if(c){if(this.options.insertion){new this.options.insertion(c,b)}else{Element.update(c,b)}}if(this.responseIsSuccess()){if(this.onComplete){setTimeout(this.onComplete.bind(this),10)}}}});Ajax.PeriodicalUpdater=Class.create();Ajax.PeriodicalUpdater.prototype=Object.extend(new Ajax.Base(),{initialize:function(b,e,c){this.setOptions(c);this.onComplete=this.options.onComplete;this.frequency=(this.options.frequency||2);this.decay=(this.options.decay||1);this.updater={};this.container=b;this.url=e;this.start()},start:function(){this.options.onComplete=this.updateComplete.bind(this);this.onTimerEvent()},stop:function(){this.updater.onComplete=undefined;clearTimeout(this.timer);(this.onComplete||Prototype.emptyFunction).apply(this,arguments)},updateComplete:function(b){if(this.options.decay){this.decay=(b.responseText==this.lastText?this.decay*this.options.decay:1);this.lastText=b.responseText}this.timer=setTimeout(this.onTimerEvent.bind(this),this.decay*this.frequency*1000)},onTimerEvent:function(){this.updater=new Ajax.Updater(this.container,this.url,this.options)}});document.getElementsByClassName=function(e,b){var c=($(b)||document.body).getElementsByTagName("*");return $A(c).inject([],function(g,h){if(h.className.match(new RegExp("(^|\\s)"+e+"(\\s|$)"))){g.push(h)}return g})};if(!window.Element){var Element=new Object()}Object.extend(Element,{visible:function(b){return $(b).style.display!="none"},toggle:function(){for(var c=0;c<arguments.length;c++){var b=$(arguments[c]);Element[Element.visible(b)?"hide":"show"](b)}},hide:function(){for(var c=0;c<arguments.length;c++){var b=$(arguments[c]);b.style.display="none"}},show:function(){for(var c=0;c<arguments.length;c++){var b=$(arguments[c]);b.style.display=""}},remove:function(b){b=$(b);b.parentNode.removeChild(b)},update:function(c,b){$(c).innerHTML=b.stripScripts();setTimeout(function(){b.evalScripts()},10)},getHeight:function(b){b=$(b);return b.offsetHeight},classNames:function(b){return new Element.ClassNames(b)},hasClassName:function(b,c){if(!(b=$(b))){return}return Element.classNames(b).include(c)},addClassName:function(b,c){if(!(b=$(b))){return}return Element.classNames(b).add(c)},removeClassName:function(b,c){if(!(b=$(b))){return}return Element.classNames(b).remove(c)},cleanWhitespace:function(c){c=$(c);for(var b=0;b<c.childNodes.length;b++){var e=c.childNodes[b];if(e.nodeType==3&&!/\S/.test(e.nodeValue)){Element.remove(e)}}},empty:function(b){return $(b).innerHTML.match(/^\s*$/)},scrollTo:function(c){c=$(c);var b=c.x?c.x:c.offsetLeft,e=c.y?c.y:c.offsetTop;window.scrollTo(b,e)},getStyle:function(c,e){c=$(c);var g=c.style[e.camelize()];if(!g){if(document.defaultView&&document.defaultView.getComputedStyle){var b=document.defaultView.getComputedStyle(c,null);g=b?b.getPropertyValue(e):null}else{if(c.currentStyle){g=c.currentStyle[e.camelize()]}}}if(window.opera&&["left","top","right","bottom"].include(e)){if(Element.getStyle(c,"position")=="static"){g="auto"}}return g=="auto"?null:g},setStyle:function(b,c){b=$(b);for(name in c){b.style[name.camelize()]=c[name]}},getDimensions:function(c){c=$(c);if(Element.getStyle(c,"display")!="none"){return{width:c.offsetWidth,height:c.offsetHeight}}var b=c.style;var h=b.visibility;var e=b.position;b.visibility="hidden";b.position="absolute";b.display="";var l=c.clientWidth;var g=c.clientHeight;b.display="none";b.position=e;b.visibility=h;return{width:l,height:g}},makePositioned:function(b){b=$(b);var c=Element.getStyle(b,"position");if(c=="static"||!c){b._madePositioned=true;b.style.position="relative";if(window.opera){b.style.top=0;b.style.left=0}}},undoPositioned:function(b){b=$(b);if(b._madePositioned){b._madePositioned=undefined;b.style.position=b.style.top=b.style.left=b.style.bottom=b.style.right=""}},makeClipping:function(b){b=$(b);if(b._overflow){return}b._overflow=b.style.overflow;if((Element.getStyle(b,"overflow")||"visible")!="hidden"){b.style.overflow="hidden"}},undoClipping:function(b){b=$(b);if(b._overflow){return}b.style.overflow=b._overflow;b._overflow=undefined}});var Toggle=new Object();Toggle.display=Element.toggle;Abstract.Insertion=function(b){this.adjacency=b};Abstract.Insertion.prototype={initialize:function(b,c){this.element=$(b);this.content=c.stripScripts();if(this.adjacency&&this.element.insertAdjacentHTML){try{this.element.insertAdjacentHTML(this.adjacency,this.content)}catch(g){if(this.element.tagName.toLowerCase()=="tbody"){this.insertContent(this.contentFromAnonymousTable())}else{throw g}}}else{this.range=this.element.ownerDocument.createRange();if(this.initializeRange){this.initializeRange()}this.insertContent([this.range.createContextualFragment(this.content)])}setTimeout(function(){c.evalScripts()},10)},contentFromAnonymousTable:function(){var b=document.createElement("div");b.innerHTML="<table><tbody>"+this.content+"</tbody></table>";return $A(b.childNodes[0].childNodes[0].childNodes)}};var Insertion=new Object();Insertion.Before=Class.create();Insertion.Before.prototype=Object.extend(new Abstract.Insertion("beforeBegin"),{initializeRange:function(){this.range.setStartBefore(this.element)},insertContent:function(b){b.each((function(c){this.element.parentNode.insertBefore(c,this.element)}).bind(this))}});Insertion.Top=Class.create();Insertion.Top.prototype=Object.extend(new Abstract.Insertion("afterBegin"),{initializeRange:function(){this.range.selectNodeContents(this.element);this.range.collapse(true)},insertContent:function(b){b.reverse(false).each((function(c){this.element.insertBefore(c,this.element.firstChild)}).bind(this))}});Insertion.Bottom=Class.create();Insertion.Bottom.prototype=Object.extend(new Abstract.Insertion("beforeEnd"),{initializeRange:function(){this.range.selectNodeContents(this.element);this.range.collapse(this.element)},insertContent:function(b){b.each((function(c){this.element.appendChild(c)}).bind(this))}});Insertion.After=Class.create();Insertion.After.prototype=Object.extend(new Abstract.Insertion("afterEnd"),{initializeRange:function(){this.range.setStartAfter(this.element)},insertContent:function(b){b.each((function(c){this.element.parentNode.insertBefore(c,this.element.nextSibling)}).bind(this))}});Element.ClassNames=Class.create();Element.ClassNames.prototype={initialize:function(b){this.element=$(b)},_each:function(b){this.element.className.split(/\s+/).select(function(c){return c.length>0})._each(b)},set:function(b){this.element.className=b},add:function(b){if(this.include(b)){return}this.set(this.toArray().concat(b).join(" "))},remove:function(b){if(!this.include(b)){return}this.set(this.select(function(c){return c!=b}).join(" "))},toString:function(){return this.toArray().join(" ")}};Object.extend(Element.ClassNames.prototype,Enumerable);var Field={clear:function(){for(var b=0;b<arguments.length;b++){$(arguments[b]).value=""}},focus:function(b){$(b).focus()},present:function(){for(var b=0;b<arguments.length;b++){if($(arguments[b]).value==""){return false}}return true},select:function(b){$(b).select()},activate:function(b){b=$(b);b.focus();if(b.select){b.select()}}};var Form={serialize:function(g){var h=Form.getElements($(g));var e=new Array();for(var c=0;c<h.length;c++){var b=Form.Element.serialize(h[c]);if(b){e.push(b)}}return e.join("&")},getElements:function(c){c=$(c);var e=new Array();for(tagName in Form.Element.Serializers){var g=c.getElementsByTagName(tagName);for(var b=0;b<g.length;b++){e.push(g[b])}}return e},getInputs:function(l,e,g){l=$(l);var b=l.getElementsByTagName("input");if(!e&&!g){return b}var m=new Array();for(var h=0;h<b.length;h++){var c=b[h];if((e&&c.type!=e)||(g&&c.name!=g)){continue}m.push(c)}return m},disable:function(e){var g=Form.getElements(e);for(var c=0;c<g.length;c++){var b=g[c];b.blur();b.disabled="true"}},enable:function(e){var g=Form.getElements(e);for(var c=0;c<g.length;c++){var b=g[c];b.disabled=""}},findFirstElement:function(b){return Form.getElements(b).find(function(c){return c.type!="hidden"&&!c.disabled&&["input","select","textarea"].include(c.tagName.toLowerCase())})},focusFirstElement:function(b){Field.activate(Form.findFirstElement(b))},reset:function(b){$(b).reset()}};Form.Element={serialize:function(c){c=$(c);var g=c.tagName.toLowerCase();var e=Form.Element.Serializers[g](c);if(e){var b=encodeURIComponent(e[0]);if(b.length==0){return}if(e[1].constructor!=Array){e[1]=[e[1]]}return e[1].map(function(h){return b+"="+encodeURIComponent(h)}).join("&")}},getValue:function(b){b=$(b);var e=b.tagName.toLowerCase();var c=Form.Element.Serializers[e](b);if(c){return c[1]}}};Form.Element.Serializers={input:function(b){switch(b.type.toLowerCase()){case"submit":case"hidden":case"password":case"text":return Form.Element.Serializers.textarea(b);case"checkbox":case"radio":return Form.Element.Serializers.inputSelector(b)}return false},inputSelector:function(b){if(b.checked){return[b.name,b.value]}},textarea:function(b){return[b.name,b.value]},select:function(b){return Form.Element.Serializers[b.type=="select-one"?"selectOne":"selectMany"](b)},selectOne:function(e){var g="",c,b=e.selectedIndex;if(b>=0){c=e.options[b];g=c.value;if(!g&&!("value" in c)){g=c.text}}return[e.name,g]},selectMany:function(e){var g=new Array();for(var c=0;c<e.length;c++){var b=e.options[c];if(b.selected){var h=b.value;if(!h&&!("value" in b)){h=b.text}g.push(h)}}return[e.name,g]}};var $F=Form.Element.getValue;Abstract.TimedObserver=function(){};Abstract.TimedObserver.prototype={initialize:function(b,c,e){this.frequency=c;this.element=$(b);this.callback=e;this.lastValue=this.getValue();this.registerCallback()},registerCallback:function(){setInterval(this.onTimerEvent.bind(this),this.frequency*1000)},onTimerEvent:function(){var b=this.getValue();if(this.lastValue!=b){this.callback(this.element,b);this.lastValue=b}}};Form.Element.Observer=Class.create();Form.Element.Observer.prototype=Object.extend(new Abstract.TimedObserver(),{getValue:function(){return Form.Element.getValue(this.element)}});Form.Observer=Class.create();Form.Observer.prototype=Object.extend(new Abstract.TimedObserver(),{getValue:function(){return Form.serialize(this.element)}});Abstract.EventObserver=function(){};Abstract.EventObserver.prototype={initialize:function(b,c){this.element=$(b);this.callback=c;this.lastValue=this.getValue();if(this.element.tagName.toLowerCase()=="form"){this.registerFormCallbacks()}else{this.registerCallback(this.element)}},onElementEvent:function(){var b=this.getValue();if(this.lastValue!=b){this.callback(this.element,b);this.lastValue=b}},registerFormCallbacks:function(){var c=Form.getElements(this.element);for(var b=0;b<c.length;b++){this.registerCallback(c[b])}},registerCallback:function(b){if(b.type){switch(b.type.toLowerCase()){case"checkbox":case"radio":Event.observe(b,"click",this.onElementEvent.bind(this));break;case"password":case"text":case"textarea":case"select-one":case"select-multiple":Event.observe(b,"change",this.onElementEvent.bind(this));break}}}};Form.Element.EventObserver=Class.create();Form.Element.EventObserver.prototype=Object.extend(new Abstract.EventObserver(),{getValue:function(){return Form.Element.getValue(this.element)}});Form.EventObserver=Class.create();Form.EventObserver.prototype=Object.extend(new Abstract.EventObserver(),{getValue:function(){return Form.serialize(this.element)}});if(!window.Event){var Event=new Object()}Object.extend(Event,{KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,element:function(b){return b.target||b.srcElement},isLeftClick:function(b){return(((b.which)&&(b.which==1))||((b.button)&&(b.button==1)))},pointerX:function(b){return b.pageX||(b.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft))},pointerY:function(b){return b.pageY||(b.clientY+(document.documentElement.scrollTop||document.body.scrollTop))},stop:function(b){if(b.preventDefault){b.preventDefault();b.stopPropagation()}else{b.returnValue=false;b.cancelBubble=true}},findElement:function(e,c){var b=Event.element(e);while(b.parentNode&&(!b.tagName||(b.tagName.toUpperCase()!=c.toUpperCase()))){b=b.parentNode}return b},observers:false,_observeAndCache:function(g,e,c,b){if(!this.observers){this.observers=[]}if(g.addEventListener){this.observers.push([g,e,c,b]);g.addEventListener(e,c,b)}else{if(g.attachEvent){this.observers.push([g,e,c,b]);g.attachEvent("on"+e,c)}}},unloadCache:function(){if(!Event.observers){return}for(var b=0;b<Event.observers.length;b++){Event.stopObserving.apply(this,Event.observers[b]);Event.observers[b][0]=null}Event.observers=false},observe:function(g,e,c,b){var g=$(g);b=b||false;if(e=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||g.attachEvent)){e="keydown"}this._observeAndCache(g,e,c,b)},stopObserving:function(g,e,c,b){var g=$(g);b=b||false;if(e=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||g.detachEvent)){e="keydown"}if(g.removeEventListener){g.removeEventListener(e,c,b)}else{if(g.detachEvent){g.detachEvent("on"+e,c)}}}});Event.observe(window,"unload",Event.unloadCache,false);var Position={includeScrollOffsets:false,prepare:function(){this.deltaX=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;this.deltaY=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},realOffset:function(c){var b=0,e=0;do{b+=c.scrollTop||0;e+=c.scrollLeft||0;c=c.parentNode}while(c);return[e,b]},cumulativeOffset:function(c){var b=0,e=0;do{b+=c.offsetTop||0;e+=c.offsetLeft||0;c=c.offsetParent}while(c);return[e,b]},positionedOffset:function(c){var b=0,e=0;do{b+=c.offsetTop||0;e+=c.offsetLeft||0;c=c.offsetParent;if(c){p=Element.getStyle(c,"position");if(p=="relative"||p=="absolute"){break}}}while(c);return[e,b]},offsetParent:function(b){if(b.offsetParent){return b.offsetParent}if(b==document.body){return b}while((b=b.parentNode)&&b!=document.body){if(Element.getStyle(b,"position")!="static"){return b}}return document.body},within:function(c,b,e){if(this.includeScrollOffsets){return this.withinIncludingScrolloffsets(c,b,e)}this.xcomp=b;this.ycomp=e;this.offset=this.cumulativeOffset(c);return(e>=this.offset[1]&&e<this.offset[1]+c.offsetHeight&&b>=this.offset[0]&&b<this.offset[0]+c.offsetWidth)},withinIncludingScrolloffsets:function(c,b,g){var e=this.realOffset(c);this.xcomp=b+e[0]-this.deltaX;this.ycomp=g+e[1]-this.deltaY;this.offset=this.cumulativeOffset(c);return(this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+c.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+c.offsetWidth)},overlap:function(c,b){if(!c){return 0}if(c=="vertical"){return((this.offset[1]+b.offsetHeight)-this.ycomp)/b.offsetHeight}if(c=="horizontal"){return((this.offset[0]+b.offsetWidth)-this.xcomp)/b.offsetWidth}},clone:function(c,e){c=$(c);e=$(e);e.style.position="absolute";var b=this.cumulativeOffset(c);e.style.top=b[1]+"px";e.style.left=b[0]+"px";e.style.width=c.offsetWidth+"px";e.style.height=c.offsetHeight+"px"},page:function(g){var b=0,e=0;var c=g;do{b+=c.offsetTop||0;e+=c.offsetLeft||0;if(c.offsetParent==document.body){if(Element.getStyle(c,"position")=="absolute"){break}}}while(c=c.offsetParent);c=g;do{b-=c.scrollTop||0;e-=c.scrollLeft||0}while(c=c.parentNode);return[e,b]},clone:function(e,h){var b=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{});e=$(e);var g=Position.page(e);h=$(h);var l=[0,0];var c=null;if(Element.getStyle(h,"position")=="absolute"){c=Position.offsetParent(h);l=Position.page(c)}if(c==document.body){l[0]-=document.body.offsetLeft;l[1]-=document.body.offsetTop}if(b.setLeft){h.style.left=(g[0]-l[0]+b.offsetLeft)+"px"}if(b.setTop){h.style.top=(g[1]-l[1]+b.offsetTop)+"px"}if(b.setWidth){h.style.width=e.offsetWidth+"px"}if(b.setHeight){h.style.height=e.offsetHeight+"px"}},absolutize:function(c){c=$(c);if(c.style.position=="absolute"){return}Position.prepare();var g=Position.positionedOffset(c);var l=g[1];var h=g[0];var e=c.clientWidth;var b=c.clientHeight;c._originalLeft=h-parseFloat(c.style.left||0);c._originalTop=l-parseFloat(c.style.top||0);c._originalWidth=c.style.width;c._originalHeight=c.style.height;c.style.position="absolute";c.style.top=l+"px";c.style.left=h+"px";c.style.width=e+"px";c.style.height=b+"px"},relativize:function(b){b=$(b);if(b.style.position=="relative"){return}Position.prepare();b.style.position="relative";var e=parseFloat(b.style.top||0)-(b._originalTop||0);var c=parseFloat(b.style.left||0)-(b._originalLeft||0);b.style.top=e+"px";b.style.left=c+"px";b.style.height=b._originalHeight;b.style.width=b._originalWidth}};if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){Position.cumulativeOffset=function(c){var b=0,e=0;do{b+=c.offsetTop||0;e+=c.offsetLeft||0;if(c.offsetParent==document.body){if(Element.getStyle(c,"position")=="absolute"){break}}c=c.offsetParent}while(c);return[e,b]}}Object.extend(Event,{_domReady:function(){if(arguments.callee.done){return}arguments.callee.done=true;if(this._timer){clearInterval(this._timer)}this._readyCallbacks.each(function(b){b()});this._readyCallbacks=null},onDOMReady:function(f){if(!this._readyCallbacks){var domReady=this._domReady.bind(this);if(document.addEventListener){document.addEventListener("DOMContentLoaded",domReady,false);
/*@cc_on @*/
/*@if (@_win32)
            document.write("<script id=__ie_onload defer src=javascript:void(0)><\/script>");
            document.getElementById("__ie_onload").onreadystatechange = function() {
                if (this.readyState == "complete") domReady(); 
            };
        /*@end @*/
}if(/WebKit/i.test(navigator.userAgent)){this._timer=setInterval(function(){if(/loaded|complete/.test(document.readyState)){domReady()}},10)}Event.observe(window,"load",domReady);Event._readyCallbacks=[]}Event._readyCallbacks.push(f)}});if(typeof deconcept=="undefined"){var deconcept=new Object()}if(typeof deconcept.util=="undefined"){deconcept.util=new Object()}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object()}deconcept.SWFObject=function(v,e,z,l,s,t,n,m,g,u){if(!document.getElementById){return}this.DETECT_KEY=u?u:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(v){this.setAttribute("swf",v)}if(e){this.setAttribute("id",e)}if(z){this.setAttribute("width",z)}if(l){this.setAttribute("height",l)}if(s){this.setAttribute("version",new deconcept.PlayerVersion(s.toString().split(".")))}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true}if(t){this.addParam("bgcolor",t)}var b=n?n:"high";this.addParam("quality",b);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var r=(m)?m:window.location;this.setAttribute("xiRedirectUrl",r);this.setAttribute("redirectUrl","");if(g){this.setAttribute("redirectUrl",g)}};deconcept.SWFObject.prototype={useExpressInstall:function(b){this.xiSWFPath=!b?"expressinstall.swf":b;this.setAttribute("useExpressInstall",true)},setAttribute:function(b,c){this.attributes[b]=c},getAttribute:function(b){return this.attributes[b]},addParam:function(c,b){this.params[c]=b},getParams:function(){return this.params},addVariable:function(c,b){this.variables[c]=b},getVariable:function(b){return this.variables[b]},getVariables:function(){return this.variables},getVariablePairs:function(){var e=new Array();var c;var b=this.getVariables();for(c in b){e[e.length]=c+"="+b[c]}return e},getSWFHTML:function(){var c="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath)}c='<embed type="application/x-shockwave-flash" src="'+this.getAttribute("swf")+'" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" style="'+this.getAttribute("style")+'"';c+=' id="'+this.getAttribute("id")+'" name="'+this.getAttribute("id")+'" ';var l=this.getParams();for(var h in l){c+=[h]+'="'+l[h]+'" '}var g=this.getVariablePairs().join("&");if(g.length>0){c+='flashvars="'+g+'"'}c+="/>"}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath)}c='<object id="'+this.getAttribute("id")+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" style="'+this.getAttribute("style")+'">';c+='<param name="movie" value="'+this.getAttribute("swf")+'" />';var e=this.getParams();for(var h in e){c+='<param name="'+h+'" value="'+e[h]+'" />'}var b=this.getVariablePairs().join("&");if(b.length>0){c+='<param name="flashvars" value="'+b+'" />'}c+="</object>"}return c},write:function(c){if(this.getAttribute("useExpressInstall")){var b=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(b)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title)}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var e=(typeof c=="string")?document.getElementById(c):c;e.innerHTML=this.getSWFHTML();return true}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"))}}return false}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var l=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var b=navigator.plugins["Shockwave Flash"];if(b&&b.description){l=new deconcept.PlayerVersion(b.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."))}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var c=1;var g=3;while(c){try{g++;c=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+g);l=new deconcept.PlayerVersion([g,0,0])}catch(h){c=null}}}else{try{var c=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(h){try{var c=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");l=new deconcept.PlayerVersion([6,0,21]);c.AllowScriptAccess="always"}catch(h){if(l.major==6){return l}}try{c=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(h){}}if(c!=null){l=new deconcept.PlayerVersion(c.GetVariable("$version").split(" ")[1].split(","))}}}return l};deconcept.PlayerVersion=function(b){this.major=b[0]!=null?parseInt(b[0]):0;this.minor=b[1]!=null?parseInt(b[1]):0;this.rev=b[2]!=null?parseInt(b[2]):0};deconcept.PlayerVersion.prototype.versionIsValid=function(b){if(this.major<b.major){return false}if(this.major>b.major){return true}if(this.minor<b.minor){return false}if(this.minor>b.minor){return true}if(this.rev<b.rev){return false}return true};deconcept.util={getRequestParameter:function(e){var g=document.location.search||document.location.hash;if(e==null){return g}if(g){var c=g.substring(1).split("&");for(var b=0;b<c.length;b++){if(c[b].substring(0,c[b].indexOf("="))==e){return c[b].substring((c[b].indexOf("=")+1))}}}return""}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var c=document.getElementsByTagName("OBJECT");for(var e=c.length-1;e>=0;e--){c[e].style.display="none";for(var b in c[e]){if(typeof c[e][b]=="function"){c[e][b]=function(){}}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs)};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true}}if(!document.getElementById&&document.all){document.getElementById=function(b){return document.all[b]}}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;function init(){valignButtonsInTeaser.set();if(document.getElementById("transparentLayer")){transparentLayer.open()}if(document.getElementById("popupLayer")||document.getElementById("formWerbenNewsletter24")){popupLayerShadowForIE6.set();popupLayer.open()}if(document.getElementById("ibeHome")){ibeHomeShadowForIE6.set()}}var windowOpen={open:function(e,c,g,b){f=window.open(e,c,"width="+g+",height="+b+",scrollbars=yes,status=yes,toolbar=no,location=no,directories=no,resizable=yes,menubar=yes");setTimeout("f.focus()",200)}};var transparentLayer={pageWidth:false,pageheight:false,init:function(){scrollWidth=document.getElementsByTagName("body")[0].offsetWidth;scrollHeight=document.getElementsByTagName("body")[0].offsetHeight;documentWidth=document.getElementsByTagName("body")[0].scrollLeft;documentHeight=document.getElementsByTagName("body")[0].scrollTop;if(window.innerWidth){windowWidth=window.innerWidth;windowHeight=window.innerHeight}else{windowWidth=document.body.clientWidth;windowHeight=document.body.clientHeight}if((documentWidth-scrollWidth)>windowWidth){this.pageWidth=documentWidth-scrollWidth}else{this.pageWidth=windowWidth}if((documentHeight-scrollHeight)>windowHeight){this.pageHeight=documentHeight-scrollHeight}else{this.pageHeight=windowHeight}},open:function(){if(document.getElementById("transparentLayer")){this.init();document.getElementById("transparentLayer").style.width="100%";document.getElementById("transparentLayer").style.height=this.pageHeight+"px";document.getElementById("transparentLayer").style.zIndex="19999";document.getElementById("transparentLayer").style.visibility="visible"}},close:function(){if(document.getElementById("transparentLayer")){document.getElementById("transparentLayer").style.visibility="hidden"}},debug:function(){alert(this.pageWidth+" x "+this.pageHeight)}};var popupLayer={close:function(){if(document.getElementById("popupLayer")){document.getElementById("popupLayer").style.visibility="hidden"}else{if(document.getElementById("formWerbenNewsletter24")){document.getElementById("formWerbenNewsletter24").style.visibility="hidden"}}transparentLayer.close()},open:function(){if(document.getElementById("popupLayer")){document.getElementById("popupLayer").style.zIndex="20000";document.getElementById("popupLayer").style.visibility="visible"}else{if(document.getElementById("formWerbenNewsletter24")){document.getElementById("formWerbenNewsletter24").style.zIndex="20000";document.getElementById("formWerbenNewsletter24").style.visibility="visible"}}}};var popupLayerShadowForIE6={set:function(){if(document.all&&!window.opera){preffix="";if(document.getElementById("formWerbenNewsletter24")){preffix="werben_"}var b={top:{obj:document.getElementById("PopupLayerTop"),src:"images/structure/background/bg_"+preffix+"popupLayer_top.png"},content:{obj:document.getElementById("PopupLayerVertical"),src:"images/structure/background/bg_"+preffix+"popupLayer_vertical.png"},bottom:{obj:document.getElementById("PopupLayerBottom"),src:"images/structure/background/bg_"+preffix+"popupLayer_bottom.png"}};b.top["obj"].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+b.top["src"]+', sizingMethod="image")';b.top["obj"].style.backgroundColor="transparent";b.content["obj"].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+b.content["src"]+', sizingMethod="scale")';b.content["obj"].style.backgroundColor="transparent";b.bottom["obj"].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+b.bottom["src"]+', sizingMethod="image")';b.bottom["obj"].style.backgroundColor="transparent"}}};var ibeHomeShadowForIE6={set:function(){if(!document.getElementById("ibeHome")){return false}if(document.all&&!window.opera){var b={top:{obj:document.getElementById("shadowTop"),src:"/it/Images/bg_shadow_1_4_top.png"},content:{obj:document.getElementById("shadowContent"),src:"/it/Images/bg_shadow_1_4_content.png"},bottom:{obj:document.getElementById("shadowBottom"),src:"/it/Images/bg_shadow_1_4_bottom.gif"}};b.top["obj"].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+b.top["src"]+', sizingMethod="image")';b.top["obj"].style.backgroundColor="transparent";b.content["obj"].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+b.content["src"]+', sizingMethod="scale")';b.content["obj"].style.backgroundColor="transparent";b.bottom["obj"].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+b.bottom["src"]+', sizingMethod="image")';b.bottom["obj"].style.backgroundColor="transparent"}}};var valignButtonsInTeaser={check:function(e){var c=e.getElementsByTagName("div");for(var b=0;b<c.length;b++){if(c[b].className.indexOf("link")>-1){return true}}return false},setCSSPositionLink:function(g,e){var c=g.getElementsByTagName("div");for(var b=0;b<c.length;b++){if(c[b].className.indexOf("link")>-1){c[b].style.position=e}}},set:function(){myDivs=document.getElementsByTagName("div");myAlignGroups=new Array();for(var c=0;c<myDivs.length;c++){if(myDivs[c].className.indexOf("alignButton")>-1){if(this.check(myDivs[c])){this.setCSSPositionLink(myDivs[c],"static");x=myDivs[c].offsetHeight;this.setCSSPositionLink(myDivs[c],"absolute");var b=myDivs[c].getElementsByTagName("DIV");for(j=0;j<b.length;j++){b[j].parentNode.style.height=x+15+"px"}}}}}};var motion=false;var decrease=0.9;function slideInit(b,l,h,e,c){var g=b.parentNode.nextSibling;while(g.nodeType!=1){g=g.nextSibling}if(!motion){window.slideObj=g;slideObj.toggle=b;if(b.parentNode.getAttribute("rel")=="open"){slideObj.direc=-1;b.parentNode.setAttribute("rel","")}if(slideObj.className.indexOf("noCollapse")>-1){if(!slideObj.style.height){slideObj.minHt=slideObj.offsetHeight-2;slideObj.style.height=slideObj.minHt+"px"}}else{slideObj.minHt=0;if(!slideObj.style.height){slideObj.style.height="0px"}}if(l){slideObj.sideBorder=false}else{slideObj.sideBorder=true}if(h){b.style.visibility="hidden"}else{b.style.visibility=""}slideObj.toggleImage=b.getElementsByTagName("IMG")[0];slideObj.imageOpen=new Image();slideObj.imageOpen.src=e;slideObj.imageClose=new Image();slideObj.imageClose.src=c;if(!slideObj.direc){slideObj.direc=1}slideObj.speed=parseInt(slideObj.getElementsByTagName("DIV")[0].offsetHeight/4);slide()}return false}function slide(){window.clearTimeout(motion);slideObj.speed*=decrease;ht=parseInt(slideObj.style.height);if(slideObj.direc>0){if(ht<(slideObj.getElementsByTagName("DIV")[0].offsetHeight)){slideObj.style.height=ht+Math.ceil(slideObj.speed)+"px";if(slideObj.sideBorder){slideObj.style.borderStyle="solid"}}else{slideObj.style.height=slideObj.getElementsByTagName("DIV")[0].offsetHeight+"px";slideObj.toggle.className="open";if(slideObj.toggleImage&&slideObj.imageClose){slideObj.toggleImage.src=slideObj.imageClose.src}slideObj.direc*=-1;motion=false;return}}else{if(ht>slideObj.minHt){var b=ht-Math.ceil(slideObj.speed);if(b<slideObj.minHt){b=slideObj.minHt}slideObj.style.height=b+"px"}else{slideObj.style.height=slideObj.minHt+"px";if(!slideObj.minHt){slideObj.style.borderStyle="none"}slideObj.toggle.className="";if(slideObj.toggleImage&&slideObj.imageOpen){slideObj.toggleImage.src=slideObj.imageOpen.src}slideObj.direc*=-1;motion=false;return}}motion=window.setTimeout("slide()",40)}function changeOption(c){for(var b=0;b<c.length;b++){if(c[b].selected){c[b].style.fontWeight="bold"}else{c[b].style.fontWeight="normal"}}}function newsletter_email(b,c){if(b.value==""){b.style.color="#c1c1c1";b.value=c}}function newsletter_email_clear(b,c){if(b.value==c){b.style.color="#000000";b.value=""}}function zaehlen(){var b=501;anz=document.pressekontakt_form.Pressekontakt_Anliegen.value.length+1;document.pressekontakt_form.anzeige.value=b-anz;uebrig=b-anz;if(anz>=b){alert("Maximum erreicht !!!")}return uebrig}var px=10;var timer;var merker;function scrollDiv(b){clearTimeout(timer);d=document.getElementById("ScrollArea");y=d.scrollTop;if(b==1){y-=px}if(b==2){y+=px}if(y<=d.scrollHeight-d.offsetHeight+px&&y>=0-px){d.scrollTop=y;timer=setTimeout("scrollDiv("+b+")",50)}if(y<0||y>d.scrollHeight-d.offsetHeight){clearTimeout(timer)}}function zaehlenFAQ(){var b=501;anz=document.faq.faq_ihre_anfrage.value.length+1;document.faq.anzeige.value=b-anz;uebrig=b-anz;if(anz>=b){alert("Maximum erreicht !!!")}return uebrig}function switchLanguage(b){var c=b.options[b.options.selectedIndex].value;if(c!=""){if(document.URL.search("flugundhotel.germanwings.com")!=-1){window.location.href="http://www.germanwings.com/"+c}else{window.location.href=c}}}function gw_maxLengthTextArea(c,e,b){if((e.keyCode>=37&&e.keyCode<=40)||e.keyCode==8||e.keyCode==13||e.keyCode==35||e.keyCode==36||e.keyCode==46){return true}if(c.value.length+1>b){return false}else{return true}}function gw_updateCounter(e,c,b){c.update(b-e.value.length)}function popupSized(g,c,e,b){positionx=(screen.width/2)-(e/2);positiony=(screen.height/2)-(b/2);window.open(g,c,"width="+e+",height="+b+",resizable=yes,status=no,scrollbars=yes,toolbar=no,menubar=no,left="+positionx+",top="+positiony+",screenX="+positionx+",screenY="+positiony)}function slideInitUnternehmen(b,c){merker=b;if(!motion){window.slideObj=document.getElementById(c);slideObj.toggle=b;if(!slideObj.direc){slideObj.direc=1}slideObj.speed=parseInt(slideObj.getElementsByTagName("DIV")[0].offsetHeight/4);slideUnternehmen()}return false}function slideUnternehmen(){window.clearTimeout(motion);slideObj.speed*=decrease;ht=parseInt(slideObj.style.height);if(slideObj.direc>0){if(ht<(slideObj.getElementsByTagName("DIV")[0].offsetHeight)){slideObj.style.height=ht+Math.ceil(slideObj.speed)+"px"}else{slideObj.style.height=slideObj.getElementsByTagName("DIV")[0].offsetHeight+"px";slideObj.toggle.className="open";merker.style.visibility="hidden";slideObj.direc*=-1;motion=false;return}}else{if(ht>0){var b=ht-Math.ceil(slideObj.speed);if(b<0){b=0}slideObj.style.height=b+"px"}else{slideObj.style.height="0px";slideObj.toggle.className="";merker.style.visibility="visible";slideObj.direc*=-1;motion=false;return}}motion=window.setTimeout("slideUnternehmen()",40)}function mouseX(b){if(b.pageX){return b.pageX}else{if(b.clientX){return b.clientX+(document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft)}else{return null}}}function mouseY(b){if(b.pageY){return b.pageY}else{if(b.clientY){return b.clientY+(document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop)}else{return null}}}function displayImage(l,m){var c=document.getElementById("Container");try{var h=c.getElementsByTagName("IMG")[0];c.removeChild(h)}catch(g){}var b=document.createElement("IMG");b.src=m;c.appendChild(b);c.style.top=mouseY(l)+"px";c.style.left=mouseX(l)+"px";c.style.display="block"}function emptyContainer(){var b=document.getElementById("Container");var c=b.getElementsByTagName("IMG")[0];b.removeChild(c);b.style.display="none"}function openContentPopup(url,winName,w,h){var parameter="width="+w+",height="+h+",left="+eval((screen.width-w)/2)+",top=50,scrollbars=yes,resizable=yes,location=no,menubar=no,toolbar=no";a=window.open(url,winName,parameter);a.focus();return false}function openRatesTable(){var l=location.href;urlArray=new Array();urlArray=l.split("/");var h;if(urlArray[3].length!=2){h="en"}else{h=urlArray[3]}var e="/"+h+"/faq_rates.htm";var c="ratestable";var g=700;var b=800;openContentPopup(e,c,g,b)}var MONTH_NAMES=new Array("January","February","March","April","May","June","July","August","September","October","November","December","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");var DAY_NAMES=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sun","Mon","Tue","Wed","Thu","Fri","Sat");function LZ(b){return(b<0||b>9?"":"0")+b}function isDate(e,c){var b=getDateFromFormat(e,c);if(b==0){return false}return true}function compareDates(h,l,e,g){var c=getDateFromFormat(h,l);var b=getDateFromFormat(e,g);if(c==0||b==0){return -1}else{if(c>b){return 1}}return 0}function formatDate(R,O){O=O+"";var t="";var D=0;var Q="";var l="";var r=R.getYear()+"";var n=R.getMonth()+1;var P=R.getDate();var v=R.getDay();var u=R.getHours();var G=R.getMinutes();var z=R.getSeconds();var B,C,e,A,S,g,N,L,I,w,U,u,T,q,b,J;var F=new Object();if(r.length<4){r=""+(r-0+1900)}F.y=""+r;F.yyyy=r;F.yy=r.substring(2,4);F.M=n;F.MM=LZ(n);F.MMM=MONTH_NAMES[n-1];F.NNN=MONTH_NAMES[n+11];F.d=P;F.dd=LZ(P);F.E=DAY_NAMES[v+7];F.EE=DAY_NAMES[v];F.H=u;F.HH=LZ(u);if(u==0){F.h=12}else{if(u>12){F.h=u-12}else{F.h=u}}F.hh=LZ(F.h);if(u>11){F.K=u-12}else{F.K=u}F.k=u+1;F.KK=LZ(F.K);F.kk=LZ(F.k);if(u>11){F.a="PM"}else{F.a="AM"}F.m=G;F.mm=LZ(G);F.s=z;F.ss=LZ(z);while(D<O.length){Q=O.charAt(D);l="";while((O.charAt(D)==Q)&&(D<O.length)){l+=O.charAt(D++)}if(F[l]!=null){t=t+F[l]}else{t=t+l}}return t}function _isInteger(e){var c="1234567890";for(var b=0;b<e.length;b++){if(c.indexOf(e.charAt(b))==-1){return false}}return true}function _getInt(l,g,h,e){for(var b=e;b>=h;b--){var c=l.substring(g,g+b);if(c.length<h){return null}if(_isInteger(c)){return c}}return null}function getDateFromFormat(F,w){F=F+"";w=w+"";var E=0;var s=0;var A="";var l="";var D="";var n,m;var e=new Date();var q=e.getYear();var C=e.getMonth()+1;var B=1;var g=e.getHours();var z=e.getMinutes();var u=e.getSeconds();var r="";while(s<w.length){A=w.charAt(s);l="";while((w.charAt(s)==A)&&(s<w.length)){l+=w.charAt(s++)}if(l=="yyyy"||l=="yy"||l=="y"){if(l=="yyyy"){n=4;m=4}if(l=="yy"){n=2;m=2}if(l=="y"){n=2;m=4}q=_getInt(F,E,n,m);if(q==null){return 0}E+=q.length;if(q.length==2){if(q>70){q=1900+(q-0)}else{q=2000+(q-0)}}}else{if(l=="MMM"||l=="NNN"){C=0;for(var v=0;v<MONTH_NAMES.length;v++){var h=MONTH_NAMES[v];if(F.substring(E,E+h.length).toLowerCase()==h.toLowerCase()){if(l=="MMM"||(l=="NNN"&&v>11)){C=v+1;if(C>12){C-=12}E+=h.length;break}}}if((C<1)||(C>12)){return 0}}else{if(l=="EE"||l=="E"){for(var v=0;v<DAY_NAMES.length;v++){var t=DAY_NAMES[v];if(F.substring(E,E+t.length).toLowerCase()==t.toLowerCase()){E+=t.length;break}}}else{if(l=="MM"||l=="M"){C=_getInt(F,E,l.length,2);if(C==null||(C<1)||(C>12)){return 0}E+=C.length}else{if(l=="dd"||l=="d"){B=_getInt(F,E,l.length,2);if(B==null||(B<1)||(B>31)){return 0}E+=B.length}else{if(l=="hh"||l=="h"){g=_getInt(F,E,l.length,2);if(g==null||(g<1)||(g>12)){return 0}E+=g.length}else{if(l=="HH"||l=="H"){g=_getInt(F,E,l.length,2);if(g==null||(g<0)||(g>23)){return 0}E+=g.length}else{if(l=="KK"||l=="K"){g=_getInt(F,E,l.length,2);if(g==null||(g<0)||(g>11)){return 0}E+=g.length}else{if(l=="kk"||l=="k"){g=_getInt(F,E,l.length,2);if(g==null||(g<1)||(g>24)){return 0}E+=g.length;g--}else{if(l=="mm"||l=="m"){z=_getInt(F,E,l.length,2);if(z==null||(z<0)||(z>59)){return 0}E+=z.length}else{if(l=="ss"||l=="s"){u=_getInt(F,E,l.length,2);if(u==null||(u<0)||(u>59)){return 0}E+=u.length}else{if(l=="a"){if(F.substring(E,E+2).toLowerCase()=="am"){r="AM"}else{if(F.substring(E,E+2).toLowerCase()=="pm"){r="PM"}else{return 0}}E+=2}else{if(F.substring(E,E+l.length)!=l){return 0}else{E+=l.length}}}}}}}}}}}}}}if(E!=F.length){return 0}if(C==2){if(((q%4==0)&&(q%100!=0))||(q%400==0)){if(B>29){return 0}}else{if(B>28){return 0}}}if((C==4)||(C==6)||(C==9)||(C==11)){if(B>30){return 0}}if(g<12&&r=="PM"){g=g-0+12}else{if(g>11&&r=="AM"){g-=12}}var b=new Date(q,C-1,B,g,z,u);return b.getTime()}function parseDate(n){var h=(arguments.length==2)?arguments[1]:false;generalFormats=new Array("y-M-d","MMM d, y","MMM d,y","y-MMM-d","d-MMM-y","MMM d");monthFirst=new Array("M/d/y","M-d-y","M.d.y","MMM-d","M/d","M-d");dateFirst=new Array("d/M/y","d-M-y","d.M.y","d-MMM","d/M","d-M");var c=new Array("generalFormats",h?"dateFirst":"monthFirst",h?"monthFirst":"dateFirst");var m=null;for(var g=0;g<c.length;g++){var b=window[c[g]];for(var e=0;e<b.length;e++){m=getDateFromFormat(n,b[e]);if(m!=0){return new Date(m)}}}return null}function initDestinations(){var b=["grey","white","last"];toggleDestinationClass("destinationsThree",3,b);toggleDestinationClass("destinationsFour",4,b)}function toggleDestinationClass(e,c,b){document.getElementsByClassName(e).each(function(r){var s=r.getElementsByTagName("li"),h=s.length,l=b[0],n=new Array(),q,m;for(q=0;q<h;++q){Element.cleanWhitespace(s[q]);if(!s[q].children){n[q]=s[q].childNodes[0]}else{n[q]=s[q].children[0]}if(n[q]&&!Element.hasClassName(n[q],"destHeadline")){Element.addClassName(s[q],l)}switch(true){case (q+1)%c==0:if(n[q]&&!Element.hasClassName(n[q],"destHeadline")){l=l==b[0]?b[1]:b[0]}if(!n[q]){var g=false;for(m=((q+1)-c);m<=q;m++){if(n[m]&&!Element.hasClassName(n[m],"destHeadline")){g=true;break}}if(g===true){l=l==b[0]?b[1]:b[0]}}case (q+1)%c==0||h==(q+1):Element.addClassName(s[q],b[2])}}})}function correctStructBackground(){var e,c,l,h,b=0,g={3:"/de/Images/Buchung/bg_struct_teasergroup_3_3.gif",2:"/de/Images/Buchung/bg_struct_teasergroup_3_3_2teaser.gif",1:"/de/Images/Buchung/bg_struct_teasergroup_3_3_1teaser.gif"};h=getBgTeaserByClassName(document,"strucTeasergroup33");for(e=0;e<h.length;++e){l=getBgTeaserByClassName(h[e],"group alignButton");for(c=0;c<l.length;++c){b=getBgTeaserByClassName(l[c],"contentTeaserImage").length;switch(b%3){case 0:l[c].style.backgroundImage="url("+g[3]+")";break;default:l[c].style.backgroundImage="url("+g[b%3]+")";break}}}}function getBgTeaserByClassName(l,h){var g=new RegExp("(^| )"+h+"($| )");var c=l.getElementsByTagName("*");var b=new Array();var e;for(e=0;e<c.length;e++){if(c[e]&&c[e].className&&c[e].className!=""){if(c[e].className.match(g)){b[b.length]=c[e]}}}return b}function checkFormInput(c,e){var b=document.search.SearchQueryText.value;if(b==""){document.search.SearchQueryText.value=e}else{if(b==e){document.search.SearchQueryText.value=""}}}function alignBoxHights(){var g=document.getElementsByTagName("DIV");var c=new Array();for(j=0;j<g.length;j++){if(g[j].className.indexOf("alignHeight")>0){c.push(g[j])}}for(j=0;j<c.length;j++){var l=0;var b=c[j].getElementsByTagName("DIV");var e=new Array();for(i=0;i<b.length;i++){if(b[i].className.indexOf("alignBox")>0){e.push(b[i])}}for(i=0;i<e.length;i++){var h=e[i];if(h.offsetHeight>l){l=h.offsetHeight}}for(i=0;i<e.length;i++){var h=e[i];h.style.height=l+"px"}}}window.onload=function(){preExecOpened();var b=document.URL.split("/");if(b[b.length-1]!="General-Conditions-of-Carriage.htm"&&b[b.length-1]!="Conditions-generales-de-transport.htm"&&b[b.length-1]!="Condiciones-Generales-de-Transporte.htm"&&b[b.length-1]!="Condizioni-generali-di-trasporto.htm"&&b[b.length-1]!="Algemene-Vervoersvoorwaarden.htm"&&b[b.length-1]!="Ogolne-Warunki-Przewozu.htm"&&b[b.length-1]!="Obshije-uslovija-perevoski-OUP.htm"){alignBoxHights()}};var TrackingStructFinder=Class.create();TrackingStructFinder.prototype={initialize:function(g,e,l,h){this.trackingClassFlag=typeof g=="string"?g:"trckng";this.trackingExpression=typeof e=="string"?e:"trckng-expr";this.trackingContentSeparationCharacters=typeof l=="object"&&typeof(l[0]=="string")&&typeof(l[1]=="string")?l:["(",")"];this.trackingTypeSeparationChar=typeof h=="string"?h:"_";this.elements=[]},find:function(){var g=document.getElementsByClassName(this.trackingClassFlag),e=g.length,h;for(h=0;h<e;++h){Object.extend(g[h],{getTrackingType:function(){return this.trackingType},setTrackingType:function(b){this.trackingType=b;return this}});this.elements.push(g[h].setTrackingType(this.extractMetaData(g[h]).type))}return this.elements},getTrackingSeparators:function(){return{classFlag:this.trackingClassFlag,expression:this.trackingExpression,contentSeparationCharacters:this.trackingContentSeparationCharacters,typeSeparationChar:this.trackingTypeSeparationchar}},extractMetaData:function(e){e=e.className;e=e.substr(e.indexOf(this.trackingExpression+this.trackingContentSeparationCharacters[0])+(this.trackingExpression+this.trackingContentSeparationCharacters[0]).length).split(this.trackingContentSeparationCharacters[1])[0];var c=e.indexOf(this.trackingTypeSeparationChar);return{type:e.substr(0,c),id:e.substr(c+1)}}};var AbstractTrackingPlugin=Class.create();AbstractTrackingPlugin.prototype={initialize:function(){this.trackingSeparator="|";this.filters=[];this.beforeFilters=[]},getPluginName:function(){if(typeof this.name=="string"&&this.name!=""){return this.name}throw"No concrete plugin handler implementation available"},trackingHandler:function(){throw"No concrete tracking handler implementation available"},setTrackingSeparator:function(b){this.trackingSeparator=typeof b=="string"?b:"|";return this},addFilter:function(b){b instanceof AbstractEmitterPlugin&&this.filters.push(b);return this},addBeforeFilter:function(b){b instanceof AbstractEmitterPlugin&&this.beforeFilters.push(b);return this},sendTrackingValues:function(g,e){var h=s_gi("germanwingscomprod");h.linkTrackVars="eVar9";h.linkTrackEvents="None";h.eVar9=g;h.tl(e,"e","Link Name");return this},renderLinkSignature:function(h,g,q){var n=this.filters.length,m=this.beforeFilters.length;q=typeof q!="string"&&typeof q!="number"?1:q;var l;for(l=0;l<m;++l){h=this.beforeFilters[l].filter(h);this.beforeFilters[l].filter(q);g=this.beforeFilters[l].filter(g)}h=h+this.trackingSeparator+q+this.trackingSeparator+g;for(g=0;g<n;++g){h=this.filters[g].filter(h)}return h},findParentTrackingContainer:function(b){return b.className.search("\\b"+this.separators.classFlag+"\\b")!=-1?b:this.findParentTrackingContainer(b.parentNode)},setTrackingSeparators:function(b){this.separators=b;return this},getParentElement:function(b){return b===document||b.tagName.toLowerCase()=="a"?b:this.getParentElement(b.parentNode)}};var AbstractEmitterPlugin=Class.create();AbstractEmitterPlugin.prototype={initialize:function(){},filter:function(){throw"No concrete filter emitter handler implementation available"}};var TrackingPluginManager=Class.create();TrackingPluginManager.prototype={initialize:function(b){this.separators=b;this.plugins={}},attach:function(b){if(b instanceof AbstractTrackingPlugin){this.plugins[b.getPluginName()]=b.setTrackingSeparators(this.separators)}return this},detach:function(e){var c={};if(!this.hasPlugin(e)){return this}for(index in this.plugins){if(index!=e){c[index]=this.plugins[index]}}this.plugins=c;return this},hasPlugin:function(b){return typeof this.plugins[b]=="object"&&this.plugins[b] instanceof AbstractTrackingPlugin?true:false},getPlugin:function(b){return this.hasPlugin(b)?this.plugins[b]:null}};var TrackingEventDecorator=Class.create();TrackingEventDecorator.prototype={initialize:function(e,c){this.pluginManager=e;this.trackingSeparator=typeof c=="string"?c:"|";this.filters=[];this.beforeFilters=[]},addFilter:function(b){b instanceof AbstractEmitterPlugin&&this.filters.push(b);return this},before:function(){this.beforeFilters.push(this.filters.pop());return this},attachEventHandler:function(e){var c=typeof e.getTrackingType=="function"?e.getTrackingType():null;if(c===null){throw"Element is not trackable"}if(!this.pluginManager.hasPlugin(c)){throw"Tracking plugin '"+c+"' does not exist"}c=this.pluginManager.getPlugin(c);c.setTrackingSeparator(this.trackingSeparator);for(index in this.filters){c.addFilter(this.filters[index])}for(index in this.beforeFilters){c.addBeforeFilter(this.beforeFilters[index])}Event.observe(e,"click",c.trackingHandler.bind(c));return this}};var SpecialCharacterReplacer=Class.create();SpecialCharacterReplacer.prototype=Object.extend(new AbstractEmitterPlugin,{filter:function(b){return this.replaceChars(["\u00fc","\u00dc","\u00e4","\u00c4","\u00f6","\u00d6","\u00df","&uuml;","&Uuml;","&auml;","&Auml;","&ouml;","&Ouml;","&szlig;","&euro;","\u20ac","&amp;","&","|"],["ue","Ue","ae","Ae","oe","Oe","ss","ue","Ue","ae","Ae","oe","Oe","ss","EUR","EUR","und","und",""],b)},replaceChars:function(h,g,n){var m=h.length;n=new String(n);var l;for(l=0;l<m;++l){if(typeof g[l]=="string"){n=n.replace(RegExp(h[l],"g"),g[l])}}return n}});var TrackerTeasergroup44=Class.create();TrackerTeasergroup44.prototype=Object.extend(new AbstractTrackingPlugin,{name:"Teasergroup44",initialize:function(b){this.classNames=b},trackingHandler:function(e){e=Event.element(e);var c=new TrackingStructFinder;this.getParentElement(e)!==document&&this.sendTrackingValues(this.renderLinkSignature(c.extractMetaData(this.findParentTrackingContainer(e)).id,this.getTeaserContent(e),this.getTeaserPosition(e),this.getExtraContent(e)))},getTeaserPosition:function(g){var e=this.traceTeaserContainer(g,this.classNames);g=function(v,u){var t=v.getElementsByTagName("*"),s=u.length,r=t.length,c=[],b,n,q;for(q=0;q<r;++q){for(n=0;n<s;++n){b=RegExp("\\b"+u[n]+"\\b");b.test(t[q].className)&&c.push(t[q])}}return c}(this.findParentTrackingContainer(g),this.classNames);var h=g.length;for(k=0;k<h;++k){if(g[k]===e){return k+1}}return 1},getTeaserContent:function(e){e=function(b){if(b===document){return b}return b.getElementsByTagName("h5")[0]||b.getElementsByTagName("h4")[0]||b.getElementsByTagName("h3")[0]||b.getElementsByTagName("h2")[0]||document}(this.traceTeaserContainer(e,this.classNames));var c=e.childNodes[0];return c.nodeName.toLowerCase()=="img"?c.alt:e===document?"No trackable content available":e.innerHTML.replace(/^\s\s*/,"").replace(/\s\s*$/,"")},traceTeaserContainer:function(g,e){var l=e.length,h;if(g===document){return g}else{for(h=0;h<l;++h){if(Element.hasClassName(g,e[h])){return g}}return this.traceTeaserContainer(g.parentNode,e)}},getExtraContent:function(h){var g=h.parentNode,n=[],m=0;n=[];m=0;var l="";if(!(h.tagName.toLowerCase()!="a"||g.tagName.toLowerCase()!="li"||g.className.search("hplpt")==-1)){n=h.href.replace(".htm","").split("/");m=n.length;for(g=0;g<m;++g){if(g+2==m||g+1==m){l+=n[g]+(g+2==m?" -> ":" ")}}n=h.innerHTML.split(" ");m=n.length;for(g=0;g<m;++g){if(g+2==m){l+=n[g]+" EUR"}}return l}},renderLinkSignature:function(l,h,s,r){var q=this.filters.length,n=this.beforeFilters.length;s=typeof s!="string"&&typeof s!="number"?1:s;r=typeof r=="string"?r:false;var m;for(m=0;m<n;++m){l=this.beforeFilters[m].filter(l);this.beforeFilters[m].filter(s);h=this.beforeFilters[m].filter(h);r=r!==false?this.beforeFilters[m].filter(r):false}l=l+this.trackingSeparator+s+this.trackingSeparator+h+(r!==false?this.trackingSeparator+r:"");for(h=0;h<q;++h){l=this.filters[h].filter(l)}return l}});var TrackerQuadrupelSquare=Class.create();TrackerQuadrupelSquare.prototype=Object.extend(new AbstractTrackingPlugin,{name:"QuadrupelSquare",trackingHandler:function(g){g=Event.element(g);var e=this.getParentElement(g),h=new TrackingStructFinder;if(e!==document){h=h.extractMetaData(this.findParentTrackingContainer(g));this.sendTrackingValues(this.renderLinkSignature(h.id,typeof e.className!="string"||e.className!="offer-teaser"?this.getTeaserContentByLink(e):this.getTeaserContentByMarkup(e),this.getTeaserPosition(g)))}},getTeaserContentByLink:function(g){g=g.href;var e,h;if(typeof g.split("?")[1]!="undefined"){e=g.split("?")[1].split("&");g=e[0].split("=")[1];h=e[1].split("=")[1];e=e[2].split("=")[1]}else{e=g.replace(".htm","").replace(".shtm","").replace(".aspx","").split("/");data_length=e.length;g=e[e.length-2];h=e[e.length-1];e=null}return g+" -> "+h+(e!=null?" @ "+e:"")},getTeaserContentByMarkup:function(g){g=g.getElementsByTagName("span");var e=g.length,l={currency:"",decimal:"",destination:"","int":"",origin:"",sep:""},h;for(h=0;h<e;++h){if(typeof g[h].className=="string"&&typeof l[g[h].className]=="string"){l[g[h].className]=g[h].innerHTML}}return l.origin+" -> "+l.destination+" @ "+l["int"]+l.sep+l.decimal+" "+l.currency},getTeaserPosition:function(g){var e=this.getParentElement(g);g=this.findParentTrackingContainer(g).getElementsByTagName("a");var l=g.length,h;for(h=0;h<l;++h){if(g[h]===e){return h+1}}return 1}});var TrackerCalendarTeaser=Class.create();TrackerCalendarTeaser.prototype=Object.extend(new AbstractTrackingPlugin,{name:"CalendarTeaser",trackingHandler:function(b){b=Event.element(b);this.sendTrackingValues(this.renderLinkSignature((new TrackingStructFinder).extractMetaData(this.findParentTrackingContainer(b)).id,b.alt))}});var TrackerSidebarDefault=Class.create();TrackerSidebarDefault.prototype=Object.extend(new AbstractTrackingPlugin,{name:"SidebarDefault",trackingHandler:function(e){e=Event.element(e);var c=new TrackingStructFinder;if(this.getParentElement(e)!==document){c=c.extractMetaData(this.findParentTrackingContainer(e));this.sendTrackingValues(this.renderLinkSignature(c.id,this.getSidebarContent(e),this.getSidebarPosition(e)))}},getSidebarContent:function(g){var e=function(b){return b.replace(/^\s\s*/,"").replace(/\s\s*$/,"")},l=this.findBox(this.getParentElement(g));l=typeof l=="object"?l.parentNode.getElementsByTagName("h5")[0]||l.parentNode.getElementsByTagName("h4")[0]||l.parentNode.getElementsByTagName("h3")[0]||l.parentNode.getElementsByTagName("h2")[0]||null:document;var h=l.childNodes[0];if(l!==document){return h.nodeName.toLowerCase()=="img"&&typeof h.alt=="string"&&e(g.alt)!=""?h.alt:e(l.innerHTML)}if(g.tagName.toLowerCase()=="img"&&typeof g.alt=="string"&&e(g.alt)!=""){return g.alt}return"No trackable content available"},getSidebarPosition:function(g){var e=this.findParentTrackingContainer(g);g=this.findBox(this.getParentElement(g));e=function(n){n=n.getElementsByTagName("*");var m=n.length,c=[],b;for(b=0;b<m;++b){Element.hasClassName(n[b],"box")&&c.push(n[b])}return c}(e);var l=e.length,h;for(h=0;h<l;++h){if(g===e[h]){return h+1}}return 1},findBox:function(b){return Element.hasClassName(b,"box")===true?b:this.findBox(b.parentNode)}});var TrackerTicker=Class.create();TrackerTicker.prototype=Object.extend(new AbstractTrackingPlugin,{name:"Ticker",elements:[],elementsData:[],initialize:function(){setTimeout(function(){var h=[],g=(new TrackingStructFinder).find(),n=[],m=g.length,l;for(l=0;l<m;++l){if(g[l].className.search(this.getPluginName()+"_")>-1){n=g[l].getElementsByTagName("a")}}for(g=0;g<n.length;++g){typeof h[n[g].innerHTML]!=="object"&&this.elements.push(n[g])}}.bind(this),350)},trackingHandler:function(e){e=Event.element(e);var c=new TrackingStructFinder;if(this.getParentElement(e)!==document){c=c.extractMetaData(this.findParentTrackingContainer(e));this.sendTrackingValues(this.renderLinkSignature(c.id,this.getTickerContent(e),this.getTickerPosition(e)))}},getTickerContent:function(b){return typeof b.title==="string"&&b.title.length>0?b.title:b.innerHTML},getTickerPosition:function(g){var e=this.elements.length,h;for(h=0;h<e;++h){if(g.innerHTML==this.elements[h].innerHTML){return h+1}}return 1}});Event.observe(window,"load",function(){var g=new TrackingStructFinder,e=g.find(),l=new TrackingPluginManager(g.getTrackingSeparators());g=e.length;var h;l.attach(new TrackerTeasergroup44(["contentTeaserBgImage","contentTeaserImage","teaser14FlagTable","contentTeaserBgIcon"])).attach(new TrackerQuadrupelSquare).attach(new TrackerCalendarTeaser).attach(new TrackerSidebarDefault).attach(new TrackerTicker);l=new TrackingEventDecorator(l);l.addFilter(new SpecialCharacterReplacer).before();for(h=0;h<g;++h){l.attachEventHandler(e[h])}});function preExecOpened(){var e=document.getElementsByClassName("switchBar"),c=[],g,b;for(key in e){if(typeof e[key]!=="function"){if(e[key].getAttribute("rel")=="open"){c.push(e[key])}}}for(key in c){if(typeof e[key]!=="function"){cur_obj=e[key].getElementsByTagName("h4")[0];g=e[key].nextSibling;while(g.nodeType!=1){g=g.nextSibling}b=g.getElementsByTagName("DIV")[0].offsetHeight;e[key].getElementsByTagName("h4")[0].className="open";Element.setStyle(g,{borderStyle:"solid"});Element.setStyle(g,{height:b});g.setAttribute("style",g.getAttribute("style")+"height:"+b+"px;")}}}var ac_url=document.URL.split("/");if(ac_url[ac_url.length-1]!="Allgemeine-Befoerderungsbedingungen-ABB.htm"&&ac_url[ac_url.length-1]!="Unternehmen-Pressearchiv.htm"){Event.observe(window,"load",function(){correctTeaserHeadlines()})}function correctTeaserHeadlines(){var b=document.getElementsByTagName("link");landing_page=false;for(var J=0;J<b.length;++J){if(b[J].getAttribute("href")&&b[J].getAttribute("href").search(/master.+/)!=-1){landing_page=true}}if(landing_page===false){var l=[],I=["contentTeaserBgIcon","contentTeaserBgImageLarge","contentTeaserImage","teaserOnlyHeadline","picText"],F=false,e=Element,H,r,q,A,C,g=0,G,E,u,B,w="18.2px",v,n=F,z=F,s=true,D="h5";for(r=0;r<I.length;++r){H=document.getElementsByClassName(I[r]);if(H!=""){for(q=0;q<H.length;++q){l[g]=H[q];g=l.length}}}if(g>0){for(A=0;A<g;++A){for(C=0;C<l[A].getElementsByTagName(D).length;++C){G=l[A].getElementsByTagName(D)[C];E=G.parentNode.className;e.setStyle(G,{display:"inline"});u=parseInt(e.getStyle(G,"padding-top").replace("px",""));u=u===undefined?0:u;B=e.getHeight(G);if(E==I[0]){u=0}if((B-u)>=60&&E!=I[1]){n=s}if(B>=34&&E==I[4]){z=n=s}if(E==I[1]){if(B-u>=34){n=s}}e.setStyle(G,{display:"block"})}}}if(n===s){for(A=0;A<l.length;++A){for(C=0;C<l[A].getElementsByTagName(D).length;++C){v=$(l[A]);e.setStyle(v.getElementsByTagName("div")[0],{marginTop:w});if(z===s){e.setStyle(v.getElementsByTagName("p")[0],{marginTop:w})}}}}}}Event.observe(window,"load",function(){if(typeof run_ticker=="function"){run_ticker()}});var OriginalNavItem;var CurrentNavigationTimeout=0;var CurrentMousePosX=0;var CurrentMousePosY=0;var LastMousePosX=0;var LastMousePosY=0;function HoverNavigationItem(e){e.onmousemove=e.onmouseover;if(!IsCursorMoved(CurrentMousePosX,CurrentMousePosY,LastMousePosX,LastMousePosY)){return false}else{LastMousePosX=CurrentMousePosX;LastMousePosY=CurrentMousePosY}if(CurrentNavigationTimeout!=0){clearTimeout(CurrentNavigationTimeout)}var h=null;var g=null;if(Prototype.Version=="1.4.0"){h=document.getElementsByClassName("topnav active");g=document.getElementsByClassName("subnav active")}else{var h=$$(".topnav.active");var g=$$(".subnav.active")}if(h.length>0){for(var c=0;c<h.length;c++){h[c].className="topnav"}}if(g.length>0){for(var b=0;b<g.length;b++){g[b].className="subnav"}}e.className="subnav active";if(document.getElementById(e.id+"-subnav")){document.getElementById(e.id+"-subnav").className="subnav active"}if(typeof(DefaultActiveNavItem)!="undefined"){if(DefaultActiveNavItem.length>0){OriginalNavItem=document.getElementById(DefaultActiveNavItem);CurrentNavigationTimeout=setTimeout("HoverNavigationItem(OriginalNavItem)",3000)}}}function IsCursorMoved(h,g,e,c){var b=false;if((h-e>10)||(e-h>10)||(g-c>10)||(c-g>10)){b=true}return b}var IE=document.all?true:false;if(!IE){document.captureEvents(Event.MOUSEMOVE)}document.onmousemove=getMouseXY;var tempX=0;var tempY=0;function getMouseXY(b){if(IE){tempX=event.clientX+(document.body!=null?document.body.scrollLeft:0);tempY=event.clientY+(document.body!=null?document.body.scrollTop:0)}else{tempX=b.pageX;tempY=b.pageY}if(tempX<0){tempX=0}if(tempY<0){tempY=0}CurrentMousePosX=tempX;CurrentMousePosY=tempY;return true}var Germanwings={FlightSelection:function(e,b,c){this._id=e;this._anchor=Element.extend(b);this._i18n=c;this._init=function(){this._data=[];this._rowCount=0;var u=Element.extend(document.createElement("table"));u.className="gwui_flightsel";u.style.display="none";u.id=this._id;var q=u.createTHead();var r=q.insertRow(-1);var n=document.createElement("th");r.appendChild(n);var h=document.createElement("th");h.appendChild(document.createTextNode(this._i18n.date));r.appendChild(h);var t=document.createElement("th");t.appendChild(document.createTextNode(this._i18n.departure));r.appendChild(t);var l=document.createElement("th");l.appendChild(document.createTextNode(this._i18n.arrival));r.appendChild(l);var v=document.createElement("th");v.appendChild(document.createTextNode(this._i18n.flightNo));r.appendChild(v);var s=document.createElement("th");s.appendChild(document.createTextNode(this._i18n.via));r.appendChild(s);var g=u.insertRow(-1);g.className="gwui_flightsel_flight";var m=g.insertCell(-1);m.colSpan=6;m.appendChild(document.createTextNode(this._i18n.noData));this._anchor.parentNode.appendChild(u);this._table=u};this.reset=function(){this._table.remove();this._init()};this.show=function(){this._positionTable();this._table.show()};this.hide=function(){this._table.hide()};this.toggle=function(){this._positionTable();this._table.toggle()};this.visible=function(){return this._table.visible()};this.rowCount=function(){return this._rowCount};this.appendRow=function(m){if(this._rowCount==0){this._table.deleteRow(1)}var s=Element.extend(document.createElement("input"));s.type="radio";s.name=this._id+"_radio";s.observe("click",this._select.bindAsEventListener(this,this._rowCount,s));var u=Element.extend(this._table.insertRow(-1));u.className="gwui_flightsel_flight";u.observe("mouseover",function(){this.className="gwui_flightsel_flight_hover"}.bindAsEventListener(u));u.observe("mouseout",function(){this.className="gwui_flightsel_flight"}.bindAsEventListener(u));u.observe("click",this._select.bindAsEventListener(this,this._rowCount,s));var r=u.insertCell(-1);r.appendChild(s);var q=u.insertCell(-1);q.appendChild(document.createTextNode(m.date));var h=u.insertCell(-1);h.appendChild(document.createTextNode(m.departureTime));var g=u.insertCell(-1);g.appendChild(document.createTextNode(m.arrivalTime));var n=u.insertCell(-1);n.appendChild(document.createTextNode(m.flightNo));var t=u.insertCell(-1);var l;if(m.via){l=m.via}else{l="-"}t.appendChild(document.createTextNode(l));m._inp=s;this._data[this._rowCount]=m;this._rowCount++};this._positionTable=function(){var g=Position.cumulativeOffset(this._anchor);this._table.style.left=g[0]+"px";this._table.style.top=g[1]+this._anchor.getHeight()-1+"px"};this._select=function(m,g,l){for(var h=0;h<this._data.length;h++){this._data[h]._inp.checked=false}l.checked=true;this.hide();if(this.callback){this.callback(this._data[g])}};this._init(e)}};function TabView(b,c){this.tabView=new YAHOO.widget.TabView(b);this.addTabs=function(h){for(var g=0;g<h.length;g++){var m=h[g];var e=(m.onClickURL!==undefined&&m.onClickURL!=null);var n;if(e){n={label:m.label,href:m.onClickURL}}else{n={label:m.label,dataSrc:m.dataSrc,cacheData:true}}var l=new YAHOO.widget.Tab(n);l.on("click",this.clickEvent,l,this);if(e){l.set("activationEvent",null)}YAHOO.plugin.Dispatcher.delegate(l,this.tabView)}};this.clickEvent=function(e,l){try{var h=s_gi("germanwingscomprod");h.linkTrackVars="None";h.linkTrackEvents="None";h.tl(l,"o",'CompactSearch: Tab "'+l.get("label")+'" clicked')}catch(g){}};this.addTabs(c)}function CarRentalAutocomplete(e,b,c,g){this.setStations=function(l){this.stationList=new Array();for(var h=0;h<l.length;h++){this.stationList.push({name:l[h][0],code:l[h][1]})}};this.getStations=function(r){var n=decodeURIComponent(r.toLowerCase());var l=new Array();for(var h=0;h<this.stationList.length;h++){var m=this.stationList[h];if(n==m.code.toLowerCase()||m.name.toLowerCase().indexOf(n)>=0){l.push(m)}}return l};this.formatResult=function(h){return"<div class='station active-station'><div class='name'>"+h.name+"</div><div class='code'>"+h.code+"</div></div>"};this.select=function(q,n,h){var l=n[2];var m=n[0].getInputEl();$(h.formFields[m.id]).value=l.code;if(m.id==h.checkOutStationFieldName&&$(h.formFields[h.checkInStationFieldName]).value==""){$(h.checkInStationFieldName).value=l.name;$(h.formFields[h.checkInStationFieldName]).value=l.code}};this.createAutocomplete=function(q){var l=new YAHOO.widget.AutoComplete(q,q+"Container",this.dataSource);l.formatResult=this.formatResult;l.resultTypeList=false;l.forceSelection=false;l.minQueryLength=0;if($(q+"Toggle")){var m=$(q+"Toggle");var n=new YAHOO.widget.Button({container:m});var h=function(r){if(l.isContainerOpen()){l.collapseContainer()}else{l.getInputEl().focus();setTimeout(function(){l.sendQuery("")},0)}};n.on("click",h)}l.itemSelectEvent.subscribe(this.select,this);return l};this.formFields=new Array();this.formFields[e]=c;this.formFields[b]=g;this.stationList=[{name:"Bitte auswählen",code:""}];this.dataSource=new YAHOO.util.FunctionDataSource(this.getStations);this.dataSource.responseSchema={fields:["name","code"]};this.dataSource.scope=this;this.checkOutStationFieldName=e;this.checkInStationFieldName=b;this.checkOutAutocomplete=this.createAutocomplete(e);this.checkInAutocomplete=this.createAutocomplete(b);Event.observe(this.checkOutStationFieldName,"click",function(){this.select()}.bind($(this.checkOutStationFieldName)));Event.observe(this.checkOutStationFieldName,"focus",function(){this.select()}.bind($(this.checkOutStationFieldName)));Event.observe(this.checkInStationFieldName,"click",function(){this.select()}.bind($(this.checkInStationFieldName)));Event.observe(this.checkInStationFieldName,"focus",function(){this.select()}.bind($(this.checkInStationFieldName)))}function TabViewCalendar(c,b){this.containerField=$(c);this.handleSelect=function(h,g,l){var e=g[0][0];l.selectedDate={day:l.formatDate(e[2]),month:l.formatDate(e[1]),year:e[0]};l.inputField.value=l.selectedDate.day+"."+l.selectedDate.month+"."+l.selectedDate.year;l.calendar.hide()};this.formatDate=function(e){if(e<10){return"0"+e}else{return e}};this.inputClick=function(e){if(Element.visible(this.containerField)){this.calendar.hide();Event.stop(e)}else{this.calendar.show()}};this.createCalendar=function(e){var h=new Date();var l=this.formatDate(h.getMonth()+1)+"/"+this.formatDate(h.getDate())+"/"+h.getFullYear();var g=new YAHOO.widget.Calendar(e,{START_WEEKDAY:1,mindate:l,iframe:false});if(typeof localizeCalendar=="function"){localizeCalendar(g)}g.selectEvent.subscribe(this.handleSelect,this);return g};this.calendar=this.createCalendar(c);this.inputField=$(b);this.selectedDate=null;Event.observe(this.inputField,"click",this.inputClick.bindAsEventListener(this));this.calendar.render()}function TabViewDataPicker(g,b,e,c){this.containerField=$(g);this.inputField=$(b);this.allowedValues=e;this.dataPickerGroup=c;this.inputClick=function(h){if(Element.visible(this.containerField)){Element.hide(this.containerField);Event.stop(h);return}this.showAndHideOthers()};this.inputFocus=function(h){this.showAndHideOthers()};this.elementClick=function(h){Element.hide(this.containerField);this.inputField.value=h.innerHTML};this.showAndHideOthers=function(){if(this.dataPickerGroup!==undefined&&this.dataPickerGroup!=null&&this.dataPickerGroup!=""){var l=document.getElementsByClassName(this.dataPickerGroup);for(var h=0;h<l.length;h++){Element.hide(l[h])}}Element.show(this.containerField)};this.render=function(){Element.hide(this.containerField);var m=document.createElement("ul");for(var l=0;l<this.allowedValues.length;l++){var n=this.allowedValues[l];var h=document.createElement("li");h.innerHTML=n;m.appendChild(h);Event.observe(h,"click",this.elementClick.bind(this,h));Event.observe(h,"mouseover",function(){Element.addClassName(this,"hover")}.bind(h));Event.observe(h,"mouseout",function(){Element.removeClassName(this,"hover")}.bind(h))}this.containerField.appendChild(m)};Event.observe(this.inputField,"click",this.inputClick.bindAsEventListener(this));this.render()}var PriceTeasers=Class.create();PriceTeasers.prototype={elements:[],elementsLength:0,baseUrl:(window.location.protocol=="http:"?"http://":"https://")+document.URL.split("/")[2]+"/xml/connections/",translations:{from:{"de-DE":"ab","en-GB":"from"}},initialize:function(){Event.observe(window,"load",function(){var b;this.elements=this.getTeaserElements();this.elementsLength=this.elements.length;for(b=0;b<this.elementsLength;++b){this.renderPriceTeaser(this.getMetaData(this.elements[b]))}}.bind(this))},getTeaserElements:function(){var b=document.getElementsByClassName("teaser",$("content"));return typeof b=="object"&&typeof b.length!="undefined"?b:[]},getMetaData:function(b){var e=/^pt_([^_]{3})_([^_]{3})_(.{5})$/,c;c=b.firstChild.firstChild;e.exec(c.id);return{element:c,origin:RegExp.$1.toLowerCase(),destination:RegExp.$2.toLowerCase(),culture:RegExp.$3}},renderPriceTeaser:function(b){new Ajax.Request(this.getXmlUrl(b),{method:"get",onSuccess:function(e){var c=this.grabPriceFromXml(e.responseXML);b.element.innerHTML='<div class="priceTeaser">'+this.getTranslationFor(b.culture,b.origin,"airport")+"<br />&ndash;<br />"+this.getTranslationFor(b.culture,b.destination,"airport")+'<table><tbody><tr><td rowspan="2" class="bottom"><span>'+this.getTranslationFor(b.culture,"from")+'</span></td><td rowspan="2" class="big price">'+c.big+'</td><td class="fraction price"><span>'+c.fraction+'</span></td></tr><tr><td class="currency"><span>'+c.currency+"*</span></td></tr></tbody></table></div>"}.bind(this),onError:function(){throw"Error retrieving connection xml file"}})},getXmlUrl:function(e){var c=e.origin,b=e.destination;return this.baseUrl+c+b+"/"+c+b+".xml"},grabPriceFromXml:function(e){var b=e.getElementsByTagName("offer"),c=b.length,t={EUR:"&euro;"},r=1000000,u,s,g,m,l,q,n,h;for(n=0;n<c;++n){u=parseFloat(b[n].firstChild.nodeValue);if(u<r){r=u;l=b[n].attributes;q=l.length;for(h=0;h<q;++h){if(l[h].nodeName.toLowerCase()=="currency"){s=l[h].nodeValue}}}}g=r+"";m=g.split(".");return{big:m[0],fraction:m[1],currency:t[s]}},getTranslationFor:function(c,h,g){var e,b;g=typeof g!="string"?"simple":g;if(g=="simple"){b=this.translations[h][c];if(typeof b!="string"){throw"No proper translation found for"+h+" "+c+" "+g}return b}if(g=="airport"){e=Stations[h.toUpperCase()];if(typeof e.name=="string"){return e.name}throw"Station with 3-Letter Code "+h+" not found"}throw"No proper translation type defined!"}};function ShowLanguageSelect(){var b=document.getElementById("language_select");b.style.visibility="visible"}function HideLanguageSelect(){var b=document.getElementById("language_select");b.style.visibility="hidden"}function ShowLoginBox(){var c=document.getElementById("loginbox");var b=document.getElementById("UserNameField");c.style.visibility="visible";b.focus()}function HideLoginBox(){var b=document.getElementById("loginbox");b.style.visibility="hidden"}var CurrentCulture="de-DE";var InitialItem="";function SetActiveCulture(b){CurrentCulture=b}function setActiveMenuItem(e){if(InitialItem.length==0){InitialItem=e}resetAllMenuItems();var c=document.getElementById(e);if(c){for(var b=0;b<topnavimages.length;b++){if(e==topnavimages[b][0]){var h=topnavimages[b][2]}}c.style.backgroundImage="url("+h+")"}var g=document.getElementById(e+"Submenu");if(g){g.style.visibility="visible"}}function resetSingleMenuItem(e){var c=document.getElementById(e);if(c){for(var b=0;b<topnavimages.length;b++){if(e==topnavimages[b][0]){var h=topnavimages[b][1]}}c.style.backgroundImage="url("+h+")"}var g=document.getElementById(e+"Submenu");if(g){g.style.visibility="hidden"}}function resetAllMenuItems(){var c=getElementsByClassName("TopItem","div",null);for(var b=0;b<c.length;b++){resetSingleMenuItem(c[b].id)}}function getElementsByClassName(n,q,m){var c=new RegExp("(^|s)"+n+"(s|$)");var q=q||"*";var m=m||document;var b=(q=="*"&&m.all)?m.all:m.getElementsByTagName(q);var g=[];var l;var e=b.length;for(var h=0;h<e;h++){l=b[h];if(c.test(l.className)){g.push(l)}}return g}function GetMatchingStations(SearchTerm){var BestMatchingStations=new Array();var DebugString="";if(Stations!=null&&SortedStations!=null){for(var i=0;i<SortedStations.length;i++){var CurrentStationCode=SortedStations[i];var CurrentStationName=Stations[CurrentStationCode].name;RegExpTerm=eval("/(.*)"+SearchTerm.toLowerCase().replace(" ","|")+"(.*)/");if(CurrentStationName.toLowerCase().search(RegExpTerm)!=-1){BestMatchingStations.push(CurrentStationCode);DebugString+=CurrentStationCode+"\n"}}}return BestMatchingStations}function SearchFlights(w,n,e,B,g,r,h,c,l,z,q){var v=q||"de-DE";var b=function(C){if(C<10){return"0"+C}else{return C}};var A=function(E){var D=parseInt(E.substring(E.lastIndexOf(".")+1),10);var F=parseInt(E.substring(E.indexOf(".")+1,E.lastIndexOf(".")),10)-1;var C=parseInt(E.substring(0,E.indexOf(".")),10);return new Date(D,F,C)};var s=function(C){return C.getFullYear()+"-"+b(C.getMonth()+1)+"-"+b(C.getDate())};var m="/skysales/Deeplink.aspx";m+="?o="+w;m+="&d="+n;if(z=="OneWay"){m+="&t=o"}else{m+="&t=r"}var t;if(e==null||e==""){t=new Date(new Date().getTime()+1000*60*60*24*30)}else{t=A(e)}m+="&od="+s(t);if(z=="RoundTrip"){var u;if(B==null||B==""){u=new Date(t.getTime()+1000*60*60*24*7)}else{u=A(B)}m+="&rd="+s(u)}m+="&adt="+r;m+="&chd="+h;m+="&inf="+c;m+="&lng="+v;window.location=m}function SearchWWFlights(g,m,v,c,e,u,n,s,w,h,b){var l=new Date(v.substring(v.lastIndexOf(".")+1),(v.substring(v.indexOf(".")+1,v.lastIndexOf("."))-1),v.substring(0,v.indexOf(".")));var t=new Date(c.substring(c.lastIndexOf(".")+1),(c.substring(c.indexOf(".")+1,c.lastIndexOf("."))-1),c.substring(0,c.indexOf(".")));var r="false";if(h=="OneWay"){r="true"}else{r="false"}var q="http://www.bmibaby.com/mvc/Deeplink/Flight/GW?";q+="Origin="+g;q+="&Dest="+m;q+="&OneWay="+r;q+="&Depart="+l.getFullYear()+"-"+(l.getMonth()+1)+"-"+l.getDate();if(h=="RoundTrip"){q+="&Return="+t.getFullYear()+"-"+(t.getMonth()+1)+"-"+t.getDate()}q+="&Adults="+u;q+="&Children="+n;q+="&Infants="+s;window.open(q,"_blank")}function SearchVYFlights(A,r,c,E,g,t,h,b,l,B,s){var z=new Date(c.substring(c.lastIndexOf(".")+1),(c.substring(c.indexOf(".")+1,c.lastIndexOf("."))-1),c.substring(0,c.indexOf(".")));var e=new Date(E.substring(E.lastIndexOf(".")+1),(E.substring(E.indexOf(".")+1,E.lastIndexOf("."))-1),E.substring(0,E.indexOf(".")));var v="EN";switch(s){case"de-DE":case"en-GB":v="EN";break;case"es-ES":v="ES";break;case"fr-FR":v="FR";break;case"it-IT":v="IT";break;case"nl-NL":v="NL";break;default:v="EN"}var C="2";if(B==="OneWay"){C="1"}var n="http://www.vueling.com/skylights/cgi-bin/skylights.cgi?";var q="event=search&module=SB&page=SEARCH&language="+v;q+="&travel="+C+"&from1="+A+"&to1="+r;var D=z.getDate()<10?"0"+z.getDate().toString():z.getDate().toString();var m=(z.getMonth()+1)<10?"0"+(z.getMonth()+1).toString():(z.getMonth()+1).toString();q+="&departDay1="+D;q+="&departMonth1="+z.getFullYear().toString()+m;q+="&departDate1="+z.getFullYear().toString()+m+D;q+="&depart1FlexBy=0101";if(C==="2"){q+="&from2="+r+"&to2="+A;var u=e.getDate()<10?"0"+e.getDate().toString():e.getDate().toString();var w=(e.getMonth()+1)<10?"0"+(e.getMonth()+1).toString():(e.getMonth()+1).toString();q+="&departDay2="+u;q+="&departMonth2="+e.getFullYear().toString()+w;q+="&departDate2="+e.getFullYear().toString()+w+u;q+="&depart2FlexBy=0101"}q+="&ADULT="+t+"&CHILD="+h+"&INFANT="+b+"&numberMarkets="+C;window.open(n+q,"_blank")}function SearchDEFlights(z,q,c,C,g,s,h,b,l,A,r){var w=new Date(c.substring(c.lastIndexOf(".")+1),(c.substring(c.indexOf(".")+1,c.lastIndexOf("."))-1),c.substring(0,c.indexOf(".")));var e=new Date(C.substring(C.lastIndexOf(".")+1),(C.substring(C.indexOf(".")+1,C.lastIndexOf("."))-1),C.substring(0,C.indexOf(".")));var u="de";switch(r){case"de-DE":u="de";break;case"en-GB":u="eu";break;case"es-ES":u="es";break;case"fr-FR":u="fr";break;case"it-IT":u="it";break;case"pl-PL":u="pl";break;default:u="us"}var n="http://www.condor.com/ibe/cfi/"+u+"/flight/search.xhtml?origin="+z+"&destination="+q;var B=w.getDate()<10?"0"+w.getDate().toString():w.getDate().toString();var m=(w.getMonth()+1)<10?"0"+(w.getMonth()+1).toString():(w.getMonth()+1).toString();n+="&outwardYearMonthDay="+w.getFullYear().toString()+m+B;if(A=="OneWay"){n+="&flightVacancyType=1"}else{n+="&flightVacancyType=2";var t=e.getDate()<10?"0"+e.getDate().toString():e.getDate().toString();var v=(e.getMonth()+1)<10?"0"+(e.getMonth()+1).toString():(e.getMonth()+1).toString();n+="&returnYearMonthDay="+e.getFullYear().toString()+v+t}n+="&partyAdults="+s+"&partyChildren="+h+"&partyInfants="+b;n+="&operationType=search";n+="&ns_campaign=germanwings&ns_mchannel=germanwings"+u+"&source=germanwings&ns_linkname=germanwings&ns_fee=1";window.open(n,"_blank")}function ShowSearchDropdown(r,w,A){var m=document.getElementById("SearchDropdown");if(DropDownAlreadyOpened()){HideSearchDropdown();return false}var z="";if(r=="Destination"||r=="LFCDestination"){var B=document.getElementById("Origin");if(r=="LFCDestination"){B=document.getElementById("LFCOrigin")}if(B){if(B.value!=""){z=B.value}}}setTimeout("trackElementClick('"+r+"Container','CompactSearch: "+r+"-list opened')",10);if(m){if(Stations!=null&&SortedStations!=null){var n=new Array(200);var h=0;var b=GetMatchingStations("");var u=false;var v=0;for(var t=0;t<b.length;t++){var l=b[t];var s=Stations[l].islocal;if(s){v++}}if(v!=0){n[h]="<div id='LocalStationsHead' class='StationHeadText'><table style='width:100%;'><tr><td>"+LocalAirportsText+"</td><td style='text-align:right;padding-right:25px;'><a href='#' onClick='HideSearchDropdown(); return false;'><img src='../../downloads/btn_close.gif' alt='[X]'></a></td></tr></table></div>";h++}var g=0;for(var t=0;t<b.length;t++){var l=b[t];var c=Stations[l].name;if(z!=""){if(IsValidDestination(z,"CGN")){u=true}}if(t==v){n[h]="<div class='StationHeadText'>"+ForeignAirportsText+"</div>";g=0;h++}var e='onclick=\'javascript:if(document.getElementById("InfoBoxLowfareCal")) {ShowInfoBox();} SetStation("'+r+'","'+l+'","'+c+"\");' ";var q="onmouseenter='javascript:if(OldColor==\"\"){OldColor=this.style.backgroundColor;this.style.backgroundColor=\"#ffec00\";}' onmouseout='javascript:this.style.backgroundColor=OldColor;'";if(z!=""){if(IsValidDestination(z,l)){n[h]="<div id='StationItem"+t+"' class='StationItem sta"+t+" rowsta"+g+"' "+e+q+">"+c+"</div>";h++}else{n[h]="<div id='StationItem"+t+"' class='InactiveStationItem sta"+t+" rowsta"+g+"' "+q+">"+c+"</div>";h++}}else{n[h]="<div id='StationItem"+t+"' class='StationItem sta"+t+" rowsta"+g+"' "+e+q+">"+c+"</div>";h++}if((g+1)%4!=0){n[h]="<div class='StationSeparator'>&nbsp;</div>";h++}g++}if(u&&z!=""&&r=="Destination"){n[h]="<div id='StationItemCBC' class='StationItem staCBC rowsta"+g+"'  onclick='javascript:ShowCologneBonnWebsite();'>"+CologneBonnConnectLabel+"</div>";h++}}m.innerHTML=n.join("\n");m.style.visibility="visible";m.style.position="absolute";m.style.left=w+"px";m.style.top=A+"px"}}function trackCBCRedirect(c){var b=s_gi("germanwingscomprod");b.linkTrackVars="None";b.linkTrackEvents="None";b.tl(c,"e","CompactSearch Link: Cologne-Bonn-Connect")}function trackElementClick(b,e){var c=s_gi("germanwingscomprod");c.linkTrackVars="None";c.linkTrackEvents="None";c.tl(document.getElementById(b),"o",e)}function ShowCologneBonnWebsite(){var c=false;var b=2;c=confirm(CologneBonnConnectPrompt.replace(/<BR>/g,"\n"));if(CurrentCompactCulture.toLowerCase()=="de-DE"){b=1}if(c){window.open(CologneBonnConnectURL+"?pid=1&from="+document.getElementById("Origin").value+"&lang="+b,"CBCWindow");trackCBCRedirect(document.getElementById("StationItemCBC"));ResetDestinationStationSelection()}}function ShowUnderagePaxInfo(){window.open("/staticcontent/"+CurrentCompactCulture.substring(0,2)+"/child.html","Germanwings","left=20,top=20,width=500,height=358,scrollbars=0,status=0,toolbar=0,resizable=0")}var OldColor="";var CurrentActiveDateField="";var CurrentActiveMonths=new Array();var TodaysDateObj=new Date();var CalendarStartDate=(TodaysDateObj.getMonth()+1)+"/"+TodaysDateObj.getFullYear();var SelectedOutwardDate=null;var gwDynCalendar;function PreRenderCalendar(){gwDynCalendar=new YAHOO.widget.CalendarGroup("yCalendar","CalendarContainer",{pages:3,title:"",close:false});localizeCalendar(gwDynCalendar);gwDynCalendar.changePageEvent.subscribe(RegisterDaySelectorsEventsAsync);gwDynCalendar.render();RegisterDaySelectorsEventsAsync();gwDynCalendar.selectEvent.subscribe(SelectDate,gwDynCalendar,true);RenderQuickMonthAccess()}function RenderQuickMonthAccess(){var l=document.getElementById("CalendarQuickMonth");var g=TodaysDateObj.getMonth();var h=TodaysDateObj.getFullYear();var e=new Array();var c=0;e[c]="<table cellspacing='1' cellpadding='2'><tr>";c++;for(var b=0;b<14;b++){if(g==12){g=0;h++}if(b==7){e[c]="</tr><tr>";c++}e[c]="<td id='QuickMonth"+g+"_"+h+"' class='QuickMonthEntry'><a href='#' onclick='javascript:SetCalendarMonth("+g+","+h+");'>"+LocalizedShortMonths[g]+"&nbsp;"+h+"</a></td>";c++;g++}e[c]="</tr></table>";c++;l.innerHTML=e.join("\n");setTimeout("MarkCurrentMonthsInQuickMonth()",100)}function MarkCurrentMonthsInQuickMonth(){var e=new Array();e[0]=gwDynCalendar.pages[0].getDateByCellId("yCalendar_0_cell20");e[1]=gwDynCalendar.pages[1].getDateByCellId("yCalendar_1_cell20");e[2]=gwDynCalendar.pages[2].getDateByCellId("yCalendar_2_cell20");for(var c=0;c<e.length;c++){var b=document.getElementById("QuickMonth"+e[c].getMonth()+"_"+e[c].getFullYear());if(b){b.style.backgroundColor="#e8e8e8"}}}function SetCalendarMonth(c,b){gwDynCalendar.setMonth(c);gwDynCalendar.setYear(b);setTimeout("RefreshCalendarObject()",0);setTimeout("RenderQuickMonthAccess()",100)}function ShowCalendar(h,c,b){var g=document.getElementById("CalendarPopUp");if(g.style.visibility=="visible"){g.style.visibility="hidden";return false}if(h=="Return"&&document.getElementById("TripTypeOneWayRadio").checked==true){return false}if(h=="Outward"){var e=new Date();MinimumDate=(e.getMonth()+1)+"/"+e.getDate()+"/"+e.getFullYear()}if(h=="Return"){MinimumDate=SelectedOutwardDate}CurrentActiveDateField=h;if(!gwDynCalendar){PreRenderCalendar()}else{if(CurrentActiveMonths[0]!=null){gwDynCalendar.setMonth(CurrentActiveMonths[0].getMonth());gwDynCalendar.setYear(CurrentActiveMonths[0].getFullYear())}else{gwDynCalendar.setMonth(CalendarStartDate.substring(0,CalendarStartDate.indexOf("/"))-1);gwDynCalendar.setYear(CalendarStartDate.substring(CalendarStartDate.indexOf("/")+1))}}var l=document.getElementById("CalendarHeadText");if(h=="Outward"){l.innerHTML=CalendarHeadOutbound}if(h=="Return"){l.innerHTML=CalendarHeadReturn}var g=document.getElementById("CalendarPopUp");g.style.visibility="visible";g.style.left=c+"px";g.style.top=b+"px";setTimeout("RefreshCalendarObject()",0);setTimeout("trackElementClick('CalendarPopUp','CompactSearch: "+h+"-calendar opened')",10)}function SelectDate(r,q,h){var b=q[0];var g=b[0];var s=g[0],n=g[1],t=g[2];var c=document.getElementById(CurrentActiveDateField+"Date");var l=document.getElementById(CurrentActiveDateField+"DateField");l.innerHTML=t+". "+LocalizedMonths[(n-1)]+" "+s;c.value=t+"."+n+"."+s;var e=$(CurrentActiveDateField+"DateField");e.style.backgroundImage="url('/images/maincontent/compactsearch/searchfield.jpg')";if(CurrentActiveDateField=="Outward"){MinimumDate=n+"/"+t+"/"+s;SelectedOutwardDate=n+"/"+t+"/"+s;CurrentActiveMonths[0]=gwDynCalendar.pages[0].getDateByCellId("yCalendar_0_cell20")}var m=document.getElementById("CalendarPopUp");m.style.visibility="hidden";setTimeout("RefreshCalendarObject()",0)}function RefreshCalendarObject(){gwDynCalendar.cfg.setProperty("mindate",new Date(MinimumDate));gwDynCalendar.cfg.setProperty("maxdate",new Date(MaximumDate));if(SelectedOutwardDate!=null){gwDynCalendar.cfg.setProperty("selected",SelectedOutwardDate+"-"+SelectedOutwardDate);RegisterDaySelectorsEventsAsync()}gwDynCalendar.render()}var CurrentSrcElement;var RangeRendererActive=false;function MarkTripDateRangeInCalendarAsync(b){if(!b){b=window.event}var c;if(b.target){c=b.target}if(b.srcElement){c=b.srcElement}CurrentSrcElement=c;if(!RangeRendererActive){setTimeout("MarkTripDateRangeInCalendar()",10);RangeRendererActive=true}}function MarkTripDateRangeInCalendar(){if(CurrentActiveDateField=="Outward"){return false}var l=CurrentSrcElement;if(l.className=="selector"){l=l.parentNode}var n="yCalendar_0_cell0";var z=GetSelectedDateObject().id;if(z){n=z}var m=n.substring((n.indexOf("_")+1),(n.lastIndexOf("_")));var t=n.substring((n.indexOf("cell")+4));var b=l.id;var w=b.substring((b.indexOf("_")+1),(b.lastIndexOf("_")));var h=b.substring((b.indexOf("cell")+4));for(var v=0;v<34;v++){for(var s=0;s<43;s++){var u=v+"0"+s;if(s<10){u=v+"00"+s}var q=m+"0"+t;if(t<10){q=m+"00"+t}var g=w+"0"+h;if(h<10){g=w+"00"+h}var r="yCalendar_"+v+"_cell"+s;var e=document.getElementById(r);if(e){if(e.className.indexOf("oom")<0&&e.className.indexOf("previous")<0){if(u>q&&u<g){e.style.backgroundColor="#EDE9BA"}else{e.style.backgroundColor="#E8E8E8"}if(u==g){e.style.backgroundColor="#FFEC00"}}}}}RangeRendererActive=false}function GetSelectedDateObject(){for(var g=0;g<3;g++){for(var e=0;e<43;e++){var b="yCalendar_"+g+"_cell"+e;if(document.getElementById(b)){if(document.getElementById(b).className.indexOf("selected")>0){return document.getElementById(b)}}}}return false}function RegisterDaySelectorsEventsAsync(){setTimeout("RenderQuickMonthAccess()",0)}function RegisterDaySelectorsEvents(){for(var l=0;l<3;l++){for(var h=0;h<43;h++){var b="yCalendar_"+l+"_cell"+h;if(document.getElementById(b)){document.getElementById(b).onmouseover=MarkTripDateRangeInCalendarAsync;var e=document.getElementsByTagName("a");for(var g=0;g<e.length;g++){if(e[g].className=="selector"){e[g].onmouseover=MarkTripDateRangeInCalendarAsync}}}}}}function TranslateCalendarToGerman(b){b.cfg.setProperty("DATE_FIELD_DELIMITER",".");b.cfg.setProperty("START_WEEKDAY",1);b.cfg.setProperty("MDY_DAY_POSITION",1);b.cfg.setProperty("MDY_MONTH_POSITION",2);b.cfg.setProperty("MDY_YEAR_POSITION",3);b.cfg.setProperty("MD_DAY_POSITION",1);b.cfg.setProperty("MD_MONTH_POSITION",2);b.cfg.setProperty("HIDE_BLANK_WEEKS",true);b.cfg.setProperty("MONTHS_SHORT",["Jan","Feb","M&auml;r","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"]);b.cfg.setProperty("MONTHS_LONG",["Januar","Februar","M&auml;rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]);b.cfg.setProperty("WEEKDAYS_1CHAR",["S","M","D","M","D","F","S"]);b.cfg.setProperty("WEEKDAYS_SHORT",["<div class='WeekendDayHead'>So</div>","Mo","Di","Mi","Do","Fr","<div class='WeekendDayHead'>Sa</div>"]);b.cfg.setProperty("WEEKDAYS_MEDIUM",["<div class='WeekendDayHead'>Son</div>","Mon","Die","Mit","Don","Fre","<div class='WeekendDayHead'>Sam</div>"]);b.cfg.setProperty("WEEKDAYS_LONG",["<div class='WeekendDayHead'>Sonntag</div>","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","<div class='WeekendDayHead'>Samstag</div>"])}function HideSearchDropdown(){var b=document.getElementById("SearchDropdown");if(b){b.style.visibility="hidden"}}function DropDownAlreadyOpened(){var b=document.getElementById("SearchDropdown");if(b){if(b.style.visibility=="hidden"){return false}else{return true}}else{return false}}function IsValidDestination(b,e){var c=false;if(Stations!=null){for(i=0;i<Stations[b].mkts.length;i++){if(Stations[b].mkts[i]==e){c=true}}}return c}function SetStation(b,e,l){var h=document.getElementById(b);var c=document.getElementById(b+"Text");h.value=e;c.innerHTML=l;var g=$(b+"Container");g.style.backgroundImage="url('/images/maincontent/compactsearch/searchfield.jpg')";if(b=="Origin"){ResetDestinationStationSelection()}HideSearchDropdown()}function PerformFlightSearch(m){var z=m||"de-DE";trackElementClick("FlightSearchButton","CompactSearch: Flightsearch clicked");var e=document.getElementById("Origin").value;var u=document.getElementById("Destination").value;var v=document.getElementById("OutwardDate").value;var n=document.getElementById("ReturnDate").value;var l="6|6";var A=document.getElementById("AdultPaxCount").innerHTML;var D=document.getElementById("ChildPaxCount").innerHTML;var E=document.getElementById("InfantPaxCount").innerHTML;var C="R,F";var b="OneWay";if(document.getElementById("TripTypeRoundTripRadio").checked){b="RoundTrip"}var F=$("OriginText");var H=$("DestinationText");var r=$("OutwardDateField");var w=$("ReturnDateField");r.style.backgroundImage="url('/images/maincontent/compactsearch/searchfield.jpg')";if(b=="OneWay"){w.style.backgroundImage="url('/images/maincontent/compactsearch/searchfield_disabled.jpg')"}else{w.style.backgroundImage="url('/images/maincontent/compactsearch/searchfield.jpg')"}Element.removeClassName($("OriginAutocompleteContainer"),"inputError");Element.removeClassName($("DestinationAutocompleteContainer"),"inputError");var g=false;if(e==null||e==""){g=true;Element.addClassName($("OriginAutocompleteContainer"),"inputError")}if(u==null||u==""){g=true;Element.addClassName($("DestinationAutocompleteContainer"),"inputError")}if(v==null||v==""){r.style.backgroundImage="url('/images/maincontent/compactsearch/searchfield_error.jpg')";g=true}if(b=="RoundTrip"&&(n==null||n=="")){w.style.backgroundImage="url('/images/maincontent/compactsearch/searchfield_error.jpg')";g=true}if(g){return}var s="OK";var c="Abbrechen";if(typeof OkButtonLabel!="undefined"&&OkButtonLabel!=null){s=OkButtonLabel}if(typeof CancelButtonLabel!="undefined"&&CancelButtonLabel!=null){c=CancelButtonLabel}var G={"2A":function(){this.hide();var I=GetViaStationByRoute(e,u);SearchFlights(I,u,v,n,l,A,D,E,C,b,z)},"2AA":function(){this.hide();var I=GetViaStationByRoute(e,u);SearchFlights(e,I,v,n,l,A,D,E,C,b,z)},WW:function(){this.hide();SearchWWFlights(e,u,v,n,l,A,D,E,C,b,z)},VY:function(){this.hide();SearchVYFlights(e,u,v,n,l,A,D,E,C,b,z)},DE:function(){this.hide();SearchDEFlights(e,u,v,n,l,A,D,E,C,b,z)},CBC:function(){this.hide();var I=2;if(CurrentCompactCulture.toLowerCase()=="de-DE"){I=1}window.open(CologneBonnConnectURL+"?pid=1&from="+document.getElementById("Origin").value+"&lang="+I,"CBCWindow");trackCBCRedirect(document.getElementById("StationItemCBC"))}};if(!FlightSearchMessages.OtherAirline(e,u,s,c,G,"/images/rail_and_fly.gif")){if(v!=""&&typeof(todaysDateMessage)!="undefined"&&todaysDateMessage!=""){var h=v.split(".");var q=Date.UTC(h[2],parseInt(h[1],10)-1,h[0]);var B=new Date();var t=Date.UTC(B.getFullYear(),B.getMonth(),B.getDate());if(q==t){alert(todaysDateMessage)}}SearchFlights(e,u,v,n,l,A,D,E,C,b,z)}}function SwitchFlightType(b){if(b=="OneWay"){document.getElementById("ReturnDateField").innerHTML=OneWayOnlyText;document.getElementById("ReturnDateField").style.backgroundImage="url('/images/maincontent/compactsearch/searchfield_disabled.jpg')";document.getElementById("ReturnDateField").style.color="#e0e0e0";$("ReturnDate").value="";document.getElementById("ReturnCalendarGroup").style.display="none"}else{document.getElementById("ReturnDateField").innerHTML=ReturnFlightText;document.getElementById("ReturnDateField").style.backgroundImage="url('/images/maincontent/compactsearch/searchfield.jpg')";document.getElementById("ReturnDateField").style.color="#666666";document.getElementById("ReturnCalendarGroup").style.display="block"}}var ActivePaxField="";function ShowPaxDropdown(g,e,b){var c=document.getElementById("PaxCountDropdown");if(g=="Adult"){c.getElementsByTagName("div")[0].style.display="none"}else{c.getElementsByTagName("div")[0].style.display="block"}c.style.left=e+"px";c.style.top=b+"px";if(c.style.visibility=="visible"){c.style.visibility="hidden"}else{c.style.visibility="visible"}ActivePaxField=g+"PaxCount"}function SetPaxCount(c){var b=document.getElementById("PaxCountDropdown");b.style.visibility="hidden";document.getElementById(ActivePaxField).innerHTML=c}function GetAbsoluteLeft(b){o=document.getElementById(b);oLeft=o.offsetLeft;while(o.offsetParent!=null){oParent=o.offsetParent;oLeft+=oParent.offsetLeft;o=oParent}return oLeft}function GetAbsoluteTop(b){o=document.getElementById(b);oTop=o.offsetTop;while(o.offsetParent!=null){oParent=o.offsetParent;oTop+=oParent.offsetTop;o=oParent}return oTop}var _departureStation="";var _isArrivalStation="";function FlightSearchAutocomplete(g,h,e,c,b){this.departureStationField=g;this.arrivalStationField=h;this.departureStationFormField=e;this.arrivalStationFormField=c;this.disableCologneBonnConnect=b;this.formFields=new Object();this.formFields[this.departureStationField]=this.departureStationFormField;this.formFields[this.arrivalStationField]=this.arrivalStationFormField;this.activeField=null;this.departureAutoComplete=null;this.arrivalAutoComplete=null;this.stationDataSource=null;this.initializeAutoCompleteFields=function(){this.stationDataSource=new YAHOO.util.FunctionDataSource(this.stationList);this.stationDataSource.responseSchema={fields:["code","name","active"]};this.stationDataSource.scope=this;this.departureAutoComplete=this.createAutoComplete(this.departureStationField);this.arrivalAutoComplete=this.createAutoComplete(this.arrivalStationField);Event.observe($(this.departureAutoComplete.getInputEl()),"keydown",this.tabStationField.bind(this));var l=$(this.departureStationField);Event.observe(l,"click",this.selectAll.bind(l));Event.observe(l,"focus",this.selectAll.bind(l));var m=$(this.arrivalStationField);Event.observe(m,"click",this.selectAll.bind(m));Event.observe(m,"focus",this.selectAll.bind(m))};this.selectAll=function(){this.select()};this.stationList=function(u){stationListResult=Array();var r=decodeURIComponent(u);var n=SortedStations;var v=0;var s=false;for(var q=0;q<n.length;q++){var l=Stations[n[q]].name;var m=Stations[n[q]].code;var w=true;if(_isArrivalStation==true&&_departureStation!=""){w=false;if(RouteIndex[_departureStation+m]==true){w=true;if(m=="CGN"){s=true}}}else{if(Stations[n[q]].mkts==0){w=false}}var t=false;if(r.toLowerCase()==m.toLowerCase()||l.toLowerCase().indexOf(r.toLowerCase())==0){t=true}if(t==true&&w==true){stationListResult[v]=Array();stationListResult[v][0]=m;stationListResult[v][1]=l;stationListResult[v][2]=w;v++}}if((this.disableCologneBonnConnect===undefined||this.disableCologneBonnConnect==false)&&typeof CologneBonnConnectLabel!="undefined"){if(s){stationListResult[v]=Array();stationListResult[v][0]="CBC";stationListResult[v][1]=CologneBonnConnectLabel;stationListResult[v][2]=true}}return stationListResult};this.createAutoComplete=function(s){var n=new YAHOO.widget.AutoComplete(s,(s+"Container"),this.stationDataSource);n.formatResult=this.formatResult;n.resultTypeList=false;n.forceSelection=false;n.minQueryLength=0;n.animVert=false;n.maxResultsDisplayed=this.getStationsCount();n.itemSelectEvent.subscribe(this.selectStation,this);n.textboxFocusEvent.subscribe(this.setActiveField,this);n.containerExpandEvent.subscribe(startRenderStationIcon);n.containerCollapseEvent.subscribe(stopRenderStationIcon);var l=false;if(s==this.arrivalStationField){l=true}if($(s+"Toggle")){var q=$(s+"Toggle");var r=new YAHOO.widget.Button({container:q});var m=function(t){if(n.isContainerOpen()){n.collapseContainer()}else{if(l){_isArrivalStation=true}else{_isArrivalStation=false}n.getInputEl().focus();setTimeout(function(){n.sendQuery("")},0)}};r.on("click",m)}return n};this.getStationsCount=function(){return SortedStations.length};this.selectStation=function(r,q,l){var m=q[2];var n=q[0].getInputEl();n.value=m.name;$(l.formFields[n.id]).value=m.code;if(m.code!="CBC"&&RouteIndex[$(l.departureStationFormField).value+$(l.arrivalStationFormField).value]!==true){if(_isArrivalStation){if($(l.departureStationFormField).value!=""){$(l.departureStationField).value="";$(l.departureStationFormField).value=""}}else{if($(l.arrivalStationFormField).value!=""){$(l.arrivalStationField).value="";$(l.arrivalStationFormField).value=""}}}if(!_isArrivalStation){_departureStation=m.code}};this.setActiveField=function(n,m,l){l.activeField=m[0].getInputEl().id;if(l.activeField==l.arrivalStationField){_isArrivalStation=true}else{_isArrivalStation=false}};this.tabStationField=function(m){if(m.keyCode==9){var l=this.arrivalAutoComplete.getInputEl().id;setTimeout("$('"+l+"').focus()",10)}};this.formatResult=function(m,u,l){var r="active-station";if(!m.active){r="inactive-station"}var q=false;var w="";var s="";if(_isArrivalStation==false){var v=GetAirlinesByAirport(m.code);if(v.length==1){w=v[0];q=true;s="o_"}}else{q=IsOtherAirlineRoute(_departureStation,m.code);w=GetAirlineCodeByRoute(_departureStation,m.code);s="d_"}var n="<div class='station "+r+"'><div class='name'>"+m.name+"</div><div class='code'>"+m.code+"</div></div>";if(q==true&&w=="DE"){var t=s+"oal_"+w+"_"+m.code;n="<div id='"+t+"' class='station "+r+"' ><div class='name' style='width:100px;overflow:hidden;'>"+m.name+"</div><div class='code'>"+m.code+"</div></div>";sta_changeItemArray.push(t)}return n};this.initializeAutoCompleteFields()}var sta_changeItemNum=0;var sta_changeInterval;var sta_changeItemArray=new Array();function startRenderStationIcon(c,b){sta_changeItemNum=0;sta_changeItemArray=sta_changeItemArray.reverse();clearInterval(sta_changeInterval);if(sta_changeItemArray.length>0){sta_changeInterval=setInterval("renderStationIconAsync()",25)}}function stopRenderStationIcon(c,b){clearInterval(sta_changeInterval);sta_changeItemArray=new Array();sta_changeItemNum=0}function renderStationIconAsync(){if(document.getElementById(sta_changeItemArray[sta_changeItemNum])){var b=document.getElementById(sta_changeItemArray[sta_changeItemNum]);b.style.backgroundImage="url(/skysales/images/elements/ico_condor.gif)";b.style.paddingLeft="18px";b.style.backgroundPosition="left";b.style.backgroundRepeat="no-repeat"}sta_changeItemNum++;if(sta_changeItemNum>=sta_changeItemArray.length){clearInterval(sta_changeInterval)}}var FlightSearchMessages={OtherAirline:function(g,l,b,e,m,h){var n=false;var c=GetAirlineCodeByRoute(g,l);if(typeof CologneBonnConnectLabel!="undefined"&&l=="CBC"){FlightSearchMessages.CologneBonnConnect(CologneBonnConnectLabel,CologneBonnConnectPrompt,b,e,m.CBC,function(){this.hide()});n=true}else{if(c=="2A"){FlightSearchMessages.RFMessage(c,g,l,b,e,m["2A"],function(){this.hide()},h);n=true}else{if(c=="2AA"){FlightSearchMessages.RFMessage(c,g,l,b,e,m["2AA"],function(){this.hide()},h);n=true}else{if(c=="XG"){FlightSearchMessages.OALMessage(c,g,l,"Clickair",b,e,m.XG,function(){this.hide()});n=true}else{if(c=="WW"){FlightSearchMessages.OALMessage(c,g,l,"<img src='/skysales/images/logos/bmibaby.gif' alt='bmibaby' />",b,e,m.WW,function(){this.hide()});n=true}else{if(c=="DE"){FlightSearchMessages.OALMessage(c,g,l,"<img src='/skysales/images/logos/condor.gif' alt='Condor' />",b,e,m.DE,function(){this.hide()});n=true}}}}}}return n},RFMessage:function(t,r,m,h,b,q,g,c){var s=OperatorInfo[t];var l=GetViaStationByRoute(r,m);s=s.replace(/{ORIGIN}/g,Stations[r].name);s=s.replace(/{DESTINATION}/g,Stations[m].name);s=s.replace(/\n/g,"<br/>");if(l!=""){s=s.replace(/{VIA}/g,Stations[l].name)}var n="<div style='padding:10px;'><img src='"+c+"' /><br/><br/><span>"+s+"</span></div>";var e=new YAHOO.widget.SimpleDialog("rfMessageBox",{width:"380px",fixedcenter:true,visible:false,draggable:true,close:true,modal:true,constraintoviewport:false,text:n,icon:"none",buttons:[{text:h,handler:q,isDefault:true},{text:b,handler:g,isDefault:false}]});e.setHeader("Germanwings.com");e.render(document.body);e.show()},CologneBonnConnect:function(g,c,b,e,m,h){var n="<div style='padding:10px;'><h2 style='color:#77003D;'>Cologne Bonn Connect</h2><br/><span>"+c.replace(/\n/g,"<br/>")+"</span></div>";var l=new YAHOO.widget.SimpleDialog("cbcMessageBox",{width:"380px",fixedcenter:true,visible:false,draggable:true,close:true,modal:true,constraintoviewport:false,text:n,icon:"none",buttons:[{text:b,handler:m,isDefault:true},{text:e,handler:h,isDefault:false}]});l.setHeader("Germanwings.com");l.render(document.body);l.show()},OALMessage:function(s,n,h,q,g,b,m,e){var r=OperatorInfo[s];r=r.replace(/{ORIGIN}/g,Stations[n].name);r=r.replace(/{DESTINATION}/g,Stations[h].name);r=r.replace(/\n/g,"<br/>");var l="<div style='padding:10px;'><h2 style='color:#77003D;'>"+q+"</h2><br/><span>"+r+"</span></div>";var c=new YAHOO.widget.SimpleDialog("oalMessageBox",{width:"380px",fixedcenter:true,visible:false,draggable:true,close:true,modal:true,constraintoviewport:false,text:l,icon:"none",buttons:[{text:g,handler:m,isDefault:true},{text:b,handler:e,isDefault:false}]});c.setHeader("Germanwings.com");c.render(document.body);c.show()},TodayMessage:function(g,e){var b=g;b=b.replace(/\n/g,"<br/>");var h="<div style='padding:10px;'><span>"+b+"</span></div>";var c=new YAHOO.widget.SimpleDialog("todayMessageBox",{width:"380px",fixedcenter:true,visible:false,draggable:false,close:true,modal:true,constraintoviewport:false,text:h,icon:"none",buttons:[{text:"OK",handler:e,isDefault:true}]});c.setHeader("Germanwings.com");c.render(document.body);c.show()}};
