if (is_nav4up || is_ie4up) {
    with (document) {
        writeln("<style type='text/css'>");
        if (is_nav4) {
            writeln(".parent { position: absolute; visibility: hidden }");
            writeln(".child { position: absolute; visibility: hidden }");
            writeln(".regular { position: absolute; visibility: hidden }")
        }
        else {
            writeln(".child { display: none }")
        }
        writeln("</style>");
    }
}

function getIndex(el) {
    ind = null;
    for (i=0; i < document.layers.length; i++) {
        whichEl = document.layers[i];
        if (whichEl.id == el) {
            ind = i;
            break;
        }
    }
    return ind;
}

function showAll() {
    for (i=firstInd; i<document.layers.length; i++) {
        whichEl = document.layers[i];
        whichEl.visibility = "show";
    }
}

function arrange() {
    nextY = document.layers[firstInd].pageY + document.layers[firstInd].document.height;
    for (i = firstInd + 1; i < document.layers.length; i++) {
        whichEl = document.layers[i];
        if (whichEl.visibility != "hide") {
            whichEl.pageY = nextY;
            nextY += whichEl.document.height;
        }
    }
}

function initIt(){
    if (!(is_nav4up || is_ie4up)) return;
    if (is_nav4up) {
        for (i=0; i < document.layers.length; i++) {
            whichEl = document.layers[i];
            if (whichEl.id.indexOf("Child") != -1) whichEl.visibility = "hide";
        }
        arrange();
    }
    else {
        divColl = document.all.tags("DIV");
        for (i=0; i < divColl.length; i++) {
            whichEl = divColl(i);
            if (whichEl.className == "child") whichEl.style.display = "none";
        }
    }
}

function isVisible(el) {
    if (!(is_nav4up || is_ie4up)) return;
    if (is_ie4up) {
        whichEl = eval(el + "Child");
        otherEl = eval(el + "Parent");
        if (whichEl.style.display == "none") {
			return 0;
        }
        else {
			return 1;
        }
    }
    else {
        whichEl = eval("document." + el + "Child");
        otherEl = eval("document." + el + "Parent");
        if (whichEl.visibility == "hide") {
			return 0;
        }
        else {
			return 1;
        }

    }
}

function expandIt(el) {
    if (!(is_nav4up || is_ie4up)) return;
    if (is_ie4up) {
        whichEl = eval(el + "Child");
        otherEl = eval(el + "Parent");
        if (whichEl.style.display == "none") {
            whichEl.style.display = "block";
            otherEl.style.color = "#330066";
        }
        else {
            whichEl.style.display = "none";
            otherEl.style.color = "#999999";
        }
    }
    else {
        whichEl = eval("document." + el + "Child");
        otherEl = eval("document." + el + "Parent");
        if (whichEl.visibility == "hide") {
            whichEl.visibility = "show";
            otherEl.color = "#330066";
        }
        else {
            whichEl.visibility = "hide";
            otherEl.color = "#999999";
        }

        arrange();
    }
}

function hideAll() {

    if (!(is_nav4up || is_ie4up)) return;
    if (is_nav4up) {
        for (i=firstInd; i<document.layers.length; i++) {
            whichEl = document.layers[i];
            if (whichEl.id.indexOf("Child") != -1)
                whichEl.visibility = "hide";
        }

        arrange();

    }
    else {
        divColl = document.all.tags("DIV");
        for (i=0; i<divColl.length; i++)
            if (divColl(i).className == "child")
                divColl(i).style.display = "none";
    }
}

function setMenu (section, sub) {

	hideAll();
	expandIt(section);
	if (sub)
		ro_set(sub);

}

onload = initIt;
