if(mnOn){
	fl_open_node = null;
	openvis = false;
	}

function findObj(n){return document.all ? eval(n) : document.getElementById(n);}

function fStart(){
	var fl, gl, flCount=0;
	if(!mnOn) return;
	menuLoc = window;

	while(eval("window.flAr" + flCount)){
		//fl=eval("fl"+br+flCount);
		gl=eval("flGlob"+flCount);
		for(i=0;i<gl.length;i++) eval(flGl[i] + "=" + gl[i]);
		//for(i=0;i<flBr.length;i++) eval(flBr[i] + "=" + fl[i]);

		stlStr=" style='position:absolute;visibility:hidden;width:" + fWidth + "px;padding:" + pad + "px";
		if(brdW) stlStr += ";border-bottom-width:" + brdW + "px;border-bottom-color:" + brdC + ";border-bottom-style:" + brdS
		stlStr+="'><table border=0 cellspacing=0 cellpadding=0 width=" +fWidth + ">"

		flStr="<div id=fl" + flCount + " style='position:relative;left:0px;top:0px;cursor:default;overflow:" + flow + ";width:" + fWidth + ";height:" + (fpad*2) + ";background-color:" + bkgC + "'>";
		flIE(flCount,0);
		findObj(name).innerHTML= flStr + "</div>";

		folder=findObj("fl" + flCount);
		folder.fheight=fpad*2;
		folder.ovBkg=[lOBkg,fOBkg];
		folder.lv=0;

		flMake(false,flCount,0);
		
		fvis=null;
		if(fvisited){
			fvis=findObj(fvisited);
			fvis.onmouseover=fvis.onmouseout=fvis.onclick=fvis.onmouseup=null;
			if(fvis.parent){
				openvis=true;
				var fpar=findObj(fvisited.substr(0,fvisited.indexOf("_",fvisited.indexOf("_")+1)));
				folder.act =  fpar.next ? fpar.next : fpar.thr;
				fpar.expand();
				}
			else{
				openvis=false;
				if(fvis.isSub){folder.act =  fvis.next ? fvis.next : fvis.thr; fvis.expand();}
				}
			if(fvis.isSub){
				fvis.onclick=fActive;
				fvis.style.cursor="default";
				}
			//fvis.style.backgroundColor="#04A95C";
			fvis.txt.style.color="#000000";
			}
		folder.unlock=1;
		flCount++;
		}
	}

function flIE(ndCnt, lv){
	var i, arPtr, styleStr, array = eval("flAr" + ndCnt);
	var lg=array.length/3, txtWidth, lStr, rStr, lTab=lv*tab, name, imgTab;
	var tWidth = fWidth-lTab;
	imgTab = lTab ? "<img height=1 width=" + lTab + ">" : ""
	for(i=0; i<lg; i++){	
		name =ndCnt + "_" + i; arPtr = i*3;	txtWidth = tWidth;
		lStr= lTab ? "<td width=" + lTab + ">" + imgTab + "</td>" : "";
		rStr="";
		if(array[arPtr + 2]){
			if(leftC){
				txtWidth-=(ltWidth + leftH);
				lStr = "<td width=" + (lTab + ltWidth + leftH) + ">" + imgTab + "<img id=nlp" + name + " width=" + ltWidth + " height=" + ltHeight + " src='" + leftC + "' border=1 vspace=" + leftV + "></td>";
				}
			if(rightC){
				txtWidth-=(rtWidth + rightH);
				rStr = "<td width=" + (rtWidth + rightH) + " align=right><img id=nrp" + name + " width=" + rtWidth + " height=" + rtHeight + " src='" + rightC + "' border=0 vspace=" + rightV + "></td>";
				}
			flStr+="<span ID=nd" + name + stlStr + "<tr valign=middle align=left>" + lStr + "<td ID=ndt" + name + " width=" + txtWidth + " style='" + styles[lv] + "'>" + array[arPtr] + "</td>" + rStr + "</tr></table><img height=1 src='im/dots.gif'></span>";
			flIE(name, lv+1);
			}
		else{
			if(leftL){
				txtWidth-=(ltWidth + 2*leftH);
				lStr = "<td width=" + (lTab + lfWidth + leftH) + ">" + imgTab + "<img id=nll" + name + " width=" + lfWidth + " height=" + lfHeight + " src='" + leftL + "' border=0 vspace=" + leftV + "></td>";
				}
			if(rightL){
				txtWidth-=(rtWidth + rightH);
				rStr = "<td width=" + (lfWidth + rightH) + " align=right><img id=nrl" + name + " width=" + lfWidth + " height=" + lfHeight + " src='" + rightL + "' border=0 vspace=" + rightV + "></td>";
				}
			flStr+="<span ID=nd" + name + stlStr + "<tr valign=middle align=left>" + lStr + "<td ID=ndt" + name + " width=" + txtWidth + " style='" + styles[lv] + "'>" + array[arPtr] + "</td>" + rStr + "</tr></table><img height=1 src='im/dots.gif'></span>";
			}
		}
	}
	
function flMake(prNd,ndCount,lv){
	var nd, i, array = eval("flAr" + ndCount);
	var lg=array.length/3;
	for(i=0; i<lg; i++){
		pNd = i>0 ? nd : null;
		nd = findObj("nd" + ndCount + "_" + i);
		if(pNd){nd.lead=pNd.lead; pNd.next=nd; pThr=pNd.last; while(pThr){pThr.thr=nd; pThr=pThr.last;}} else nd.lead=nd;
		if(prNd){if(i<=0)prNd.first=nd;	nd.parent=prNd;	if(i==lg-1)prNd.last=nd;}

		arPtr = i*3;
		nd.lv = lv;
		nd.folder=folder;
		nd.linkText	= array[arPtr + 1];
		nd.isSub		= array[arPtr + 2];
		nd.show=showNode;
		
		nd.onselectstart = function(){return false;};
		nd.style.cursor = "default";
		if(nd.linkText){nd.onclick = fLink; nd.style.cursor = "hand";}
		else if(nd.isSub) nd.onclick = fActive;
		if(nd.isSub)nd.expand = fExpand;
		nd.onmouseover = fIeOver;
		nd.onmouseout = fIeOut;
		
		nd.txt=findObj("ndt" + ndCount + "_" + i);
		if(nd.isSub){
			if(leftO!=""){nd.fptr = findObj("nlp" + ndCount + "_" + i); nd.imgO=leftO; nd.imgC=leftC;}
			else if(rightO!=""){nd.fptr = findObj("nrp" + ndCount + "_" + i); nd.imgO=rightO; nd.imgC=rightC;}
			}

		if(!nd.parent){
			nd.top = nd.style.top = folder.fheight-fpad;
			folder.fheight+=nd.offsetHeight;
			folder.style.height=folder.fheight;
			nd.style.visibility="visible";
			}
		nd.fheight=nd.offsetHeight;
		
		if(nd.isSub)flMake(nd,ndCount + "_" + i,lv+1);
		}
	}

function fActive(){
	if(this.folder.unlock){
	this.folder.unlock=0;
	this.folder.act =  this.next ? this.next : this.thr;
	this.expand();
	}
	}

function fExpand(){
	this.folder.lv=this.lv;
	if(this.open){this.fptr.src= this.imgC; 	this.open=false; hideNode(this.first, this.top+this.fheight);}
	else{
		hnode=this.lead;
		while(hnode){if(hnode.open)break; hnode=hnode.next;}
		if(hnode){fl_open_node=this;	hnode.expand();}
		else{fl_open_node=null; this.fptr.src=this.imgO; this.open=true; showNode(this.first, this.top+this.fheight);}
		}
	}
	
function hideNode(nd, pos){
	nd.folder.fheight-=nd.fheight;
	nd.folder.style.height=nd.folder.fheight;
	var node = nd.open ? nd.first : (nd.next ? nd.next : nd.thr);
	while(node){
		node.top-=nd.fheight; node.style.top=node.top;
		node = node.open ? node.first : (node.next ? node.next : node.thr);
		}
	nd.style.visibility="hidden";
	cr_node=seekNext(nd);
	if(cr_node){cr_pos=pos+nd.fheight; setTimeout("hideNode(cr_node, cr_pos);",10);}
	else if(fl_open_node)setTimeout("fl_open_node.expand();",10);
	else nd.folder.unlock=1;
	}

function showNode(nd, pos){
	nd.folder.fheight += nd.fheight; nd.folder.style.height=nd.folder.fheight;
	var topPos=pos+nd.fheight;
	var node = nd.folder.act;
	while(node){
		node.top=topPos;
		node.style.top=node.top;
		topPos+=node.fheight;
		node = node.next ? node.next : node.thr;
		}
	nd.top=pos; nd.style.top=pos;	nd.style.visibility="visible";
	cr_node=seekNext(nd);
	if(cr_node){
		cr_pos=pos+nd.fheight;
		setTimeout("showNode(cr_node, cr_pos);",10);
		}
	else if(openvis){
		var i=0, fv=fvisited.indexOf("_",fvisited.indexOf("_")+1);
		while(i<nd.lv){fv=fvisited.indexOf("_",fv+1); i++;}
		str=fvisited.substr(0,fv);
		if(fv>-1){
			cr_node=eval(str);
			cr_node.folder.act =  cr_node.next ? cr_node.next : cr_node.thr;
			cr_node.expand();
			}
		else{
			openvis=false;
			if(fvis.isSub)fvis.expand();
			}
		}
	else nd.folder.unlock=1;
	}

function seekNext(nd){
	if(nd.open)return nd.first;
	else if(nd.next)return nd.next;
	else if(nd.thr && nd.thr.lv>nd.folder.lv)return nd.thr;
	return null;
	}

function fIeOut(){this.txt.style.color = "#2d59a6";}
	
function fIeOver(){this.txt.style.color = "#000033";}

function fLink(){if(this.linkText.indexOf(".pdf")>0 || this.linkText.indexOf(".ppt")>0) window.open(this.linkText); else window.top.location.href = this.linkText;}
