var geocoder;
var map;
var gdir;

function addToMap(point)
{
    if (point != null)
    {
        map.setCenter(point, 13);
        marker = new GMarker(point);
        map.addOverlay(marker);
    } 
    else 
    {
        document.getElementById("map").innerHTML = "Non è stato trovato il punto sulle mappe.";
    }
}

function setDirections(fromAddress, toAddress, locale) 
{
	document.getElementById("googledir").innerHTML = "";
	if (toAddress == null) toAddress = address;
	gdir.load("from: " + fromAddress + " to: " + toAddress, { "locale": locale });
}

function handleErrors()
{
	document.getElementById("googledir").innerHTML = "<strong style='color: red'>Non è stato possibile calcolare il percorso.</strong>"
}

function onGDirectionsLoad()
{ 
}


