////
////  Javascript to show and hide the requirement text on the /mba/requirements.html page
////

//
//  Variables
//

//  Variables to contain the plus and minus image locations
var plusImage = "box_plus.gif";
var minusImage = "box_minus.gif";


//
//  Function definitions
//

//  Function to draw the html-based plus/minus button
function doButton (name)
{
	//  Create a string to output
	var o = "";
	
	
	//  Start a link
	o += "<a href=\"javascript:doToggle('"+name+"');\" title=\"Open/close description\">";
	
	
	//  Add the image tag to the output
	o += "<img id=\"img_"+name+"\" src=\""+plusImage+"\" border=\"0\" />";
	
	
	//  Close the link
	o += "</a>";
	
	
	//  Write to the document
	document.write(o);
	
};











//  Function to toggle the element
function doToggle (id)
{
	//  Look for the elements in question
	var elmnt = document.getElementById("class_"+id);
	var img = document.getElementById("img_"+id);
	
	//  Check the element's display prop
	if (elmnt.style.display == "inline")
	{
		//  Set the image and description to go away
		elmnt.style.display = "none";
		img.src = plusImage;
		elmnt.parentNode.className = "entry";
		
	} else
	{
		//  Show the image and description
		elmnt.style.display = "inline";
		img.src = minusImage;
		elmnt.parentNode.className = "entry open";
		
	};
	
};