    // JScript source code
var andamento = true;

function exibirNoticia(indice,controlId,classe,classeSel,velocidade,origem) {
	if(origem == null && !andamento) return;
	
    var tempControlId = controlId;
    if(window.document.getElementById(controlId + "_tbIndices") == null) {
        tempControlId = "componente2__ctl0_" + controlId;
    }
    
	var indices = window.document.getElementById(tempControlId + "_tbIndices").getElementsByTagName("TD");
	var maxIndice = (indices.length+1);
	if(parseInt(indice)==maxIndice || parseInt(indice)>maxIndice)indice=1;

	for(var i=0; i<indices.length; i++) {
		indices[i].className = classe;
	}
	indices[parseInt(indice)-1].className = classeSel;
	
	var manchetes = window.document.getElementById(tempControlId + "_tbManchetes").getElementsByTagName("TD");
	
	for(var i=0; i<manchetes.length; i++) {
		manchetes[i].style.display = "inline";
		manchetes[i].style.display = "none";
	}
	manchetes[parseInt(indice)-1].style.display = "inline";
	manchetes[parseInt(indice)-1].style.display = "block";
	
	indice=parseInt(indice)+2;
	if(andamento) {
		setTimeout("exibirNoticia("+indice+",'"+controlId+"','"+classe+"','"+classeSel+"',"+velocidade+");", (parseInt(velocidade)*1000));
	}
}

function exibirNoticiaClick(indice,controlId,classe,classeSel,velocidade) {
	andamento = false;
	exibirNoticia(indice,controlId,classe,classeSel,velocidade,"click");
}
