	var initialized = false
    var map = null;
    var geocoder = null;

    function initialize() {
      if (GBrowserIsCompatible()) {
   		document.getElementById('map_canvas').style.display = ""
        map = new GMap2(document.getElementById("map_canvas"));
		var mapControl = new GMapTypeControl();
		map.addControl(mapControl);
		map.addControl(new GLargeMapControl());
        geocoder = new GClientGeocoder();
   		document.getElementById('map_canvas').style.display = "none"
      }
      initialized = true
    }

    function showAddress(address) {
      if (geocoder) {
        geocoder.getLatLng(
          address,
          function(point) {
            if (!point) {
              alert(address + " не найден");
            } else {
              //map.setCenter(point, 13);
              map.setCenter(point, 15);
              var marker = new GMarker(point);
              map.addOverlay(marker);
              //marker.openInfoWindowHtml(address);
            }
          }
        );
      }
    }
    
    function showMap(address)
    {
    	if (!initialized)
    		initialize()
    		
//    	showAddress(address)
    }
    
    function unloadMap()
    {
    	if (!initialized)
	    	GUnload()
    }
    
