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(k){if(k!=$continue){throw k}}})}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(k,h){var g=k.toString();if(g.match(e)){b.push((c||Prototype.K)(k,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(k){}}})}};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 k=this.transport,c=this.evalJSON();if(g=="Complete"){try{(this.options["on"+this.transport.status]||this.options["on"+(this.responseIsSuccess()?"Success":"Failure")]||Prototype.emptyFunction)(k,c)}catch(h){this.dispatchException(h)}if((this.header("Content-type")||"").match(/^text\/javascript/i)){this.evalResponse()}}try{(this.options["on"+g]||Prototype.emptyFunction)(k,c);Ajax.Responders.dispatch("on"+g,this,k,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(k,h){this.updateContent();g(k,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 k=c.clientWidth;var g=c.clientHeight;b.display="none";b.position=e;b.visibility=h;return{width:k,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(k,e,g){k=$(k);var b=k.getElementsByTagName("input");if(!e&&!g){return b}var l=new Array();for(var h=0;h<b.length;h++){var c=b[h];if((e&&c.type!=e)||(g&&c.name!=g)){continue}l.push(c)}return l},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 k=[0,0];var c=null;if(Element.getStyle(h,"position")=="absolute"){c=Position.offsetParent(h);k=Position.page(c)}if(c==document.body){k[0]-=document.body.offsetLeft;k[1]-=document.body.offsetTop}if(b.setLeft){h.style.left=(g[0]-k[0]+b.offsetLeft)+"px"}if(b.setTop){h.style.top=(g[1]-k[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 k=g[1];var h=g[0];var e=c.clientWidth;var b=c.clientHeight;c._originalLeft=h-parseFloat(c.style.left||0);c._originalTop=k-parseFloat(c.style.top||0);c._originalWidth=c.style.width;c._originalHeight=c.style.height;c.style.position="absolute";c.style.top=k+"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(u,e,v,k,r,s,m,l,g,t){if(!document.getElementById){return}this.DETECT_KEY=t?t:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(u){this.setAttribute("swf",u)}if(e){this.setAttribute("id",e)}if(v){this.setAttribute("width",v)}if(k){this.setAttribute("height",k)}if(r){this.setAttribute("version",new deconcept.PlayerVersion(r.toString().split(".")))}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true}if(s){this.addParam("bgcolor",s)}var b=m?m:"high";this.addParam("quality",b);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var n=(l)?l:window.location;this.setAttribute("xiRedirectUrl",n);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 k=this.getParams();for(var h in k){c+=[h]+'="'+k[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 k=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var b=navigator.plugins["Shockwave Flash"];if(b&&b.description){k=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);k=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");k=new deconcept.PlayerVersion([6,0,21]);c.AllowScriptAccess="always"}catch(h){if(k.major==6){return k}}try{c=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(h){}}if(c!=null){k=new deconcept.PlayerVersion(c.GetVariable("$version").split(" ")[1].split(","))}}}return k};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:"/ru/Images/bg_shadow_1_4_top.png"},content:{obj:document.getElementById("shadowContent"),src:"/ru/Images/bg_shadow_1_4_content.png"},bottom:{obj:document.getElementById("shadowBottom"),src:"/ru/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,k,h,e,c){var g=b.parentNode.nextSibling;while(g.nodeType!=1){g=g.nextSibling}if(!motion){window.slideObj=g;slideObj.toggle=b;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(k){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!=""){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(k,l){var c=document.getElementById("Container");try{var h=c.getElementsByTagName("IMG")[0];c.removeChild(h)}catch(g){}var b=document.createElement("IMG");b.src=l;c.appendChild(b);c.style.top=mouseY(k)+"px";c.style.left=mouseX(k)+"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 k=location.href;urlArray=new Array();urlArray=k.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,k,e,g){var c=getDateFromFormat(h,k);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(k,g,h,e){for(var b=e;b>=h;b--){var c=k.substring(g,g+b);if(c.length<h){return null}if(_isInteger(c)){return c}}return null}function getDateFromFormat(E,v){E=E+"";v=v+"";var D=0;var r=0;var z="";var k="";var C="";var m,l;var e=new Date();var n=e.getYear();var B=e.getMonth()+1;var A=1;var g=e.getHours();var w=e.getMinutes();var t=e.getSeconds();var q="";while(r<v.length){z=v.charAt(r);k="";while((v.charAt(r)==z)&&(r<v.length)){k+=v.charAt(r++)}if(k=="yyyy"||k=="yy"||k=="y"){if(k=="yyyy"){m=4;l=4}if(k=="yy"){m=2;l=2}if(k=="y"){m=2;l=4}n=_getInt(E,D,m,l);if(n==null){return 0}D+=n.length;if(n.length==2){if(n>70){n=1900+(n-0)}else{n=2000+(n-0)}}}else{if(k=="MMM"||k=="NNN"){B=0;for(var u=0;u<MONTH_NAMES.length;u++){var h=MONTH_NAMES[u];if(E.substring(D,D+h.length).toLowerCase()==h.toLowerCase()){if(k=="MMM"||(k=="NNN"&&u>11)){B=u+1;if(B>12){B-=12}D+=h.length;break}}}if((B<1)||(B>12)){return 0}}else{if(k=="EE"||k=="E"){for(var u=0;u<DAY_NAMES.length;u++){var s=DAY_NAMES[u];if(E.substring(D,D+s.length).toLowerCase()==s.toLowerCase()){D+=s.length;break}}}else{if(k=="MM"||k=="M"){B=_getInt(E,D,k.length,2);if(B==null||(B<1)||(B>12)){return 0}D+=B.length}else{if(k=="dd"||k=="d"){A=_getInt(E,D,k.length,2);if(A==null||(A<1)||(A>31)){return 0}D+=A.length}else{if(k=="hh"||k=="h"){g=_getInt(E,D,k.length,2);if(g==null||(g<1)||(g>12)){return 0}D+=g.length}else{if(k=="HH"||k=="H"){g=_getInt(E,D,k.length,2);if(g==null||(g<0)||(g>23)){return 0}D+=g.length}else{if(k=="KK"||k=="K"){g=_getInt(E,D,k.length,2);if(g==null||(g<0)||(g>11)){return 0}D+=g.length}else{if(k=="kk"||k=="k"){g=_getInt(E,D,k.length,2);if(g==null||(g<1)||(g>24)){return 0}D+=g.length;g--}else{if(k=="mm"||k=="m"){w=_getInt(E,D,k.length,2);if(w==null||(w<0)||(w>59)){return 0}D+=w.length}else{if(k=="ss"||k=="s"){t=_getInt(E,D,k.length,2);if(t==null||(t<0)||(t>59)){return 0}D+=t.length}else{if(k=="a"){if(E.substring(D,D+2).toLowerCase()=="am"){q="AM"}else{if(E.substring(D,D+2).toLowerCase()=="pm"){q="PM"}else{return 0}}D+=2}else{if(E.substring(D,D+k.length)!=k){return 0}else{D+=k.length}}}}}}}}}}}}}}if(D!=E.length){return 0}if(B==2){if(((n%4==0)&&(n%100!=0))||(n%400==0)){if(A>29){return 0}}else{if(A>28){return 0}}}if((B==4)||(B==6)||(B==9)||(B==11)){if(A>30){return 0}}if(g<12&&q=="PM"){g=g-0+12}else{if(g>11&&q=="AM"){g-=12}}var b=new Date(n,B-1,A,g,w,t);return b.getTime()}function parseDate(m){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 k=null;for(var g=0;g<c.length;g++){var b=window[c[g]];for(var e=0;e<b.length;e++){k=getDateFromFormat(m,b[e]);if(k!=0){return new Date(k)}}}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(q){var r=q.getElementsByTagName("li"),h=r.length,k=b[0],m=new Array(),n,l;for(n=0;n<h;++n){Element.cleanWhitespace(r[n]);if(!r[n].children){m[n]=r[n].childNodes[0]}else{m[n]=r[n].children[0]}if(m[n]&&!Element.hasClassName(m[n],"destHeadline")){Element.addClassName(r[n],k)}switch(true){case (n+1)%c==0:if(m[n]&&!Element.hasClassName(m[n],"destHeadline")){k=k==b[0]?b[1]:b[0]}if(!m[n]){var g=false;for(l=((n+1)-c);l<=n;l++){if(m[l]&&!Element.hasClassName(m[l],"destHeadline")){g=true;break}}if(g===true){k=k==b[0]?b[1]:b[0]}}case (n+1)%c==0||h==(n+1):Element.addClassName(r[n],b[2])}}})}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=""}}}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 t=Element.extend(document.createElement("table"));t.className="gwui_flightsel";t.style.display="none";t.id=this._id;var n=t.createTHead();var q=n.insertRow(-1);var m=document.createElement("th");q.appendChild(m);var h=document.createElement("th");h.appendChild(document.createTextNode(this._i18n.date));q.appendChild(h);var s=document.createElement("th");s.appendChild(document.createTextNode(this._i18n.departure));q.appendChild(s);var k=document.createElement("th");k.appendChild(document.createTextNode(this._i18n.arrival));q.appendChild(k);var u=document.createElement("th");u.appendChild(document.createTextNode(this._i18n.flightNo));q.appendChild(u);var r=document.createElement("th");r.appendChild(document.createTextNode(this._i18n.via));q.appendChild(r);var g=t.insertRow(-1);g.className="gwui_flightsel_flight";var l=g.insertCell(-1);l.colSpan=6;l.appendChild(document.createTextNode(this._i18n.noData));this._anchor.parentNode.appendChild(t);this._table=t};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(l){if(this._rowCount==0){this._table.deleteRow(1)}var r=Element.extend(document.createElement("input"));r.type="radio";r.name=this._id+"_radio";r.observe("click",this._select.bindAsEventListener(this,this._rowCount,r));var t=Element.extend(this._table.insertRow(-1));t.className="gwui_flightsel_flight";t.observe("mouseover",function(){this.className="gwui_flightsel_flight_hover"}.bindAsEventListener(t));t.observe("mouseout",function(){this.className="gwui_flightsel_flight"}.bindAsEventListener(t));t.observe("click",this._select.bindAsEventListener(this,this._rowCount,r));var q=t.insertCell(-1);q.appendChild(r);var n=t.insertCell(-1);n.appendChild(document.createTextNode(l.date));var h=t.insertCell(-1);h.appendChild(document.createTextNode(l.departureTime));var g=t.insertCell(-1);g.appendChild(document.createTextNode(l.arrivalTime));var m=t.insertCell(-1);m.appendChild(document.createTextNode(l.flightNo));var s=t.insertCell(-1);var k;if(l.via){k=l.via}else{k="-"}s.appendChild(document.createTextNode(k));l._inp=r;this._data[this._rowCount]=l;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(l,g,k){for(var h=0;h<this._data.length;h++){this._data[h]._inp.checked=false}k.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 l=h[g];var e=(l.onClickURL!==undefined&&l.onClickURL!=null);var m;if(e){m={label:l.label,href:l.onClickURL}}else{m={label:l.label,dataSrc:l.dataSrc,cacheData:true}}var k=new YAHOO.widget.Tab(m);k.on("click",this.clickEvent,k,this);if(e){k.set("activationEvent",null)}YAHOO.plugin.Dispatcher.delegate(k,this.tabView)}};this.clickEvent=function(e,k){try{var h=s_gi("germanwingscomprod");h.linkTrackVars="None";h.linkTrackEvents="None";h.tl(k,"o",'CompactSearch: Tab "'+k.get("label")+'" clicked')}catch(g){}};this.addTabs(c)}function CarRentalAutocomplete(e,b,c,g){this.setStations=function(k){this.stationList=new Array();for(var h=0;h<k.length;h++){this.stationList.push({name:k[h][0],code:k[h][1]})}};this.getStations=function(n){var m=decodeURIComponent(n.toLowerCase());var k=new Array();for(var h=0;h<this.stationList.length;h++){var l=this.stationList[h];if(m==l.code.toLowerCase()||l.name.toLowerCase().indexOf(m)>=0){k.push(l)}}return k};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(n,m,h){var k=m[2];var l=m[0].getInputEl();$(h.formFields[l.id]).value=k.code;if(l.id==h.checkOutStationFieldName&&$(h.formFields[h.checkInStationFieldName]).value==""){$(h.checkInStationFieldName).value=k.name;$(h.formFields[h.checkInStationFieldName]).value=k.code}};this.createAutocomplete=function(n){var k=new YAHOO.widget.AutoComplete(n,n+"Container",this.dataSource);k.formatResult=this.formatResult;k.resultTypeList=false;k.forceSelection=false;k.minQueryLength=0;if($(n+"Toggle")){var l=$(n+"Toggle");var m=new YAHOO.widget.Button({container:l});var h=function(q){if(k.isContainerOpen()){k.collapseContainer()}else{k.getInputEl().focus();setTimeout(function(){k.sendQuery("")},0)}};m.on("click",h)}k.itemSelectEvent.subscribe(this.select,this);return k};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,k){var e=g[0][0];k.selectedDate={day:k.formatDate(e[2]),month:k.formatDate(e[1]),year:e[0]};k.inputField.value=k.selectedDate.day+"."+k.selectedDate.month+"."+k.selectedDate.year;k.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 k=this.formatDate(h.getMonth()+1)+"/"+this.formatDate(h.getDate())+"/"+h.getFullYear();var g=new YAHOO.widget.Calendar(e,{START_WEEKDAY:1,mindate:k,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 k=document.getElementsByClassName(this.dataPickerGroup);for(var h=0;h<k.length;h++){Element.hide(k[h])}}Element.show(this.containerField)};this.render=function(){Element.hide(this.containerField);var l=document.createElement("ul");for(var k=0;k<this.allowedValues.length;k++){var m=this.allowedValues[k];var h=document.createElement("li");h.innerHTML=m;l.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(l)};Event.observe(this.inputField,"click",this.inputClick.bindAsEventListener(this));this.render()}function PriceTeasers(){this.init=function(){var b=this;window.setTimeout(function(){b.initDelayed()},1000)};this.initDelayed=function(){var e=/^pt_([^_]{3})_([^_]{3})_(.{5})$/;var h=document.getElementsByClassName("teaser",$("content"));if(h!=null){for(var b=0;b<h.length;b++){var c=h[b].firstChild.firstChild;e.exec(c.id);var g={origin:RegExp.$1,destination:RegExp.$2,culture:RegExp.$3};this.request(c,g)}}};this.request=function(c,e){var b="/skysales/html/TouchClarity/DynamicPriceTeaserSnippet.aspx?Origin="+e.origin+"&Destination="+e.destination+"&Culture="+e.culture;new Ajax.Request(b,{method:"get",onSuccess:function(h,k){var g=k.responseText;if(g.search(/^<div class="priceTeaser">/)!=-1){h.innerHTML=k.responseText}}.bind(this,c)})};this.init()}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(m,n,l){var c=new RegExp("(^|s)"+m+"(s|$)");var n=n||"*";var l=l||document;var b=(n=="*"&&l.all)?l.all:l.getElementsByTagName(n);var g=[];var k;var e=b.length;for(var h=0;h<e;h++){k=b[h];if(c.test(k.className)){g.push(k)}}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(M,v,g,Q,k,A,l,c,m,N,w){var I=w||"de-DE";var G=document.createElement("form");G.name="SkySales";G.id="SkySales";G.method="post";G.action="/skysales/Search.aspx?culture="+I;var B=document.createElement("input");B.type="hidden";B.name="AvailabilitySearchInputSearchView$RadioButtonMarketStructure";B.id=B.name.replace("$","_");B.value=N;G.appendChild(B);var D=document.createElement("input");D.type="hidden";D.name="AvailabilitySearchInputSearchView$DropDownListMarketOrigin1";D.id=D.name.replace("$","_");D.value=M;G.appendChild(D);var b=document.createElement("input");b.type="hidden";b.name="AvailabilitySearchInputSearchView$DropDownListMarketDestination1";b.id=b.name.replace("$","_");b.value=v;G.appendChild(b);var D=document.createElement("input");D.type="hidden";D.name="AvailabilitySearchInputSearchView$DropDownListMarketOrigin2";D.id=D.name.replace("$","_");D.value=v;G.appendChild(D);var b=document.createElement("input");b.type="hidden";b.name="AvailabilitySearchInputSearchView$DropDownListMarketDestination2";b.id=b.name.replace("$","_");b.value=M;G.appendChild(b);var e=document.createElement("input");e.type="hidden";e.name="AvailabilitySearchInputSearchView$DropDownListFareTypes";e.id=e.name.replace("$","_");e.value=m;G.appendChild(e);var L=null;if(g==null||g==""){var u=new Date();L=new Date(u.getTime()+1000*60*60*24*30)}else{L=new Date(g.substring(g.lastIndexOf(".")+1),(g.substring(g.indexOf(".")+1,g.lastIndexOf("."))-1),g.substring(0,g.indexOf(".")))}var H=document.createElement("input");H.type="hidden";H.name="AvailabilitySearchInputSearchView$DropDownListMarketDay1";H.id=H.name.replace("$","_");H.value=L.getDate();G.appendChild(H);var F=document.createElement("input");F.type="hidden";F.name="AvailabilitySearchInputSearchView$DropDownListMarketMonth1";F.id=F.name.replace("$","_");F.value=L.getFullYear()+"-"+(L.getMonth()+1);G.appendChild(F);var C=document.createElement("input");C.type="hidden";C.name="AvailabilitySearchInputSearchView$DropDownListMarketDateRange1";C.id=C.name.replace("$","_");C.value=k;G.appendChild(C);var h=null;if(Q==null||Q==""){h=new Date(L.getTime()+1000*60*60*24*7)}else{h=new Date(Q.substring(Q.lastIndexOf(".")+1),(Q.substring(Q.indexOf(".")+1,Q.lastIndexOf("."))-1),Q.substring(0,Q.indexOf(".")))}var K=document.createElement("input");K.type="hidden";K.name="AvailabilitySearchInputSearchView$DropDownListMarketDay2";K.id=K.name.replace("$","_");K.value=h.getDate();G.appendChild(K);var P=document.createElement("input");P.type="hidden";P.name="AvailabilitySearchInputSearchView$DropDownListMarketMonth2";P.id=P.name.replace("$","_");P.value=h.getFullYear()+"-"+(h.getMonth()+1);G.appendChild(P);var J=document.createElement("input");J.type="hidden";J.name="AvailabilitySearchInputSearchView$DropDownListMarketDateRange2";J.id=J.name.replace("$","_");J.value=k;G.appendChild(J);var n=document.createElement("input");n.type="hidden";n.name="AvailabilitySearchInputSearchView$DropDownListPassengerType_ADT";n.id=n.name.replace("$","_");n.value=A;G.appendChild(n);var s=document.createElement("input");s.type="hidden";s.name="AvailabilitySearchInputSearchView$DropDownListPassengerType_CHD";s.id=s.name.replace("$","_");s.value=l;G.appendChild(s);var q=document.createElement("input");q.type="hidden";q.name="AvailabilitySearchInputSearchView$DropDownListPassengerType_INFANT";q.id=q.name.replace("$","_");q.value=c;G.appendChild(q);var z=document.createElement("input");z.type="hidden";z.name="step";z.id="step";z.value="Select";G.appendChild(z);var r=document.createElement("input");r.type="hidden";r.name="__EVENTTARGET";r.id="__EVENTTARGET";r.value="AvailabilitySearchInputSearchView$LinkButtonNewSearch";G.appendChild(r);var E=document.createElement("input");E.type="hidden";E.name="__EVENTARGUMENT";E.id="__EVENTARGUMENT";E.value="";G.appendChild(E);var t=document.createElement("input");t.type="hidden";t.name="__VIEWSTATE";t.id="__VIEWSTATE";t.value="";G.appendChild(t);var O=document.getElementById("DynamFormPlaceholder");O.appendChild(G);document.getElementById("SkySales").submit()}function SearchWWFlights(C,r,g,F,l,t,m,c,n,D,s){var B=new Date(g.substring(g.lastIndexOf(".")+1),(g.substring(g.indexOf(".")+1,g.lastIndexOf("."))-1),g.substring(0,g.indexOf(".")));var k=new Date(F.substring(F.lastIndexOf(".")+1),(F.substring(F.indexOf(".")+1,F.lastIndexOf("."))-1),F.substring(0,F.indexOf(".")));var v=document.createElement("form");v.name="bmibabyForm";v.id="bmibabyForm";v.method="post";v.action="http://www.bmibaby.com/bmibaby/en/search.aspx?linkid=gw";v.target="_blank";var u=document.createElement("input");u.type="hidden";u.name="Source";u.id=u.name;u.value="germanwings";v.appendChild(u);var w=document.createElement("input");w.type="hidden";w.name="From";w.id=w.name;w.value=C;v.appendChild(w);var b=document.createElement("input");b.type="hidden";b.name="To";b.id=b.name;b.value=r;v.appendChild(b);var A=document.createElement("input");A.type="hidden";A.name="OutboundDate";A.id=A.name;A.value=B.getDate()+"/"+(B.getMonth()+1)+"/"+B.getFullYear();v.appendChild(A);if(D=="RoundTrip"){var z=document.createElement("input");z.type="hidden";z.name="ReturnDate";z.id=z.name;z.value=k.getDate()+"/"+(k.getMonth()+1)+"/"+k.getFullYear();v.appendChild(z)}var e=document.createElement("input");e.type="hidden";e.name="Adt";e.id=e.name;e.value=t;v.appendChild(e);var q=document.createElement("input");q.type="hidden";q.name="Chd";q.id=q.name;q.value=m;v.appendChild(q);var h=document.createElement("input");h.type="hidden";h.name="Inf";h.id=h.name;h.value=c;v.appendChild(h);var E=document.getElementById("DynamFormPlaceholder");E.appendChild(v);document.getElementById("bmibabyForm").submit()}function SearchVYFlights(z,q,c,D,g,s,h,b,k,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(D.substring(D.lastIndexOf(".")+1),(D.substring(D.indexOf(".")+1,D.lastIndexOf("."))-1),D.substring(0,D.indexOf(".")));var u="EN";switch(r){case"de-DE":case"en-GB":u="EN";break;case"es-ES":u="ES";break;case"fr-FR":u="FR";break;case"it-IT":u="IT";break;case"nl-NL":u="NL";break;default:u="EN"}var B="2";if(A==="OneWay"){B="1"}var m="http://www.vueling.com/skylights/cgi-bin/skylights.cgi?";var n="event=search&module=SB&page=SEARCH&language="+u;n+="&travel="+B+"&from1="+z+"&to1="+q;var C=w.getDate()<10?"0"+w.getDate().toString():w.getDate().toString();var l=(w.getMonth()+1)<10?"0"+(w.getMonth()+1).toString():(w.getMonth()+1).toString();n+="&departDay1="+C;n+="&departMonth1="+w.getFullYear().toString()+l;n+="&departDate1="+w.getFullYear().toString()+l+C;n+="&depart1FlexBy=0101";if(B==="2"){n+="&from2="+q+"&to2="+z;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+="&departDay2="+t;n+="&departMonth2="+e.getFullYear().toString()+v;n+="&departDate2="+e.getFullYear().toString()+v+t;n+="&depart2FlexBy=0101"}n+="&ADULT="+s+"&CHILD="+h+"&INFANT="+b+"&numberMarkets="+B;window.open(m+n,"_blank")}function SearchDEFlights(w,n,c,B,g,r,h,b,k,z,q){var v=new Date(c.substring(c.lastIndexOf(".")+1),(c.substring(c.indexOf(".")+1,c.lastIndexOf("."))-1),c.substring(0,c.indexOf(".")));var e=new Date(B.substring(B.lastIndexOf(".")+1),(B.substring(B.indexOf(".")+1,B.lastIndexOf("."))-1),B.substring(0,B.indexOf(".")));var t="de";switch(q){case"de-DE":t="de";break;case"en-GB":t="eu";break;case"es-ES":t="es";break;case"fr-FR":t="fr";break;case"it-IT":t="it";break;case"pl-PL":t="pl";break;default:t="us"}var m="http://www.condor.com/ibe/cfi/"+t+"/flight/search.xhtml?origin="+w+"&destination="+n;var A=v.getDate()<10?"0"+v.getDate().toString():v.getDate().toString();var l=(v.getMonth()+1)<10?"0"+(v.getMonth()+1).toString():(v.getMonth()+1).toString();m+="&outwardYearMonthDay="+v.getFullYear().toString()+l+A;if(z=="OneWay"){m+="&flightVacancyType=1"}else{m+="&flightVacancyType=2";var s=e.getDate()<10?"0"+e.getDate().toString():e.getDate().toString();var u=(e.getMonth()+1)<10?"0"+(e.getMonth()+1).toString():(e.getMonth()+1).toString();m+="&returnYearMonthDay="+e.getFullYear().toString()+u+s}m+="&partyAdults="+r+"&partyChildren="+h+"&partyInfants="+b;m+="&operationType=search";window.open(m,"_blank")}function ShowSearchDropdown(q,v,z){var l=document.getElementById("SearchDropdown");if(DropDownAlreadyOpened()){HideSearchDropdown();return false}var w="";if(q=="Destination"||q=="LFCDestination"){var A=document.getElementById("Origin");if(q=="LFCDestination"){A=document.getElementById("LFCOrigin")}if(A){if(A.value!=""){w=A.value}}}setTimeout("trackElementClick('"+q+"Container','CompactSearch: "+q+"-list opened')",10);if(l){if(Stations!=null&&SortedStations!=null){var m=new Array(200);var h=0;var b=GetMatchingStations("");var t=false;var u=0;for(var s=0;s<b.length;s++){var k=b[s];var r=Stations[k].islocal;if(r){u++}}if(u!=0){m[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 s=0;s<b.length;s++){var k=b[s];var c=Stations[k].name;if(w!=""){if(IsValidDestination(w,"CGN")){t=true}}if(s==u){m[h]="<div class='StationHeadText'>"+ForeignAirportsText+"</div>";g=0;h++}var e='onclick=\'javascript:if(document.getElementById("InfoBoxLowfareCal")) {ShowInfoBox();} SetStation("'+q+'","'+k+'","'+c+"\");' ";var n="onmouseenter='javascript:if(OldColor==\"\"){OldColor=this.style.backgroundColor;this.style.backgroundColor=\"#ffec00\";}' onmouseout='javascript:this.style.backgroundColor=OldColor;'";if(w!=""){if(IsValidDestination(w,k)){m[h]="<div id='StationItem"+s+"' class='StationItem sta"+s+" rowsta"+g+"' "+e+n+">"+c+"</div>";h++}else{m[h]="<div id='StationItem"+s+"' class='InactiveStationItem sta"+s+" rowsta"+g+"' "+n+">"+c+"</div>";h++}}else{m[h]="<div id='StationItem"+s+"' class='StationItem sta"+s+" rowsta"+g+"' "+e+n+">"+c+"</div>";h++}if((g+1)%4!=0){m[h]="<div class='StationSeparator'>&nbsp;</div>";h++}g++}if(t&&w!=""&&q=="Destination"){m[h]="<div id='StationItemCBC' class='StationItem staCBC rowsta"+g+"'  onclick='javascript:ShowCologneBonnWebsite();'>"+CologneBonnConnectLabel+"</div>";h++}}l.innerHTML=m.join("\n");l.style.visibility="visible";l.style.position="absolute";l.style.left=v+"px";l.style.top=z+"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("/skysales/html/"+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 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 k=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++;k.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()}CurrentActiveDateField=h;if(!gwDynCalendar){PreRenderCalendar()}else{gwDynCalendar.setMonth(CalendarStartDate.substring(0,CalendarStartDate.indexOf("/"))-1);gwDynCalendar.setYear(CalendarStartDate.substring(CalendarStartDate.indexOf("/")+1))}var k=document.getElementById("CalendarHeadText");if(h=="Outward"){k.innerHTML=CalendarHeadOutbound}if(h=="Return"){k.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(q,n,h){var b=n[0];var g=b[0];var r=g[0],m=g[1],s=g[2];var c=document.getElementById(CurrentActiveDateField+"Date");var k=document.getElementById(CurrentActiveDateField+"DateField");k.innerHTML=s+". "+LocalizedMonths[(m-1)]+" "+r;c.value=s+"."+m+"."+r;var e=$(CurrentActiveDateField+"DateField");e.style.backgroundImage="url('/images/maincontent/compactsearch/searchfield.jpg')";if(CurrentActiveDateField=="Outward"){MinimumDate=m+"/"+s+"/"+r;CalendarStartDate=m+"/"+r;SelectedOutwardDate=m+"/"+s+"/"+r}var l=document.getElementById("CalendarPopUp");l.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 k=CurrentSrcElement;if(k.className=="selector"){k=k.parentNode}var m="yCalendar_0_cell0";var w=GetSelectedDateObject().id;if(w){m=w}var l=m.substring((m.indexOf("_")+1),(m.lastIndexOf("_")));var s=m.substring((m.indexOf("cell")+4));var b=k.id;var v=b.substring((b.indexOf("_")+1),(b.lastIndexOf("_")));var h=b.substring((b.indexOf("cell")+4));for(var u=0;u<34;u++){for(var r=0;r<43;r++){var t=u+"0"+r;if(r<10){t=u+"00"+r}var n=l+"0"+s;if(s<10){n=l+"00"+s}var g=v+"0"+h;if(h<10){g=v+"00"+h}var q="yCalendar_"+u+"_cell"+r;var e=document.getElementById(q);if(e){if(e.className.indexOf("oom")<0&&e.className.indexOf("previous")<0){if(t>n&&t<g){e.style.backgroundColor="#EDE9BA"}else{e.style.backgroundColor="#E8E8E8"}if(t==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 k=0;k<3;k++){for(var h=0;h<43;h++){var b="yCalendar_"+k+"_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,k){var h=document.getElementById(b);var c=document.getElementById(b+"Text");h.value=e;c.innerHTML=k;var g=$(b+"Container");g.style.backgroundImage="url('/images/maincontent/compactsearch/searchfield.jpg')";if(b=="Origin"){ResetDestinationStationSelection()}HideSearchDropdown()}function PerformFlightSearch(l){var w=l||"de-DE";trackElementClick("FlightSearchButton","CompactSearch: Flightsearch clicked");var e=document.getElementById("Origin").value;var t=document.getElementById("Destination").value;var u=document.getElementById("OutwardDate").value;var m=document.getElementById("ReturnDate").value;var k="2|4";var z=document.getElementById("AdultPaxCount").innerHTML;var C=document.getElementById("ChildPaxCount").innerHTML;var D=document.getElementById("InfantPaxCount").innerHTML;var B="R,F";var b="OneWay";if(document.getElementById("TripTypeRoundTripRadio").checked){b="RoundTrip"}var E=$("OriginText");var G=$("DestinationText");var q=$("OutwardDateField");var v=$("ReturnDateField");q.style.backgroundImage="url('/images/maincontent/compactsearch/searchfield.jpg')";if(b=="OneWay"){v.style.backgroundImage="url('/images/maincontent/compactsearch/searchfield_disabled.jpg')"}else{v.style.backgroundImage="url('/images/maincontent/compactsearch/searchfield.jpg')"}Element.removeClassName($("OriginAutocompleteContainer"),"inputError");Element.removeClassName($("DestinationAutocompleteContainer"),"inputError");var g=false;if((e==null||e=="")&&E.value!=null&&E.value.length==3){e=E.value.toUpperCase()}if((t==null||t=="")&&G.value!=null&&G.value.length==3){t=G.value.toUpperCase()}if(e==null||e==""){g=true;Element.addClassName($("OriginAutocompleteContainer"),"inputError")}if(t==null||t==""){g=true;Element.addClassName($("DestinationAutocompleteContainer"),"inputError")}if(u==null||u==""){q.style.backgroundImage="url('/images/maincontent/compactsearch/searchfield_error.jpg')";g=true}if(b=="RoundTrip"&&(m==null||m=="")){v.style.backgroundImage="url('/images/maincontent/compactsearch/searchfield_error.jpg')";g=true}if(g){return}var r="OK";var c="Abbrechen";if(typeof OkButtonLabel!="undefined"&&OkButtonLabel!=null){r=OkButtonLabel}if(typeof CancelButtonLabel!="undefined"&&CancelButtonLabel!=null){c=CancelButtonLabel}var F={"2A":function(){this.hide();var H=GetViaStationByRoute(e,t);SearchFlights(H,t,u,m,k,z,C,D,B,b,w)},"2AA":function(){this.hide();var H=GetViaStationByRoute(e,t);SearchFlights(e,H,u,m,k,z,C,D,B,b,w)},WW:function(){this.hide();SearchWWFlights(e,t,u,m,k,z,C,D,B,b,w)},VY:function(){this.hide();SearchVYFlights(e,t,u,m,k,z,C,D,B,b,w)},DE:function(){this.hide();SearchDEFlights(e,t,u,m,k,z,C,D,B,b,w)},CBC:function(){this.hide();var H=2;if(CurrentCompactCulture.toLowerCase()=="de-de"){H=1}window.open(CologneBonnConnectURL+"?pid=1&from="+document.getElementById("Origin").value+"&lang="+H,"CBCWindow");trackCBCRedirect(document.getElementById("StationItemCBC"))}};if(!FlightSearchMessages.OtherAirline(e,t,r,c,F,"/images/rail_and_fly.gif")){if(u!=""&&typeof(todaysDateMessage)!="undefined"&&todaysDateMessage!=""){var h=u.split(".");var n=Date.UTC(h[2],h[1],h[0]);var A=new Date();var s=Date.UTC(A.getFullYear(),(A.getMonth()+1),A.getDate());if(n==s){alert(todaysDateMessage)}}SearchFlights(e,t,u,m,k,z,C,D,B,b,w)}}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=""}else{document.getElementById("ReturnDateField").innerHTML=ReturnFlightText;document.getElementById("ReturnDateField").style.backgroundImage="url('/images/maincontent/compactsearch/searchfield.jpg')";document.getElementById("ReturnDateField").style.color="#666666"}}var ActivePaxField="";function ShowPaxDropdown(g,e,b){var c=document.getElementById("PaxCountDropdown");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 k=$(this.departureStationField);Event.observe(k,"click",this.selectAll.bind(k));Event.observe(k,"focus",this.selectAll.bind(k));var l=$(this.arrivalStationField);Event.observe(l,"click",this.selectAll.bind(l));Event.observe(l,"focus",this.selectAll.bind(l))};this.selectAll=function(){this.select()};this.stationList=function(t){stationListResult=Array();var q=decodeURIComponent(t);var m=SortedStations;var u=0;var r=false;for(var n=0;n<m.length;n++){var k=Stations[m[n]].name;var l=Stations[m[n]].code;var v=true;if(_isArrivalStation==true&&_departureStation!=""){v=false;if(RouteIndex[_departureStation+l]==true){v=true;if(l=="CGN"){r=true}}}else{if(Stations[m[n]].mkts==0){v=false}}var s=false;if(q.toLowerCase()==l.toLowerCase()||k.toLowerCase().indexOf(q.toLowerCase())==0){s=true}if(s==true&&v==true){stationListResult[u]=Array();stationListResult[u][0]=l;stationListResult[u][1]=k;stationListResult[u][2]=v;u++}}if((this.disableCologneBonnConnect===undefined||this.disableCologneBonnConnect==false)&&typeof CologneBonnConnectLabel!="undefined"){if(r){stationListResult[u]=Array();stationListResult[u][0]="CBC";stationListResult[u][1]=CologneBonnConnectLabel;stationListResult[u][2]=true}}return stationListResult};this.createAutoComplete=function(r){var m=new YAHOO.widget.AutoComplete(r,(r+"Container"),this.stationDataSource);m.formatResult=this.formatResult;m.resultTypeList=false;m.forceSelection=false;m.minQueryLength=0;m.animVert=false;m.maxResultsDisplayed=this.getStationsCount();m.itemSelectEvent.subscribe(this.selectStation,this);m.textboxFocusEvent.subscribe(this.setActiveField,this);m.containerExpandEvent.subscribe(startRenderStationIcon);m.containerCollapseEvent.subscribe(stopRenderStationIcon);var k=false;if(r==this.arrivalStationField){k=true}if($(r+"Toggle")){var n=$(r+"Toggle");var q=new YAHOO.widget.Button({container:n});var l=function(s){if(m.isContainerOpen()){m.collapseContainer()}else{if(k){_isArrivalStation=true}else{_isArrivalStation=false}m.getInputEl().focus();setTimeout(function(){m.sendQuery("")},0)}};q.on("click",l)}return m};this.getStationsCount=function(){return SortedStations.length};this.selectStation=function(q,n,k){var l=n[2];var m=n[0].getInputEl();m.value=l.name;$(k.formFields[m.id]).value=l.code;if(!_isArrivalStation){_departureStation=l.code}};this.setActiveField=function(m,l,k){k.activeField=l[0].getInputEl().id;if(k.activeField==k.arrivalStationField){_isArrivalStation=true}else{_isArrivalStation=false}};this.tabStationField=function(l){if(l.keyCode==9){var k=this.arrivalAutoComplete.getInputEl().id;setTimeout("$('"+k+"').focus()",10)}};this.formatResult=function(l,t,k){var q="active-station";if(!l.active){q="inactive-station"}var n=false;var v="";var r="";if(_isArrivalStation==false){var u=GetAirlinesByAirport(l.code);if(u.length==1){v=u[0];n=true;r="o_"}}else{n=IsOtherAirlineRoute(_departureStation,l.code);v=GetAirlineCodeByRoute(_departureStation,l.code);r="d_"}var m="<div class='station "+q+"'><div class='name'>"+l.name+"</div><div class='code'>"+l.code+"</div></div>";if(n==true&&v=="DE"){var s=r+"oal_"+v+"_"+l.code;m="<div id='"+s+"' class='station "+q+"' ><div class='name' style='width:100px;overflow:hidden;'>"+l.name+"</div><div class='code'>"+l.code+"</div></div>";sta_changeItemArray.push(s)}return m};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/GermanwingsNew/logos/airline-icons/DE.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,k,b,e,l,h){var m=false;var c=GetAirlineCodeByRoute(g,k);if(typeof CologneBonnConnectLabel!="undefined"&&k=="CBC"){FlightSearchMessages.CologneBonnConnect(CologneBonnConnectLabel,CologneBonnConnectPrompt,b,e,l.CBC,function(){this.hide()});m=true}else{if(c=="2A"){FlightSearchMessages.RFMessage(c,g,k,b,e,l["2A"],function(){this.hide()},h);m=true}else{if(c=="2AA"){FlightSearchMessages.RFMessage(c,g,k,b,e,l["2AA"],function(){this.hide()},h);m=true}else{if(c=="XG"){FlightSearchMessages.OALMessage(c,g,k,"Clickair",b,e,l.XG,function(){this.hide()});m=true}else{if(c=="WW"){FlightSearchMessages.OALMessage(c,g,k,"<img src='/skysales/Images/GermanwingsNew/logos/bmibaby.gif' alt='bmibaby' />",b,e,l.WW,function(){this.hide()});m=true}else{if(c=="VY"){FlightSearchMessages.OALMessage(c,g,k,"<img src='/skysales/Images/GermanwingsNew/logos/vueling.gif' alt='Vueling' />",b,e,l.VY,function(){this.hide()});m=true}else{if(c=="DE"){FlightSearchMessages.OALMessage(c,g,k,"<img src='/skysales/Images/GermanwingsNew/logos/condor.gif' alt='Condor' />",b,e,l.DE,function(){this.hide()});m=true}}}}}}}return m},RFMessage:function(s,q,l,h,b,n,g,c){var r=OperatorInfo[s];var k=GetViaStationByRoute(q,l);r=r.replace(/{ORIGIN}/g,Stations[q].name);r=r.replace(/{DESTINATION}/g,Stations[l].name);r=r.replace(/\n/g,"<br/>");if(k!=""){r=r.replace(/{VIA}/g,Stations[k].name)}var m="<div style='padding:10px;'><img src='"+c+"' /><br/><br/><span>"+r+"</span></div>";var e=new YAHOO.widget.SimpleDialog("rfMessageBox",{width:"380px",fixedcenter:true,visible:false,draggable:true,close:true,modal:true,constraintoviewport:false,text:m,icon:"none",buttons:[{text:h,handler:n,isDefault:true},{text:b,handler:g,isDefault:false}]});e.setHeader("Germanwings.com");e.render(document.body);e.show()},CologneBonnConnect:function(g,c,b,e,l,h){var m="<div style='padding:10px;'><h2 style='color:#77003D;'>Cologne Bonn Connect</h2><br/><span>"+c.replace(/\n/g,"<br/>")+"</span></div>";var k=new YAHOO.widget.SimpleDialog("cbcMessageBox",{width:"380px",fixedcenter:true,visible:false,draggable:true,close:true,modal:true,constraintoviewport:false,text:m,icon:"none",buttons:[{text:b,handler:l,isDefault:true},{text:e,handler:h,isDefault:false}]});k.setHeader("Germanwings.com");k.render(document.body);k.show()},OALMessage:function(r,m,h,n,g,b,l,e){var q=OperatorInfo[r];q=q.replace(/{ORIGIN}/g,Stations[m].name);q=q.replace(/{DESTINATION}/g,Stations[h].name);q=q.replace(/\n/g,"<br/>");var k="<div style='padding:10px;'><h2 style='color:#77003D;'>"+n+"</h2><br/><span>"+q+"</span></div>";var c=new YAHOO.widget.SimpleDialog("oalMessageBox",{width:"380px",fixedcenter:true,visible:false,draggable:true,close:true,modal:true,constraintoviewport:false,text:k,icon:"none",buttons:[{text:g,handler:l,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()}};