var map;var gdir;var geocoder = null;var addressMarker; function initialize() {if (GBrowserIsCompatible()) {map = new GMap2(document.getElementById("mapa"));map.addControl(new GLargeMapControl());gdir = new GDirections(map, document.getElementById("direc"));map.setCenter(new GLatLng(23, 48), 17);setDirections('São Paulo, SP','Taubaté, SP','pt-BR');}} function setDirections(fromAddress, toAddress, locale) {if (fromAddress == 0){alert("Indique um endereço de origem!");return;}document.getElementById("direc").innerHTML = "";gdir.load("from: " + fromAddress + " to: " + toAddress,{ "locale": locale });}
