<!--
/******************* MENU PULLDOWN BY WEB-REFERENCE ***********************/

// DHTML & Javascript by www.webreference.com (expandable Outlines) 1999
//
// Added a few additional features, such as mouseovers, mouse-on states.
// Web Effect 2000
//
// Only one menu is displayed at any one time.  To disable this feature,
// remove all associations to oldEl and prevEl in expandIt().


NS4 = (document.layers) ? 1 : 0;
IE4 = (document.all) ? 1 : 0;
ver4 = (NS4 || IE4) ? 1 : 0;

if (ver4) {
    with (document) {
        write("<STYLE TYPE='text/css'>");
        if (NS4) {
            write(".start {position:relative; visibility:show}");
            write(".parent {position:absolute; visibility:show}");
            write(".child {position:absolute; visibility:show}");
            write(".regular {position:absolute; visibility:show}")
        }
        else {
            write(".child {display:none}")
        }
        write("</STYLE>");
    }
}

isExpanded = false;
prevEl = "elTwo";  // First expandable element (not always the FIRST element).

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 arrange() {
    nextY = document.layers[firstInd].pageY + document.layers[firstInd].document.height;
    nextX = document.layers[firstInd].pageX;
    for (i=firstInd+1; i<document.layers.length; i++) {
        whichEl = document.layers[i];
        if (whichEl.visibility != "hide") {
            whichEl.pageY = nextY;
            whichEl.pageX = nextX;
            nextY += whichEl.document.height;
        }
    }
}

function initIt(){
    if (!ver4) return;
    if (NS4) {
        for (i=0; i<document.layers.length; i++) {
            whichEl = document.layers[i];
            if (whichEl.id.indexOf("Parent") != -1) whichEl.visibility = "show";
            if (whichEl.id.indexOf("Child") != -1) {
				whichEl.visibility = "hide";
				whichEl.bgColor = "B8AF82";
				whichEl.clip.width=119;
			}
            if (whichEl.id.indexOf("Rest") != -1) whichEl.visibility = "show";
        }
        arrange();
    }
    else {
        divColl = document.all.tags("DIV");
        for (i=0; i<divColl.length; i++) {
            whichEl = divColl(i);
            if (whichEl.className == "parent") whichEl.style.visibility = "visible";
            if (whichEl.className == "child") whichEl.style.display = "none";
            if (whichEl.className == "regular") whichEl.style.visibility = "visible";
        }
    }
}

function expandIt(el) {     // Original = el, gfx
    if (!ver4) return;
    if (IE4) {
        whichEl = eval(el + "Child");
        whichIm = event.srcElement;
        oldEl = eval(prevEl + "Child");
        if (whichEl.style.display == "none") {
            oldEl.style.display = "none";
            whichEl.style.display = "block";
//            whichIm.src = "graphics/" + gfx + "_close.gif";
        }
        else {
            whichEl.style.display = "none";
//            whichIm.src = "graphics/" + gfx + ".gif";
        }
    }
    else {
        whichEl = eval("document." + el + "Child");
        whichIm = eval("document." + el + "Parent.document.images['imEx']");
        oldEl = eval("document." + prevEl + "Child");
        if (whichEl.visibility == "hide") {
            oldEl.visibility = "hide";
            whichEl.visibility = "show";
//            whichIm.src = "graphics/" + gfx + "_close.gif";
        }
        else {
            whichEl.visibility = "hide";
//            whichIm.src = "graphics/" + gfx + ".gif";
        }
        arrange();
    }
    prevEl = el;
}

function expandAll() {
    if (!ver4) return;
    imgStatus = (isExpanded) ? ".gif" : "_close.gif";
    gfxIndex = 0;

    if (NS4) {
//        document.images["imEx"].src = newSrc;
        for (i=firstInd; i<document.layers.length; i++) {
            whichEl = document.layers[i];
//            if (whichEl.id.indexOf("Parent") != -1) {
//                whichEl.document.images["imEx"].src = "graphics/" + gfxIndex + imgStatus;
//		++gfxIndex;
//            }
            if (whichEl.id.indexOf("Child") != -1) {
                whichEl.visibility = (isExpanded) ? "hide" : "show";
            }
        }

        arrange();
        if (isExpanded) scrollTo(0,document.layers[firstInd].pageY);
    }
    else {
        divColl = document.all.tags("DIV");
        for (i=0; i<divColl.length; i++) {
            if (divColl(i).className == "child") {
                divColl(i).style.display = (isExpanded) ? "none" : "block";
            }
        }
        imColl = document.images.item("imEx");
//        for (i=0; i<imColl.length; i++) {
//            imColl(i).src = "graphics/" + i + imgStatus;
//        }
    }
    
    isExpanded = !isExpanded;
}



/******** KONG'S SUPERIOR ROLLOVERS *************/

var previName = "none";
var prevlName = "none";
var prevgName = "none";

// navImgLoc = "graphics/";		// This has been moved to the parent file.

var imgList = new Array(
	"01_off.gif", "01_on.gif",
	"02_off.gif", "02_on.gif",
	"03_off.gif", "03_on.gif",
	"04_off.gif", "04_on.gif",
	"05_off.gif", "05_on.gif",
	"06_off.gif", "06_on.gif",
	"07_off.gif", "07_on.gif",
	"08_off.gif", "08_on.gif",
	"09_off.gif", "09_on.gif",
	"10_off.gif", "10_on.gif",
	"11_off.gif", "11_on.gif"

);
var imgBin = new Array();
for (var i in imgList) {
	imgBin[i] = new Image();
	imgBin[i].src = "../../images/menu/" + imgList[i];
	
};

function navSwap(lname, iname, gname, stat) {
// lname = layer tag name
// iname = image tag name
// gname = graphics name minus the on/off.gif bit.
// stat  = 1 = on, 0 = off

    var domType;

    domType = (document.all) ? eval("document.images." + iname) : eval("document." + lname + ".document." + iname);

	if (iname != previName) {
	    if (stat == 1)    // onmouseover
			domType.src = gname + "_on.gif";
//			document.layers[lname].document.images[iname].src = gname + "_on.gif";		
	    else
			domType.src = gname + "_off.gif";
	}
    
}

function navDown(lname, iname, gname) {
    var domType, prevType;

    domType = (document.all) ? eval("document.images." + iname) : eval("document." + lname + ".document." + iname);
    prevType = (document.all) ? eval("document.images." + previName) : eval("document." + prevlName + ".document." + previName);

	if (previName != "none")
//		prevType.src = navImgLoc + previName + "_off.gif";
		prevType.src = prevgName + "_off.gif";
	domType.src = gname + "_on.gif";
	previName = iname;
	prevlName = lname;
	prevgName = gname;
		
/*
	This code is used for when multiple pulldowns are active.
	
	if (navStatus[iname] == 1)
		domType.src = gname + "_on.gif";
    else
		domType.src = gname + "_off.gif";
	navStatus[iname] *= -1;
 */
   
}

function swapAll() {
    if (document.all) {
	for (var x=0; x < document.images.length; x++) {
	    if (document.images[x].name.indexOf("arrow") != -1) {
		if (((!isExpanded) && (navStatus[document.images[x].name] == 1)) || ((isExpanded) && (navStatus[document.images[x].name] == -1))) {
		    navDown('',document.images[x].name);
		}
	    }
	}
    } else {
	newIndx = getIndex("elTwoParent");
        for (var incc=firstInd; incc<document.layers.length; incc++) {
            for (var ginc=0; ginc<document.layers[incc].document.images.length; ginc++) {
                if (document.layers[incc].document.images[ginc].name.indexOf("arrow") != -1) {
		    if (((!isExpanded) && (navStatus[document.layers[incc].document.images[ginc].name] == 1)) || ((isExpanded) && (navStatus[document.layers[incc].document.images[ginc].name] == -1))) {
		        navDown(document.layers[incc].name,document.layers[incc].document.images[ginc].name);
		    }
                }
            }
        }

    }
}


function normSwap(iname, gname, stat) {
	if (document.images)
		if (stat == 1)
			document.images[iname].src = gname + "_on.gif";
		else
			document.images[iname].src = gname + "_off.gif";
}

//-->



TreeParams = { 

	OPEN_MULTIPLE_MENUS	: false,
	
	TIME_DELAY          : 20,
	OPEN_WHILE_CLOSING	: true,

	OPEN_INSTANTLY		: false,
	
	ICON_TYPE_INDIVIDUAL  : false,
	
	CLOSED_OVER_MENU_ICON : "../../images/menu/01_on.gif",
	OPEN_MENU_ICON : "../../images/menu/01_on.gif",
	OPEN_OVER_MENU_ICON : "../../images/menu/01_on.gif",
	
	IMG_EXT : {
		DOWN : "_on",
		OVER : "",
		DOWN_OVER : "_on"
	}
	// if ICON_TYPE_INDIVIDUAL is false, then you can ignore these.
};


//-----PERSISTENCE USER PARAMS--------------
/**
 * LISTENER_SCRIPT_SRC is the supporting file for browsers that 
 * support neither addEventListener nor attachEvent.
 * Change LISTENER_SCRIPT_SRC to point to global.js on YOUR server.
 */
var LISTENER_SCRIPT_SRC = "global.js";


/**
 * PERSISTENCE_MILLIS - int 
 * How long to save the tree state between visits.
 */
var MS_PER_DAY = 1000 * 60 * 60 * 24;
var PERSISTENCE_MILLIS = -1; // 1 day

//-----END PERSISTENCE USER PARAMS--------------


// this function fires onload.
fireOnload( function() {
		saveTreeOnUnload("contentScripts");
		restoreTreeState("contentScripts", window.SECTION||null);
});

function demo(uri){window.open(uri);return false;}