//<![CDATA[
var map = null;
var geocoder = null;


function load() {

	if (GBrowserIsCompatible()) {

		var WINDOW_HTML1 = '<div style="width: 204px; padding-right: 10px; font-family:Arial, Helvetica, sans-serif; font-size:11px;"><b>Flats in Lido del Sole</b></div>';

		var n=41.92246071806207;	
		var e=15.8258056640625;

		map = new GMap2(document.getElementById("map"));
		geocoder = new GClientGeocoder();

		map.setCenter(new GLatLng(n, e), 13);
		map.addControl(new GLargeMapControl());
		map.addControl(new GMapTypeControl());
		
		var icon = new GIcon();
		icon.image = "http://www.gammavacanze.it/eng/img/ico_sopra.png";
		icon.shadow = "http://www.gammavacanze.it/eng/img/ico_sotto.png";
		icon.iconSize = new GSize(75, 37);
		icon.shadowSize = new GSize(75, 37);
		icon.iconAnchor = new GPoint(15, 30);
		icon.infoWindowAnchor = new GPoint(24, 0);

		var marker1 = new GMarker(new GLatLng(n, e ),icon);
		map.addOverlay(marker1);

		GEvent.addListener(marker1, "click", function() {
			marker1.openInfoWindowHtml(WINDOW_HTML1); 
		});
		
		marker1.openInfoWindowHtml(WINDOW_HTML1); 
		
		GEvent.addListener(map, "moveend", function() {
		  var center = map.getCenter();
		  document.getElementById("message").innerHTML = center.toString();

		  
});

	}
}

function load2() {

	if (GBrowserIsCompatible()) {

		var WINDOW_HTML1 = '<div style="width: 204px; padding-right: 10px; font-family:Arial, Helvetica, sans-serif; font-size:11px;"><b>Residence La Cappella del Convento</b></div>';

		var n=41.92309933783743;	
		var e=15.876617431640625;

		map = new GMap2(document.getElementById("map2"));
		geocoder = new GClientGeocoder();

		map.setCenter(new GLatLng(n, e), 14);
		map.addControl(new GLargeMapControl());
		map.addControl(new GMapTypeControl());
		
		var icon = new GIcon();
		icon.image = "http://www.gammavacanze.it/eng/img/ico_sopra.png";
		icon.shadow = "http://www.gammavacanze.it/eng/img/ico_sotto.png";
		icon.iconSize = new GSize(75, 37);
		icon.shadowSize = new GSize(75, 37);
		icon.iconAnchor = new GPoint(15, 30);
		icon.infoWindowAnchor = new GPoint(24, 0);

		var marker1 = new GMarker(new GLatLng(n, e ),icon);
		map.addOverlay(marker1);

		GEvent.addListener(marker1, "click", function() {
			marker1.openInfoWindowHtml(WINDOW_HTML1); 
		});
		
		marker1.openInfoWindowHtml(WINDOW_HTML1); 
		
		GEvent.addListener(map, "moveend", function() {
		  var center = map.getCenter();
		  document.getElementById("message").innerHTML = center.toString();

		  
});

	}
}

function load3() {

	if (GBrowserIsCompatible()) {

		var WINDOW_HTML1 = '<div style="width: 204px; padding-right: 10px; font-family:Arial, Helvetica, sans-serif; font-size:11px;"><b>Gamma Vacanze Flats<br />Corso Madonna della Libera 56,<br />71012 Rodi Garganico (FG)<br />Tel. 0884.965340<br />Fax 0884.965366<br />email:<a href="mailto:info@gammavacanze.it">indo@gammavacanze.it</a></b></div>';

		var n=41.9282080659345;	
		var e=15.881552696228027;

		map = new GMap2(document.getElementById("map3"));
		geocoder = new GClientGeocoder();

		map.setCenter(new GLatLng(n, e), 14);
		map.addControl(new GLargeMapControl());
		map.addControl(new GMapTypeControl());
		
		var icon = new GIcon();
		icon.image = "http://www.gammavacanze.it/eng/img/ico_sopra.png";
		icon.shadow = "http://www.gammavacanze.it/eng/img/ico_sotto.png";
		icon.iconSize = new GSize(75, 37);
		icon.shadowSize = new GSize(75, 37);
		icon.iconAnchor = new GPoint(15, 30);
		icon.infoWindowAnchor = new GPoint(24, 0);

		var marker1 = new GMarker(new GLatLng(n, e ),icon);
		map.addOverlay(marker1);

		GEvent.addListener(marker1, "click", function() {
			marker1.openInfoWindowHtml(WINDOW_HTML1); 
		});
		
		marker1.openInfoWindowHtml(WINDOW_HTML1); 
		
		GEvent.addListener(map, "moveend", function() {
		  var center = map.getCenter();
		  document.getElementById("message").innerHTML = center.toString();

		  
});

	}
}


function showAddress(address) {
  geocoder.getLatLng(
    address,
    function(point) {
      if (!point) {
        alert(address + " not found");
      } else {
        map.setCenter(point, 15);
        var marker = new GMarker(point);
        map.addOverlay(marker);
        marker.openInfoWindowHtml(address);
      }
    }
  );
}




//]]>
