/*
This code is based on a code example from the article "Javascript navigation - cleaner, not meaner" by Christian Heilmann
URL: http://www.evolt.org/article/Javascript_navigation_cleaner_not_meaner/17/60273/index.html
Modified by Christa Dickson
*/
function show(s, source) {
	//alert("This is the id: " + s);
	element = document.getElementById(s);
	element.style.display = 'block';
	//element.className = "shown";
	if(source){
		source.style.display = 'none';
		source.className = 'hidden';
	}
	//this.onclick = function(){ hide(s); }
}

function hide(s) {
	element = document.getElementById(s);
	element.style.display = 'none';
	element.className = "hidden";
	element.setAttribute("disabled","disabled");  
	//this.onclick = function(){ show(s); }
}
function hidethis() {
	this.style.display = 'none';
	this.className = "hidden";
	this.setAttribute("disabled","disabled");  
	//this.onclick = function(){ show(s); }
}
function hideall(){
	var things = document.getElementsByTagName("div");
	for(var i=0; i < things.length; i++){
		var thing = things[i];
		var thisclass = thing.className;
		if ((thisclass.indexOf("hidden") != -1)) { 
		  	thing.style.display = 'none';
		}
	  }	
}
// Show extra sections on the contact form
function showMoreContact(requestType){
	if(requestType == "Report a Bug" || requestType == "Report Inappropriate Behavior"){
		var showMoreID = requestType.toLowerCase();
    	showMoreID = showMoreID.replace(/ /g,'-');
		//alert("This is the id to show: " + id);
		hideall();
		show(showMoreID);
		var commentsBox = document.getElementById('request_details_label');
		if(requestType == "Suggestions"){
			commentsBox.innerHTML = 'Describe your Suggestion';
		}
		if(requestType == "Report Inappropriate Behavior"){
			commentsBox.innerHTML = 'Describe the Inappropriate Behavior';
		}
	}
	return true;
}

document.write("<style type=\"text/css\" media=\"screen\"> .hidden{ display: none; } </style>");