var map;
var gdir;
var ort;
var zielAdresse;

function setDirectionsLat(latlng) {
	gdir.loadFromWaypoints(new Array(latlng, new GLatLng(adresse[1], adresse[2])));
}

function setDirections(fromAddress, fromStreet) {
	gdir.load("from: " + fromAddress + " " + fromStreet + " to: " + zielAdresse, { "locale": "de_DE" });
}

function handleErrors(){
   if (gdir.getStatus().code == G_GEO_UNKNOWN_ADDRESS || gdir.getStatus().code == G_GEO_MISSING_QUERY)
	 alert("Die gesuchte Adresse wurde nicht gefunden.");
   else if (gdir.getStatus().code == G_GEO_SERVER_ERROR || gdir.getStatus().code == G_GEO_BAD_KEY || gdir.getStatus().code == G_GEO_BAD_REQUEST)
	 alert("Der Geo-Server wurde nicht erreicht.");
   else alert("Es ist ein fehler aufgetreten.");
}

function onGDirectionsLoad(){
	//hier hide / show on direction find
}
