//*****************************************************************************
// map_retrieval.js
//
// library functions for toggling 'map retrieval' image
// loaded into map.asp and map_status_bar.htm
// requires the following js modules: retrieval_dhtml.js
//
//*****************************************************************************

// put up the "RetrieveMap" image
function showRetrieveMap() {
	if (hasLayer("LoadMap")) {
		//assumes retrieving map labels 200 px wide
		var halfLblWidth = 100;			
		var tx = parent.getMapLeft();
		var ty = parent.getMapTop();
		var tw = parent.getMapWidth();
		var th = parent.getMapHeight();
		moveLayer("LoadMap", tx+(tw/2-halfLblWidth), ty+(th/2))
		showLayer("LoadMap");
	}
}

// hide the "RetrieveMap" image
function hideRetrieveMap() {
	if (hasLayer("LoadMap")) {
		hideLayer("LoadMap");
	}
}

// put up the "theMap" image
function showMapImage() {
	if (hasLayer("theMap")) {
		showLayer("theMap");
	}
}

// hide the "theMap" image
function hideMapImage() {
	if (hasLayer("theMap")) {
		hideLayer("theMap");
	}
}

// put up the "RetrieveData" image
function showRetrieveData() {
	if (hasLayer("LoadData")) {
		////assumes retrieving map labels 200 px wide
		var halfLblWidth = 100;			
		var tx = parent.getMapLeft();
		var ty = parent.getMapTop();
		var tw = parent.getMapWidth();
		var th = parent.getMapHeight();
		moveLayer("LoadData", tx+(tw/2-halfLblWidth), ty+(th/2))
		showLayer("LoadData");
	}
}

// hide the "RetrieveData" image
function hideRetrieveData() {
	if (hasLayer("LoadData")) {
		hideLayer("LoadData");
	}
}

