var bV=parseInt(navigator.appVersion);
NS4=(document.layers) ? true : false;
IE4=((document.all)&&(bV>=4))?true:false;
ver4 = (NS4 || IE4) ? true : false;

function expandmgmt(){return}
function expandAll(){return}
isExpanded = 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;
}

function arrange() {
	if (NS4){
	nextY = 0;
	}
	else{
	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.id.indexOf("el") != -1){
			if (whichEl.visibility.indexOf("hide") != -1) {
				whichEl.pageY = nextY;
				nextY += whichEl.document.height-10;
			}
		}
	}
}

function initIt(){
	if (NS4) {
		for (i=0; i<document.layers.length; i++) {
			whichEl = document.layers[i];
			if (whichEl.id.indexOf("Child") != -1) whichEl.visibility = "hide";
		}
		arrange();
	}
	else {
		tempColl = document.all.tags("DIV");
		for (i=0; i<tempColl.length; i++) {
			if (tempColl(i).className == "child") tempColl(i).style.display = "none";
		}
	}
}

function CheckIt(el){
	whichEl = eval(el + "Child");
	whichIm = eval("document." + el + "imEx")
	if (whichEl.style.display == "none" || whichEl.style.display == "") {
		initIt();
		expandmgmt(el);
	}
	else {
		initIt();
	}
}

function expandmgmt(el) {
	if (!ver4) return;
	// Modified by Terence
	if (IE4) {expandIE(el)} //else {expandNS(el)}
}

function expandIE(el) { 
	whichEl = eval(el + "Child");
	whichIm = eval("document." + el + "imEx")
	if (whichEl.style.display == "none" || whichEl.style.display == "") {
		whichEl.style.display = "block";
//		whichIm.src = "../../images/large_arrow_o_2.gif";
//		whichIm.src = "../../../images/greenpoint.gif";
	}
	else {
		whichEl.style.display = "none";
// 		whichIm.src = "../../images/large_arrow_2.gif";
//		whichIm.src = "../../../images/bluepoint.gif";
	}
}

function expandNS(el) {
	whichEl = eval("document." + el + "Child");
	whichIm = eval("document." + el + "Parent.document.images['imEx']");
	if (whichEl.visibility == "hide") {
		whichEl.visibility = "show";
//		whichIm.src = "triUp.gif";
		whichIm.src = "../../images/1_pixel.gif";
	}
	else {
		whichEl.visibility = "hide";
//		whichIm.src = "triDown.gif";
		whichIm.src = "../../images/1_pixel.gif";		
	}
	arrange();
}

function showAll() {
	for (i=firstInd; i<document.layers.length; i++) {
		whichEl = document.layers[i];
		if (whichEl.id.indexOf("el") != -1)
		whichEl.visibility = "show";
	}
}

with (document) {
	write("<STYLE TYPE='text/css'>");
	if (NS4) {
		write(".parent {position:relative; visibility:hidden}");
		write(".child {position:relative; visibility:hidden}");
		write(".regular {position:relative; visibility:hidden}")
	}
	else {
		write(".child {display:none}")
	}
	write("</STYLE>");
}

initIt();
