var map = null;
var geocoder = null;

function showAddress(gmap_address,address) {
	if (GBrowserIsCompatible()) {
    	//console.log('in your gmapz, running your vars');
    	map = new GMap2(document.getElementById("map_canvas"));
    	map.addControl(new GLargeMapControl());
		map.addControl(new GMapTypeControl());
    	geocoder = new GClientGeocoder();
      	if (geocoder) {
        	geocoder.getLatLng(
         		gmap_address,
          		function(point) {
            		if (!point) {
             			alert(gmap_address + " not found");
            		} else {
			            map.setCenter(point, 17);
			            var Icon = new GIcon();
      					Icon.image = "/images/static/map_marker.png";
      					//Icon.shadow = "/images/static/map_marker_shadow.png";
      					Icon.iconSize = new GSize(39, 79);
      					//Icon.shadowSize = new GSize(52, 49);
						Icon.iconAnchor = new GPoint(5, 34);
						Icon.infoWindowAnchor = new GPoint(5, 2);    					
			            var marker = new GMarker(point,Icon);
			            map.addOverlay(marker);
			            //map.addOverlay(Icon);
			            marker.openInfoWindowHtml('<p style="font-family:arial; color:#000000; font-size:14px;  width: 210px; padding-right: 10px">'+address+'</p>');
            		}
          		}
        	);
      	}
	}
}