// Trata o podcast
// Bloco é o ID do elemento onde o conteúdo será adicionado
function podcast(subtitulo, rodape, bloco)
{
  lkn = rodape.split("|");
  HTML = '<a href="'+lkn[2]+'">';
  HTML += '  <h6>PODCAST</h6>';
  HTML += '	<p id="textoTopo">'+subtitulo+'</p>';
  HTML += '</a>';
  
  document.getElementById(bloco).innerHTML = HTML;
}

function linkmaker(text) {
	if (text != '|||||||||||') {
		e = text.split('|');
		for (n=0; n<e.length; n=n+3) {
			if (e[n] != '') {
				document.write('<a href='+e[n+2]+' id=a10nb>');
			}
		}
	}
}


//Muda abas do canal Ciência
function mudaAba(revista, abaIndex) {

	for (i = 0; i < 3; i++) {
	  var abaX = document.getElementById("abasRevistas").getElementsByTagName("li")[i];
		var abaY = document.getElementById(abaIndex);
	
		//Muda classe da Aba
		if (abaY.id == abaX.id) {
			abaY.className = "selecao";
		}
		else {
			abaX.className = "";
			abaX.blur();
		}
	}

	if (revista == "cienciaHoje") {
		document.getElementById("cienciaHoje").style.display = "block";
		document.getElementById("scientificAmerican").style.display = "none";
		document.getElementById("superInt").style.display = "none";
	}

	if (revista == "scientificAmerican") {
		document.getElementById("cienciaHoje").style.display = "none";
		document.getElementById("scientificAmerican").style.display = "block";
		document.getElementById("superInt").style.display = "none";
	}
	if (revista == "superInt") {
		document.getElementById("cienciaHoje").style.display = "none";
		document.getElementById("scientificAmerican").style.display = "none";
		document.getElementById("superInt").style.display = "block";
	}


}