// ------------------ Función mostrar menú ÍNDICE ------------------------------------------------------------------------ //

function mostrarIndice (variable) {

	var sabana = document.getElementById("indice");
	var formato = document.getElementById(variable);

	if (formato.style.display == "none") {
		sabana.style.position = "relative";
		formato.style.display = "block";
		formato.style.position = "absolute";
		formato.style.top = "18px";
		formato.style.left = "-8px";

		if (variable == "opinion") {
			var portada = document.getElementById("portada");
			var articulos = document.getElementById("articulos");
			var entrevistas = document.getElementById("entrevistas");

			portada.style.display = "none";
			articulos.style.display = "none";
			entrevistas.style.display = "none";
		} else if (variable == "portada") {
			var opinion = document.getElementById("opinion");
			var articulos = document.getElementById("articulos");
			var entrevistas = document.getElementById("entrevistas");

			opinion.style.display = "none";
			articulos.style.display = "none";
			entrevistas.style.display = "none";
		} else if (variable == "articulos") {
			var portada = document.getElementById("portada");
			var opinion = document.getElementById("opinion");
			var entrevistas = document.getElementById("entrevistas");

			opinion.style.display = "none";
			portada.style.display = "none";
			entrevistas.style.display = "none";
		} else if (variable == "entrevistas") {
			var portada = document.getElementById("portada");
			var articulos = document.getElementById("articulos");
			var opinion = document.getElementById("opinion");

			opinion.style.display = "none";
			portada.style.display = "none";
			articulos.style.display = "none";
		}
	} else {
		sabana.style.position = "static";
		formato.style.display = "none";
	}
}

function mostrarMuestra () {
	var sabana = document.getElementById('muestra');
	var formato = document.getElementById('numeros');

	if (formato.style.display == "none") {
		sabana.style.position = "relative";
		formato.style.display = "block";
		formato.style.position = "absolute";
		formato.style.top = "18px";
		formato.style.left = "0";
	} else {
		sabana.style.position = "static";
		formato.style.display = "none";
	}
}

function mostrarNoticias () {
	var sabana = document.getElementById('ver');
	var formato = document.getElementById('listadonoticias');

	if (formato.style.display == "none") {
		sabana.style.position = "relative";
		formato.style.display = "block";
		formato.style.position = "absolute";
		formato.style.top = "18px";
		formato.style.left = "0";
	} else {
		sabana.style.position = "static";
		formato.style.display = "none";
	}
}


// ------------------ Función mostrar tabulador NÚMEROS ANTERIORES ------------------------------------------------------- //

function setTabsIndice(tab) {
	if(tab == 'atrasados') {
		document.getElementById('tab_actual').className = "";
		document.getElementById('tab_atrasados').className = 'selected';
		document.getElementById('tab_viejo').className = "";
		document.getElementById('actual').className = 'tabcontent';
		document.getElementById('atrasados').className = 'tabcontent selected';
		document.getElementById('viejo').className = 'tabcontent';
	} else if(tab == 'viejo') {
		document.getElementById('tab_actual').className = "";
		document.getElementById('tab_atrasados').className = "";
		document.getElementById('tab_viejo').className = 'selected';
		document.getElementById('actual').className = 'tabcontent';
		document.getElementById('atrasados').className = 'tabcontent';
		document.getElementById('viejo').className = 'tabcontent selected';
	} else {
		document.getElementById('tab_actual').className = 'selected';
		document.getElementById('tab_atrasados').className = "";
		document.getElementById('tab_viejo').className = "";
		document.getElementById('actual').className = 'tabcontent selected';
		document.getElementById('atrasados').className = 'tabcontent';
		document.getElementById('viejo').className = 'tabcontent';
	}
}


// ------------------ Función mostrar tabulador ACTUALIDAD --------------------------------------------------------------- //

function setTabs( tab ) {
	if( tab == 'play' ) {
		document.getElementById('tab_noticias').className = "";
		document.getElementById('tab_play').className = 'selected';
		document.getElementById('noticias').className = 'tabcontent';
		document.getElementById('play').className = 'tabcontent selected';
	} else {
		document.getElementById('tab_noticias').className = "selected";
		document.getElementById('tab_play').className = "";
		document.getElementById('noticias').className = 'tabcontent selected';
		document.getElementById('play').className = 'tabcontent';
	}
}


// ------------------ Función mostrar tabulador CONCURSO ----------------------------------------------------------------- //

function setTabsConcurso( tab ) {
	if( tab == 'finalizados' ) {
		document.getElementById('tab_envigor').className = "";
		document.getElementById('tab_finalizados').className = 'selected';
		document.getElementById('envigor').className = 'tabcontent';
		document.getElementById('finalizados').className = 'tabcontent selected';
	} else {
		document.getElementById('tab_envigor').className = "selected";
		document.getElementById('tab_finalizados').className = "";
		document.getElementById('envigor').className = 'tabcontent selected';
		document.getElementById('finalizados').className = 'tabcontent';
	}
}