

var g_oCurrentMap = null;
var results = null;
 

function GetMap()
{
	g_oCurrentMap = new VEMap("mapMeeting");
	g_oCurrentMap.LoadMap();
	
	setTimeout("FindLoc()", 0.25*1000 );

}

function FindLoc()
{
	try
	{
		//results = g_oCurrentMap.Find( gsName, gsAddr );
		results = g_oCurrentMap.Find( gsName, gsAddr, null, null, null, null, true, null, false, null, resolveMap );
	}
	catch(e)
	{
		alert(e.message);
	}
}



var g_oCurrentMap = null;
var g_oCurrentLayer = null;

function resolveMap( oLayer, aResults, aPlaces, bMore, sErrorMessage )
{
	if ( aPlaces != null )
	{
		var oPin;
		var	oPinPix;
		
		if ( 0 < aPlaces.length )
		{
			if ( null == oLayer )
			{
				oPin = new VEShape( VEShapeType.Pushpin, aPlaces[0].LatLong);
				if ( oPin )
					g_oCurrentMap.AddShape( oPin );
				//oPinPix = g_oCurrentMap.LatLongToPixel( aPlaces[0].LatLong );
				//g_oCurrentMap.AddPushpin( oPinPix );
				//g_oCurrentMap.Find( "", aPlaces[0] );
			}
			else
			{
				if ( 1 < aPlaces.length )
				{
					oPin = new VEShape( VEShapeType.Pushpin, aPlaces[0].LatLong);
					if ( oPin )
						g_oCurrentMap.AddShape( oPin );
				}
			}
		}
		else if ( null != aResults  &&  0 < aResults.length )
		{
			oPin = new VEShape( VEShapeType.Pushpin, aResults[0].LatLong);
			if ( oPin )
				g_oCurrentMap.AddShape( oPin );
			//oPinPix = g_oCurrentMap.LatLongToPixel( aResults[0].LatLong );
			//g_oCurrentMap.AddPushpin( oPinPix );
			//g_oCurrentMap.Find( "", aResults[0] );
		}
		else
		{
			if ( 0 < sErrorMessage.length )
				alert( sErrorMessage );
		}
	}
	g_oCurrentMap = null;
	g_oCurrentLayer = null;
}
      





