function showMap(locat) {
    var docWidth = $(document).width();
    var docHeight = $(document).height();
    
    $("<div id='overlay' style='position:absolute; top:0px; left:0px; background-color:#000; z-index:100;'></div>").appendTo("body");
    $('#overlay')
        .css({'width':docWidth+'px', 'height':docHeight+'px', 'opacity':0})
        .click(function(event){
            hideMap();
        })
        .animate({opacity:.6}, 400, function() {
            $('#mapAddress').html(locat);
            $('#map_window').css({
                'top': ($(window).height() / 2 - 200 + $(window).scrollTop()) + 'px',
                'left': ($(window).width() / 2 - 300) + 'px'
            }).show();
            
            if (GBrowserIsCompatible()) {
                var map;
                map = new GMap2(document.getElementById("map_canvas"));
                map.addControl(new GSmallMapControl());
                map.addControl(new GMapTypeControl());
                geocoder = new GClientGeocoder();
                geocoder.getLocations(locat, function(response) {
                    if (response.Placemark != null) {
                        place = response.Placemark[0];
                        point = new GLatLng(place.Point.coordinates[1], place.Point.coordinates[0]);
                        map.setCenter(point, 16);
                        marker = new GMarker(point);
                        map.addOverlay(marker);
                    }
                });
            }
        });
    
    return false;
}
function hideMap() {
    $('#map_window').hide();
    $('#overlay').remove();
}