var baseIcon=new GIcon();baseIcon.shadow="http://"+window.location.hostname+"/images/google/shadow50.png";baseIcon.iconSize=new GSize(20,34);baseIcon.shadowSize=new GSize(37,34);baseIcon.iconAnchor=new GPoint(9,34);baseIcon.infoWindowAnchor=new GPoint(9,2);baseIcon.infoShadowAnchor=new GPoint(18,25);var bounds=new GLatLngBounds();var myMarker=new Array();var myPoint=new Array();var hoverimg;var map;var currentLatLng=new Array();var directionsPanel;var directions;var newWidth;var newHeight;currentLatLng[0]=0;currentLatLng[1]=0;function ithIcon(A){var B=String.fromCharCode("A".charCodeAt(0)+A);return"http://"+window.location.hostname+"/images/google/marker"+B+".png"}function createMarker(A,D,E){var C=new GIcon(baseIcon);C.image=D;hoverimg="http://"+window.location.hostname+"/images/google/markeryellow.png";var B=new PdMarker(A,C);GEvent.addListener(B,"mouseover",function(){B.setTooltip(E)});GEvent.addListener(B,"mouseout",function(){B.hideTooltip()});return B}function showAllMarkers(F,E){var D=E.getSouthWest();var B=E.getNorthEast();var A=new GLatLng(D.lat()+E.toSpan().lat()/2,D.lng()+E.toSpan().lng()/2);var C=F.getBoundsZoomLevel(E);F.setCenter(A,C)}function map_init(){if(GBrowserIsCompatible()){map=new GMap2(document.getElementById("map"));if(map_type=="large"){map.addControl(new GLargeMapControl());map.addControl(new GMapTypeControl())}else{map.addControl(new GSmallZoomControl())}for(var A=0;A<myMarkers.length;A++){myPoint[A]=new GLatLng(myMarkers[A][1],myMarkers[A][2]);if(myMarkers[0][3]==1){if(A==0){myMarker[A]=createMarker(myPoint[A],"http://"+window.location.hostname+"/images/google/markeryellow.png",myMarkers[A][0])}else{myMarker[A]=createMarker(myPoint[A],ithIcon(A-1),myMarkers[A][0])}}else{myMarker[A]=createMarker(myPoint[A],ithIcon(A),myMarkers[A][0])}}map.setCenter(myPoint[0],15);for(A=0;A<myMarkers.length;A++){map.addOverlay(myMarker[A]);bounds.extend(myPoint[A])}map.zoomToMarkers(10)}}function showTooltip(B){if(myMarkers[B][1]!=currentLatLng[0]&&myMarkers[B][2]!=currentLatLng[1]&&myMarkers.length!=1){map.panTo(new GLatLng(myMarkers[B][1],myMarkers[B][2]));var A=GEvent.addListener(map,"moveend",function(){myMarker[B].setImage(hoverimg);myMarker[B].setTooltip(myMarkers[B][0]);myMarker[B].showTooltip();GEvent.removeListener(A)});currentLatLng[0]=myMarkers[B][1];currentLatLng[1]=myMarkers[B][2]}else{myMarker[B].setImage(hoverimg);myMarker[B].setTooltip(myMarkers[B][0]);myMarker[B].showTooltip()}}function hideTooltip(A){myMarker[A].restoreImage();myMarker[A].hideTooltip();GEvent.clearListeners(map,"moveend")}function getMapDivOffset(B){var A=document.getElementById(B);var D=0;var C=0;while(A){D+=A.offsetLeft;C+=A.offsetTop;A=A.offsetParent}if(navigator.userAgent.indexOf("Mac")!=-1&&typeof document.body.leftMargin!="undefined"){D+=document.body.leftMargin;C+=document.body.topMargin}return{left:D,top:C}}function resizeMap(C,A){var B=document.getElementById("map");B.style.width=C+"px";B.style.height=A+"px";if(map){map.checkResize()}}function getDirection(B,A){directionsPanel=document.getElementById("directions");directionsPanel.innerHTML="";if(directions){directions.clear()}directions=new GDirections(map,directionsPanel);GEvent.addListener(directions,"load",onLoadDirection);GEvent.addListener(directions,"error",handleErrors);directions.load("from: "+B+" to: "+A)}function onLoadDirection(){resizeMap(newWidth,newHeight);directionsPanel.style.display="block";hideDiv("loading");showDiv("divFmDirection")}function handleErrors(){if(directions.getStatus().code==G_GEO_UNKNOWN_ADDRESS){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: "+directions.getStatus().code)}else{if(directions.getStatus().code==G_GEO_SERVER_ERROR){alert("A geocoding or directions request could not be successfully processed, yet the exact reason for the failure is not known.\n Error code: "+directions.getStatus().code)}else{if(directions.getStatus().code==G_GEO_MISSING_QUERY){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.\n Error code: "+directions.getStatus().code)}else{if(directions.getStatus().code==G_GEO_BAD_KEY){alert("The given key is either invalid or does not match the domain for which it was given. \n Error code: "+directions.getStatus().code)}else{if(directions.getStatus().code==G_GEO_BAD_REQUEST){alert("A directions request could not be successfully parsed.\n Error code: "+directions.getStatus().code)}else{alert("An unknown error occurred.")}}}}}hideDiv("loading");showDiv("divFmDirection")}function direction(A){document.getElementById("txtDir").innerHTML="Get Driving Directions "+A;showDiv("divFmDirection");hideDiv("direction");document.fmDirection.direction.value=A};