var map = null;
var infowindow = null;
var markers = new Array();
var overlay = null;

function myclick(i) {
  google.maps.event.trigger(markers[i], "click");
   map.setZoom(12);

}
       (function() {
        window.onload = function(){
          var latlng = new google.maps.LatLng(20,-10);
          var sIcon = '/fileadmin/templates/images/airport-retail.png' ;
          infowindow = new google.maps.InfoWindow({content: "holding...", maxWidth: 200});
          var bovertisStyles = [
          {
            featureType: "water",
            stylers: [
               { hue: "#7fba00" }, { saturation: 35 }, { lightness: -35 }
            ]
          }];
        
          // Creating an object literal containing the properties we want to pass to the map  
          var options = {  
            zoom: 2,
            center: latlng,
            mapTypeId: google.maps.MapTypeId.ROADMAP,
            streetViewControl: false,
            mapTypeControl: false,
            mapTypeControlOptions: {
                   style: google.maps.MapTypeControlStyle.DROPDOWN_MENU
            },
            zoomControl: true,
            zoomControlOptions: {
                   style: google.maps.ZoomControlStyle.SMALL,
           //        position: google.maps.ControlPosition.TOP_RIGHT
            },
            panControl: true,
            panControlOptions: {
          //  position: google.maps.ControlPosition.TOP_RIGHT
            },
            //styles: bovertisStyles
          };

          // Calling the constructor, thereby initializing the map  
          map = new google.maps.Map(document.getElementById('map_canvas'), options);

         
// Schiphol Amsterdam, Nederland
          var marker1 = new google.maps.Marker({
            position: new google.maps.LatLng(52.30907,4.763385),
            map: map,
            title: 'Schiphol Amsterdam Airport, The Nederlands',
            icon: sIcon,
            animation: google.maps.Animation.DROP,
            html: 'Schiphol Amsterdam Airport, The Nederlands'
          });
          markers.push(marker1);

// Eindhoven airport, Nederland
          var marker2 = new google.maps.Marker({
            position: new google.maps.LatLng(51.451887,5.377666),
            map: map,
            title: 'Eindhoven Airport, <br/>The Nederlands',
            icon: sIcon,
            animation: google.maps.Animation.DROP,
            html: 'Eindhoven Airport, <br/>The Nederlands'
          });
          markers.push(marker2);

// Rotterdam thehague airport, Nederland
          var marker3 = new google.maps.Marker({
            position: new google.maps.LatLng(51.957743,4.440935),
            map: map,
            title: 'Rotterdam-TheHague Airport,<br/> The Nederlands',
            icon: sIcon,
            animation: google.maps.Animation.DROP,
            html: 'Rotterdam-TheHague Airport, <br/>The Nederlands'
          });
          markers.push(marker3);

// Flughaven frankfurt, Deutschland
          var marker4 = new google.maps.Marker({
            position: new google.maps.LatLng(50.037532,8.560949),
            map: map,
            title: 'Flughaven Frankfurt, Germany',
            icon: sIcon,
            animation: google.maps.Animation.DROP,
            html: 'Flughaven Frankfurt, Germany'
          });
          markers.push(marker4);

// Flughaven munich, Deutschland
          var marker5 = new google.maps.Marker({
            position: new google.maps.LatLng(48.353469,11.781162),
            map: map,
            title: 'Flughaven Munich, Germany',
            icon: sIcon,
            animation: google.maps.Animation.DROP,
            html: 'Flughaven Munich, Germany'
          });
          markers.push(marker5);

// Flughaven duesseldorf, Deutschland
          var marker6 = new google.maps.Marker({
            position: new google.maps.LatLng(51.280833,6.757222),
            map: map,
            title: 'Flughaven Duesseldorf, Germany',
            icon: sIcon,
            animation: google.maps.Animation.DROP,
            html: 'Flughaven Duesseldorf, Germany'
          });
          markers.push(marker6);

// Helsinki-Vantaan lentoasema, Finland  
          var marker7 = new google.maps.Marker({
            position: new google.maps.LatLng(60.31805,24.965365),
            map: map,
            title: 'Helsinki-Vantaan lentoasema,<br/> Finland',
            icon: sIcon,
            animation: google.maps.Animation.DROP,
            html: 'Helsinki-Vantaan lentoasema,<br/> Finland'
          });
          markers.push(marker7);

// Oslo Lufthavn, Norge
          var marker8 = new google.maps.Marker({
            position: new google.maps.LatLng(59.894165,10.6175),
            map: map,
            title: 'Oslo Lufthavn, Norway',
            icon: sIcon,
            animation: google.maps.Animation.DROP,
            html: 'Oslo Lufthavn, Norway'
          });
          markers.push(marker8);

// Copenhagen Airport, Denmark
          var marker9 = new google.maps.Marker({
            position: new google.maps.LatLng(55.619504,12.647971),
            map: map,
            title: 'Copenhagen Airport, Denmark',
            icon: sIcon,
            animation: google.maps.Animation.DROP,
            html: 'Copenhagen Airport, Denmark'
          });
          markers.push(marker9);

// OR Tambo Int. Airport, South Africa
          var marker10 = new google.maps.Marker({
            position: new google.maps.LatLng(-26.133611,28.242222),
            map: map,
            title: 'OR Tambo Int. Airport,<br/> South Africa',
            icon: sIcon,
            animation: google.maps.Animation.DROP,
            html: 'OR Tambo Int. Airport,<br/> South Africa'
          });
          markers.push(marker10);

// Cape Town Int Airport, South Africa
          var marker11 = new google.maps.Marker({
            position: new google.maps.LatLng(-33.968056,18.604444),
            map: map,
            title: 'Cape Town Int Airport,<br/> South Africa',
            icon: sIcon,
            animation: google.maps.Animation.DROP,
            html: 'Cape Town Int Airport,<br/> South Africa'
          });
          markers.push(marker11);

// Brussel Zaventem Airport, Belgique
          var marker12 = new google.maps.Marker({
            position: new google.maps.LatLng(50.90355,4.489535),
            map: map,
            title: 'Brussel Zaventem Airport,<br/> Belgium',
            icon: sIcon,
            animation: google.maps.Animation.DROP,
            html: 'Brussel Zaventem Airport,<br/> Belgium'
          });
          markers.push(marker12);

// Liège Airport , Belgique
          var marker13 = new google.maps.Marker({
            position: new google.maps.LatLng(50.63878,5.443336),
            map: map,
            title: 'Liège Airport , Belgium',
            icon: sIcon,
            animation: google.maps.Animation.DROP,
            html: 'Liège Airport , Belgium'
          });
          markers.push(marker13);


// Larnaca Int. Airport , Cyprus
          var marker14 = new google.maps.Marker({
            position: new google.maps.LatLng(34.8703,33.611282),
            map: map,
            title: 'Larnaca Int. Airport , Cyprus',
            icon: sIcon,
            animation: google.maps.Animation.DROP,
            html: 'Larnaca Int. Airport , Cyprus'
          });
          markers.push(marker14);          
                    

for (var i = 0; i < markers.length; i++) {
      var marker = markers[i];
      google.maps.event.addListener(marker, 'click', function () {
      // where I have added .html to the marker object.
      infowindow.setContent('<br/><h3>' + this.html + '</h3>');
      infowindow.open(map, this);
      map.setCenter(this.position);
});
}
   }
      })();


// page.bodyTag >
// page.bodyTag = <body onload="initialize()">

/*
<a href="http://www.schiphol.nl/ target="_blank">Schiphol Amsterdam</a>,
<a href="http://www.eindhovenairport.nl/ target="_blank">Eindhoven</a>,
<a href="http://www.rotterdamthehagueairport.nl/ target="_blank">Rotterdam</a>,
<a href="http://www.frankfurt-airport.com/ target="_blank">Frankfurt</a>,
<a href="http://www.munich-airport.de/ target="_blank">München</a>,
<a href="http://www.duesseldorf-international.de/ target="_blank">Dusseldorf</a>,
<a href="http://www.helsinki-vantaa.fi/ target="_blank">Helsinki</a>,
<a href="http://www.osl.no/en/osl target="_blank">Oslo</a>,
<a href="http://www.cph.dk/ target="_blank">Kopenhagen</a>,
<a href="http://www.acsa.co.za/home.asp?pid=228 target="_blank">Johannesburg</a>,
<a href="http://www.capetown-airport.com/ target="_blank">Kaapstad</a>,
<a href="http://www.brusselsairport.be/en/ target="_blank">Brussel Zaventem</a>
<a href="http://www.liegeairport.com/en/home target="_blank">and Liège</a>.

*/



