var map = null;
var pinid = 0;
var icon = '<img src="fileadmin/images/ApoMapSymb.png" alt="" width="25" height="25" />';
var title = null;
var description = null;

function AddPushpin()
{
	var shape = new VEShape(VEShapeType.Pushpin, map.GetCenter());
	shape.SetCustomIcon(icon);
	shape.SetTitle("<h2>" + title + "</h2>");
	shape.SetDescription(description);
	map.AddShape(shape);
	pinid++;
}		

function GetMap(searchString, t, d)
{
	title = t;
	description = d;
	
	map = new VEMap('VEMap');
	//map.HideScalebar();
	map.HideDashboard();
	map.LoadMap();
	map.SetScaleBarDistanceUnit(VEDistanceUnit.Kilometers);
	map.Find(null, searchString, null, null, null, null, null, null, null, null, findCompleted);
}   

function findCompleted()
{
	AddPushpin();
	map.SetZoomLevel(15);
}

