var map=null;var geocoder=null;var route=null;var startZoom=15;var startLat=48.125275;var startLng=11.52531;var centerZoom=10;window.addEvent("domready",init);window.addEvent("unload",GUnload);function init(){if(!map){initMap()}else{map.clearOverlays()}var b=new GIcon();b.image=mapsMarker;b.iconSize=new GSize(60,60);b.iconAnchor=new GPoint(60,60);b.infoWindowAnchor=new GPoint(30,30);var a=new GMarker(new GLatLng(startLat,startLng),{icon:b,title:"HLC Rot-Weiß München e.V."});if(map){map.addOverlay(a)}}function initMap(){if(GBrowserIsCompatible()){map=new GMap2($("map"));map.setCenter(new GLatLng(startLat,startLng),startZoom);map.addMapType(G_PHYSICAL_MAP);if(map.isLoaded()){map.setMapType(G_PHYSICAL_MAP)}map.addControl(gmaptypecontrol=new GHierarchicalMapTypeControl());map.addControl(gsmallmapcontrol=new GSmallMapControl());map.enableScrollWheelZoom();map.enableContinuousZoom();map.disableDoubleClickZoom();geocoder=new GClientGeocoder();route=new GDirections(map,$("route"));GEvent.addListener(route,"error",function(){handleErrors("de")})}else{var a="Sie haben leider keinen Google Maps kompatiblen Browser. Bitte aktualisieren Sie Ihren Webbrowser.";alert(a)}}function handleErrors(b){if(b){var a=String.toLowerCase(b)}if(route.getStatus().code==G_GEO_UNKNOWN_ADDRESS){if(a=="de"){alert("Es konnte kein zugehöriger geographischer Ort für eine der spezifizierten Adressen gefunden werden. Das kann daran liegen, dass die einegegebene Adresse relativ neu oder falsch ist. \nFehlercode: "+route.getStatus().code)}else{alert("No corresponding geographic location could be found for one of the specified addresses. This may be due to the fact that the address is relatively new, or it may be incorrect. \nError code: "+route.getStatus().code)}}else{if(route.getStatus().code==G_GEO_SERVER_ERROR){if(a=="de"){alert("Eine Geokodierungs- oder Routenanfrage konnte nicht erfolgreich bearbeitet werden. Der exakte Grund dafür ist leider unbekannt. \nFehlercode: "+route.getStatus().code)}else{alert("A geocoding or directions request could not be successfully processed, yet the exact reason for the failure is not known. \nError code: "+route.getStatus().code)}}else{if(route.getStatus().code==G_GEO_MISSING_QUERY){if(a=="de"){alert("Der HTTP Anfrageparameter hat entweder gefehlt oder keinen Wert gehabt. \nFehlercode: "+route.getStatus().code)}else{alert("The HTTP q parameter was either missing or had no value. For geocoder requests, this means that an empty address was specified as input. For directions requests, this means that no query was specified in the input. \nError code: "+route.getStatus().code)}}else{if(route.getStatus().code==G_GEO_BAD_KEY){if(a=="de"){alert("Der übergebene Schlüssel ist entweder ungültig oder passt nicht zur Domain, für die er generiert wurde. \nFehlercode: "+route.getStatus().code)}else{alert("The given key is either invalid or does not match the domain for which it was given. \n Error code: "+route.getStatus().code)}}else{if(route.getStatus().code==G_GEO_BAD_REQUEST){if(a=="de"){alert("Die Routenanfrage konnte nicht geparst werden. \nFehlercode: "+route.getStatus().code)}else{alert("A directions request could not be successfully parsed. \nError code: "+route.getStatus().code)}}else{if(a=="de"){alert("Ein unbekannter Fehler ist aufgetreten.")}else{alert("An unknown error occurred.")}}}}}}}function onGDirectionsLoad(){}function setDirections(b,d,a){var a=a||"de_DE";if(route){route.load("from: "+b+" to: "+d,{locale:a})}try{map.setMapType(G_NORMAL_MAP)}catch(c){}try{map.closeInfoWindow()}catch(c){}};