    var Icon = new GIcon();
    Icon.iconSize = new GSize(20, 34);
    Icon.iconAnchor = new GPoint(9, 34);
    Icon.infoWindowAnchor = new GPoint(9, 0);

    //function to create a new marker
    function createMarker(point,id,color) {
        
    	Icon.image = MarkerLink + "/maps/" + color + ".png";
    	var marker = new GMarker(point, {icon:Icon});
    	
    	//alert(point);
    	GEvent.addListener(marker, "click", function() { 	
    		selector = '#infowindow_' + id;
    		var html = $(selector).html();
    		
            marker.openInfoWindowHtml(html);
        });
    	
    	return marker;
     
    }
    
    
    // if body is loaded:
    function initialize() {
    
    //is the browser compatible?
      if (GBrowserIsCompatible()) {
      
      	//make new map
        var map = new GMap2(document.getElementById("googlemap_canvas"));
        
        //set center
        map.setCenter(new GLatLng(googleMapsLat, googleMapsLng), googleMapsZoomLevel);
        map.addControl(new GLargeMapControl3D);
        
         // Read the data from the XML-file
    GDownloadUrl(AjaxData + googleMapsZoom, function(doc) {
        var xmlDoc = GXml.parse(doc);
        var markers = xmlDoc.documentElement.getElementsByTagName("marker");

        var point = new Array();
        var color = new Array();
        var id = new Array();
        
        //add points to the map
        for (var i = 0; i < markers.length; i++) {
          // obtain the attribues of each marker
          var lat = parseFloat(markers[i].getAttribute("lat"));
          var lng = parseFloat(markers[i].getAttribute("lng"));
          point[i] = new GLatLng(lat,lng);
          id[i] = markers[i].getAttribute("id");
          color[i] = markers[i].getAttribute("color");
          
	      	// create the marker
	      	var marker = createMarker(point[i],id[i],color[i]);
	      	if(!isNaN(lat) || !isNaN(lng)) {
	      		map.addOverlay(marker);
	      	}
    	
        }
         
        //fade out the Loader-div
        $('#googlemap_loader').fadeOut(1000);
       
     });
        
      }
    }
    
    initialize();
    
    
    /*** END OF GOOGLE MAPS API **/
    
    
	/*
	 * label2value
	 * jquery based script for using form labels as text field values
	 * more info on http://cssglobe.com/post/1500/using-labels- 
	 *
	 * Copyright (c) 2008 Alen Grakalic (cssglobe.com)
	 * Dual licensed under the MIT (MIT-LICENSE.txt)
	 * and GPL (GPL-LICENSE.txt) licenses.
	 *
	 */

	this.label2value = function(){	

		// CSS class names
		// put any class name you want
		// define this in external css (example provided)
		var inactive = "inactive";
		var active = "active";
		var focused = "focused";
		
		// function
		$("label").each(function(){		
			obj = document.getElementById($(this).attr("for"));
			if(($(obj).attr("type") == "text") || (obj.tagName.toLowerCase() == "textarea")){			

				var text = $(this).text();
				
				//$(this).css("display","none");
				
				if($(obj).val() == '') {
					$(obj).val(text);
					$(obj).addClass(inactive);
				}
				
				$(obj).focus(function(){	
					$(this).addClass(focused);
					$(this).removeClass(inactive);
					$(this).removeClass(active);								  
					if($(this).val() == text) $(this).val("");
				});	
				$(obj).blur(function(){	
					$(this).removeClass(focused);													 
					if($(this).val() == "") {
						$(this).val(text);
						$(this).addClass(inactive);
					} else {
						$(this).addClass(active);		
					};				
				});				
			};	
		});		
	};
    
    $(document).ready(function() {
	    //Put the label of the google maps postal-code input form into the form
		 label2value();
    });
