function creaTesto(titolo,corpo) {
	return "<strong>" + titolo + "</strong><br/><font size=\"1\">" + corpo + "<br/>&nbsp;</font>";
}

function loadMap(cond) {
	if (cond == true) {
      if (GBrowserIsCompatible()) {
		var mytesto = creaTesto("","Albergo Ristorante Al Lago<br>Via Cattedrale, 79 San Lazzaro<br>61034 Fossombrone (PU)<br>Tel & Fax +39.0721.726129");
        var map = new GMap2(document.getElementById("cartina"));
		map.addControl(new GLargeMapControl());
		map.addControl(new GOverviewMapControl());
		map.setCenter(new GLatLng(43.709083, 12.868423), 11); 
		var point = new GLatLng(43.68219624717089, 12.768784761428833);
		var appo = createMarker(point, mytesto,1);
		map.addOverlay(appo);
		appo.openInfoWindowHtml(mytesto);
      } else {
		  alert("Le mappe di google non possono essere visualizzate sul tuo browser");
	  }
	}
}

function createMarker(point, description, index) {
	var marker = new GMarker(point);
	GEvent.addListener(marker, "click", function() {marker.openInfoWindowHtml(description);});
	gmarkers[index] = marker;
	return marker;
}
function unloadMap(cond) {
	if (cond == true) {
		GUnload();	
	}
}
function myclick(i) {
    GEvent.trigger(gmarkers[i], "click");
}
function mappa_flash() {
	w = 700
	h = 600
	l = (screen.width - w) / 2;
	t = (screen.height - h) / 2;
	if (l < 0) l = 0;
	if (t < 0) t = 0;
	newwindow = window.open('cartina.html','_blank','width='+w+',height='+h+',top='+t+',left='+l+',status=no,toolbar=no,menubar=no,location=no,directories=no,resizable=yes,scrollbars=no');
}
function mappa_flash_l(la) {
	w = 700
	h = 600
	l = (screen.width - w) / 2;
	t = (screen.height - h) / 2;
	if (l < 0) l = 0;
	if (t < 0) t = 0;
	newwindow = window.open('cartina-'+la+'.html','_blank','width='+w+',height='+h+',top='+t+',left='+l+',status=no,toolbar=no,menubar=no,location=no,directories=no,resizable=yes,scrollbars=no');
}
function foto(url,w,h) {
	l = (screen.width - w) / 2;
	t = (screen.height - h) / 2;
	if (l < 0) l = 0;
	if (t < 0) t = 0;
	newwindow = window.open('foto.php?ob='+url,'_blank','width='+w+',height='+h+',top='+t+',left='+l+',status=no,toolbar=no,menubar=no,location=no,directories=no,resizable=yes,scrollbars=no');
}
function apri2(url,w,h) {
	l = (screen.width - w) / 2;
	t = (screen.height - h) / 2;
	if (l < 0) l = 0;
	if (t < 0) t = 0;
	newwindow = window.open(url,'_blank','width='+(w+20)+',height='+h+',top='+t+',left='+l+',status=no,toolbar=no,menubar=no,location=no,directories=no,resizable=yes,scrollbars=yes');
}

