function hide_loading() {
    var obj = document.getElementById('loading');
    if (obj && obj.style) {
        obj.style.display = 'none';
    }
}

/*******pestanas promociones*******/

function procesaPestanas() {
    var objs = document.getElementsByTagName('span');
    if (objs && objs.length) {
        for (var i = 0; i < objs.length; i++) {
            if (objs[i].className == 'pestana') {
                objs[i].onclick = activaPestana;
                var id  = objs[i].id.substring(1);
                var obj = document.getElementById(id);
                if (obj && obj.style) {
                    obj.style.display = '';
                }
            } else {
                objs[i].onclick = '';
                var id  = objs[i].id.substring(1);
                var obj = document.getElementById(id);
                if (obj && obj.style) {
                    obj.style.display = 'block';
                }
            }
        }
    }
}

function activaPestana() {
    if (!this.id) {
        return false;
    }

    var objs = document.getElementsByTagName('span');
    if (objs && objs.length) {

        // Verificamos que el DIV destino existe
        for (var i = 0; i < objs.length; i++) {
            if (objs[i].className=='pestana' || objs[i].className=='pestana sel') {
                var idcontent = objs[i].id.substring(1);
                var obj       = document.getElementById(idcontent);
                if (objs[i].id == this.id && !obj) {
                    alert('No se ha encontrado el DIV del contenido');
                    return false;
                }
            }
        }

        // Todo OK
        for (var i = 0; i < objs.length; i++) {
            if (objs[i].className=='pestana' || objs[i].className=='pestana sel') {
                var idcontent = objs[i].id.substring(1);
                var obj       = document.getElementById(idcontent);
                if (objs[i].id == this.id) {
                    if (obj && obj.style) {
                        obj.style.display = 'block';
                    }
                    objs[i].className = 'pestana sel';
                    objs[i].onclick = null;
                } else {
                    if (obj && obj.style) {
                        obj.style.display = 'none';
                    }
                    objs[i].className = 'pestana';
                    objs[i].onclick = activaPestana;
                }
            }
        }
    }
}



<!-- // Cambio de color celda

	function cambiar_color_over(celda){
		celda.style.backgroundColor="#D5D7D8"
	}
	function cambiar_color_out(celda){
		celda.style.backgroundColor="#E9EBED"
	}
	
<!-- // Mostrar ocultar capas	

var visto = null;
function verCapa(iden) {
  obj = document.getElementById(iden);
  if (obj==visto) return false;
  if (visto!=null)
    visto.style.visibility = 'hidden';
  obj.style.visibility = 'visible';
  visto=obj;
}

<!-- // enlaces	

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

// NOTICIAS: Visualiza u oculta el contenido de un TR
function openCloseTR(id){
	tr  = document.getElementById('idprensa' + id);
	img = document.getElementById('idprensa' + id + 'img');

if (tr.style.display == ''){
		tr.style.display = 'none';
		img.src = 'img/noticias/ico_mas.gif';
	} else {
		tr.style.display = '';
		img.src = 'img/noticias/ico_menos.gif';
		
	}
	
}

