function removeElement(arr, sElement)
{
	var tmp = new Array();
	for (var i = 0; i<arr.length; i++) if (arr[i] != sElement) tmp[tmp.length] = arr[i];
	arr=null;
	arr=new Array();
	for (var i = 0; i<tmp.length; i++) arr[i] = tmp[i];
	tmp = null;
	return arr;
}

function SectionClick(id)
{
	var div = document.getElementById(id);
    var opened_sections = ['variants', 'direction', 'structures', 'ordens', 'orden1', 'orden1_1', 'orden2', 'orden2_1', 'lawdef', 'project1', 'project1_1'];
	if (div.className == "hidden")
	{
		opened_sections[opened_sections.length]=id;
	}
	else
	{
		opened_sections = removeElement(opened_sections, id);
	}  
	div.className = div.className == 'hidden' ? 'shown' : 'hidden';
}				 

