
var baseopacity=0
var allPageTags = new Array(); 

function colapseall(theClass) {
  //Populate the array with all the page tags
  var allPageTags=document.getElementsByTagName("*");
  //Cycle through the tags using a for loop
  for (i=0; i<allPageTags.length; i++) 
  {
    //Pick out the tags with our class name
    if (allPageTags[i].className==theClass) 
    {
      //Manipulate this in whatever way you want
        allPageTags[i].style.display='none';
        imgexp(allPageTags[i].id+'colexp');
    }
  }
}
function slowhigh(id){
obj=document.getElementById(id);
browserdetect=obj.filters? "ie" : typeof obj.style.MozOpacity=="string"? "mozilla" : ""
instantset(baseopacity)
highlighting=setInterval("gradualfade(obj)",50)
}

function slowlow(which2){
cleartimer()
instantset(baseopacity)
}

function instantset(degree){
if (browserdetect=="mozilla")
obj.style.MozOpacity=degree/100
else if (browserdetect=="ie")
obj.filters.alpha.opacity=degree
}

function cleartimer(){
if (window.highlighting) clearInterval(highlighting)
}

function gradualfade(cur2){
if (browserdetect=="mozilla" && cur2.style.MozOpacity<1)
cur2.style.MozOpacity=Math.min(parseFloat(cur2.style.MozOpacity)+0.05, 0.99)
else if (browserdetect=="ie" && cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=5
else if (window.highlighting)
clearInterval(highlighting)
}
function imgexp(img_name) {
	document.getElementById(img_name).src = '/images/expand.gif';
}
function imgcol(img_name) {
	document.getElementById(img_name).src = '/images/collapse.gif';
}

function visi(nr,opt)
{
	if (document.layers)
	{
		document.layers[nr].visibility = opt;
	}
	else if (document.all)
	{
		document.all[nr].style.visibility = opt;
	}
	else if (document.getElementById)
	{
		document.getElementById(nr).style.visibility = opt;
	}
}

function blocking(nr,opt)
{
	if (document.layers)
	{
		document.layers[nr].display = opt;
	}
	else if (document.all)
	{
		document.all[nr].style.display = opt;
	}
	else if (document.getElementById)
	{
		document.getElementById(nr).style.display = opt;
	}
}
function blockingswitch(nr)
{
	/*if (document.layers)
	{
		if (document.layers[nr].display == 'none')
		{
			colapseall("block");
			current = 'block';
		}
		else
		{
			current = 'none';
		}
		document.layers[nr].display = current;
	}
	else if (document.all)
	{
		if (document.all[nr].style.display == 'none')
		{
			colapseall("block");
			current = 'block';
		}
		else
		{
			current = 'none';
		}
		document.all[nr].style.display = current;
	}
	else if (document.getElementById)
	{*/
		if (document.getElementById(nr).style.display == 'block')
		{
			current = 'none';

		}
		else
		{
			colapseall("block");
			current = 'block';

		}
		document.getElementById(nr).style.display = current;
//	}
	name = document.getElementById(nr).id+'colexp';
	if (current == 'none')
	{
		imgexp(name);
        	location.hash=nr+'a';
	}
	else
	{
		imgcol(name);
	}
}
