///////////////////////////////////////////////////////////////////////
// icon manipulation scripts
///////////////////////////////////////////////////////////////////////
function clear_layertoolicons(exception) {
	// turn all layer icons off
	if (exception != 'mapplusicon') {
		document.getElementById("mapplusicon").className = "mapplusicon";
	}
	if (exception != 'mapxicon') {
		document.getElementById("mapxicon").className = "mapxicon";
	}
	if (exception != 'mapallicon') {
		document.getElementById("mapallicon").className = "mapallicon";
	}
	if (exception != 'mapcosticon') {
		document.getElementById("mapcosticon").className = "mapcosticon";
	}
}
function clear_maptoolicons(exception) {
	// turn all map icons off
	if (exception != 'mapselecticon' && document.getElementById("mapselecticon")) {
		document.getElementById("mapselecticon").className = "mapselecticon";
	}
	if (exception != 'mappanicon') {
		document.getElementById("mappanicon").className = "mappanicon";
	}
	if (exception != 'mapzoominicon') {
		document.getElementById("mapzoominicon").className = "mapzoominicon";
	}
	if (exception != 'mapzoomouticon') {
		document.getElementById("mapzoomouticon").className = "mapzoomouticon";
	}
	// the move point icons does not always appear
	if (exception != 'mapmovepointicon' && document.getElementById("mapmovepointicon")) {
		document.getElementById("mapmovepointicon").className = "mapmovepointicon";
	}
}
function push_button(icon) {
	// then push this icon down
	if (document.getElementById(icon).className == icon + "_down") {
		// button was down
		document.getElementById(icon).className = icon;
	} else {
		// button was up
		document.getElementById(icon).className = icon + "_down";
	}
}
function restore_button(icon) {
    document.getElementById(icon).className = icon;
}
///////////////////////////////////////////////////////////////////////
// show or hide loading banner
///////////////////////////////////////////////////////////////////////
var loading = false;
function showLoading() {
    loading = true;
    positionLayer(loadImageId,(mapWidth/2)-(loadingWidth/2),(mapHeight/2)-(loadingHeight/2),positionLayerId);
    showLayer(loadImageId);
    
}
function hideLoading() {
    loading = false;
    hideLayer(loadImageId);
    
}

