function OnClickHandler(aLink,isPU,aTg)
{
//alert("aLink=" + aLink + ", isPU=" + isPU + ", aTg=" + aTg);
	if(!IsNill(aLink))
	{
		if(!IsNill(isPU) && isPU)
		{
			open(aLink);
		}
		else 
		{
			if ( !IsNill(aTg) && aTg!= "main" && !IsNill(frames[aTg]) )
				frames[aTg].location.href = aLink;
			else 
				location.href = aLink;
		}
	}
}

/* Fun‡”es para colapsar e expandir conteudos - tipo FAQ */
function toggleAllBlocks(bExpand)
{
	var o, n;	
	
	n = 0;
	while (true)
	{
		o = document.getElementById("bloco" + n + "_detail");
		if (o == null) break;
		o.style.display = bExpand ? "" : "none";
		n+=1;
	}

	n = 0;
	while (true)
	{
		o = document.getElementById("bloco" + n + "_img");
		if (o == null) break;
		o.src = "appImages/seta-" + (bExpand ? "colapsa" : "expande") + ".gif";
		n+=1;
	}
	
	document.getElementById("collapseAll").style.display = bExpand ? "" : "none";
	document.getElementById("expandAll").style.display = bExpand ? "none" : "";		
}


function toggleBlock(id)
{
	//alert('toggleBlock ' + id);
	var oBlockDetail = document.getElementById(id + "_detail");
	var oBlockImg = document.getElementById(id + "_img");
	
	if (oBlockDetail.style.display == "none")
	{
		oBlockDetail.style.display = "";
		oBlockImg.src = "appImages/seta-colapsa.gif";
	}
	else
	{
		oBlockDetail.style.display = "none";
		oBlockImg.src = "appImages/seta-expande.gif";
	}
		
	oBlockImg.scrollIntoView(true);	
}
