    var iconBlue = new GIcon(); 
    iconBlue.image = 'http://labs.google.com/ridefinder/images/mm_20_blue.png';
    iconBlue.shadow = 'http://labs.google.com/ridefinder/images/mm_20_shadow.png';
    iconBlue.iconSize = new GSize(12, 20);
    iconBlue.shadowSize = new GSize(22, 20);
    iconBlue.iconAnchor = new GPoint(6, 20);
    iconBlue.infoWindowAnchor = new GPoint(5, 1);

	var icon1stelle = new GIcon(); 
    icon1stelle.image = 'http://www.riminirimini.com/img2007/marker/marker1stella.png';
    icon1stelle.shadow = 'http://www.riminirimini.com/img2007/marker/shadow1stella.png';
    icon1stelle.iconSize = new GSize(24,46);
    icon1stelle.shadowSize = new GSize(47,46);
    icon1stelle.iconAnchor = new GPoint(12,46);
    icon1stelle.infoWindowAnchor = new GPoint(12,0);
	
	var icon2stelle = new GIcon(); 
    icon2stelle.image = 'http://www.riminirimini.com/img2007/marker/marker2stelle.png';
    icon2stelle.shadow = 'http://www.riminirimini.com/img2007/marker/shadow2stelle.png';
    icon2stelle.iconSize = new GSize(34,46);
    icon2stelle.shadowSize = new GSize(57,46);
    icon2stelle.iconAnchor = new GPoint(17,46);
    icon2stelle.infoWindowAnchor = new GPoint(17,0);
	
	var icon3stelle = new GIcon(); 
    icon3stelle.image = 'http://www.riminirimini.com/img2007/marker/marker3stelle.png';
    icon3stelle.shadow = 'http://www.riminirimini.com/img2007/marker/shadow3stelle.png';
    icon3stelle.iconSize = new GSize(24,45);
    icon3stelle.shadowSize = new GSize(47,45);
    icon3stelle.iconAnchor = new GPoint(12,45);
    icon3stelle.infoWindowAnchor = new GPoint(12,0);

	var icon4stelle = new GIcon(); 
    icon4stelle.image = 'http://www.riminirimini.com/img2007/marker/marker4stelle.png';
    icon4stelle.shadow = 'http://www.riminirimini.com/img2007/marker/shadow4stelle.png';
    icon4stelle.iconSize = new GSize(34,46);
    icon4stelle.shadowSize = new GSize(57,46);
    icon4stelle.iconAnchor = new GPoint(17,46);
    icon4stelle.infoWindowAnchor = new GPoint(17,0);
	
	var iconresidence = new GIcon(); 
    iconresidence.image = 'http://www.riminirimini.com/img2007/marker/markerresidence.png';
    iconresidence.shadow = 'http://www.riminirimini.com/img2007/marker/shadowresidence.png';
    iconresidence.iconSize = new GSize(24,46);
    iconresidence.shadowSize = new GSize(47,46);
    iconresidence.iconAnchor = new GPoint(12,46);
    iconresidence.infoWindowAnchor = new GPoint(12,0);
	
	var iconevento = new GIcon(); 
    iconevento.image = 'http://www.riminirimini.com/img2007/marker/marker_evento.png';
    iconevento.shadow = 'http://www.riminirimini.com/img2007/marker/shadow_evento.png';
    iconevento.iconSize = new GSize(35,55);
    iconevento.shadowSize = new GSize(63,55);
    iconevento.iconAnchor = new GPoint(0,55);
    iconevento.infoWindowAnchor = new GPoint(18,0);
	
    var iconRed = new GIcon(); 
    iconRed.image = 'http://labs.google.com/ridefinder/images/mm_20_red.png';
    iconRed.shadow = 'http://labs.google.com/ridefinder/images/mm_20_shadow.png';
    iconRed.iconSize = new GSize(12, 20);
    iconRed.shadowSize = new GSize(22, 20);
    iconRed.iconAnchor = new GPoint(6, 20);
    iconRed.infoWindowAnchor = new GPoint(5, 1);

    var customIcons = [];
    customIcons["1 Stella"] = icon1stelle;
	customIcons["2 Stelle"] = icon2stelle;
	customIcons["3 Stelle"] = icon3stelle;
    customIcons["4 Stelle"] = icon4stelle;
	customIcons["Residence 3 Stelle"] = iconresidence;
	customIcons["evento"] = iconevento;

    function load(parametro,mappalat,mappalong,zoom,object,indirizzo) {
		miozoom = parseInt(zoom);
        if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map"));
        map.addControl(new GSmallMapControl());
        map.addControl(new GMapTypeControl());
        map.setCenter(new GLatLng(mappalat, mappalong), miozoom);
				
		
        var xmlurl= parametro;
        GDownloadUrl(xmlurl, function(data) {
          var xml = GXml.parse(data);
          var markers = xml.documentElement.getElementsByTagName("marker");
          for (var i = 0; i < markers.length; i++) {
            var name = markers[i].getAttribute("name");
            var address = markers[i].getAttribute("address");
            var type = markers[i].getAttribute("type");
			var url = markers[i].getAttribute("url");
			var img = markers[i].getAttribute("img");
            var point = new GLatLng(parseFloat(markers[i].getAttribute("lat")),
                                    parseFloat(markers[i].getAttribute("lng")));
            var marker = createMarker(point, name, address, type, url,img);
            map.addOverlay(marker);
          }
        })
      }
   
          
            var type = "evento"
			var url = "http://www.riminirimini.com";
            var point = new GLatLng(parseFloat(mappalat), parseFloat(mappalong));
            var marker = createMarker(point, object, indirizzo, type, url);
            map.addOverlay(marker);
   
   
   }
            


    function createMarker(point, name, address, type, url, img) {
      var marker = new GMarker(point, customIcons[type]);
      var html = "<table width='200' border='0'><tr><td width='68'><img src='http://www.riminirimini.com/images/" + img + "' width='58' height='50'></td><td width='132' valign='top'><a href='" + url + "' target='_blank'>" + name + "</a><br> " + address + "</td></tr></table>";
      GEvent.addListener(marker, 'click', function() {
        marker.openInfoWindowHtml(html);
      });
      return marker;
    }

	
