    //<![CDATA[
    var map = null;
    var geocoder = null;
	var sideHtml= "";
	var gmarkers = [];
	var markerPos = [];
	var info = [];
	var j = 0;
	var counter = 0;
	function load(daten)
	{
		var nr = daten[0]['nr'];
		var strasse = daten[0]['strasse'];
		var ort = daten[0]['ort'];
		var plz = daten[0]['plz'];
		var land = daten[0]['land'];
		var comment = daten[0]['comment'];

		var text = "";
		
		if ( nr.length != '*' )
			text = nr + ', ';
		if ( strasse.length != '*' )
			text = text + strasse + ', ';
		if ( ort.length > 0 )
			text = text + ort + ', ';
		if ( plz.length > 0 )
			text = text + plz + ', ';
		if ( land.length > 0 )
			text = text + land + ', ';
		if ( text.length > 0 )
			text = text.substr(0, text.length-2);
		if (GBrowserIsCompatible()) 
		{
			map = new GMap2(document.getElementById("map"));
			map.removeMapType(G_HYBRID_MAP);
			map.removeMapType(G_SATELLITE_MAP);
			map.addControl(new GSmallMapControl());
			map.addControl(new GMapTypeControl());
			geocoder = new GClientGeocoder();
			geocoder.getLatLng( text,function(point)
						 {
							map.setCenter(new GLatLng(point.x, point.y), 2);
							map.addOverlay(createMarker(point, plz + ' ' + ort, strasse + ' ' + nr,comment));
					
						//	openMarker(0,15);					

						 });



		}else
		{
			alert("Mit diesem Browser ist die Anzeige der Karte nicht möglich.");
		}
		//end of function load
			
		
	}

	//this function creates a marker, attachtes an event-listener to it and creates the
	//html out of the data read from the xml( name, addDate,...) to display in the Info-window
	//Then it adds information of the marker to the specified arrays and calls the appropriate function
	//for generating the sidebar-html
	function createMarker(point, ort, strasse, comment) {
		var marker = new GMarker(point);
		var displayHtml = "<div style=\"width:250px;\"><b>" + ort + "</b><br>" + strasse + "<br><br>" + comment + "</div>";
		GEvent.addListener(marker, "click", function() {
			marker.openInfoWindowHtml(displayHtml);
		});
		//alert("Debug:\npoint:" + point + "\nname:" + name);
		//storing information about the marker
	//	markerPos[j] = point;
		gmarkers[j] = marker;
		info[j]= displayHtml;
		map.setCenter(point,15);
//		marker.openInfoWindowHtml(displayHtml);
		//not optimal because addHTML method should be called at end, because so
		//variable sideHtml is not needed, but for some reason when calling it only at the
		//end, the variable sideHtml was always empty...I will change this as soon as I discover the bug
		j++;
		return marker;
	}


	//this function sets the map-center to the given "point" and sets the zoom to "zoom"
	function setPosAndZoom(point, zoom){
		map.setCenter(point,zoom);
	}	

	//this function is called when the user clicks on a link. It opens the InfoWindow of the attached
	//marker and depending on the link it zooms-in or out
	function openMarker(index, zoom){
		if(zoom!=-1){
		//	setPosAndZoom(markerPos[index],zoom);
			gmarkers[index].openInfoWindowHtml(info[index]);
		}else{
			//leave level of zoom as it is
			gmarkers[index].openInfoWindowHtml(info[index]);
		}
	}	


	/*--------------------------------------*/

    //]]>
