<!--
/******************* 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(
	"nav_but1_off.gif", "nav_but1_on.gif",
	"nav_but2_off.gif", "nav_but2_on.gif",
	"nav_but14_off.gif", "nav_but14_on.gif",
	"nav_but3_off.gif", "nav_but3_on.gif",
	"nav_but4_off.gif", "nav_but4_on.gif",
	"nav_but5_off.gif", "nav_but5_on.gif",
	"nav_but6_off.gif", "nav_but6_on.gif",
	"nav_but7_off.gif", "nav_but7_on.gif",
	"nav_but8_off.gif", "nav_but8_on.gif",
	"nav_but9_off.gif", "nav_but9_on.gif",
	"nav_but10_off.gif", "nav_but10_on.gif",
	"nav_but11_off.gif", "nav_but11_on.gif"	
);

var imgBin = new Array();

// Preload images.
for (var a in imgList) {
    imgBin[a] = new Image();
    imgBin[a].src = navImgLoc + imgList[a];
}

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";
}

//-->
