//<![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>Gruppo Creditalia</b><br />Via Frattina, 89  <br />00187 Roma<br />Tel. 06.98.35.47.01 <br />Fax 06.23.32.81.92</div>';

		var n=41.903842;	
		var e=12.479653;

		map = new GMap2(document.getElementById("map"));
		geocoder = new GClientGeocoder();

		map.setCenter(new GLatLng(n, e), 15); <!--zoom //-->
		map.addControl(new GLargeMapControl());
		map.addControl(new GMapTypeControl());
		
		var icon = new GIcon();
		icon.image = "http://www.gruppocreditalia.it/img/ico_sopra.png";
		icon.shadow = "http://www.gruppocreditalia.it/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(); <!--div message che permette di vedere le coordinate esatte //-->

		  
});

	}
}


function load2() {
	
		if (GBrowserIsCompatible()) {

		var WINDOW_HTML1 = '<div style="width: 204px; padding-right: 10px; font-family:Arial, Helvetica, sans-serif; font-size:11px;"><b>Gruppo Creditalia</b><br />Viale Vincenzo Monti, 8<br />20121 Milano<br />Tel. 02.00.61.34.20<br />Fax 02.93.36.64.22.6</div>';

		var n=45.507385;	
		var e=9.097667;

		map = new GMap2(document.getElementById("map2"));
		geocoder = new GClientGeocoder();

		map.setCenter(new GLatLng(n, e), 15); <!--zoom //-->
		map.addControl(new GLargeMapControl());
		map.addControl(new GMapTypeControl());
		
		var icon = new GIcon();
		icon.image = "http://www.gruppocreditalia.it/img/ico_sopra.png";
		icon.shadow = "http://www.gruppocreditalia.it/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(); <!--div message che permette di vedere le coordinate esatte //-->

		  
});

	}
}

function load3() {

	if (GBrowserIsCompatible()) {

		var WINDOW_HTML1 = '<div style="width: 204px; padding-right: 10px; font-family:Arial, Helvetica, sans-serif; font-size:11px;"><b>Gruppo Creditalia</b><br />Via Carmine Vecchio, 50<br />71036 Lucera<br />Tel. 0881.52.42.10<br />Fax 0881.52.68.19</div>';

		var n=41.500285308219226;	
		var e=15.34738540649414;

		map = new GMap2(document.getElementById("map3"));
		geocoder = new GClientGeocoder();

		map.setCenter(new GLatLng(n, e), 15); <!--zoom //-->
		map.addControl(new GLargeMapControl());
		map.addControl(new GMapTypeControl());
		
		var icon = new GIcon();
		icon.image = "http://www.gruppocreditalia.it/img/ico_sopra.png";
		icon.shadow = "http://www.gruppocreditalia.it/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(); <!--div message che permette di vedere le coordinate esatte //-->

		  
});

	}
}


function showAddress(address) {
  geocoder.getLatLng(
    address,
    function(point) {
      if (!point) {
        alert(address + " not found");
      } else {
        map.setCenter(point, 14);
        var marker = new GMarker(point);
        map.addOverlay(marker);
        marker.openInfoWindowHtml(address);
      }
    }
  )
}




//]]>
