function probando() {    //alert('entra');    var ul = document.getElementsByTagName("ul");    var a = document.getElementsByTagName("a");    var loc = window.location.href;    var idsub = "";    for (var j = 0; j < ul.length; j++) {        var enlace = ul[j].getElementsByTagName('a');        var ules = ul[j].getElementsByTagName('ul');        for (var m = 0; m < enlace.length; m++) {            var hreff1 = 'http://www.docultura.es' + enlace[m].getAttribute("href");            var idlink = enlace[m].getAttribute("id") + enlace[m].getAttribute("id");            if (hreff1 == loc) {                //var nodo1 = ul[j].getElementsByTagName('ul');                for (var p = 0; p < ules.length; p++) {                    idsub = ules[p].id;                    if (idlink == idsub) {                        ules[p].style.position = "absolute";                        ules[p].style.display = "block";                        ules[p].style.marginTop = "-22px";                        ules[p].style.width = "601px";                        ules[p].style.background = "red";                        etiqueta = ules[p];                        return;                    }                }            }        }    }    if ((typeof ul[j] != "undefined") && (ul[j].className == "cssMenum")) {        var nodo = ul[j].getElementsByTagName('a');        for (var h = 0; h < nodo.length; h++) {            var hreff = 'http://www.docultura.es' + nodo[h].getAttribute("href");            if (hreff == loc) {                nodo[h].id = "activo";                ul[j].style.position = "absolute";                ul[j].style.display = "block";                ul[j].style.marginTop = "-22px";                ul[j].style.width = "601px";                ul[j].style.background = "red";                etiqueta = ul[j];            }        }    }}function scriptInit() {    if (!document.getElementById) {        return;    }}function addEvent(elm, evType, fn, useCapture) {    if (elm.addEventListener) {        elm.addEventListener(evType, fn, useCapture);        return true;    } else if (elm.attachEvent) {        var r = elm.attachEvent('on' + evType, fn);        return r;    } else {        elm['on' + evType] = fn;    }}function checkActive(enlace) {    var ul = document.getElementsByTagName("ul");    var a = document.getElementsByTagName("a");    if (window.location.href.substr(location.href.length - 1, 1) == '/') {        var loc = window.location.href + 'index.html';    } else if (enlace.length) {        var loc = enlace;    } else {        var loc = window.location.href;    }    var idsub = "";    for (var j = 0; j < ul.length; j++) {        var enlace = ul[j].getElementsByTagName('a');        var ules = ul[j].getElementsByTagName('ul');        for (var m = 0; m < enlace.length; m++) {            var hreff1 = 'http://www.docultura.es' + enlace[m].getAttribute("href");            var idlink = enlace[m].getAttribute("id") + enlace[m].getAttribute("id");            if (hreff1 == loc) {                //var nodo1 = ul[j].getElementsByTagName('ul');                for (var p = 0; p < ules.length; p++) {                    idsub = ules[p].id;                    if (idlink == idsub) {                        ules[p].style.position = "absolute";                        ules[p].style.display = "block";                        ules[p].style.marginTop = "-22px";                        ules[p].style.width = "601px";                        ules[p].style.background = "red";                        etiqueta = ules[p];                        return;                    }                }            }        }        //var hreff1 = 'http://www.docultura.es'+enlace[j].getAttribute("href");        //alert (hreff1 +' '+ loc);        if (ul[j].className == "cssMenum") {            var nodo = ul[j].getElementsByTagName('a');            for (var h = 0; h < nodo.length; h++) {                var hreff = 'http://www.docultura.es' + nodo[h].getAttribute("href");                if (hreff == loc) {                    nodo[h].id = "activo";                    ul[j].style.position = "absolute";                    ul[j].style.display = "block";                    ul[j].style.marginTop = "-22px";                    ul[j].style.width = "601px";                    ul[j].style.background = "red";                    etiqueta = ul[j];                }            }        }    }}function checkActive2(enlace) {    clearstyle2();    var loc2 = window.location.href;    var ul = document.getElementsByTagName("ul");    var a = document.getElementsByTagName("a");    if (window.location.href.substr(location.href.length - 1, 1) == '/') {        var loc = window.location.href + 'index.html';    } else if (enlace.length) {        var loc = enlace;    } else {        var loc = window.location.href;    }    var idsub = "";    for (var j = 0; j < ul.length; j++) {        var enlace = ul[j].getElementsByTagName('a');        var ules = ul[j].getElementsByTagName('ul');        for (var m = 0; m < enlace.length; m++) {            var hreff1 = 'http://www.docultura.es' + enlace[m].getAttribute("href");            var idlink = enlace[m].getAttribute("id") + enlace[m].getAttribute("id");            if (hreff1 == loc) {                //var nodo1 = ul[j].getElementsByTagName('ul');                for (var p = 0; p < ules.length; p++) {                    idsub = ules[p].id;                    if (idlink == idsub) {                        ules[p].style.position = "absolute";                        ules[p].style.display = "block";                        ules[p].style.marginTop = "-22px";                        ules[p].style.width = "601px";                        ules[p].style.background = "red";                        etiqueta = ules[p];                        return;                    }                }            }        }        //var hreff1 = 'http://www.docultura.es'+enlace[j].getAttribute("href");        //alert (hreff1 +' '+ loc);        if (ul[j].className == "cssMenum") {            var nodo = ul[j].getElementsByTagName('a');            for (var h = 0; h < nodo.length; h++) {                var hreff = 'http://www.docultura.es' + nodo[h].getAttribute("href");                if (hreff == loc) {                    nodo[h].id = "activo";                    ul[j].style.position = "absolute";                    ul[j].style.display = "block";                    ul[j].style.marginTop = "-22px";                    ul[j].style.width = "601px";                    ul[j].style.background = "red";                    etiqueta = ul[j];                }            }        }    }}addEvent(window, 'load', checkActive, false);function inicial() {    //var loc = window.location.href;    clearstyle();}function clearstyle2() {    if (typeof etiqueta != "undefined") {        etiqueta.style.position = "";        etiqueta.style.display = "";        etiqueta.style.marginTop = "";        etiqueta.style.width = "";        etiqueta.style.background = "";    }}function clearstyle() {    if (typeof etiqueta != "undefined") {        etiqueta.style.position = "";        etiqueta.style.display = "";        etiqueta.style.marginTop = "";        etiqueta.style.width = "";        etiqueta.style.background = "";    }}