    function initialize() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map_canvas"),
        { size: new GSize(800,400) }	); // GMap2 -The Elementary Object

//        map.removeMapType(G_NORMAL_MAP);
        map.removeMapType(G_SATELLITE_MAP);
//        map.removeMapType(G_HYBRID_MAP);
        map.setCenter(new GLatLng(37.24126187205382, -93.18328857421875), 10); // Initializing the map
        map.addControl(new GMapTypeControl());
        map.addControl(new GLargeMapControl());
        map.addControl(new GOverviewMapControl());
	
					// Create our "tiny" marker icon
					var tinyIcon = new GIcon();
					tinyIcon.image = "http://labs.google.com/ridefinder/images/mm_20_red.png";
					tinyIcon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
					tinyIcon.iconSize = new GSize(12, 20);
					tinyIcon.shadowSize = new GSize(22, 20);
					tinyIcon.iconAnchor = new GPoint(6, 20);
					tinyIcon.infoWindowAnchor = new GPoint(5, 1);					                

					// Set up our GMarkerOptions object
					markerOptions = { icon:tinyIcon, draggable:false };

        	// Markers
	       var wedding_point = new GLatLng(37.074942, -93.22513);
	       var wedding_marker = new GMarker(wedding_point, markerOptions);
					var weddingInfo = "<img src='img/jra_building.jpg' width='220px' height='140px' /><br /><p>The wedding and dinner reception will be held<br /> at <a href='http://www.jamesriver.org'>James River Assembly</a> behind the Realife<br /> Student Center in Ozark, Missouri.</p>";



					// Add Event Listener
					GEvent.addListener(wedding_marker, "click", function() {
							wedding_marker.openInfoWindow(weddingInfo);
					});

					// Create Marker
					map.addOverlay(wedding_marker);

					// Create Info Window
					wedding_marker.openInfoWindow(weddingInfo);


					var directionsPanel = document.getElementById("directions");
					gdir = new GDirections(map, directionsPanel);

				    function handleErrors(){
					   if (gdir.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: " + gdir.getStatus().code);
					   else if (gdir.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: " + gdir.getStatus().code);
					   
					   else if (gdir.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: " + gdir.getStatus().code);
					     
					   else if (gdir.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: " + gdir.getStatus().code);
				
					   else if (gdir.getStatus().code == G_GEO_BAD_REQUEST)
					     alert("A directions request could not be successfully parsed.\n Error code: " + gdir.getStatus().code);
					    
					   else alert("An unknown error occurred.");
					   
					}

        	GEvent.addListener(gdir, "error", handleErrors);


        
      }
    }

    function setDirections(fromAddress) {
    	gdir.load(fromAddress + " to 37.074942, -93.22513");
    }
