
var g_imageId = -1;

function init() {		
	loadMap();	
	if (g_imageId == -1) {
		$("picture").style.display = "none";
	} else {
		selectImage(g_imageId);
	}
}

function selectImage(i) {
	$("picture").style.backgroundImage = "url(GetImage.aspx?obj=Org&ThumbNail=N&ID=" + i + ")";	
}

function loadMap() {    
	var map = new GMap2($("map"));
	// map.centerAndZoom(new GPoint(Longitude, Latitude), 4);
	map.setCenter(new GLatLng(Latitude, Longitude), 11);
		
	map.addControl(new GSmallMapControl());
	map.addControl(new GMapTypeControl());
	map.addControl(new GOverviewMapControl());
		
	var marker = new GMarker(new GPoint(Longitude,Latitude));
	map.addOverlay(marker);			
}   

Behaviour.addLoadEvent(init);

