function expand (postid)
{
	whichpost = document.getElementById(postid);
	whichpost.className="shown";
}

function collapse (postid)
{
	whichpost = document.getElementById(postid);
	whichpost.className="texthidden";
}

function expandcollapse (postid)
{
	whichpost = document.getElementById(postid);
	if (whichpost.className=="shown") {
		whichpost.className="texthidden";
	}
	else {
		whichpost.className="shown";
	}
}

function expand3oumais (postexpandindo, postpadrao, postoutros) {
	expandindo = document.getElementById(postexpandindo);
	padrao = document.getElementById(postpadrao);
	outros = document.getElementById(postoutros);
	if (expandindo.className=="shown") {
		collapse(postexpandindo);
		expand(postpadrao);
	}
	else if (padrao.className=="shown"||outros.className=="shown") {
		collapse(postpadrao);
		expand(postexpandindo);
	}
	for ( i = 0 ; i < postoutros.length ; i++ )
		collapse(postoutros[i]);
}

function expandproximo ( postsnasequencia ){
	for ( i=0 ; i<postsnasequencia.length ; i++ ) {
		postatu = document.getElementById ( postsnasequencia[i] );
		if (postatu.className=="shown"){
			iprox = i + 1;
		}
		if (iprox == postsnasequencia.length) {
			iprox = 0;
		}
		collapse ( postsnasequencia[i] )
	}
	expand ( postsnasequencia[iprox] );
	return iprox;
}

function expandanterior ( postsnasequencia ){
	for ( i=0 ; i<postsnasequencia.length ; i++ ) {
		postatu = document.getElementById ( postsnasequencia[i] );
		if (postatu.className=="shown"){
			iprox = i - 1;
		}
		if (iprox == - 1) {
			iprox = postsnasequencia.length - 1;
		}
		collapse ( postsnasequencia[i] );
	}
	expand ( postsnasequencia[iprox] );
	return iprox;
}

function func_href ( postid , ahref ) {

}