//Toggles the visibility of elements
function show_hideItem(ID){
	var e = document.getElementById(ID);
	
	if(e.style.display!="block" && e.style.display!="none"){
		e.style.display = "block";
		}
	
	if(e.style.display=="none"){
		e.style.display = "block";
		}else{
		e.style.display = "none";
		}
	}	
function swap(on,off){
	document.getElementById(on).style.display="block";
	document.getElementById(off).style.display="none";
}//end function

function gotoMonth(){
	var timestamp = document.getElementById("monthSelector").value;
	location.href="education.php?Time="+timestamp;
}//end function

function showPost(ID){
 	//Make sure thread_post div is showing
	swap('thread_post','hiddenDiv');
	
	vars = "function_name=grabSurveyBoardPostsProfile&param1="+ID;
	
	updateContentArea('thread_post',vars,'run.php');
	
}//end function

//Shrinks the left hand side
function moveLeft(){
	var left = document.getElementById('thread_left');
	var right = document.getElementById('thread_right');

	if(left.style.display=="none" || right.style.display=="none"){
		left.style.width = "45%";
		left.style.display = "block";
		right.style.display = "block";			
		right.style.width = "45%";	
	}else{
		left.style.width = "1%";
		left.style.display = "none";
		right.style.width = "90%";
	}	
}

//Shrinks the right hand side
function moveRight(){
	var left = document.getElementById('thread_left');
	var right = document.getElementById('thread_right');

	if(left.style.display=="none" || right.style.display=="none"){
		left.style.width = "45%";
		left.style.display = "block";
		right.style.display = "block";		
		right.style.width = "45%";	
	}else{
		right.style.width = "1%";
		right.style.display = "none";
		left.style.width = "90%";
	}	
}
