var aList = new Array();
var k = false;

function ShowHide(a)
{
	k = !k;
	for (var i=0; i<aList.length; i++)
	{
		var id = aList[i].hash.replace(/#/, '');
		if (a != null)
		{
			k = true;
			document.getElementById(id).style.display = (aList[i] == a) ? 'block' : 'none';
		}
		else
		{
			document.getElementById(id).style.display = k ? 'block' : 'none';
		}
	}
	if (document.all) document.getElementById("footer").style.position = k ? 'static' : 'absolute';
	return false;
}

function autoLoad()
{
	if (anchors = document.getElementsByTagName("a"))
	{
		var j = -1;
		for (var i=0; i<anchors.length; i++)
		{
			if (anchors[i].className == "blank") anchors[i].target = "_blank";
			if (anchors[i].className == "view")
			{
				j++;
				aList[j] = anchors[i];
				anchors[i].onclick = function() { return ShowHide(this); }
			}
			if (anchors[i].className == "fullview")
			{
				anchors[i].onclick = function() { return ShowHide(); };
			}
		}
	}
}
try
{
	window.addEventListener("load", autoLoad, true);
}
catch(e)
{
	window.attachEvent("onload", autoLoad);
}

