		//<![CDATA[
		function loadGoogleMaps() {
		  if (GBrowserIsCompatible()) {
			var map = new GMap2(document.getElementById("map"));
			// Add and set the maptype to physical (terrein)
			map.addMapType(G_PHYSICAL_MAP) ; 
			map.setMapType(G_PHYSICAL_MAP);
			// Add extra zoom functionality
			map.enableDoubleClickZoom();
			map.enableContinuousZoom();
			map.enableScrollWheelZoom();
			// Set the center of the map to the center of the Netherlands
			map.setCenter(new GLatLng(52.469397, 5.509644), 7);
		
			
			// Add the controls
			map.addControl(new GSmallMapControl());
			map.addControl(new GMenuMapTypeControl());

			// Map dragevent
			GEvent.addListener(map, "dragstart", function() {
				hideInfoWindow();
			});
			// Map zoomevent
			GEvent.addListener(map, "zoomend", function() {
				hideInfoWindow();
			});


			function routeLaden() {
			    var routePanel = document.getElementById("routePanel");
			    var van = document.getElementById("saddr").value + " Nederland";
			    gdir = new GDirections(map);
			    GEvent.addListener(gdir, "load", onGDirectionsLoad);
			    GEvent.addListener(gdir, "error", handleErrors);
			    gdir.load("from: " + van + " to: Orfeoschouw @52.06502, 4.49250", { "locale": "nl_nl", getSteps: true });
			}

			function onGDirectionsLoad() {
			    var route_li = "&nbsp;<br /><strong>Afstand en reistijd:</strong>&nbsp;" + gdir.getSummaryHtml() + "<br /><ul>";
			    var route = gdir.getRoute(0);
			    for (var i = 0; i < route.getNumSteps(); i++) {
			        var stap = route.getStep(i).getDescriptionHtml();
			        route_li += "<li class=route>" + stap + "</li>";
			    }
			    route_li += "</ul>";
			    document.getElementById("routePanel").innerHTML = route_li;
			    document.getElementById("explanation").style.display = 'none';
			}

			function handleErrors() {
			    if (gdir.getStatus().code == G_GEO_UNKNOWN_ADDRESS) {
			        alert("De locatie van het opgegeven vertrekadres kon niet worden bepaald");
			    } else if (gdir.getStatus().code == G_GEO_SERVER_ERROR) {
			        alert("Er is iets misgegaan. Maar het is onduidelijk WAT!");
			    } else if (gdir.getStatus().code == G_GEO_MISSING_QUERY) {
			        alert("Een parameter ontbreekt. Misschien was er geen vertrekpunt ingevoerd");
			    } else if (gdir.getStatus().code == G_GEO_BAD_KEY) {
			        alert("De Google Maps sleutel is ongeldig of de gebruikte sleutel is niet geldig voor dit domein");
			    } else if (gdir.getStatus().code == G_GEO_BAD_REQUEST) {
			        alert("De aanvraag voor het plannen van een route is mislukt");
			    } else {
			        alert("Er is iets misgegaan. Maar het is volstrekt onduidelijk WAT de oorzaak is!");
			    }
			}

			function fncOnload() {
			    document.getElementById("saddr").focus();
			}

			function checkEnter(e) {
			    var evt = e || window.event;
			    var key = evt.keyCode;
			    if (key == 13) {
			        return false;
			    } else {
			        return true;
			    }
			}

				
			// Info window
			var infoWindow = document.createElement('div');
			infoWindow.id = 'infoWindow';
			infoWindow.className = 'infoWindowLarge';
			document.getElementById('map').appendChild(infoWindow);
			
			// Define the icons
			var mapIconBouw = new GIcon();
			mapIconBouw.image = "/img/mapimages/imgMapPointInfra.png";
			mapIconBouw.iconSize = new GSize(16, 16);
			mapIconBouw.iconAnchor = new GPoint(8, 8);
			mapIconBouw.infoWindowAnchor = new GPoint(8, 8);
			
			var mapIconInfra = new GIcon();
			mapIconInfra.image = "/img/mapimages/imgMapPointBouw.png";
			mapIconInfra.iconSize = new GSize(16, 16);
			mapIconInfra.iconAnchor = new GPoint(8, 8);
			mapIconInfra.infoWindowAnchor = new GPoint(8, 8);
			
			var mapIconAdvies = new GIcon();
			mapIconAdvies.image = "/img/mapimages/imgMapPointAdvies.png";
			mapIconAdvies.iconSize = new GSize(16, 16);
			mapIconAdvies.iconAnchor = new GPoint(8, 8);
			mapIconAdvies.infoWindowAnchor = new GPoint(8, 8);
			
			var mapIconDiensten = new GIcon();
			mapIconDiensten.image = "/img/mapimages/imgMapPointDiensten.png";
			mapIconDiensten.iconSize = new GSize(16, 16);
			mapIconDiensten.iconAnchor = new GPoint(8, 8);
			mapIconDiensten.infoWindowAnchor = new GPoint(8, 8);
			
			var mapIconGroep = new GIcon();
			mapIconGroep.image = "/img/mapimages/imgMapPointGroep.png";
			mapIconGroep.iconSize = new GSize(16, 16);
			mapIconGroep.iconAnchor = new GPoint(8, 8);
			mapIconGroep.infoWindowAnchor = new GPoint(8, 8);
			
			function createMarker(latLng, id, mapIcon)
			{
				var marker = new GMarker(latLng, { icon:mapIcon });
				marker.id = id;
				GEvent.addListener(marker, 'click', function() {
					toggleInfoWindow(marker);
				});
				return marker;
			}
			
			// Add the points
			var bounds = new GLatLngBounds();
			$('.offices > div').each(function() {
				var oProject = $(this);
				var point = new GLatLng(parseFloat(oProject.find('.lat').text()), parseFloat(oProject.find('.long').text()));
				if ($(oProject.children('div').get(0)).is('.bouw'))
				{
					map.addOverlay(createMarker(point, oProject.attr('id'), mapIconBouw));
				}
				else if ($(oProject.children('div').get(0)).is('.infra'))
				{
					map.addOverlay(createMarker(point, oProject.attr('id'), mapIconInfra));
				}
				else if ($(oProject.children('div').get(0)).is('.advies'))
				{
					map.addOverlay(createMarker(point, oProject.attr('id'), mapIconAdvies));
				}
				else if ($(oProject.children('div').get(0)).is('.diensten'))
				{
					map.addOverlay(createMarker(point, oProject.attr('id'), mapIconDiensten));
				}
				else
				{
					map.addOverlay(createMarker(point, oProject.attr('id'), mapIconGroep));
				}
				bounds.extend(point);
			});
			
			// Zoom in to put all points in view
			window.setTimeout(function() {
			  map.setZoom(map.getBoundsZoomLevel(bounds));
			  map.setCenter(bounds.getCenter());
			}, 500);
			
			function toggleInfoWindow(marker)
			{
				var oInfoWindow = $('#infoWindow');
				var oInfoWindowContent = $('#' + marker.id);
				
				if (oInfoWindow.is(':visible') && oInfoWindow.html().length > 0 && 
					oInfoWindow.find('.lat').text() == oInfoWindowContent.find('.lat').text() &&
					oInfoWindow.find('.long').text() == oInfoWindowContent.find('.long').text())
				{
					hideInfoWindow();
				}
				else
				{
					oInfoWindow.html(oInfoWindowContent.html());
					
					var point = map.getCurrentMapType().getProjection().fromLatLngToPixel(map.getBounds().getSouthWest(),map.getZoom());
					var offset = map.getCurrentMapType().getProjection().fromLatLngToPixel(marker.getPoint(),map.getZoom());
					var anchor = marker.getIcon().iconAnchor;
					var width = marker.getIcon().iconSize.width;
					var pos = new GControlPosition(G_ANCHOR_BOTTOM_LEFT, new GSize(offset.x - point.x - oInfoWindow.width() + 25, - offset.y + point.y +anchor.y));
					
					pos.apply(oInfoWindow.get(0));
					oInfoWindow.show();
					
				}
			}
				
			function hideInfoWindow()
			{
				$('#infoWindow').hide();
			}
		  }
		}
		//]]>