//The file offer the ability for an area to have the ability to open and close a single instance or to open and close all
//Edited 8-4-08 by Will Morrison, the javascript King



function addLoadEvent(func)
{
	var oldonload = window.onload;
	if(typeof window.onload!= 'function')
	{
		window.onload = func;
	}
	else
	{
		window.onload = function()
		{
			oldonload();
			func();
		}
	}
}

function prepareDropDowns()
{
	if(!document.getElementsByTagName) return false;
	if(!document.getElementById) return false;
	if(!document.getElementById("expand")) return false;
	var topic = document.getElementById("expand");
	var links = topic.getElementsByTagName("a");
	for(var i = 0; i < links.length; i++)
	{	
		links[i].onclick = function()
		{
			return operateDropDowns(this.getAttribute("title"));
		}
	}
}

function operateDropDowns(whichdiv)
{
	var dropper = document.getElementById(whichdiv);
	if(dropper.style.display == 'block')
	{
		dropper.style.display = 'none';	
	}
	else
	{
		dropper.style.display = 'block';
	}
	return false;
}

addLoadEvent(prepareDropDowns);
