function GetMap(lat,long,zoom)
         {
		 	var VA = new VELatLong(lat,long);			 
            map = new VEMap('myMap');
            map.LoadMap(VA, zoom, VEMapStyle.Road, false, VEMapMode.Mode2D, true, 1);

            AddPin();
         }
		 
		 function AddPin()
         {
			var pinPoint = null;
    	     var pinPixel = null;
            // Add a new pushpin to the center of the map.
			map.Clear();
			
            pinPoint = map.GetCenter();
            pinPixel = map.LatLongToPixel(pinPoint);
            map.AddPushpin(pinPoint);
         }
		 function getRoute()
		 {		
            var locations;
			from=document.getElementById("from").value;         
			to=document.getElementById("to").value;
			//alert(from);
			//alert(to);
	     	locations = new Array(from,to);

            var options1 = new VERouteOptions;     
            options1.DrawRoute      = true;
            // So the map doesn't change:
            options1.SetBestMapView = true;
            // Call this function when map route is determined:
            //options.RouteCallback  = ShowTurns;
            // Show as miles
            options1.DistanceUnit   = VERouteDistanceUnit.Mile;
            // Show the disambiguation dialog
            options1.ShowDisambiguation = true;
            map.GetDirections(locations, options1);
//            map.GetRoute(document.getElementById("from"),document.getElementById("to"));
		}
		function findLoc()
         {
            try
            {
               results = map.Find(null,
                                  document.getElementById("where").value,
                                  null,
                                  null,
                                  null,
                                  null,
                                  true,
                                  true,
                                  true,
                                  true,
                                  null);
               // index = parseInt(index)+9;
            }
            catch(e)
            {
               alert(e.message);
            }
         }
        
         /*function MoreResults(layer, resultsArray, places, hasMore, veErrorMessage)
         {
            if(hasMore)
            {
               var r = "<a href='#' onclick='javascript:FindLoc(parseInt(txtNumResults.value));'>" +
                       "Click for More Results</a>";
               document.getElementById('results').innerHTML = r;
            }
            else
            {
               index=0;
               number=Number(txtNumResults.value); 
               document.getElementById('results').innerHTML = "";
               document.getElementById('results').innerHTML = "No More Results Available";
            }
         }
*/

