var markers = [];
if (GBrowserIsCompatible()) { 
	var huurIcon = new GIcon();
	huurIcon.image = "/customers/huur030.ziltsysteem.nl/galerij/logo.gif";
	huurIcon.iconSize = new GSize(15, 18);
	huurIcon.iconAnchor = new GPoint(9, 31);
	huurIcon.infoWindowAnchor = new GPoint(5, 1);
	var huurIconSelected = new GIcon();
	huurIconSelected.image = "/customers/huur030.ziltsysteem.nl/galerij/logo-selected.gif";
	huurIconSelected.iconSize = new GSize(15, 18);
	huurIconSelected.iconAnchor = new GPoint(9, 31);
	huurIconSelected.infoWindowAnchor = new GPoint(5, 1);
	var geocoder = new GClientGeocoder(); 

	// A function to create the marker and set up the event window
	// Dont try to unroll this function. It has to be here for the function closure
	// Each instance of the function preserves the contends of a different instance
	// of the "marker" and "html" variables which will be needed later when the event triggers.    
	function createMarker(point,html, icon) {
		var marker = new GMarker(point, icon);
		GEvent.addListener(marker, "click", function() {
			marker.openInfoWindowHtml(html);
		});
		return marker;
	}
	function htmllayout(a,b) {
		return '<div class="tablegoogle" style="height: 120px; width: 300px"><div class=\"titlegooglemap\"><b>' + a + '</b><br /></div><div class=\"contentgooglemap\">' +b + '</div></div>'; 
	}
}

// display a warning if the browser was not compatible
else {
	alert("Sorry, the Google Maps API is not compatible with this browser");
}


// This Javascript is based on code provided by the
// Blackpool Community Church Javascript Team
// http://www.commchurch.freeserve.co.uk/   
// http://econym.googlepages.com/index.htm


function setMapScope(type) {
	 if (type == 'region') {
	 geocoder.getLatLng('Utrecht, Netherlands', 
          function(point) {
            map.setCenter(point, 13);
	   }
	 );
	 } else {
   	 geocoder.getLatLng('Utrecht, Netherlands', 
          function(point) {
            map.setCenter(point, 10);
	   }
	 );
	 }
}

function in_array( what, where ){
  var a=false;
  for(var i=0;i<where.length;i++){
    if(what == where[i]){
      a=true;
      break;
    }
  }
  return a;
}

