window.addEvent("domready",TB_init);TB_WIDTH=0;TB_HEIGHT=0;var TB_doneOnce=0;function TB_init(){$$("a.smoothbox").each(function(a){a.onclick=TB_bind})}function TB_bind(b){var b=new Event(b);b.preventDefault();this.blur();var a=this.title||this.name||"";var c=this.rel||false;TB_show(a,this.href,c);this.onclick=TB_bind;return false}function TB_show(q,e,b){if(!$("TB_overlay")){new Element("iframe").setProperty("id","TB_HideSelect").injectInside(document.body);$("TB_HideSelect").setOpacity(0);new Element("div").setProperty("id","TB_overlay").injectInside(document.body);$("TB_overlay").setOpacity(0);TB_overlaySize();new Element("div").setProperty("id","TB_load").injectInside(document.body);$("TB_load").innerHTML="<img src='images/loading.gif' />";TB_load_position();$("TB_overlay").set("tween",{duration:400});$("TB_overlay").tween("opacity",0,0.6)}if(!$("TB_load")){new Element("div").setProperty("id","TB_load").injectInside(document.body);$("TB_load").innerHTML="<img src='images/loading.gif' />";TB_load_position()}if(!$("TB_window")){new Element("div").setProperty("id","TB_window").injectInside(document.body);$("TB_window").setOpacity(0)}$("TB_overlay").onclick=TB_remove;window.onscroll=TB_position;var r=e.match(/(.+)?/)[1]||e;var o=/\.(jpe?g|png|gif|bmp)/gi;if(r.match(o)){var u={caption:"",url:"",html:""};var l=u,m=u,a="";if(b){function j(v,w,i){return{caption:v.title,url:v.href,html:"<span id='TB_"+w+"'>&nbsp;&nbsp;<a href='#'>"+i+"</a></span>"}}var c=[];$$("a.smoothbox").each(function(i){if(i.rel==b){c[c.length]=i}});var t=false;for(var p=0;p<c.length;p++){var k=c[p];var g=k.href.match(o);if(k.href==e){t=true;a="Image "+(p+1)+" of "+(c.length)}else{if(t){m=j(k,"next","Next &gt;");break}else{l=j(k,"prev","&lt; Prev")}}}}imgPreloader=new Image();imgPreloader.onload=function(){imgPreloader.onload=null;var w=window.getWidth()-150;var C=window.getHeight()-150;var z=imgPreloader.width;var v=imgPreloader.height;if(z>w){v=v*(w/z);z=w;if(v>C){z=z*(C/v);v=C}}else{if(v>C){z=z*(C/v);v=C;if(z>w){v=v*(w/z);z=w}}}TB_WIDTH=z+30;TB_HEIGHT=v+60;$("TB_window").innerHTML+="<a href='' id='TB_ImageOff' title='Close'><img id='TB_Image' src='"+e+"' width='"+z+"' height='"+v+"' alt='"+q+"'/></a><div id='TB_caption'>"+q+"<div id='TB_secondLine'>"+a+l.html+m.html+"</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='Schließen'>Schließen</a></div>";$("TB_closeWindowButton").onclick=TB_remove;function i(x){return function(){$("TB_window").dispose();new Element("div").setProperty("id","TB_window").injectInside(document.body);TB_show(x.caption,x.url,b);return false}}var B=i(l);var A=i(m);if($("TB_prev")){$("TB_prev").onclick=B}if($("TB_next")){$("TB_next").onclick=A}document.onkeydown=function(x){var x=new Event(x);switch(x.code){case 27:TB_remove();break;case 190:if($("TB_next")){document.onkeydown=null;A()}break;case 188:if($("TB_prev")){document.onkeydown=null;B()}break}};$("TB_ImageOff").onclick=TB_remove;TB_position();TB_showWindow()};imgPreloader.src=e}else{var d=e.match(/\?(.+)/)[1];var s=TB_parseQuery(d);TB_WIDTH=(s.width*1)+30;TB_HEIGHT=(s.height*1)+40;var h=TB_WIDTH-30,n=TB_HEIGHT-45;if(e.indexOf("TB_iframe")!=-1){urlNoQuery=e.split("TB_");$("TB_window").innerHTML+="<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+q+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='Schließen'>Schließen</a></div></div><iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent' style='width:"+(h+29)+"px;height:"+(n+17)+"px;' onload='TB_showWindow()'> </iframe>"}else{$("TB_window").innerHTML+="<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+q+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton'>Schließen</a></div></div><div id='TB_ajaxContent' style='width:"+h+"px;height:"+n+"px;'></div>"}$("TB_closeWindowButton").onclick=TB_remove;if(e.indexOf("TB_inline")!=-1){$("TB_ajaxContent").innerHTML=($(s.inlineId).innerHTML);TB_position();TB_showWindow()}else{if(e.indexOf("TB_iframe")!=-1){TB_position();if(frames.TB_iframeContent==undefined){$(document).keyup(function(v){var i=v.keyCode;if(i==27){TB_remove()}});TB_showWindow()}}else{var f=function(){TB_position();TB_showWindow()};new Request.HTML({method:"get",update:$("TB_ajaxContent"),onComplete:f}).get(e)}}}window.onresize=function(){TB_position();TB_load_position();TB_overlaySize()};document.onkeyup=function(i){var i=new Event(i);if(i.code==27){TB_remove()}}}function TB_showWindow(){if(TB_doneOnce==0){TB_doneOnce=1;$("TB_window").set("tween",{duration:250,onComplete:function(){if($("TB_load")){$("TB_load").dispose()}}});$("TB_window").tween("opacity",0,1)}else{$("TB_window").setStyle("opacity",1);if($("TB_load")){$("TB_load").dispose()}}}function TB_remove(){$("TB_overlay").onclick=null;document.onkeyup=null;document.onkeydown=null;if($("TB_imageOff")){$("TB_imageOff").onclick=null}if($("TB_closeWindowButton")){$("TB_closeWindowButton").onclick=null}if($("TB_prev")){$("TB_prev").onclick=null}if($("TB_next")){$("TB_next").onclick=null}$("TB_window").set("tween",{duration:250,onComplete:function(){$("TB_window").dispose()}});$("TB_window").tween("opacity",1,0);$("TB_overlay").set("tween",{duration:400,onComplete:function(){$("TB_overlay").dispose()}});$("TB_overlay").tween("opacity",0.6,0);window.onscroll=null;window.onresize=null;$("TB_HideSelect").dispose();TB_init();TB_doneOnce=0;return false}function TB_position(){$("TB_window").set("morph",{duration:75});$("TB_window").morph({width:TB_WIDTH+"px",left:(window.getScrollLeft()+(window.getWidth()-TB_WIDTH)/2)+"px",top:(window.getScrollTop()+(window.getHeight()-TB_HEIGHT)/2)+"px"})}function TB_overlaySize(){$("TB_overlay").setStyles({height:"0px",width:"0px"});$("TB_HideSelect").setStyles({height:"0px",width:"0px"});$("TB_overlay").setStyles({height:window.getScrollHeight()+"px",width:window.getScrollWidth()+"px"});$("TB_HideSelect").setStyles({height:window.getScrollHeight()+"px",width:window.getScrollWidth()+"px"})}function TB_load_position(){if($("TB_load")){$("TB_load").setStyles({left:(window.getScrollLeft()+(window.getWidth()-56)/2)+"px",top:(window.getScrollTop()+((window.getHeight()-20)/2))+"px",display:"block"})}}function TB_parseQuery(c){if(!c){return{}}var e={};var b=c.split(/[;&]/);for(var a=0;a<b.length;a++){var d=b[a].split("=");if(!d||d.length!=2){continue}e[unescape(d[0])]=unescape(d[1]).replace(/\+/g," ")}return e}window.addEvent("domready",function(){if($chk($("searchbox"))){$("searchbox").addEvents({focus:function(){if(this.value=="Suchbegriff"||this.value=="Search keyword"){this.set("alt",this.value);this.value=""}},blur:function(){if(!this.value&&this.alt){this.value=this.alt}}})}if($chk($("UserName"))){$("UserName").addEvents({focus:function(){if(this.value=="Name"){this.value=""}},blur:function(){if(!this.value){this.value="Name"}}})}if($chk($("UserPass"))){$("UserPass").addEvents({focus:function(){if(this.value=="Passwort"){this.value=""}},blur:function(){if(!this.value){this.value="Passwort"}}})}if($chk($("max_login_username"))){$("max_login_username").addEvents({focus:function(){if(this.value=="Name"){this.value=""}},blur:function(){if(!this.value){this.value="Name"}}})}if($chk($("max_login_password"))){$("max_login_password").addEvents({focus:function(){if(this.value=="Passwort"){this.value=""}},blur:function(){if(!this.value){this.value="Passwort"}}})}if($chk($("from_position"))){$("from_position").addEvents({focus:function(){if(this.value=="Haltest. / Str., Nr."||this.value=="Dep. stop / St., No."){this.set("alt",this.value);this.value=""}},blur:function(){if(!this.value&&this.alt){this.value=this.alt}}})}if($chk($("to_position"))){$("to_position").addEvents({focus:function(){if(this.value=="Haltest. / Str., Nr."||this.value=="Dep. stop / St., No."){this.set("alt",this.value);this.value=""}},blur:function(){if(!this.value&&this.alt){this.value=this.alt}}})}if($chk($("get_your_loc"))){$("get_your_loc").addEvents({focus:function(){if(this.value=="Haltest. / Str., Nr."||this.value=="Dep. stop / St., No."){this.set("alt",this.value);this.value=""}},blur:function(){if(!this.value&&this.alt){this.value=this.alt}}})}if($chk($$(".event_navigation"))){$$(".event_navigation").setStyle("display","block")}if($("widget_gen")){var c=1;var d=300;var e=1;var a="";$$(".wdgt_typ input").addEvent("click",function(){$$(".wdgt_typ label").removeClass("active");this.getParent().addClass("active");changeBvgWidgetPreview()});$$(".wdgt_bg input").addEvent("click",function(){$$(".wdgt_bg label").removeClass("active");this.getParent().addClass("active");changeBvgWidgetPreview()});$("wdgt_width").addEvent("change",function(){$("wdgt_width").value=parseInt($("wdgt_width").value);if($("wdgt_width").value==="NaN"||$("wdgt_width").value<200){$("wdgt_width").value=200}changeBvgWidgetPreview()});$("wdgt_target").addEvent("change",function(){changeBvgWidgetPreview()});$$(".wdgt_txt input").addEvent("click",function(){$$(".wdgt_txt label").removeClass("active");this.getParent().addClass("active");changeBvgWidgetPreview()});$$(".wdgt_insert input").addEvent("click",function(){$$(".wdgt_insert label").removeClass("active");this.getParent().addClass("active");changeBvgWidgetPreview()});$$(".wdgt_insert2 input").addEvent("click",function(){$$(".wdgt_insert2 label").removeClass("active");this.getParent().addClass("active");changeBvgWidgetPreview()});$$(".wdgt_msg label").addEvent("click",function(){if(this.getChildren("input")[0].checked){this.addClass("active")}else{this.removeClass("active")}changeBvgWidgetPreview()});$$(".wdgt_cnt label").addEvent("click",function(){$$(".wdgt_cnt label").removeClass("active");this.addClass("active");changeBvgWidgetPreview()});$$(".wdgt_route select").addEvent("change",function(){if(this.value!="0"){this.getParent().addClass("active")}else{this.getParent().removeClass("active")}changeBvgWidgetPreview()});$("wdgt_sel_fahrinfo").addEvent("click",function(){$$("#widget_gen li.wdgt_verkehrsmeldungen").setStyle("display","none");$$("#widget_gen li.wdgt_augenblicke").setStyle("display","none");$$("#widget_gen li.wdgt_fahrinfo").setStyle("display","list-item")});$("wdgt_sel_augenblicke").addEvent("click",function(){$$("#widget_gen li.wdgt_verkehrsmeldungen").setStyle("display","none");$$("#widget_gen li.wdgt_fahrinfo").setStyle("display","none");$$("#widget_gen li.wdgt_augenblicke").setStyle("display","list-item")});$("wdgt_sel_verkehrsmeldungen").addEvent("click",function(){$$("#widget_gen li.wdgt_fahrinfo").setStyle("display","none");$$("#widget_gen li.wdgt_augenblicke").setStyle("display","none");$$("#widget_gen li.wdgt_verkehrsmeldungen").setStyle("display","list-item")});$$("#wdgt_code textarea").addEvent("click",function(){this.select()});$("wdgt_preview").addEvent("load",function(){correctHeight()})}if($chk($("print_header"))){window.print()}if(-1!==navigator.userAgent.indexOf("PPC Mac OS X")){var b={title:function(){return"PDF-Download"},text:function(){return"Sollten Sie auf Ihrem Mac Probleme mit dem öffnen einer PDF-Datei haben installieren Sie bitte den Adobe Reader."}};new Tips(".ppcmacinfo",b)}});window.addEvent("load",function(){if($("wdgt_preview")){changeBvgWidgetPreview()}});function correctHeight(){$("foot").setStyle("clear","");if($("wdgt_typ_0").get("checked")===true){setBvgWidgetHeight(0)}else{if($("wdgt_typ_1").get("checked")===true){setBvgWidgetHeight(10)}else{if($("wdgt_typ_2").get("checked")===true){setBvgWidgetHeight(12)}}}$("foot").setStyle("clear","both")}function setBvgWidgetHeight(e){var a,b,c=0;e=parseInt(e);$("wdgt_preview").setStyle("height","auto");$("wdgt_preview").setStyle("width","auto");if(!document.all){a=$("wdgt_preview").contentDocument.body.scrollHeight||$("wdgt_preview").document.height;a+=e;if($("wdgt_typ_0").get("checked")===true){if(a<196){a=196}}else{if($("wdgt_typ_1").get("checked")===true){c=0;$$(".wdgt_cnt input").each(function(g,f){if(g.get("checked")===true){c=g.value}});if(c>1){if(a<350){a=350}}}else{if($("wdgt_typ_2").get("checked")===true){if(a<350){a=350}}}}b=$("wdgt_preview").contentDocument.body.scrollWidth||$("wdgt_preview").document.width;$("wdgt_preview").setStyle("height",a);$("wdgt_preview").set("height",a);$("wdgt_preview").setStyle("width",b);$("wdgt_preview").set("width",b)}else{a=document.frames("wdgt_preview").document.body.scrollHeight;a+=e;if($("wdgt_typ_0").get("checked")===true){if(a<196){a=196}}else{if($("wdgt_typ_1").get("checked")===true){c=0;$$(".wdgt_cnt input").each(function(g,f){if(g.get("checked")==true){c=g.value}});if(c>1){if(a<350){a=350}}}else{if($("wdgt_typ_2").get("checked")===true){if(a<350){a=350}}}}b=document.frames("wdgt_preview").document.body.scrollWidth;document.all.wdgt_preview.style.height=a+"px";document.all.wdgt_preview.style.width=b+"px"}var d=$$("#wdgt_code textarea")[0].get("html").replace(/height:(\d+)px/,"height:"+a+"px").replace(/width:(\d+)px/,"width:"+b+"px");$$("#wdgt_code textarea")[0].set("html",d)}function callBvgWidgetFahrinfo(b,c,d,a){$("wdgt_preview").setProperty("src",widget_url+"index.php/de/widgets/fahrinfo/"+b+"/"+c+"/"+d+((a!="")?"/":"")+Url.encode(a));$$("#wdgt_code textarea").set("html",'&lt;iframe frameborder="0" style="width:'+c+"px;height:"+$("wdgt_preview").getStyle("height")+';border:0;" src="'+widget_url+"index.php/de/widgets/fahrinfo/"+b+"/"+c+"/"+d+((a!="")?"/":"")+Url.encode(a)+'"&gt;&lt;/iframe&gt;')}function callBvgWidgetAugenblicke(a,d,b,c){$("wdgt_preview").setProperty("src",widget_url+"index.php/de/widgets/augenblicke/"+a+"/"+d+"/"+c+"/"+b);$$("#wdgt_code textarea").set("html",'&lt;iframe frameborder="0" style="width:'+d+"px;height:"+$("wdgt_preview").getStyle("height")+';border:0;" src="'+widget_url+"index.php/de/widgets/augenblicke/"+a+"/"+d+"/"+c+"/"+b+'"&gt;&lt;/iframe&gt;')}function callBvgWidgetStoerungen(c,e,i,f,d,a,b,k,j,h,g){$("wdgt_preview").setProperty("src",widget_url+"index.php/de/widgets/verkehrsmeldungen/"+c+"/"+e+"/"+i+"/"+f+"/"+d+"/"+a+"/"+b+"/"+k+"/"+j+"/"+h+"/"+g);$$("#wdgt_code textarea").set("html",'&lt;iframe frameborder="0" style="width:'+e+"px;height:"+$("wdgt_preview").getStyle("height")+';border:0;" src="'+widget_url+"index.php/de/widgets/verkehrsmeldungen/"+c+"/"+e+"/"+i+"/"+f+"/"+d+"/"+a+"/"+b+"/"+k+"/"+j+"/"+h+"/"+g+'"&gt;&lt;/iframe&gt;')}function changeBvgWidgetPreview(){widget_background=1;$$(".wdgt_bg input").each(function(b,a){if(b.get("checked")===true){widget_background=a+1}});widget_width=parseInt($("wdgt_width").value);if(widget_width<200||widget_width>400){widget_width=300}if($("wdgt_typ_0").get("checked")===true){widget_fahrinfo_text=1;$$(".wdgt_txt input").each(function(b,a){if(b.get("checked")===true){widget_fahrinfo_text=a+1}});widget_fahrinfo_target=$("wdgt_target").value;callBvgWidgetFahrinfo(widget_background,widget_width,widget_fahrinfo_text,widget_fahrinfo_target)}else{if($("wdgt_typ_1").get("checked")===true){widget_augenblicke_link=0;$$(".wdgt_insert input").each(function(b,a){if(b.get("checked")===true){widget_augenblicke_link=b.value}});widget_augenblicke_count=0;$$(".wdgt_cnt input").each(function(b,a){if(b.get("checked")===true){widget_augenblicke_count=b.value}});callBvgWidgetAugenblicke(widget_background,widget_width,widget_augenblicke_link,widget_augenblicke_count)}else{if($("wdgt_typ_2").get("checked")===true){active_reports=1;if($("wdgt_msg_0").get("checked")!==true){active_reports=0}future_reports=1;if($("wdgt_msg_1").get("checked")!==true){future_reports=0}traffic_news=1;all_news_link=1;if($("wdgt_msg_3").get("checked")!==true){all_news_link=0}lift_troubles_link=1;if($("wdgt_msg_4").get("checked")!==true){lift_troubles_link=0}route1=parseInt($("wdgt_route_0").get("value"));route2=parseInt($("wdgt_route_1").get("value"));route3=parseInt($("wdgt_route_2").get("value"));route4=parseInt($("wdgt_route_3").get("value"));callBvgWidgetStoerungen(widget_background,widget_width,active_reports,future_reports,traffic_news,all_news_link,lift_troubles_link,route1,route2,route3,route4)}}}}function replaceElement(a,b){var c=new Request.HTML({method:"get",url:a,update:b}).send()}function executeAndRemoveElement(a,b){var c=new Request({url:a});c.send();$(b).setStyle("display","none");return false}var Url={encode:function(a){return escape(this._utf8_encode(a))},decode:function(a){return this._utf8_decode(unescape(a))},_utf8_encode:function(b){b=b.replace(/\r\n/g,"\n");var a="";for(var e=0;e<b.length;e++){var d=b.charCodeAt(e);if(d<128){a+=String.fromCharCode(d)}else{if((d>127)&&(d<2048)){a+=String.fromCharCode((d>>6)|192);a+=String.fromCharCode((d&63)|128)}else{a+=String.fromCharCode((d>>12)|224);a+=String.fromCharCode(((d>>6)&63)|128);a+=String.fromCharCode((d&63)|128)}}}return a},_utf8_decode:function(a){var b="";var d=0;var e=c1=c2=0;while(d<a.length){e=a.charCodeAt(d);if(e<128){b+=String.fromCharCode(e);d++}else{if((e>191)&&(e<224)){c2=a.charCodeAt(d+1);b+=String.fromCharCode(((e&31)<<6)|(c2&63));d+=2}else{c2=a.charCodeAt(d+1);c3=a.charCodeAt(d+2);b+=String.fromCharCode(((e&15)<<12)|((c2&63)<<6)|(c3&63));d+=3}}}return b}};function submitForm(name){eval("document.forms."+name+".submit()")}function maxLength(b,a){if(b.value.length>a){b.value=b.value.substring(0,a)}}function htmlspecialchars_decode(b){var a=new Element("span",{html:b});return a.get("text")};