﻿if (location.host == 'watsonclinic.smtusa.com' || location.host == 'www.watsonclinic.com' || location.host == 'staging.watsonclinic.com')
{
	google.load("maps", "2",{"other_params":"sensor=true"});
	google.setOnLoadCallback(initialize);
}
function initialize() {
	window.onunload=google.maps.Unload; 
	geocoder = new GClientGeocoder();
	geocoder.getLatLng(
	  propertyAddress,
	  function(point) {
		if (point)
		  {
          if (GBrowserIsCompatible()) {
		    document.getElementById("PropertyLocationMap").style.display = "block";
		    var map = new google.maps.Map2(document.getElementById("PropertyLocationMap"));	
		    map.setCenter(point, 15);
		  }
		  var marker = new GMarker(point);
		  map.addControl(new GSmallMapControl());
		  map.addControl(new GMapTypeControl());
		  map.addOverlay(marker);
		  }
	  }
	);
}


