');
});
GEvent.addDomListener(tstPhocaMap, 'DOMMouseScroll', CancelEventPhocaMap);
GEvent.addDomListener(tstPhocaMap, 'mousewheel', CancelEventPhocaMap);
}
}
function setDirections(fromPMAddress, toPMAddress, locale) {
dirPhocaMap.load("from: " + fromPMAddress + " to: " + toPMAddress, {"language" : "en"});
}
function handleErrors(){
if (dirPhocaMap.getStatus().code == G_GEO_UNKNOWN_ADDRESS) {
alert("No corresponding geographic location could be found for one of the specified addresses. This may be due to the fact that the address is relatively new, or it may be incorrect.");
} else if (dirPhocaMap.getStatus().code == G_GEO_SERVER_ERROR) {
alert("Request could not be successfully processed.");
} else if (dirPhocaMap.getStatus().code == G_GEO_MISSING_QUERY) {
alert("No query was specified in the input.");
} else if (dirPhocaMap.getStatus().code == G_UNAVAILABLE_ADDRESS) {
alert("Route cannot be returned due to legal or contractual reasons");
} else if (dirPhocaMap.getStatus().code == G_GEO_BAD_KEY) {
alert("The given key is either invalid or does not match the domain for which it was given.");
} else if (dirPhocaMap.getStatus().code == G_GEO_BAD_REQUEST) {
alert("Request could not be successfully parsed.");
} else if (dirPhocaMap.getStatus().code == G_GEO_UNKNOWN_DIRECTIONS) {
alert("There is no route available between the two points, or there is no data for routing in that region.");
} else if (dirPhocaMap.getStatus().code == G_GEO_TOO_MANY_QUERIES) {
alert("The given key has gone over the requests limit or has submitted too many requests in too short a period of time.");
} else {
alert("An unknown error occurred");
}
}
function initialize() {
if (GBrowserIsCompatible()) {
tstPhocaMap.setAttribute("oldValue",0);
tstPhocaMap.setAttribute("refreshMap",0);
tstIntPhocaMap=setInterval("CheckPhocaMap()",500);
}
}
google.setOnLoadCallback(initialize);
//]]>