  var geocoder;
  var map;
  
  function load() {
    geocoder = new google.maps.Geocoder();
    var latlng = new google.maps.LatLng(49.20106, 16.611419);
    var myOptions = {
      zoom: 11,
      center: latlng,
      mapTypeControl: true,
      mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU},
      navigationControl: true,
      navigationControlOptions: {style: google.maps.NavigationControlStyle.SMALL},
      mapTypeId: google.maps.MapTypeId.ROADMAP
    };
    var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
    
    var image = 'http://www.waytostay.com/imgs/flag1.png';
    
    var address = [
      ['Petra Křivky 1a'],
      ['Halasovo náměstí 5, Brno'],
      ['Pálavské náměstí 5, Brno'],
      ['Dlouhá 1, Brno'],
      ['Libušina třída 2, Brno']
    ];
    
    for(a=0;a<address.length;a++) {
      geocoder.geocode( { address: address[a][0]}, function(results, status) {
        if (status == google.maps.GeocoderStatus.OK && results.length) {
          // You should always check that a result was returned, as it is
          // possible to return an empty results object.
          if (status != google.maps.GeocoderStatus.ZERO_RESULTS) { 
            var marker = new google.maps.Marker({ 
                position: results[0].geometry.location,
                map: map,
                icon: image,
                title: results[0].formatted_address
            });
          }
        } else {
          alert("Geocode was unsuccessful due to: " + status);
        }
      });
    }
  
  }
