var oh_map;
var oh_geocoder;
function loadMap(oh_address, div_name) 
{
      if (GBrowserIsCompatible()) 
      {
		oh_map = new GMap2(document.getElementById(div_name));
		oh_geocoder = new GClientGeocoder();
		//oh_map.addControl(new GLargeMapControl());
		//oh_map.addControl(new GMapTypeControl());
		//document.getElementById('property_map').style.display = 'none';
	}
	
	oh_geocoder.getLatLng(
	    oh_address,
		function(point)
		{
			if (!point) 
			{
				//document.getElementById('property_map').style.display ='none';
				document.getElementById(div_name).innerHTML = "Address: " + oh_address + " not found on Google Maps";
			} 
			else 
			{
				oh_map.setCenter(point, 15);
				oh_map.addOverlay(createMarker(point, oh_address));
			}
		}
	);
}
	
	
	
	
function showAddress(oh_address, div_name) 
{
	document.getElementById(div_name).style.display = '';	
}

function createMarker(point, text) 
{
	var marker = new GMarker(point);
	GEvent.addListener(marker, "click", 
		function() 
		{
			marker.openInfoWindowHtml(text);
		}
	);
	return marker;
}// JavaScript Document
		
		
function getMap(text_address)
{
	if(allTrim(text_address) != '')
		showAddress(text_address);
}