﻿function EFindObj(n, d) {
    var p, i, x; if (!d) d = document; if ((p = n.indexOf("?")) > 0 && parent.frames.length) {
        d = parent.frames[n.substring(p + 1)].document; n = n.substring(0, p);
    }
    if (!(x = d[n]) && d.all) x = d.all[n]; for (i = 0; !x && i < d.forms.length; i++) x = d.forms[i][n];
    for (i = 0; !x && d.layers && i < d.layers.length; i++) x = EFindObj(n, d.layers[i].document);
    if (!x && document.getElementById) x = document.getElementById(n); return x;
}

function Visio(el, vis) { var v, ob; if ((ob = EFindObj(el)) != null) { v = vis; if (ob.style) { ob = ob.style; v = (v == 'show') ? 'block' : (v = 'hide') ? 'none' : v; } ob.display = v; } }

function ToogleVisio(el, ic) {
    var o = EFindObj(el);
    var c = EFindObj(ic);


    if (o && c) {
        if (o.style.display == 'block') {
            Visio(el, 'hide');
            c.src = '/images/plus.gif';
        }
        else {
            Visio(el, 'show');
            c.src = '/images/minus.gif';
        }
    }

}

function showwin(p, n, w, h, scroll) {
    var s = '';
    var width = w;
    var height = h;
    s = s + 'left=' + (screen.availWidth - width) / 2 + ',';
    s = s + 'top=' + (screen.availHeight - height) / 2 + ',';
    s = s + 'width=' + width + ',height=' + height + ',toolbar=0,location=0,status=0,menubar=0,scrollbars=' + 1 + ',resizable=1';
    w = window.open(p, n, s);
    w.focus();
}





