
    var geocoder = null;


    function showAddress(mapDiv, addrObject, name) {
    
    if (typeof(mapDiv)=='undefined')
	    return;
    
    if (typeof addrObject== 'string') 
    {
    	address = addrObject;
    }
    else {
	     if ( (typeof addrObject== 'undefined')
	    		|| (typeof addrObject.innerHTML == 'undefined') )
	     		return;
	    addrObject.style.display="none";
	    address = addrObject.innerText;
    }
    
    		
     if (GBrowserIsCompatible()) {
        map = new GMap2(document.getElementById(mapDiv));
        geocoder = new GClientGeocoder();

	     if (geocoder) {
	       geocoder.getLatLng(
	          address,
	         		 function(point) {
			            if (!point) {
			             	// alert(address + " not found");
			            } else {
			              	map.setCenter(point, 13);
			              	var marker = new GMarker(point);
			             	map.addOverlay(marker);
		
							if (typeof name == 'object' && typeof(name.innerText) == 'string')  
								marker.openInfoWindow( '<p align="center"><b><font size="2">' + name.innerText +'</font></b><br/><font size="1">' + address  + '</font></p>' );
			              		
					        map.addControl(new GSmallMapControl());
					      //  map.addControl(new GMapTypeControl());
			            }
	         		 }
	        );
	      }
	     }
    }
    
    
    
