var geocoder;
var map;
function loadMap(address, title) {
    geocoder = new google.maps.Geocoder();
    var latlng;
    geocoder.geocode( {'address': address}, function(results, status) {
        if (status == google.maps.GeocoderStatus.OK) {
            latlng = results[0].geometry.location;
            var myOptions = {
                zoom: 15,
                center: latlng,
                mapTypeId: google.maps.MapTypeId.ROADMAP
            }
            map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);

            var marker = new google.maps.Marker({
                map: map,
                position: results[0].geometry.location
            });

            /*google.maps.event.addListener(marker, 'click', function() {
                infowindow.open(map, marker);
            });

            var infowindow = new google.maps.InfoWindow({
                content:  createInfo(title, address)
            });*/
        } else {
            alert("Geocode was not successful for the following reason: " + status);
        }
    });
}

function createInfo(title, content) {
    return '<div class="infowindow"><strong>'+ title +'</strong><br /><small>'+content+'</small></div>';
}

