function MapLegend() {
}



MapLegend.changeTitle = function(title) {
	setInnerHTML("map_legend_title", title);
}

MapLegend.changeMapLegendContent = function(content) {
	setInnerHTML("map_legend_content", content);
}

MapLegend.showLegend = function() {
	setDisplay("map_legend", "block");
}

MapLegend.hideLegend = function() {
	setDisplay("map_legend", "none");
	MapLegend.changeTitle("&nbsp;");
	MapLegend.changeMapLegendContent("&nbsp;");
}

MapLegend.toggleMapLegendContentVis = function() {
	var container = document.getElementById("map_legend_content");
	var button = document.getElementById("btn_ml_vis");
	if (container.style.display == "none") {
		container.style.display = "block";
		button.src = "/nvs/images/misc_buttons/btn_collapse_map_controls.gif";
	} else {
		container.style.display = "none";
		button.src = "/nvs/images/misc_buttons/btn_expand_map_controls.gif";
	}
}



MapLegend.changeAlertTitle = function(title) {
	setInnerHTML("map_alert_title", title);
}

MapLegend.changeAlertContent = function(content) {
	setInnerHTML("map_alert_content", content);
}

MapLegend.changeAlertImage = function(img) {
	setSrc("map_alert_img", img);
}

MapLegend.changeAlertImageTitle = function(text) {
	setTitle("map_alert_img", text);
}

MapLegend.showAlert = function() {
	setDisplay("map_alert", "block");
}

MapLegend.hideAlert = function() {
	setDisplay("map_alert", "none");
	MapLegend.changeAlertTitle("&nbsp;");
	MapLegend.changeAlertImage("/images/spacer.gif");
	MapLegend.changeAlertImageTitle("");
}

MapLegend.showAlertContent = function() {
	var container = document.getElementById("map_alert_content");
	var button = document.getElementById("btn_ma_vis");
	container.style.display = "block";
	button.src = "/nvs/images/misc_buttons/btn_collapse_map_controls.gif";
}

MapLegend.toggleAlertContentVis = function() {
	var container = document.getElementById("map_alert_content");
	var button = document.getElementById("btn_ma_vis");
	if (container.style.display == "none") {
		container.style.display = "block";
		button.src = "/nvs/images/misc_buttons/btn_collapse_map_controls.gif";
	} else {
		container.style.display = "none";
		button.src = "/nvs/images/misc_buttons/btn_expand_map_controls.gif";
	}
}

