function toggleVis(button, elemID) {
// purpose: when 'button' is clicked, hide 'elemID', and swap button image
	if (document.getElementById(elemID).style.display != "none") {
		document.getElementById(elemID).style.display = "none";
		toggleSymbol(button, "plus");
	} else {
		document.getElementById(elemID).style.display = "block";
		// detect if next element is (none), and open if so
		nextElem = document.getElementById(elemID).firstChild;
		nextElemText = nextElem.innerHTML;
		if (nextElemText.substring(nextElemText.length-6, nextElemText.length) == "(none)") {
			toggleVis(nextElem, nextElem.nextSibling.id);
		}
		toggleSymbol(button, "minus");
	}
}

function toggleSymbol(element, symbol) {
	url = "/eClassification/images/" + symbol + ".gif";
	element.style.backgroundImage = "url(" + url + ")";
}


function moveObj(elemID, posX, posY) {
	document.getElementById(elemID).style.left = posX;
	document.getElementById(elemID).style.top = posY;
}

function getHorizontalScroll() {
	var scrollY;
	if (document.all) {
		if (!document.documentElement.scrollTop) {
			scrollY = document.body.scrollTop;
		} else {
			scrollY = document.documentElement.scrollTop;
		}
	} else {
		scrollY = window.pageYOffset;
	}
	return scrollY;
}