var ver_notas = 0;
var ver_indic = 0;

function ocultar_todos(nombrediv) {
	divColl = document.getElementsByTagName("DIV");
        for (i=0; i<divColl.length; i++) {
            if (divColl[i].className == nombrediv) {
                divColl[i].style.display = 'none';
            }
        }
}
function ocultar_todos_table(nombrediv) {
        divColl = document.getElementsByTagName("table");
        for (i=0; i<divColl.length; i++) {
            if (divColl[i].className == nombrediv) {
                divColl[i].style.display = 'none';
            }
        }
}


function mostrar_todos(nombrediv) {
	divColl = document.getElementsByTagName("DIV");
        for (i=0; i<divColl.length; i++) {
            if (divColl[i].className == nombrediv) {
                divColl[i].style.display = 'block';
            }
        }
}
function mostrar_todos_table(nombrediv) {
        divColl = document.getElementsByTagName("table");
        for (i=0; i<divColl.length; i++) {
            if (divColl[i].className == nombrediv) {
                divColl[i].style.display = 'block';
            }
        }
}

function mostrar (id) {
	e=document.getElementById(id);
	e.style.display = 'block';
}

function ocultar (id) {
	e=document.getElementById(id);
	e.style.display = 'none';
}

function mostrar_seccion (id) {
	ocultar_todos('seccion');
	mostrar(id);
	tab_activo ('etiqueta_seccion',id);
}
function mostrar_seccion_nav (id) {
        ocultar_todos('seccion');
	scroll(0,0);
        mostrar(id);
        tab_activo ('etiqueta_seccion',id);
}


function tab_activo (etiqueta,id) {
	obj = document.getElementsByTagName("LI");
        for (i=0; i<obj.length; i++) {
            if (obj[i].className.match(etiqueta)) {
                obj[i].className = etiqueta;
            }
        }
        
	$tab = 'tab_' + id;
	e=document.getElementById($tab);
	if (e) {
		e.className = etiqueta + ', active';
	}
}

function mostrar_notas () {
	ver_notas = 1;
	mostrar_todos('nota');
}

function ocultar_notas () {
	ver_notas = 0;
	ocultar_todos('nota');
}

function mostrar_categs () {
        ver_indic = 1;
        mostrar_todos_table('links_informe');
}

function ocultar_categs () {
        ver_indic = 0;
        ocultar_todos_table('links_informe');
}

function mostrar_nota (id) {
	mostrar(id);
}

function ocultar_nota (id) {
	if (! ver_notas) {
		ocultar(id);
	}
}


function mostrar_cat_lista (id) {
	mostrar(id);
	idh= id + 'h';
	ids= id + 's';
	es=document.getElementById(ids);
	es.style.display = 'none';
        eh=document.getElementById(idh);
        eh.style.display = 'inline';
	window.location = '#'+id;

}
function mostrar_cat (id) {
        mostrar(id);
        idh= id + 'h';
        ids= id + 's';
        es=document.getElementById(ids);
        es.style.display = 'none';
        eh=document.getElementById(idh);
        eh.style.display = 'inline';

}

function ocultar_cat (id) {
        ocultar(id);
        idh= id + 'h';
        ids= id + 's';
        es=document.getElementById(ids);
        es.style.display = 'inline';
        eh=document.getElementById(idh);
        eh.style.display = 'none';
}

