var rElPrevious = null;
function showdiv(divObj) {
	var mEl = document.getElementById(divObj);

	if (mEl) {
		if ((mEl.style.display == "none" || mEl.style.display == "")) {
			mEl.style.display = "block";
		} else {
			if (mEl.style.display = "block") { mEl.style.display = "none"; }
		}
		if (rElPrevious && mEl != rElPrevious) { rElPrevious.style.display = "none"; }
		rElPrevious = mEl;
	} else { rElPrevious = null; }
}
function fold(toSrc) {
	if (toSrc.parentElement) {
		divObj = toSrc.parentElement.parentElement;
	} else {
		divObj = toSrc.parentNode.parentNode;
	}

	divObj.style.display = "none";
	rElPrevious = null;
}
function customDiv() {
	whichDiv = null;
	// work out which div to display if given a hash -
	// no hash  = default div or all divs, change line below
	whichDiv = document.location.hash ? document.location.hash : '';
	whichDiv = whichDiv.replace('#','');
	// defaulting to div1
	if (whichDiv && document.getElementById(whichDiv) ) {
		if (rElPrevious) { rElPrevious.style.display = "none"; }
		document.getElementById(whichDiv).style.display="block";
		rElPrevious = document.getElementById(whichDiv);
	}
}
