    //<![CDATA[

    function load() {
      if (GBrowserIsCompatible()) {
      
      
      
      


//Het menu met de gebieden
function GebiedenControl() {
}
GebiedenControl.prototype = new GControl();

GebiedenControl.prototype.initialize = function(map) {
  var container = document.createElement("div");

  var zoomOutDiv = document.createElement("div");
  this.setButtonStyle_(zoomOutDiv);
  container.appendChild(zoomOutDiv);
  zoomOutDiv.appendChild(document.createTextNode("World"));
  GEvent.addDomListener(zoomOutDiv, "mouseover", function() {
    map.setCenter(new GLatLng(43, 11), 1);
  });

  var zoomOutDiv = document.createElement("div");
  this.setButtonStyle_(zoomOutDiv);
  container.appendChild(zoomOutDiv);
  zoomOutDiv.appendChild(document.createTextNode("Ecuador"));
  GEvent.addDomListener(zoomOutDiv, "mouseover", function() {
    map.setCenter(new GLatLng(-2.710702, -80.342449), 17);
  });

  var zoomOutDiv = document.createElement("div");
  this.setButtonStyle_(zoomOutDiv);
  container.appendChild(zoomOutDiv);
  zoomOutDiv.appendChild(document.createTextNode("Indonesia"));
  GEvent.addDomListener(zoomOutDiv, "mouseover", function() {
    map.setCenter(new GLatLng(-6.76051, 108.607374), 18);
  });

  var zoomOutDiv = document.createElement("div");
  this.setButtonStyle_(zoomOutDiv);
  container.appendChild(zoomOutDiv);
  zoomOutDiv.appendChild(document.createTextNode("Malaysia"));
  GEvent.addDomListener(zoomOutDiv, "mouseover", function() {
    map.setCenter(new GLatLng(4.567163, 100.545094), 16);
  });

  var zoomOutDiv = document.createElement("div");
  this.setButtonStyle_(zoomOutDiv);
  container.appendChild(zoomOutDiv);
  zoomOutDiv.appendChild(document.createTextNode("Mexico"));
  GEvent.addDomListener(zoomOutDiv, "mouseover", function() {
    map.setCenter(new GLatLng(27.091, -110.128), 17);
  });

  var zoomOutDiv = document.createElement("div");
  this.setButtonStyle_(zoomOutDiv);
  container.appendChild(zoomOutDiv);
  zoomOutDiv.appendChild(document.createTextNode("China"));
  GEvent.addDomListener(zoomOutDiv, "mouseover", function() {
    map.setCenter(new GLatLng(32.146221, 121.622729), 15);
  });

  var zoomOutDiv = document.createElement("div");
  this.setButtonStyle_(zoomOutDiv);
  container.appendChild(zoomOutDiv);
  zoomOutDiv.appendChild(document.createTextNode("Pakistan"));
  GEvent.addDomListener(zoomOutDiv, "mouseover", function() {
    map.setCenter(new GLatLng(25.134853, 61.788869), 17);
  });

  var zoomOutDiv = document.createElement("div");
  this.setButtonStyle_(zoomOutDiv);
  container.appendChild(zoomOutDiv);
  zoomOutDiv.appendChild(document.createTextNode("Phillipines"));
  GEvent.addDomListener(zoomOutDiv, "mouseover", function() {
    map.setCenter(new GLatLng(14.735255, 120.654066), 18);
  });

  var zoomOutDiv = document.createElement("div");
  this.setButtonStyle_(zoomOutDiv);
  container.appendChild(zoomOutDiv);
  zoomOutDiv.appendChild(document.createTextNode("Madagascar"));
  GEvent.addDomListener(zoomOutDiv, "mouseover", function() {
    map.setCenter(new GLatLng(-13.186217, 48.769512), 18);
  });

  var zoomOutDiv = document.createElement("div");
  this.setButtonStyle_(zoomOutDiv);
  container.appendChild(zoomOutDiv);
  zoomOutDiv.appendChild(document.createTextNode("USA, Georgia"));
  GEvent.addDomListener(zoomOutDiv, "mouseover", function() {
    map.setCenter(new GLatLng(31.126656, -81.394358), 16);
  });

  var zoomOutDiv = document.createElement("div");
  this.setButtonStyle_(zoomOutDiv);
  container.appendChild(zoomOutDiv);
  zoomOutDiv.appendChild(document.createTextNode("USA, Louisiana"));
  GEvent.addDomListener(zoomOutDiv, "mouseover", function() {
    map.setCenter(new GLatLng(29.515644, -92.24782), 16);
  });

  var zoomOutDiv = document.createElement("div");
  this.setButtonStyle_(zoomOutDiv);
  container.appendChild(zoomOutDiv);
  zoomOutDiv.appendChild(document.createTextNode("Netherlands, Vlieland"));
  GEvent.addDomListener(zoomOutDiv, "mouseover", function() {
    map.setCenter(new GLatLng(53.290348, 4.980733), 16);
  });

  var zoomOutDiv = document.createElement("div");
  this.setButtonStyle_(zoomOutDiv);
  container.appendChild(zoomOutDiv);
  zoomOutDiv.appendChild(document.createTextNode("Netherlands, Schelde"));
  GEvent.addDomListener(zoomOutDiv, "mouseover", function() {
    map.setCenter(new GLatLng(51.453051, 3.456874), 17);
  });
  
  map.getContainer().appendChild(container);
  return container;
}

GebiedenControl.prototype.getDefaultPosition = function() {
  return new GControlPosition(G_ANCHOR_BOTTOM_RIGHT, new GSize(-130, -3));
}

//CSS
GebiedenControl.prototype.setButtonStyle_ = function(button) {
  button.style.textDecoration = "none";
  button.style.color = "#0A6BA7";
  button.style.backgroundColor = "white";
  button.style.font = "12px Arial";
  button.style.border = "1px dotted #444444";
  button.style.padding = "2px";
  button.style.marginBottom = "3px";
  button.style.textAlign = "center";
  button.style.width = "";
  button.style.cursor = "pointer";
}





      // A function to create the marker and set up the event window
      function createMarker(point,name,html) {
        var marker = new GMarker(point);
        GEvent.addListener(marker, "mouseover", function() {
          marker.openInfoWindowHtml(html);
        });
        return marker;
      }






function TextualZoomControl() {
}
TextualZoomControl.prototype = new GControl();


TextualZoomControl.prototype.initialize = function(map) {
  var container = document.createElement("div");

  var zoomInDiv = document.createElement("div");
  this.setButtonStyle_(zoomInDiv);
  container.appendChild(zoomInDiv);
  zoomInDiv.appendChild(document.createTextNode(" Zoom In "));
  GEvent.addDomListener(zoomInDiv, "click", function() {
    map.zoomIn();
  });

  var zoomOutDiv = document.createElement("div");
  this.setButtonStyle_(zoomOutDiv);
  container.appendChild(zoomOutDiv);
  zoomOutDiv.appendChild(document.createTextNode(" Zoom Out "));
  GEvent.addDomListener(zoomOutDiv, "click", function() {
    map.zoomOut();
  });

  map.getContainer().appendChild(container);
  return container;
}

TextualZoomControl.prototype.getDefaultPosition = function() {
  return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(7, 7));
}

// Sets the proper CSS for the given button element.
TextualZoomControl.prototype.setButtonStyle_ = function(button) {
  button.style.textDecoration = "none";
  button.style.color = "#0A6BA7";
  button.style.backgroundColor = "white";
  button.style.font = "12px Arial";
  button.style.border = "1px dotted #444444";
  button.style.padding = "2px";
  button.style.marginBottom = "3px";
  button.style.textAlign = "center";
  button.style.width = "";
  button.style.cursor = "pointer";
}




        var map = new GMap2(document.getElementById("map"));
        map.setCenter(new GLatLng(43, 11), 1);
        map.setMapType(G_SATELLITE_TYPE);
		map.addControl(new TextualZoomControl());
        map.addControl(new GebiedenControl());

        
// het laden van den XML dataas, php randomized ding om een niet gecachete XML te laden
GDownloadUrl("data.xml", function(data, responseCode) {
  var xml = GXml.parse(data);
  var markers = xml.documentElement.getElementsByTagName("marker");
  for (var i = 0; i < markers.length; i++) {
    var point = new GLatLng(parseFloat(markers[i].getAttribute("lat")), parseFloat(markers[i].getAttribute("lng")));
    var detitel = markers[i].getAttribute("detitel");
    var detekst = markers[i].getAttribute("detekst");
//    var ref = markers[i].getAttribute("ref");
//    var marker = createMarker(point,"dee",'<br><a href="'+ref+'">'+detekst+'</a>');
    var marker = createMarker(point,"dee",'<p><b>'+detitel+'</b><br>'+detekst+'</p>');
    map.addOverlay(marker);
  }
  });
  
  
  
          
        }
    }

    //]]>
