function toggle_visibility(id) {
   var e = document.getElementById(id);
   //if(e.style.display == 'block')
	  //e.style.display = 'none';
	  document.getElementById(id).className = "hideThis";
   //else
	 // e.style.display = 'block';
}



function enableRightNavExpand() {
  	if (!document.getElementById) return false;
	if (!document.getElementById("rightNav")) return false;
	var nav = document.getElementById("rightNav");
	var navItem = nav.getElementsByTagName("li");
	for (var i = 0; i < navItem.length; i++){
		navItem[i].onclick=function() {
			if (this.className == "selected") {
				this.className = "";
			}
			else if (this.className == ""){
				this.className = "selected";
			}
		}
	}
}

var lastDiv = "";
function showDiv(divName) {
	// hide last div
	if (lastDiv) {
		document.getElementById(lastDiv).className = "hideThis";
	}
	//if value of the box is not nothing and an object with that name exists, then change the class
	if (divName && document.getElementById(divName)) {
		document.getElementById(divName).className = "nada";
		lastDiv = divName;
	}
}