function sw(a,i,show)
{
	if (show==true)
	{
		a.style.display="block";
		var app=i.src.substr(0,i.src.lastIndexOf('/'));
		i.src=app+"/TreeMinus.gif";
	}
	else
	{
		a.style.display="none";
		var app=i.src.substr(0,i.src.lastIndexOf('/'))
		i.src=app+"/TreePlus.gif";
	}
}
function htsh(id)
{
	a=this.document.getElementById('a'+id);
	i=this.document.getElementById('i'+id);
	sw(a,i,(a.style.display!="block"));	
}

function goToId(id)
{
	a=this.document.getElementById('a'+id);
	i=this.document.getElementById('i'+id);
	sw(a,i,true);
	this.document.location="#q"+id;
}

function shAll(show)
{
	var arr=this.document.getElementsByTagName("div");
	var len=arr.length;
	var a,id,i;
	for(j=0;j<len;j++)
	{		
		a=arr[j];
		if (a.className=="answer")
		{			
			id=a.id.substr(1);
			i=this.document.getElementById('i'+id);
			sw(a,i,show);
		}
	}
}
