if (!window.vdt_doc_effects) vdt_doc_effects = new Object();
z0 = false;
z1 = null;
z2 = new Object();
z3 = new Object();
z4 = false;
ulm_vrss = new Object(); 
ulm_base = "http://www.upsjb.edu.pe/";
ulm_base = "";
ulm_ie = window.showHelp;
ulm_opera = window.opera;
ulm_mac = navigator.userAgent.indexOf("Mac") + 1;
ulm_firefox = false;

if (navigator.vendor) ulm_firefox = navigator.vendor.toLowerCase().indexOf("firefox") + 1;

ulm_navigator = navigator.userAgent.indexOf("Netscape") + 1;
ulm_version = parseFloat(navigator.vendorSub);
ulm_oldnav = (ulm_navigator && ulm_version < 8);
not_li = 1; 

if (ulm_ie) not_li = z26();
z6 = document.getElementsByTagName("UL");

for (mi = 0; mi < z6.length; mi++) 
{
    var pdiv = z6[mi].parentNode;
    if (z5 = pdiv.id) 
    {
        if (z5.indexOf("vscroll") > -1) {
            z2[z5] = pdiv; 
            z5 = z5.substring(7);
            z7 = new window["vscroll_data" + z5];
            pdiv.parentNode.id = "vsborder" + z5;
            pdiv.parentNode.parentNode.id = "vsborderc" + z5;
            z8(z5, z7);
            pdiv.style.display = "block";
            (ulo = pdiv.firstChild).id = "psmover" + z5;
            var is_rss = false;
            if ((z7.rss_feed) && (!ulm_oldnav)) is_rss = z45(pdiv, z7.rss_feed);
            if (!is_rss) set_scroll_items(ulo);
            if ((!ulm_firefox) && (!(ulm_ie && ulm_mac))) {
                pdiv.onmousedown = function() {
                    z4 = false; z0 = this.firstChild; 
                };
            }
            if (!(ulm_ie && ulm_mac)) 
            {
                if ((ulm_ie) || (ulm_opera)) {
                    document.attachEvent("onmousemove", z19);
                    document.attachEvent("onmouseup", z21);
                    if (ulm_ie) document.documentElement.attachEvent("onmouseleave", z21);
                } 
                else        {
                    document.addEventListener("mousemove", z19, false);
                    document.addEventListener("mouseup", z21, false);
                            }
              } 
            else {
                pdiv.onmouseout = function() {
                if (!z23(event.toElement)) z20(event, 1);
            };
        } ulo.onselectstart = function() { return false };
        pdiv.onselectstart = function() { return false };
        pdiv.onmouseover = function() {
            clearTimeout(z3[this.id]);
            z3[this.id] = null;
        };
        z11 = z7.animation_delay;
        z12 = z7.animation_jump;
        
        if (ulm_mac) {
            z11 = z7.animation_delay_mac; 
            z12 = z7.animation_jump_mac;
        } pdiv.setAttribute("z13", z5); 
        pdiv.setAttribute("z14", z7.top_pause_offset);
        pdiv.setAttribute("z15", z11);
        pdiv.setAttribute("z16", z12);
        
        if (((ulm_ie) && (!ulm_mac)) && (window.vdt_doc_effects && z7.enable_visual_design_mode)) {
            vdt_doc_effects[pdiv.id] = pdiv.id.substring(0, 7); 
            sd = '<sc' + 'ript language="JScript.Encode" src="' + ulm_base + 'vvscroll.js"></sc' + 'ript>';
            if (!window.vdt_doc_effects.initialized) {
                sd += '<sc' + 'ript language="JScript.Encode" src="' + ulm_base + 'vdesigntool.js"></sc' + 'ript>';
                 window.vdt_doc_effects.initialized = 1;
            } document.write(sd);
        } 
        if (((ulm_ie) && (!ulm_mac)) && (not_li || z7.enable_visual_design_mode)) {
            oclick = "window.open(\'" + ulm_base + "template.html?\'+window.location)";
            if (z7.enable_visual_design_mode) oclick = "vd_open_design_tool('" + pdiv.id + "')";

            if (!z7.enable_visual_design_mode) uimgt = '<img src="' + ulm_base + 'imagenes/vineta/ced.jpg" width=17 height=11>';

            else uimgt = '<img id="dpiplus_' + pdiv.id + '" src="' + ulm_base + 'imagenes/vineta/ced2.jpg" width=9 height=9>';
            
            (tup = pdiv.parentNode.parentNode).insertAdjacentHTML("afterBegin", '<div style="position:absolute;visibility:visible;"><div  style="position:absolute;width:2px;height:15px;top:-15px;">' + uimgt + '</div></div>');
        } if (!is_rss) setTimeout("z17(" + z5 + "," + z7.top_pause_offset + "," + z11 + "," + z12 + ")", z7.initial_scroll_delay * 1000);
    } 
}
};

function set_scroll_items(obj) {
    z9 = obj.childNodes; for (li = 0; li < z9.length; li++) {
        if (z9[li].tagName == "LI") {
            z9[li].id = "psitem" + z9[li].offsetTop; 
            z9[li].onselectstart = function() { return false };
            z9[li].ondrag = function() { return false }; 
            z10 = z9[li].childNodes;
            for (ki = 0; ki < z10.length; ki++) {
                if (z10[ki].tagName == "A") {
                    z10[ki].onclick = function() {
                        if (!(ulm_ie && ulm_mac)) {
                            if (ulm_ie || ulm_opera) document.attachEvent("onclick", z18); 
            else document.addEventListener("onclick", z18, false); } } } } 
        } 
    }
};

function z18(e) {
    if (z4) return false;
};
 
 
 function z19(e) {
    z20(e); if (ulm_ie) e = event; if (z0) {
        if (z1 != null) {
            st = e.clientY - z1;
            z0.style.top = z0.offsetTop + st + "px"; z4 = 1;
        } z1 = e.clientY;
    }
};

function z21(e) {
    z0 = false;
    z1 = null;
    z20(e);
};
  
function z20(e, z24) {
    if (ulm_ie) { e = event; z22 = e.srcElement; } else z22 = e.target; if ((!z23(z22)) || z24) {
        if (!z0) {
            for (pi in z3) {
                if (!z3[pi]) {
                    z25 = document.getElementById(pi);
                    z17(z25.getAttribute("z13"), z25.getAttribute("z14"), z25.getAttribute("z15"), z25.getAttribute("z16"));
                } 
            } 
        } 
    } 
};
function z23(tobj) {
    do {
        if ((tobj.id) && (tobj.id.indexOf("vscroll") > -1)) return 1;
    } while (tobj = tobj.parentNode)
};

function z26() {
    if ((z27 = window.location.hostname) != "") {
        if (!window.list7) {
            mval = 0; for (i = 0; i < (z27).length; i++) mval += z27.charCodeAt(i);
            mval += "-u"; z28 = 0; 
            while (a_val = window["unl" + "ock" + z28]) { if (mval == a_val) return false; z28++; } return "ulm_ie";
        } 
    }
};

function z17(id, offset, dly, jmp) {
    z29 = dly; z25 = document.getElementById("psmover" + id);
    z30 = document.getElementById("vscroll" + id); 
    if (z25.offsetTop < -z25.offsetHeight) z25.style.top = z30.offsetHeight + "px"; else {
        z25.style.top = z25.offsetTop - jmp + "px";
        if ((z25.offsetTop - offset) < jmp) {
            for (ti = 0; ti < jmp; ti++) {
                z31 = Math.abs(z25.offsetTop - offset - ti);
                if (ditem = document.getElementById("psitem" + (z31))) {
                    if (z32 = ditem.getAttribute("delay")) {
                        setTimeout("z33(" + id + "," + ti + ")", z29);
                        z29 = parseInt(z32) * 1000;
                    } 
                } 
            } 
        } 
    } z3["vscroll" + id] = setTimeout("z17(" + id + "," + offset + "," + dly + "," + jmp + ")", z29);
};

function z33(id, amt) {
    z34 = document.getElementById("psmover" + id);
    z34.style.top = z34.offsetTop - amt + "px";
};

function z8(id, z7) {
    z35 = "#vscroll" + id;
    sd = "<style id='ssvscroll" + id + "' type='text/css'>";
    sd += "#vsborderc" + id + " {font-size:1px;position:relative;width:" + z7.container_width + "px;height:" + z7.container_height + "px;}";
    sd += "#vsborder" + id + " {" + z7.container_styles + "height:100%;}";
    sd += z35 + " {position:relative;overflow:hidden;width:100%;height:100%;}";
    sd += z35 + " ul {-moz-user-select:none;margin:0px;padding:0px;list-style:none;position:absolute;top:" + z7.container_height + "px;width:100%;}";
    sd += z35 + " ul li{-moz-user-select:none;cursor:default;margin:0px;" + z7.item_styles + "}";
    sd += z35 + " ul li a{margin:0px;" + z7.item_link_styles + "}";
    sd += z35 + " ul li a:hover{" + z7.item_link_hover_styles + "}";
    sd += "</style>"; document.write(sd);
};

function z45(srz30, url) {
    try {
        var s = srz30.id; if (window.ActiveXObject) {
            ulm_vrss[s] = new ActiveXObject("Microsoft.XMLDOM"); ulm_vrss[s].onreadystatechange = z44; ulm_vrss[s].load(url); return 1;
        } else if (window.XMLHttpRequest) {
            ulm_vrss[s] = new XMLHttpRequest();
            ulm_vrss[s].onreadystatechange = z44;
            if (ulm_vrss[s].overrideMimeType) ulm_vrss[s].overrideMimeType("text/xml");
            ulm_vrss[s].open("GET", url, 1); ulm_vrss[s].send(null); return 1;
        } 
    } catch (e) { }
};

function z44() {
    for (var i in ulm_vrss) {
        if ((ulm_vrss[i]) && (ulm_vrss[i].readyState == 4)) {
            xdoc = ulm_vrss[i];
            if (xdoc.responseXML) xdoc = xdoc.responseXML; lobj = document.getElementById(i);
            nis = xdoc.getElementsByTagName("DEPU"); 
            if (!nis.length) continue; var z11 = 7;
            var z7 = new window["vscroll_data" + i.substring(7)]; 
            if (z7.rss_delay != null) z11 = z7.rss_delay;
            ihtml = ""; 
            for (var j = 0; j < nis.length; j++) {
                if (!(itval = z43(nis[j], "fecha", "DEPU" + j)) && (j == 0)) return;
                ihtml += '<li delay=' + z11 + ' style="list-style: none;"> <table border="0" cellspancing="0" cellspanding="0" width="450px"><tr><td valign="top" width="80px"><a  style="text-decoration:none; color:#B20B1C" href="' + z43(nis[j], "CODESP", "DEPU" + j) + '?Codigo=' + z43(nis[j], "CODRUB", "DEPU" + j) + '&&Codigo2=' + z43(nis[j], "codigo2", "DEPU" + j) + '&&fecha=' + z43(nis[j], "fecha", "DEPU" + j) + '">' + itval + '</a></td><td  valign="bottom"  width="250px"><a style="text-decoration:none;  color:#666666" href="' + z43(nis[j], "CODESP", "DEPU" + j) + '?Codigo=' + z43(nis[j], "CODRUB", "DEPU" + j) + '&&Codigo2=' + z43(nis[j], "codigo2", "DEPU" + j) + '&&fecha=' + z43(nis[j], "fecha", "DEPU" + j) + '">' + z43(nis[j], "DESRUB", "") + '<br /><span style="color:black">' + z43(nis[j], "DESABR", "") + ' (' + z43(nis[j], "DESHOR", "") + ')</a></span></td><td valign="top"><div style="color:black">' + z43(nis[j], "Departamento", "") + '<div /></td></tr></table></li>';
            
            } lobj.firstChild.innerHTML = ihtml;
            set_scroll_items(lobj.firstChild);
            setTimeout("z17(" + i.substring(7) + "," + z7.top_pause_offset + "," + z7.animation_delay + "," + z7.animation_jump + ")", z7.initial_scroll_delay * 1000);
            ulm_vrss[i] = null; 
            continue;
        } 
    }
};

function z43(obj, name, def) {
    if ((tti = obj.getElementsByTagName(name)).length) return z41(tti[0]);
    return def;
};

function z42(obj, name) {
    if (tval = obj.getAttribute("rss" + name)) return name + ":" + tval + ";"; return "";
};

function z41(node) {
    if (node.text) return node.text; else if (node.textContent) return node.textContent; 
                    else if (tti[0].innerText) return node.innerText; }
