﻿function load() {
  if (GBrowserIsCompatible()) {
    var map = new GMap2(document.getElementById("map"));
    var center = new GLatLng(43.92844885116443, 10.262437462806701);
	map.setCenter(center, 16);
	GEvent.addListener(map, "moveend", function() {var center = map.getCenter();document.getElementById("message").innerHTML = "coordinate: "+center.toString();});
	map.setMapType(G_PHYSICAL_MAP);
	//G_NORMAL_MAP ; G_SATELLITE_MAP ; G_HYBRID_MAP ; G_PHYSICAL_MAP 
	//map.addControl(new GLargeMapControl3D());
	//map.addControl(new GOverviewMapControl() );
	//map.addControl(new GHierarchicalMapTypeControl() );
	var customUI = map.getDefaultUI();
	map.setUI(customUI);
 
	//GSmallZoomControl3D
	function createMarker(point, strT, index) {  
		if ( typeof index == "undefined"){ index = 0} 
		var marker = new GMarker(point, new GIcon(G_DEFAULT_ICON));
		GEvent.addListener(marker, "click", function() {    marker.openInfoWindowHtml(strT);  });  
		return marker;
	};
	//protezione civile
    map.addOverlay(createMarker(center,"<a href='default.aspx?Pre=<%=Pre%>' style='font-size:16pt'><b>Protezione Civile <br/>Capezzano Pianore</b></a><hr width='100px'>Presso la Misericordia<br/> di Capezzano Pianore."));
	//Grafica Luna
    map.addOverlay(createMarker(new GLatLng(43.92356906317615, 10.266433954238891),"<a href='http://www.graficaluna.com/' style='font-size:16pt'>Grafica Luna</a><hr width='100px'>Grafica pubblicitaria.",2));  
  	//Sestante Informatica 
	map.addOverlay(createMarker(new GLatLng(43.87143120882764, 10.25550127029419),"<a href='http://www.sestanteinformatica.it/' style='font-size:16pt'>Sestante Informatica</a><hr width='100px'>Sistemi Gestionali<br>Reti informatiche.",3));  
  	//Cyberstudio
	map.addOverlay(createMarker(new GLatLng(43.91270304594629, 10.272517204284668) ,"<a href='http://www.graficaluna.com/' style='font-size:16pt'>CyberStudio</a><hr width='100px'>Siti WEB informatica st.",2));  
	};
};


