var indicePagina = 0;
//var totalPaginas = 0;

//writeUOLBar();

function irProximo(id) {
		
	indicePagina++;
	var tabela = window.document.getElementById(id);
	var tabelaConteudo = window.document.getElementById(id + "_tbConteudo");
	
	tabelaConteudo.rows[0].cells[0].innerHTML = tabela.rows[indicePagina].cells[0].innerHTML;
	
	document.getElementById('hlAnterior').style.visibility = "visible"
	
	if(indicePagina == totalPaginas-1)
		document.getElementById('hlProximo').style.visibility = "hidden"
}

function irAnterior(id) {
		
	indicePagina--;
	var tabela = window.document.getElementById(id);
	var tabelaConteudo = window.document.getElementById(id + "_tbConteudo");

	tabelaConteudo.rows[0].cells[0].innerHTML = tabela.rows[indicePagina].cells[0].innerHTML;
	
	document.getElementById('hlProximo').style.visibility = "visible"
	
	if(indicePagina == 0)
		document.getElementById('hlAnterior').style.visibility = "hidden"
}

var tvticker_indiceImagem = 0;
function tvticker_exibir(id, indice, src) {
	tvticker_indiceImagem = parseInt(indice);
	var container = window.document.getElementById(id);
	container.style.backgroundImage = "url(" + src + ")";
}
function tvticker_avancar(id) {
	var container = window.document.getElementById(id);
	var imagens = container.rows[0].cells[1].innerText.split('|');
	tvticker_indiceImagem++;
	if(tvticker_indiceImagem == imagens.length) { tvticker_indiceImagem = 0; }
	container.style.backgroundImage = "url(" + imagens[tvticker_indiceImagem] + ")";
}
function tvticker_retroceder(id) {
	var container = window.document.getElementById(id);
	var imagens = container.rows[0].cells[1].innerText.split('|');
	tvticker_indiceImagem--;
	if(tvticker_indiceImagem == -1) { tvticker_indiceImagem = imagens.length-1; }
	container.style.backgroundImage = "url(" + imagens[tvticker_indiceImagem] + ")";
}