﻿
function initialize() 
{ 
	if (GBrowserIsCompatible()) 
	{ 
		map = new GMap2(document.getElementById("map_canvas")); 
		map.setUIToDefault(); 
		showAddress(companyTitle,companyAddress);
	} 
} 
var geocoder = new GClientGeocoder();
function showAddress(title,address) {
  geocoder.getLatLng(
    address,
    function(point) {
      if (!point) {
        alert(address + " not found");
      } else {
        map.setCenter(point, 13);
        var marker = new GMarker(point);
        map.addOverlay(marker);
        marker.openInfoWindowHtml("<div style='font-family:Arial; font-size:12px'>" + title + "<br />" + address + "</div>"); 
      }
    }
  );
}


