         var map = null;
         var SpaceNeedle = new VELatLong(41.945129389502995, 12.773815932410972);

		 function initMap(theLat, theLong, theTitle)
		 {
		 	SpaceNeedle = new VELatLong(theLat, theLong);
		 	GetMap();
		 	HideDashboard();
		 	setMapTitle(theTitle);
		 }

         function GetMap()
         {
            map = new VEMap('myMap');
            map.LoadMap(SpaceNeedle, 17);
            var options = new VERouteOptions();
            options.DistanceUnit = VERouteDistanceUnit.Kilometer;
            // Let me know if a birdseye scene is available
            map.AttachEvent("onobliqueenter", OnObliqueEnterHandler);
         }

         function GoMap(theLat, theLong, theTitle)
		 {
		 	SpaceNeedle = new VELatLong(theLat, theLong);
		 	setMapTitle(theTitle);
		 	map.LoadMap(SpaceNeedle, 17);
		 	map.SetBirdseyeScene(SpaceNeedle);
		 	map.SetZoomLevel(2); //per birdseyee 2 è il max
		 }

     	  function ReCenter()
     	  {
		 	map.LoadMap(SpaceNeedle, 17);
		 	map.SetBirdseyeScene(SpaceNeedle);
		 	map.SetZoomLevel(2); //per birdseyee 2 è il max
          }

         function OnObliqueEnterHandler()
         {
            if(map.IsBirdseyeAvailable())
            {
               map.SetBirdseyeScene(SpaceNeedle);
               map.SetZoomLevel(2); //per birdseyee 2 è il max
            }
         }

         function setMapTitle(theTitle)
         {
          	if(theTitle > "")
	 	        document.getElementById('locationName').innerHTML = theTitle;
		 	else
	 	    	document.getElementById('locationName').innerHTML = ".";
         }
	     function ShowDashboard()	{ map.ShowDashboard(); }
	     function HideDashboard()	{ map.HideDashboard(); }
	     function DoZoomIn()  		{ map.ZoomIn(); }
	     function DoZoomOut()  		{ map.ZoomOut(); }

