document.onmouseover = mOver ;
document.onmouseout = mOut ;


function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_setTextOfLayer(objName,x,newText) { //v3.0
  if ((obj=MM_findObj(objName))!=null) with (obj)
    if (navigator.appName=='Netscape') {document.write(unescape(newText)); document.close();}
    else innerHTML = unescape(newText);
}


function mOver() {
	var eSrc = window.event.srcElement ;
	if (eSrc.className == "item") {
		window.event.srcElement.className = "highlight";
	}
	if (eSrc.className == "sitem") {
		window.event.srcElement.className = "shighlight";
	}
}

function mOut() {
	var eSrc = window.event.srcElement ;
	if (eSrc.className == "highlight") {
		window.event.srcElement.className = "item";
	}
	if (eSrc.className == "shighlight") {
		window.event.srcElement.className = "sitem";
	}
}


var bV=parseInt(navigator.appVersion);
NS4=(document.layers) ? true : false;
IE4=((document.all)&&(bV>=4))?true:false;
ver4 = (NS4 || IE4) ? true : false;

isExpanded = false;

function getIndex($1) {
	ind = null;
	for (i=0; i<document.layers.length; i++) {
		whichEl = document.layers[i];
		if (whichEl.id == $1) {
			ind = i;
			break;
		}
	}
	return ind;
}

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 FolderInit($1){
	if (NS4) {
	firstEl = "mParent";
	firstInd = getIndex(firstEl);
	showAll();
		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";
		}
	}
	if($1 != null) seleciona($1);
}

function FolderExpand($1,$2) {
	if (!ver4) return;
	if (IE4) { ExpandIE($1,$2) } 
	else { ExpandNS($1,$2) }
}

function ExpandIE($1,$2) {
	tempColl = document.all.tags("DIV");
	for (i=0; i<tempColl.length; i++) {
		if (tempColl(i).className == "child") tempColl(i).style.display = "none";
	}
	Expanda = eval($1 + "a");
	Expanda.blur()
	ExpandChild = eval($1 + "Child");
	ExpandChild.style.display = "block";
	seleciona($1);
}

function ExpandNS($1,$2) {
	firstEl = "mParent";
	firstInd = getIndex(firstEl);
	showAll();
		for (i=0; i<document.layers.length; i++) {
			whichEl = document.layers[i];
			if (whichEl.id.indexOf("Child") != -1) whichEl.visibility = "hide";
		}
		arrange();
	ExpandChild = eval("document." + $1 + "Child")
	ExpandChild.visibility = "show";
	arrange();
}

function showAll() {
	for (i=firstInd; i<document.layers.length; i++) {
		whichEl = document.layers[i];
		whichEl.visibility = "show";
	}
}

function seleciona($1) {
	tempLink = document.all.tags("A");
	for (i=0; i<tempLink.length; i++) {
		if (tempLink(i).className == "itemsel") tempLink(i).className = "item";
		if (tempLink(i).className == "sitemsel") tempLink(i).className = "sitem";
	}
	if (document.getElementById($1 + "a").className.indexOf("s")==0) {
		document.getElementById($1 + "a").className= "sitemsel"; }
	else {
		document.getElementById($1 + "a").className= "itemsel"; }
}


with (document) {
	write("<STYLE TYPE='text/css'>");
	write(".parent { font: 10px/11px Arial; text-decoration: none; color: #01646C }");
	write(".child { font: 10px/11px Arial; color: #01646C; width:150; height:20; display:none }");
	write(".item { font: 10px/11px Arial; color: #01646C; text-decoration:none; cursor: hand; width:150; height: 15}");
	write(".sitem { font: 10px/11px Arial; color: #9E0B0E; text-decoration:none; cursor: hand; width:150; line-height: 10pt}");
	write(".highlight {font: 10px/11px Arial; color: #9E0B0E; text-decoration:none; width:150; height: 15 }");
	write(".shighlight {font: 10px/11px Arial; color: #01646C; text-decoration:none; width:150; line-height: 10pt}");
	write(".itemsel {font: 10px/11px Arial; text-decoration:none; color: #0072BC;; width:150; height: 15 }");
	write(".sitemsel {font: 10px/11px Arial; text-decoration:none; color: #0072BC;; width:150; line-height: 10pt }");
	write("</STYLE>");
}

onload = FolderInit;


