    var startplaatsen = adressen;
	/* meegegeven vanuit cms: titels, ankers, locaties */
	var teller = 0;
	var map = "";
	var map_id = "map";

	var $j = jQuery.noConflict();

	function load() {
		/*
		//creation of new icon for marker images
		bvbvkIcon = new GIcon(G_DEFAULT_ICON);
		bvbvkIcon.image = "../img/gmap-bvbvk.png";
		//bvbvkIcon.shadow = "../img/gmap-shade-bvbvk.png";
		bvbvkIcon.iconSize = new GSize(21, 27);
		//bvbvkIcon.shadowSize = new GSize(56, 27);
		bvbvkIcon.iconAnchor = new GPoint(5,20);
		bvbvkIcon.infoWindowAnchor = new GPoint(22, 5);
		*/
		// if browser is compatible a new map object is created and linked to a div with id "map"
		if (GBrowserIsCompatible()){
			map = new GMap2(document.getElementById("map"));
			//location on which the map will center when it loads...change the coordinates to change this point, the single number at the end is the zoom level at the time of loading
			//map.setCenter(new GLatLng(center_loc), zoom);
			berekenGeoloc(center);
			//adding controls to the map: to change zoom level, to move the map in any direction, to change the type of map and to enable zooming with the mousewheel
			map.addControl(new GSmallMapControl());
			map.addControl(new GScaleControl());
			map.addControl(new GMapTypeControl());
            map.enableScrollWheelZoom();
			//function that recalls itself once started until all markers have been put on the map
			createMarker();
		}
    }
	
	function berekenGeoloc(adres)
	{
		//the GClientGeocoder is used to transform an adress to usable latitudes and longitudes
		geocoder = new GClientGeocoder();
		//method of the GClientGeocoder object to transform the addresss, the anonymous callback function is given a point (coordinates) to work with
		geocoder.getLatLng(adres, function(coords){
			map.setCenter(coords, 7);
		})
	}
	
	function createMarker(){
		//variable used to store the starting point for the next marker
		var startplaats = startplaatsen[teller];
        var titel = titels[teller];
		//the GClientGeocoder is used to transform an adress to usable latitudes and longitudes
		geocoder = new GClientGeocoder();
		//method of the GClientGeocoder object to transform the addresss, the anonymous callback function is given a point (coordinates) to work with
		geocoder.getLatLng(startplaats, function(coords){
			//instantiating a new marker object and adding a title as optional parameter
			var marker = new GMarker(coords, {title:titel});
			//adding an Event Listener to the marker,
			GEvent.addListener(marker, "click", function(){
				var html = "<p><b>" + titel + "</b></p>";
                html += "<p>" + startplaats + "</p>";
				marker.openInfoWindowHtml(html);
			});
			//changing image of the marker

			//adding the marker to the map
			map.addOverlay(marker);
		});
		//this counter keeps count of the starting points
		teller++;
		//if the counter is bigger then the length of the starting points array the setTimeout stops
		if(teller < startplaatsen.length){
			//the timeout is used to make sure the google servers have enough time to calculate the coordinates with the geocoder.getLatLng function (LOWERING THIS TIMER MIGHT CAUSE SOME MARKERS TO NOT BE SHOWN)
			setTimeout("createMarker();", 200);
		}
	}

