var mapIcons={},GME_DEFAULT_ICON=G_DEFAULT_ICON,markers=Array(),currentRow=null;function infoWindowClosed(){if(currentRow){var a=document.getElementById(currentRow);a.className=a.className.replace(" rowOn","");currentRow=null}}function highlightSearchRow(a){if(currentRow){var b=document.getElementById(currentRow);b.className=b.className.replace(" rowOn","");currentRow=null}if(b=document.getElementById("row_"+a)){b.className+=" rowOn";currentRow="row_"+a}} function openMarker(a){var b=markers[a];if(b)if(b.tabs)b.openInfoWindowTabsHtml(b.tabs);else b.caption&&b.openInfoWindowHtml(b.caption);highlightSearchRow(a)}function createMarker(a,b,c){var d=new GMarker(b,c);d.id=a;markers[a]=d;GEvent.addListener(d,"click",function(){d.openInfoWindowHtml(d.caption);highlightSearchRow(d.id)});return d}function addLoadEvent(a){var b=window.onload;window.onload=typeof b=="function"?function(){b();a()}:a}window.unload=GUnload; function makeMap1(){if(GBrowserIsCompatible()){if(typeof zoomstufe=="undefined")zoomstufe=4;var a=new GMap2(document.getElementById("map1"));a.setCenter(new GLatLng(xkoord,ykoord),zoomstufe,G_GAME_MAP);a.enableScrollWheelZoom();GEvent.addListener(a,"click",function(c){if(c)if(c.tabs)c.openInfoWindowTabsHtml(c.tabs);else c.caption&&c.openInfoWindowHtml(c.caption)});GEvent.addDomListener(document.getElementById("map1"),"DOMMouseScroll",wheelevent);document.getElementById("map1").onmousewheel=wheelevent; a.enableContinuousZoom();a.enableDoubleClickZoom();a.addControl(new GSmallMapControl);function b(c,d){var e=new GIcon,h=d.split("_");if(h[0]=="fahne")var i=16,j=16,f=2,g=15;else if(h[0]=="spot"){j=i=12;g=f=6}e.image="http://karte.hdro-mobs.de/"+d+".png";e.iconSize=new GSize(i,j);e.iconAnchor=new GPoint(f,g);e.infoWindowAnchor=new GPoint(f,g);return new GMarker(c,e)}GDownloadUrl("xmldaten.xml",function(c){c=GXml.parse(c).documentElement.getElementsByTagName("pos");for(var d=0;d<c.length;d++){var e= new GPoint(parseFloat(c[d].getAttribute("lat")),parseFloat(c[d].getAttribute("lng")));e=b(e,c[d].getAttribute("icon"));e.caption=GXml.value(c[d].getElementsByTagName("info")[0]);a.addOverlay(e)}})}else document.getElementById("map1").innerHTML='In order to see the map that would go in this space, you will need to use a &lt;a href="http://local.google.com/support/bin/answer.py?answer=16532&amp;topic=1499"&gt;compatible web browser&lt;/a&gt;.'}addLoadEvent(makeMap1);
