function initGmap(mapId, latitude, longitude, zoomlevel) {
	
	$(document).ready(function() {
		if (GBrowserIsCompatible() && latitude > 0 && longitude> 0) { 
			var map = new GMap2(document.getElementById(mapId)); 
			map.addControl(new GSmallMapControl());
			map.setCenter(new GLatLng(latitude, longitude), zoomlevel);
			map.addOverlay(createMarker(new GLatLng(latitude, longitude)));
		} else {
			document.getElementById(mapId).innerHTML = "<span>Geen kaart beschikbaar</span>";	
		}
	});	
}

function createMarker(point) {
	
	var baseIcon = new GIcon();
	baseIcon.shadow = "http://www.google.com/mapfiles/shadow50.png";
	baseIcon.iconSize = new GSize(20, 34);
	baseIcon.shadowSize = new GSize(37, 34);
	baseIcon.iconAnchor = new GPoint(9, 34);
	baseIcon.infoWindowAnchor = new GPoint(9, 2);
	baseIcon.infoShadowAnchor = new GPoint(18, 25);	
	
	var letteredIcon = new GIcon(baseIcon);
	letteredIcon.image = "http://www.google.com/mapfiles/marker.png";

	// Set up our GMarkerOptions object
	markerOptions = { icon:letteredIcon };
	return new GMarker(point, markerOptions);

}
