//--------------------------------------------------------
// General Scripts
// File: general.js
// Author: Hal Rodriguez
// Modified Monday, August 7th, 2007
//----------------------------------------------------------------------

function toggleLayer(whichLayer) {
	// this is the way the standards work
	var div = document.getElementById( whichLayer );
	if (div != null) {
		div.style.display = div.style.display? "":"block";
	}
}
function showLayer(whichLayer) {
	var div = document.getElementById( whichLayer );
	if (div != null) {
		if (div.style.display == false) {
			div.style.display = "block";
		}
	}
}
function hideLayer(whichLayer) {
	var div = document.getElementById( whichLayer );
	if (div != null) {
		if (div.style.display != false) {
			div.style.display = "";
		}
	}
}
function showOnlyLayer(whichLayer, aOthers) {
	showLayer(whichLayer);
	for (i in aOthers) {
		if (whichLayer != aOthers[i]) {
			hideLayer(aOthers[i]);
		}
	}
}

//Image Functions
function showImg(imgId, imgSrc) {
	var img = document.getElementById( imgId );
	if (img != null) {
		img.src = imgSrc;
	}
}

//Deprecated
function toggleBox(id) {
	alert('toggleBox method is Deprecated, use toggleLayer instead.');
	if (!document.getElementById) return;
	var box = document.getElementById(id);
	//alert("box.className is " + box.className);
	if (box.className == "box_hidden") {
		box.className = "box_visible";
	} else {
		box.className = "box_hidden";
	}
}
