if(document.getElementById && document.createTextNode) { window.onload=function() { var map = new GMap2($('view-google-map')); map.addControl(new GSmallMapControl()); point = new GLatLng(51.787302802753, 19.417734146118); map.setCenter(point, 15); var marker = new GMarker(point); GEvent.addListener(marker, 'click', function() { marker.openInfoWindowHtml('