// JavaScript Document
 var bV=parseInt(navigator.appVersion);
 NS4=(document.layers) ? true : false;
 IE4=((document.all)&&(bV>=4))?true:false;
 var newBrowser;
 if (document.getElementById) {newBrowser = true}
 ver4 = (NS4 || IE4 || newBrowser) ? true : false;
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;
 }

 //builds menu (netscape only)
 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;
   }
  }
 }

 //called on page load (both ie & netscape)
 function initIt(){
	//5.0 browsers
	if (newBrowser) {
		docContents = document.getElementsByTagName("div");
		for (i=0; i<docContents.length; i++) {
			if (docContents[i].id.indexOf("Child") !=  -1 && docContents[i].id != "Child") {
				docContents[i].style.display = "none";
			}
			else {
				docContents[i].style.display = "block";
			}
		}
	}
	//netscape 4
	else if (NS4) {
   for (i=0; i<document.layers.length; i++) {
		whichEl = document.layers[i];
    if (whichEl.id.indexOf("Child") != -1 && whichEl.id != "Child") {
			whichEl.visibility = "hide";
		}
		else {
			whichEl.visibility = "show";
		}
   }
   arrange();
  }
  //ie 4
  else {
   tempColl = document.all.tags("div");
   for (i=0; i<tempColl.length; i++) {
    if (tempColl(i).className == "child" && tempColl(i).id != "Child") {
			tempColl(i).style.display = "none";
		}
		else {
			tempColl(i).style.display = "block";
		}
   }
  }
 }

 //determine which expand function to call
 function expandIt(el) {
  if (!ver4) return;
  if (newBrowser) {
		expandNew(el)
  }
  else if (IE4) {
		expandIE(el)
	}
	else {
		expandNS(el)
	}
 }

 //expand menu function (5.0+ browsers)
 function expandNew(el) {
   whichEl = document.getElementById(el + "Child") //eval(el + "Child");
	 whichIm = document.getElementById(el);



  //expand selected div
  if (whichEl.style.display == "none") {
   whichEl.style.display = "block";
   whichIm.src = "images/arrowdown.gif";
  }
  else {
	 whichEl.style.display = "none";
   whichIm.src = "images/arrowright.gif";
  }
 }

 //expand menu function (ie only)
 function expandIE(el) {
  whichEl = eval(el + "Child");
  whichIm = document.images[el];


  //expand selected div
  if (whichEl.style.display == "none") {
   whichEl.style.display = "block";
   whichIm.src = "/images/arrowdown.gif";
  }
  else {
	 whichEl.style.display = "none";
   whichIm.src = "/images/arrowright.gif";
  }
 }

 //expand menu function (netscape 4 only)
 function expandNS(el) {
  whichEl = eval("document." + el + "Child");
  whichIm = eval("document." + el + "Parent.document.images['imEx']");



  //expand selected layer
  if (whichEl.visibility == "hide") {
   whichEl.visibility = "show";
   whichIm.src = "/images/arrowdown.gif";
  }
  else {
	 whichEl.visibility = "hide";
   whichIm.src = "/images/arrowright.gif";
  }

  arrange();
 }

 //called on page load (for netscape only)
 function showAll() {
  for (i=firstInd; i<document.layers.length; i++) {
   whichEl = document.layers[i];
   whichEl.visibility = "show";
  }
 }

 with (document) {
  write("<STYLE TYPE='text/css'>");
  if (NS4) {
   write(".parent {position:absolute; visibility:hidden; left:0}");
   write(".child {position:absolute; visibility:hidden; left:20px}");
   write(".childshown {position:absolute; visibility:hidden; left:20px}");
   write(".monkey {position:absolute; visibility:hidden; left:0px; top:110px}");
  }
  else {
   write(".child {display:none}")
   write(".childshown {display:block}")
  }
  write("</STYLE>");
 }

 onload = initIt;

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
