Please help, I get the following error in my page:Pubsxx

TypeError: calcRoute is not a function


calcRoute();



Code:
function calcRoute() {
alert("pub:"+ location2);
 var directionsService = new google.maps.DirectionsService(),
 directionsDisplay = new google.maps.DirectionsRenderer(),
 createMap = function (start) {
 var travel = {
 origin : (start.coords)? new google.maps.LatLng(start.lat, start.lng) : start.address,
 destination : location2,
 travelMode : google.maps.DirectionsTravelMode.DRIVING
 // Exchanging DRIVING to WALKING above can prove quite amusing :-)
 };
 
 map = new google.maps.Map(document.getElementById("map"), mapOptions);
 directionsDisplay.setMap(map);
 directionsDisplay.setPanel(document.getElementById("map-directions"));
 directionsService.route(travel, function(result, status) {
                         if (status === google.maps.DirectionsStatus.OK) {
                         directionsDisplay.setDirections(result);
                         }
                         });
 };
}