<!--
//<![CDATA[

//=============================================================================
// GOOGLE STUFF
//=============================================================================

// addAddressToMap() is called when the geocoder returns an
// answer.  It adds a marker to the map with an open info window
// showing the nicely formatted version of the address and the country code.
function addAddressToMap(response) {
	var map = new GMap2(document.getElementById("map"));
	map.addControl(new GSmallMapControl());
	map.addControl(new GMapTypeControl());
	map.setCenter(new GLatLng(40.428389, -79.697526), 13); 
	if (!response || response.Status.code != 200)
	{
		alert("Sorry, we were unable to geocode that address");
	}
	else
	{
		place = response.Placemark[0];
		point = new GLatLng(place.Point.coordinates[1],
							place.Point.coordinates[0]);
		marker = new GMarker(point);
		map.addOverlay(new GMarker(point));
		//alert(place.address);
		//alert(place.AddressDetails.Country.CountryNameCode);
		
		//marker.openInfoWindowHtml(place.address + '<br>' + '<b>Country code:</b> ' + place.AddressDetails.Country.CountryNameCode);
	}
}

// showLocation() is called when you click on the Search button
// in the form.  It geocodes the address entered into the form
// and adds a marker to the map at that location.
function showLocation(address) {
	var geocoder = new GClientGeocoder();
	geocoder.getLocations(address, addAddressToMap);
}

function load() {
  if (GBrowserIsCompatible()) {
		var map = new GMap2(document.getElementById("map"));
		var geocoder = new GClientGeocoder();
		//map.setCenter(new GLatLng(40.428389, -79.697526), 13);
		showLocation("3907 Old William Highway, Murrysville, Pa 15668");	
	}
}
//=============================================================================
// GOOGLE STUFF
//=============================================================================
	