var supported = (document.getElementById || document.all);

if (supported)
{
	document.write("<STYLE TYPE='text/css'>");
	document.write(".exhibitList {display: none}");
	document.write("</STYLE>");

	var max = 7;
	var shown = new Array();
	for (var i=1;i<=max;i++)
	{
		shown[i+1] = false;
	}

}

function blocking(i)
{
	if (!supported)
	{
		alert('This link does not work in your browser.');
		return;
	}
	shown[i] = (shown[i]) ? false : true;
	current = (shown[i]) ? 'block' : 'none';
	sign = (shown[i]) ? '- ' : '+ ';
	
	if (document.getElementById)
	{
		document.getElementById('exhibitCat'+i).style.display = current;
		
	}
	else if (document.all)
	{
		document.all['exhibitCat'+i].style.display = current;
	}
	
	replace('exhibitButton'+i, sign);
}

function replace(id, textitem){
	
	var newNode = document.createElement("span");
	newNode.setAttribute("id", id);
	
	var newText = document.createTextNode(textitem);
	newNode.appendChild(newText);
	
	var oldNode = document.getElementById(id);
	var parent = document.getElementById(id).parentNode;
	
	parent.replaceChild(newNode, oldNode);
}