// shows and hides elements by ID. 
// Used for sidenav

<!--
// This function will show the id and hide the all members of the class that you pass to it 
// This is used for the side navigation
function showhide(id,hideThisClass) {
	 if (document.getElementById){ 
		 obj = document.getElementById(id); 
		 if (obj.style.display == "none"){ 		// If the id isn't visible, show all of the class and show the id
			 hideAllDivs(hideThisClass);
			 obj.style.display = "block"; 
		 } else { 								// If the id is already visible, hide it 
			 obj.style.display = "none"; 
		 } 
	 } 
}

// This function shows the id you pass it 
// This is called by subpages to make sure the side menu it is found in is expanded
function show(id) {
	 if (document.getElementById){ 
		 obj = document.getElementById(id); 
		 obj.style.display = "block"; 
	 } 
}

function hide(id) {
	 if (document.getElementById){ 
		 obj = document.getElementById(id); 
		 obj.style.display = "none"; 
	 } 
}

function getElementsByClass(searchClass,node,tag) {
	var classElements = new Array();
	if ( node == null )
		node = document;
	if ( tag == null )
		tag = '*';
	var els = node.getElementsByTagName(tag);
	var elsLen = els.length;
	var pattern = new RegExp("(^|\\\\s)"+searchClass+"(\\\\s|$)");
	for (i = 0, j = 0; i < elsLen; i++) {
		if ( pattern.test(els[i].className) ) {
			classElements[j] = els[i];
			j++;
		}
	}
	return classElements;
}
function hideAllDivs(classToHide){ 
	var arrayOfDivs = getElementsByClass(classToHide);
	for (var i=0; i<arrayOfDivs.length; i++) {
		arrayOfDivs[i].style.display="none"; 
	}
}




-->

