function init(a){infinitymap=new InfinityMap();fenestra=new fenestra("/js/fenestra/");fenestra.getWindow("verzeichnisse").setScrollable(0);fenestra.getWindow("verzeichnisse").onResize(infinitymap.resize_verz);fenestra.getWindow("verzeichnisse").onHide(function(){infinitymap.activateButton($("#button_verzeichnis"))});fenestra.getWindow("verzeichnisse").setTitle(default_title_verzeichnisse);fenestra.getWindow("monitorlayer").setResizable(0);fenestra.getWindow("monitorlayer").setScrollable(0);fenestra.getWindow("monitorlayer").setTitle(default_title_monitor);fenestra.getWindow("monitorlayer").onHide(function(){infinitymap.activateButton($("#button_monitor"))});fenestra.getWindow("imprint").setTitle(default_title_impressum);fenestra.getWindow("imprint").onHide(function(){infinitymap.activateButton($("#button_imprint"))});fenestra.getWindow("legend").setTitle(default_title_legende);fenestra.getWindow("legend").setResizable(0);fenestra.getWindow("legend").setScrollable(0);fenestra.getWindow("legend").onHide(function(){infinitymap.activateButton($("#button_legend"))});fenestra.getWindow("infolayer").setTitle(default_title_infolayer);fenestra.getWindow("infolayer").setResizable(default_infolayer_resizable);fenestra.getWindow("infolayer").setScrollable(default_infolayer_scrollable);fenestra.getWindow("overviewlayer").setTitle(default_title_overview);fenestra.getWindow("overviewlayer").setResizable(0);fenestra.getWindow("overviewlayer").setScrollable(0);fenestra.getWindow("overviewlayer").onHide(function(){infinitymap.activateButton($("#button_overview"))});if(typeof(fenestra.getWindow("banner"))=="object"){fenestra.getWindow("banner").setTitle("Anzeige");fenestra.getWindow("banner").setResizable(0);fenestra.getWindow("banner").setScrollable(0);fenestra.getWindow("banner").show()}infinitymap.collectExistingKacheln();infinitymap.resize();infinitymap.loadKacheln();$(document).bind("mousemove",infinitymap.mmove);$(document).bind("mouseup",infinitymap.mup);$(window).bind("resize",infinitymap.resize);$("#karte").bind("mousedown",infinitymap.mdown);$("#karte").bind("mouseover",infinitymap.navFadeOut);$("#navigation").bind("mouseover",infinitymap.navFadeIn);$("#nav").bind("mouseover",infinitymap.navFadeIn);$("#monitor").bind("mousedown",infinitymap.monitor_mdown);$("#overview").bind("mousedown",infinitymap.overview_mdown);$("#mapnotice").bind("mouseover",infinitymap.clearNotice);if(typeof(a)!="undefined"){$("#karte").bind("dblclick",infinitymap.getPoint)}else{$("#karte").bind("dblclick",infinitymap.dblclick)}$(".button").css("opacity","0.9"),$(".button").css("visibility","visible"),$("#pointer_shadow").css("visibility","visible");$("#pointer_shadow").css("opacity",0.3);$("#mapnotice").css("opacity",0.9);var b=parseInt($("#default_center_x").val());var c=parseInt($("#default_center_y").val());if(!isNaN(b)&&b>0&&!isNaN(c)&&c>0){infinitymap.setCenter(new Point(b,c))}}function InfinityMap(){var g=-17;var i=-17;var j=new Array();var k=new Array();var l=new Area(new Point(0,0),new Point(0,0));var m=l;var n=null;var o=192;var p=0;var q=0;var r=false;var s=true;var t=0;var u;var w=0;var z=true;var A=true;var B=true;var C=this;this.getMapWidth=function(){return parseInt(document.getElementById('mainframe').style.width)};this.setMapWidth=function(a){if(document.getElementById('mainframe')){document.getElementById('mainframe').style.width=a+"px"}};this.getMapHeight=function(){return parseInt(document.getElementById('mainframe').style.height)};this.setMapHeight=function(a){if(document.getElementById('mainframe')){document.getElementById('mainframe').style.height=a+"px"}};this.setZoom=function(a){if(typeof(a)=="number"){o=a}};this.getZoom=function(){return o};this.getVisibleArea=function(){if(document.getElementById('karte')){var a=parseInt(document.getElementById('karte').style.left);var b=parseInt(document.getElementById('karte').style.top);var c=new Point(-a,-b);var d=new Point(-a+this.getMapWidth(),-b+this.getMapHeight());return new Area(c,d)}};this.showObject=function(a){fenestra.getWindow("infolayer").hide();this.setCenter(a);this.setPointer(a);this.reloadAd();return false};this.move=function(h,v){if(h<0){var a=parseInt(document.getElementById('karte').style.left)-Math.floor(this.getMapWidth()/3)}else if(h>0){var a=parseInt(document.getElementById('karte').style.left)+Math.floor(this.getMapWidth()/3)}else{var a=parseInt(document.getElementById('karte').style.left)}if(v>0){var b=parseInt(document.getElementById('karte').style.top)-Math.floor(this.getMapHeight()/2)}else if(v<0){var b=parseInt(document.getElementById('karte').style.top)+Math.floor(this.getMapHeight()/2)}else{var b=parseInt(document.getElementById('karte').style.top)}$("#karte").animate({left:a,top:b},{duration:1000,complete:function(){C.loadKacheln();C.updateMonitor();C.updateOverview()}});return false};this.setCenter=function(a,b){if(document.getElementById('karte')){var x=a.getX();var y=a.getY();var c=this.getMapWidth();var d=this.getMapHeight();newpos_x=-x*(this.getZoom()/192)+(Math.floor(c/2));newpos_y=-y*(this.getZoom()/192)+(Math.floor(d/2));oldpos_x=parseInt(document.getElementById('karte').style.left);oldpos_y=parseInt(document.getElementById('karte').style.top);if(Math.abs(newpos_x-oldpos_x)<900&&Math.abs(newpos_y-oldpos_y)<900&&typeof(b)!="number"){$("#karte").animate({left:newpos_x,top:newpos_y},{duration:1000,complete:function(){C.loadKacheln();C.updateMonitor();C.updateOverview()}})}else{document.getElementById('karte').style.left=newpos_x+"px";document.getElementById('karte').style.top=newpos_y+"px";this.loadKacheln();this.updateMonitor();this.updateOverview()}}};this.getCenter=function(){var a=parseInt(document.getElementById('karte').style.left);var b=parseInt(document.getElementById('karte').style.top);var c=this.getMapWidth();var d=this.getMapHeight();var e=Math.floor(c/2)-a;var f=Math.floor(d/2)-b;return new Point(e/(this.getZoom()/192),f/(this.getZoom()/192))};this.setPointer=function(a){var x=a.getX();var y=a.getY();if(document.getElementById('pointer')){document.getElementById('pointer_image').src="/images/signs/pointer.gif";document.getElementById('pointer').style.left=Math.floor(x*(this.getZoom()/192)+g)+"px";document.getElementById('pointer').style.top=Math.floor(y*(this.getZoom()/192)+i)+"px";$("#pointer").show()}};this.loadKacheln=function(a){if(typeof(a)=="undefined"){var a=C.getVisibleArea()}w++;if(w>2){C.reloadAd()}if(!m.contains(a,(C.getZoom()/2))){$.getJSON("/ajax/kacheln.php",{nw_x:a.getNW().getX(),nw_y:a.getNW().getY(),se_x:a.getSE().getX(),se_y:a.getSE().getY(),zoom:C.getZoom()},C.createNewKacheln);t++;m=a}};this.collectExistingKacheln=function(){$(".kacheln").each(function(){if(typeof(j[$(this).attr("id")])!='object'){j[$(this).attr("id")]=new Kachel($(this).attr("id"));j[$(this).attr("id")].setPoint(new Point($(this).css("left"),$(this).css("top")));j[$(this).attr("id")].setImage($(this).attr("src"));j[$(this).attr("id")].setWidth($(this).css("width"));j[$(this).attr("id")].setHeight($(this).css("height"));j[$(this).attr("id")].setZ(1);j[$(this).attr("id")].setImgobj(this)}if(o!=parseInt($(this).css("width"))){o=parseInt($(this).css("width"))}})};this.createNewKacheln=function(a){if(typeof(a.kacheln)=='object'){var b=0;var c=0;var d=0;var e=0;for(onekachel in a.kacheln){b++;if(typeof(j[a.kacheln[onekachel].id])!='object'){c++;j[a.kacheln[onekachel].id]=new Kachel(a.kacheln[onekachel].id);j[a.kacheln[onekachel].id].setPoint(new Point(a.kacheln[onekachel].x,a.kacheln[onekachel].y));j[a.kacheln[onekachel].id].setImage(a.kacheln[onekachel].url);j[a.kacheln[onekachel].id].setWidth(a.kacheln[onekachel].zoom);j[a.kacheln[onekachel].id].setHeight(a.kacheln[onekachel].zoom);j[a.kacheln[onekachel].id].setZ(1);j[a.kacheln[onekachel].id].create()}}for(onekachel in j){e++;if(typeof(a.kacheln[onekachel])=="undefined"){d++;$(j[onekachel].imgobj).remove();j[onekachel]=null;delete(j[onekachel])}}}if(default_loadflags=="true"){if(typeof(a.flags)=='object'){for(oneflag in a.flags){if(typeof(k[a.flags[oneflag].ID])!='object'){k[a.flags[oneflag].ID]=new Flag(a.flags[oneflag].ID,C);k[a.flags[oneflag].ID].setTitle(a.flags[oneflag].Title);k[a.flags[oneflag].ID].setPoint(C.getZoom(),new Point(a.flags[oneflag].X,a.flags[oneflag].Y));k[a.flags[oneflag].ID].setImage(a.flags[oneflag].Image);k[a.flags[oneflag].ID].setShadow(a.flags[oneflag].ImageShadow);k[a.flags[oneflag].ID].setOffsetX(a.flags[oneflag].ImageOffsetX);k[a.flags[oneflag].ID].setOffsetY(a.flags[oneflag].ImageOffsetY);k[a.flags[oneflag].ID].setShadowOffsetX(a.flags[oneflag].ImageShadowOffsetX);k[a.flags[oneflag].ID].setShadowOffsetY(a.flags[oneflag].ImageShadowOffsetY);k[a.flags[oneflag].ID].setWidth(a.flags[oneflag].ImageSizeX);k[a.flags[oneflag].ID].setHeight(a.flags[oneflag].ImageSizeY);k[a.flags[oneflag].ID].setShadowWidth(a.flags[oneflag].ImageShadowSizeX);k[a.flags[oneflag].ID].setShadowHeight(a.flags[oneflag].ImageShadowSizeY);k[a.flags[oneflag].ID].setLinktype(a.flags[oneflag].LinkType);k[a.flags[oneflag].ID].setLinkurl(a.flags[oneflag].Link);k[a.flags[oneflag].ID].create();k[a.flags[oneflag].ID].setPoint(C.getZoom());if(A){k[a.flags[oneflag].ID].show()}}}for(oneflag in k){if(typeof(a.flags[oneflag])=="undefined"){$(k[oneflag].imgobj_fg).remove();$(k[oneflag].imgobj_bg).remove();k[oneflag]=null;delete(k[oneflag])}}}}};this.changeTabTo=function(a){var b=document.getElementById("tabactive").innerHTML;var c=$("#tabactive").attr("tabcontent");var d=a.innerHTML;var e=$(a).attr("tabcontent");document.getElementById("tabactive").innerHTML=d;$("#tabactive").attr("tabcontent",e);a.innerHTML=b;$(a).attr("tabcontent",c);$("#verzeichnis_content").html("<div style='text-align:center'><img src='/images/loadinggif.gif' alt='Verzeichnis wird geladen' border='0' /></div>");$.get("/ajax/list.php",{list:e},this.loadTab);return false};this.loadTab=function(a){if(a.indexOf("<li>")>0){document.getElementById("verzeichnis_content").innerHTML=a}else{document.getElementById("verzeichnis_content").innerHTML="<div style='text-align:center' class='textsmall'>Dieses Verzeichnis enthält derzeit noch keine Einträge!</div>"}$("#verzeichnis_content").fadeIn(400)};this.zoom=function(a){if(typeof(a)=="number"){$("#pointer").hide();var b=this.getZoom();var c=this.getCenter();if(a==1){var d=b+20}else if(a==-1){var d=b-20}else{var d=192}if(d>110){this.setZoom(d);for(oneelement in j){var e=(j[oneelement].nr%1000)-1;var f=Math.floor(j[oneelement].nr/1000)-1;$(j[oneelement].imgobj).css({left:e*d,top:f*d,width:d,height:d})}for(oneflag in k){k[oneflag].setPoint(d)}this.setCenter(c,1);this.loadKacheln();this.updateMonitor();this.updateOverview();this.updateScale()}else{this.notice("Sie haben die kleinste Zoomstufe erreicht.<br />Ein weiteres herauszoomen ist nicht möglich.")}}return false};this.resetKacheln=function(){for(oneelement in j){delete j[oneelement]}};this.mdown=function(a){var b=a.pageX;var c=a.pageY;p=b-parseInt(this.style.left);q=c-parseInt(this.style.top);r=true};this.mmove=function(a){if(r==true){document.getElementById("karte").style.left=a.pageX-p+"px";document.getElementById("karte").style.top=a.pageY-q+"px"}};this.mup=function(a){if(r==true){r=false;C.updateMonitor();C.updateOverview();C.loadKacheln()}};this.dblclick=function(a){var b=-parseInt(document.getElementById("karte").style.left)+a.pageX-parseInt(document.getElementById("mainframe").style.left);var c=-parseInt(document.getElementById("karte").style.top)+a.pageY-parseInt(document.getElementById("mainframe").style.top);C.setCenter(new Point(Math.floor(b/(C.getZoom()/192)),Math.floor(c/(C.getZoom()/192))))};this.getPoint=function(a){if(!r){var b=-parseInt(document.getElementById("karte").style.left)+a.pageX-parseInt(document.getElementById("mainframe").style.left);var c=-parseInt(document.getElementById("karte").style.top)+a.pageY-parseInt(document.getElementById("mainframe").style.top);alert("Koordinate: x="+b+", y="+c)}};this.resize=function(){if(self.innerHeight){var a=self.innerWidth;var b=self.innerHeight}else if(document.documentElement&&document.documentElement.clientHeight){var a=document.documentElement.clientWidth;var b=document.documentElement.clientHeight}else if(document.body){var a=document.body.clientWidth;var b=document.body.clientHeight}if(default_ad_active=="false"){var c=(parseInt(a)-parseInt(document.getElementById("mainframe").style.left)-10)}else{var c=(parseInt(a)-parseInt(document.getElementById("mainframe").style.left)-175);document.getElementById("ad_skyscraper").style.left=parseInt(c)+15+"px"}var d=(parseInt(b)-parseInt(document.getElementById("mainframe").style.top)-35);document.getElementById("mainframe").style.width=c+"px";document.getElementById("mainframe").style.height=d+"px";document.getElementById("header").style.width=c+"px";document.getElementById("footer").style.width=c+"px";document.getElementById("footer").style.top=parseInt(b)-35+"px";document.getElementById("logo").style.left=parseInt(c)-250+"px";document.getElementById("buttons").style.left=parseInt(c)-150+"px";document.getElementById("buttons_control").style.left=parseInt(c)-150+"px";$("#scale").css("top",parseInt(b)-108+"px");if(fenestra.getWindow("monitorlayer").getStatusMoved()==0){fenestra.getWindow("monitorlayer").setPosition(parseInt(c)-fenestra.getWindow("monitorlayer").getWidth(),parseInt(d)-fenestra.getWindow("monitorlayer").getHeight()+50)}C.updateMonitor();C.updateOverview()};this.updateMonitor=function(){var a=this.getMapWidth()/this.getZoom();var b=this.getMapHeight()/this.getZoom();document.getElementById("monitor_frame").style.width=Math.floor((a/default_kacheln_horiz)*default_monitor_width)+"px";document.getElementById("monitor_frame").style.height=Math.floor((b/default_kacheln_verti)*default_monitor_height)+"px";var c=default_monitor_width/(default_kacheln_horiz*this.getZoom());var d=parseInt(document.getElementById("karte").style.left)*-c;var e=parseInt(document.getElementById("karte").style.top)*-c;$("#monitor_frame").animate({left:Math.floor(d)+"px",top:Math.floor(e)+"px"},{duration:300})};this.updateOverview=function(){var a=this.getMapWidth()/this.getZoom();var b=this.getMapHeight()/this.getZoom();document.getElementById("overview_frame").style.width=Math.floor((a/default_kacheln_horiz)*default_overview_width)+"px";document.getElementById("overview_frame").style.height=Math.floor((b/default_kacheln_verti)*default_overview_height)+"px";var c=default_overview_width/(default_kacheln_horiz*this.getZoom());var d=parseInt(document.getElementById("karte").style.left)*-c;var e=parseInt(document.getElementById("karte").style.top)*-c;document.getElementById("overview_frame").style.left=Math.floor(d)+"px";document.getElementById("overview_frame").style.top=Math.floor(e)+"px"};this.updateScale=function(){var a=default_kachelsize/this.getZoom();var b=parseInt($("#default_scale").val());$("#scale_text").text(parseInt((b*a))+" m")};this.monitor_mdown=function(a){var b=a.pageX-parseInt(document.getElementById("monitorlayer").style.left)-2;var c=a.pageY-parseInt(document.getElementById("monitorlayer").style.top)-15;var d=default_monitor_width/(default_kacheln_horiz*192);var e=Math.floor(b/d);var f=Math.floor(c/d);C.setCenter(new Point(e,f));return false};this.overview_mdown=function(a){var b=a.pageX-parseInt(document.getElementById("overviewlayer").style.left)-2;var c=a.pageY-parseInt(document.getElementById("overviewlayer").style.top)-15;var d=default_overview_width/(default_kacheln_horiz*192);var e=Math.floor(b/d);var f=Math.floor(c/d);C.setCenter(new Point(e,f));return false};this.resize_verz=function(a){var b=parseInt(a.getHeight())-(default_anz_tabs*30)-35;document.getElementById("verzeichnis_content").style.height=b+"px"};this.toggleWindow=function(a,b){if(!fenestra.getWindow(a).isVisible()){fenestra.getWindow(a).show();C.deactivateButton(b)}else{fenestra.getWindow(a).hide()}};this.toggleImprint=function(){if(!fenestra.getWindow("imprint").isVisible()){this.loadLayer("impressum","imprint",default_title_impressum);C.deactivateButton($("#button_imprint"))}else{fenestra.getWindow("imprint").hide()}};this.toggleSurroundings=function(){if(!fenestra.getWindow("infolayer").isVisible()||fenestra.getWindow("infolayer").getTitle()!=default_title_umgebung){fenestra.getWindow("infolayer").setScrollable(1);fenestra.getWindow("infolayer").setResizable(1);this.loadLayer("surroundings","infolayer",default_title_umgebung,function(){C.activateButton($("#button_surroundings"))});C.deactivateButton($("#button_surroundings"))}else{fenestra.getWindow("infolayer").hide()}};this.toggleLegend=function(){if(!fenestra.getWindow("legend").isVisible()){this.loadLayer("legende","legend",default_title_legende);C.deactivateButton($("#button_legend"))}else{fenestra.getWindow("legend").hide()}};this.toggleFlags=function(){if(A){C.hideFlags();A=false;C.activateButton($("#button_flags"))}else{C.showFlags();A=true;C.deactivateButton($("#button_flags"))}};this.toggleScale=function(){if(B){$("#scale").hide();B=false;C.activateButton($("#button_scale"))}else{$("#scale").fadeIn();B=true;C.deactivateButton($("#button_scale"))}};this.loadLayer=function(c,d,e,f){if(fenestra.getWindow(d).isVisible()){fenestra.getWindow(d).setHTML("");fenestra.getWindow(d).hide()}if(typeof(f)=="function"){fenestra.getWindow(d).onHide(f)}fenestra.getWindow(d).setTitle(e);fenestra.getWindow(d).show();$.get("/ajax/pages.php",{page:c},function(a,b){fenestra.getWindow(d).setHTML(a)})};this.navFadeIn=function(){if(s==false){$('#navigation').stop();$('#navigation').fadeTo('fast',0.9);s=true}};this.navFadeOut=function(){if(s==true){$('#navigation').stop();$('#navigation').fadeTo('fast',0.5);s=false}};this.deactivateButton=function(a){$(a).attr("class","button_invisible")};this.activateButton=function(a){$(a).attr("class","button_visible")};this.toggleButtons=function(){$("#buttons").slideToggle(300);if(z){$("#toggle_image").attr("src","/images/slide_down.gif");z=false}else{$("#toggle_image").attr("src","/images/slide_up.gif");z=true}};this.hideFlags=function(){for(oneflag in k){k[oneflag].hide()}};this.showFlags=function(){for(oneflag in k){k[oneflag].show()}};this.notice=function(a){if(typeof(u)!="undefined"){window.clearTimeout(u)}if($("#mapnotice").html().length>0){$("#mapnotice").append("<br /><br />")};$("#mapnotice").append(a);$("#mapnotice:hidden").show();u=window.setTimeout("infinitymap.clearNotice()",5000)};this.clearNotice=function(){$("#mapnotice:visible").fadeOut(1000,function(){$("#mapnotice").html("")})};this.reloadAd=function(){if(default_ad_active=="true"){ad_skyscraper_iframe.location.href="/pages/qm_skyscraper.php?act="+new Date().getTime()}w=0}}function Point(x,y){this.x=parseInt(x);this.y=parseInt(y);this.getX=function(){return this.x};this.getY=function(){return this.y};this.toString=function(){return"("+this.x+", "+this.y+")"}}function Area(c,d){this.nw=c;this.se=d;this.getNW=function(){return this.nw};this.getSE=function(){return this.se};this.contains=function(a,b){if(a.getNW().getX()>=(this.getNW().getX()-b)&&a.getSE().getX()<=(this.getSE().getX()+b)&&a.getNW().getY()>=(this.getNW().getY()-b)&&a.getSE().getY()<=(this.getSE().getY()+b)){return true}else{return false}}}function Kachel(b){this.id=b;this.nr=b.substr(1);this.point=null;this.imgobj=null;this.url="";this.width=0;this.height=0;this.z=0;this.setImage=function(a){this.url=a;if(this.imgobj!=null){this.imgobj.src=this.url}};this.setWidth=function(a){this.width=parseInt(a);if(this.imgobj!=null){this.imgobj.style.width=this.width+"px"}};this.setHeight=function(a){this.height=parseInt(a);if(this.imgobj!=null){this.imgobj.style.height=this.height+"px"}};this.setZ=function(z){this.z=parseInt(z);if(this.imgobj!=null){this.imgobj.style.zIndex=this.z}};this.setPoint=function(p){this.point=p;if(this.imgobj!=null){this.imgobj.style.left=this.point.getX()+"px";this.imgobj.style.top=this.point.getY()+"px"}};this.setImgobj=function(a){if(typeof(a)=='object'){this.imgobj=a}};this.create=function(){if(this.imgobj==null&&this.point!=null){var a=document.createElement('img');$(a).attr("id",this.id);$(a).attr("class","kacheln");$(a).attr("src",this.url);$(a).attr("Kartenauschnitt","");$(a).attr("title","");$(a).attr("unselectable","on");$(a).attr("onmousedown","return false;");$(a).attr("onmousemove","return false;");$(a).attr("onrightclick","return false;");$(a).attr("style","position:absolute;width:"+this.width+"px;height:"+this.height+"px;left:"+this.point.getX()+"px;top:"+this.point.getY()+"px;z-index:"+this.z+";");document.getElementById('karte').appendChild(a);this.imgobj=a}};this.toString=function(){return"id: "+this.id+", width: "+this.width+", height: "+this.height+",\nleft: "+this.point.getX()+", top: "+this.point.getY()+", z-index: "+this.z+", imgobj: "+this.imgobj}}function Flag(d,e){var f=this;this.map=e;this.id=d;this.point=null;this.image=null;this.image_shadow=null;this.offsetX=0;this.offsetY=0;this.offsetShadowX=0;this.offsetShadowY=0;this.imgobj_fg=null;this.imgobj_bg=null;this.linkurl="";this.linktype="";this.width=0;this.height=0;this.shadowwidth=0;this.shadowheight=0;this.z=0;this.visible=false;this.title="";this.hide=function(){if(this.visible==true){this.visible=false;if(this.imgobj_bg!=null){$(this.imgobj_bg).hide()}if(this.imgobj_fg!=null){$(this.imgobj_fg).fadeOut(100)}}};this.show=function(){if(this.visible==false){this.visible=true;if(this.imgobj_fg!=null){$(this.imgobj_fg).fadeIn(500)}if(this.imgobj_bg!=null){$(this.imgobj_bg).show()}}};this.loadLink=function(){if(f.linktype=="intern"){if(fenestra.getWindow("infolayer").isVisible()){fenestra.getWindow("infolayer").hide()}$.get(f.linkurl,function(a){fenestra.getWindow("infolayer").setHTML(a);fenestra.getWindow("infolayer").setTitle(default_title_infolayer);fenestra.getWindow("infolayer").setScrollable(default_infolayer_scrollable);fenestra.getWindow("infolayer").setResizable(default_infolayer_resizable);fenestra.getWindow("infolayer").setWidth(default_infolayer_width);fenestra.getWindow("infolayer").setHeight(default_infolayer_height);fenestra.getWindow("infolayer").setResizable(default_infolayer_resizable);fenestra.getWindow("infolayer").setTitle(default_title_infolayer);fenestra.getWindow("infolayer").show()})}else if(f.linktype=="extern"){newwin=window.open(f.linkurl,"Informationen");newwin.focus()}};this.setLinktype=function(a){this.linktype=a};this.setLinkurl=function(a){this.linkurl=a};this.setTitle=function(a){this.title=a};this.setImage=function(a){this.image=a;if(this.imgobj_fg!=null){this.imgobj_fg.src=this.image}};this.setShadow=function(a){this.image_shadow=a;if(this.imgobj_bg!=null){this.imgobj_bg.src=this.image_schadow}};this.setWidth=function(a){this.width=parseInt(a);if(this.imgobj_fg!=null){this.imgobj_fg.style.width=this.width+"px"}};this.setHeight=function(a){this.height=parseInt(a);if(this.imgobj_fg!=null){this.imgobj_fg.style.height=this.height+"px"}};this.setShadowWidth=function(a){this.shadowwidth=parseInt(a);if(this.imgobj_bg!=null){this.imgobj_bg.style.width=this.width+"px"}};this.setShadowHeight=function(a){this.shadowheight=parseInt(a);if(this.imgobj_bg!=null){this.imgobj_bg.style.height=this.height+"px"}};this.setZ=function(z){this.z=parseInt(z);if(this.imgobj_fg!=null){this.imgobj_fg.style.zIndex=this.z}};this.setOffsetX=function(x){this.offsetX=parseInt(x)};this.setOffsetY=function(y){this.offsetY=parseInt(y)};this.setShadowOffsetX=function(x){this.offsetShadowX=parseInt(x)};this.setShadowOffsetY=function(y){this.offsetShadowY=parseInt(y)};this.setPoint=function(a,p){if(typeof(p)!="undefined"){f.point=p}var b=Math.floor(f.point.getX()*(a/192));var c=Math.floor(f.point.getY()*(a/192));if(f.imgobj_fg!=null){f.imgobj_fg.style.left=(b+this.offsetX)+"px";f.imgobj_fg.style.top=(c+this.offsetY)+"px"}if(f.imgobj_bg!=null){f.imgobj_bg.style.left=(b+this.offsetShadowX)+"px";f.imgobj_bg.style.top=(c+this.offsetShadowY)+"px"}};this.setImgobj=function(a){if(typeof(a)=='object'){this.imgobj_fg=a}};this.create=function(){if(this.imgobj_fg==null&&this.point!=null){var a=document.createElement('img');$(a).attr("id",this.id);$(a).attr("class","flags");$(a).attr("src","/images/signs/"+this.image);$(a).attr("title",this.title);$(a).attr("alt",this.title);$(a).attr("unselectable","on");$(a).attr("onmousedown","return false;");$(a).attr("onmousemove","return false;");$(a).attr("onrightclick","return false;");$(a).attr("style","position:absolute;width:"+this.width+"px;height:"+this.height+"px;left:0px;top:0px;z-index:3;display:none;");$(a).bind("click",f.loadLink);document.getElementById('karte').appendChild(a);f.imgobj_fg=a}if(this.imgobj_fg!=null&&this.imgobj_bg==null&&this.point!=null){var a=document.createElement('img');$(a).attr("id",this.id+"_shadow");$(a).attr("class","flags_shadow");$(a).attr("src","/images/signs/"+this.image_shadow);$(a).attr("title","");$(a).attr("unselectable","on");$(a).attr("onmousedown","return false;");$(a).attr("onmousemove","return false;");$(a).attr("onrightclick","return false;");$(a).attr("onclick","return false;");$(a).attr("style","position:absolute;width:"+this.shadowwidth+"px;height:"+this.shadowheight+"px;left:0px;top:0px;z-index:2;display:none;");$(a).css("opacity",0.5);document.getElementById('karte').appendChild(a);f.imgobj_bg=a}};this.toString=function(){return"id: "+this.id+", width: "+this.width+", height: "+this.height+",\nleft: "+this.point.getX()+", top: "+this.point.getY()+", z-index: "+this.z+", imgobj: "+this.imgobj_fg}}