<script type="text/javascript" src="http://www.google.com/jsapi?key=<?php echo strip_tags($key); ?>"></script>
<script type="text/javascript">
// <![CDATA[
  google.load("maps", "2.x");

  // Call this function when the page has been loaded
  function initialize() {
    var latitude   = <?php echo $latitude; ?>;
    var longitude  = <?php echo $longitude; ?>;
    var zoom_level = <?php echo $zoom_level; ?>;

    var map = new google.maps.Map2(document.getElementById("<?php echo $html_id; ?>"));
    map.setCenter(new google.maps.LatLng(latitude,longitude), zoom_level);

    //map.setMapType(G_NORMAL_MAP);
    //map.addControl(new MapTypeControl());
    map.addControl(new GSmallMapControl());
    
    //var marker = new GMarker(new GLatLng(49.828261,19.045111),{});
    //map.addOverlay(marker);

    var marker = new GMarker(new GLatLng(latitude,longitude));
    marker.openInfoWindowHtml('<?php echo $tooltip_text; ?>');
    map.addOverlay(marker);

  }
  google.setOnLoadCallback(initialize);
// ]]>
</script>