/* expanding links */

function hideDivs(exempt)
{
  if (!document.getElementsByTagName) return null;
  if (!exempt) exempt = "";
  var divs = document.getElementsByTagName("div");
  for(var i=0; i < divs.length; i++)
  {
	if ((divs[i].className == "feature") && (divs[i].id != exempt))
    {
      divs[i].style.display = "none";
    }
  }
}

function resetLinks()
{
	var as = document.getElementsByTagName("a");
	for(var i=0; i < as.length; i++)
	{
		if(as[i].className == "expand")
		{
			as[i].style.backgroundPosition = "bottom left";
		}
	}
}

function showhide(what,thisLink)
{
	if (!document.getElementById) return null;
	
	showWhat = document.getElementById(what);
	
	if(showWhat.style.display == "block"){
		//collapse this item
		showWhat.style.display = "none";
		thisLink.style.backgroundPosition = "bottom left";
		thisLink.blur();
	}
	
	else {
		//we need to expand this item
		showWhat.style.display = "block"; //display this item
		hideDivs(what); //collapse any other items
		resetLinks(); //make sure the previous active link doesn't point down anymore
		thisLink.style.backgroundPosition = "top left"; //make this link point down
		thisLink.blur();
	}
}
