  var map = null;
    var geocoder = null;

    function initialize(divId) {
      if (GBrowserIsCompatible()) {
        map = new GMap2(document.getElementById(divId));
        map.setCenter(new GLatLng(22.3239, 114.1617667), 16);
        map.addControl(new GOverviewMapControl());
        map.addControl(new GLargeMapControl());
        geocoder = new GClientGeocoder();
        map.addControl(new GMapTypeControl());  
     }
   }
    var marker=null;
    function showAddress(hotelName,address) {  
      if (geocoder) {
        
        geocoder.reset(); 
        geocoder.getLatLng(
          address,
          function(point) {
            if (!point) { 
            } else {
            if(marker!=null)
               map.removeOverlay(marker);
            map.setCenter(point, 16);
              
           var blueIcon = new GIcon(G_DEFAULT_ICON);
           blueIcon.image = "http://gmaps-samples.googlecode.com/svn/trunk/markers/green/blank.png";
		
		     markerOptions = { icon:blueIcon };
             marker = new GMarker(point,markerOptions);
             map.addOverlay(marker); 
			 marker.openInfoWindowHtml("酒店名称：<strong>"+hotelName+"</strong><p />地址：" +  address + "");
             GEvent.addListener(marker, "click", function() {
             marker.openInfoWindowHtml("酒店名称：<strong>"+hotelName+"</strong><p />地址：" +  address + "");
          });
            }
          }
        );
      }
    }
