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