var imagePath;imagePath='/obladm/obldp.nsf/';function TreeControl(varName){this.nodes=new Array();this.styles=new Array();this.styles[0]="SITEMAP0";this.styles[1]="SITEMAP1";this.styles[2]="SITEMAP2";this.styles[3]="SITEMAP2";this.varName=varName;this.linkStyle='';//----------------------------------------------------------------------------------------------------------this.render= _TC_render;this.addNode=_TC_addNode;this.addChildNode=_TC_addChildNode;this.getNode=_TC_getNode;this.expandNode=_TC_expand_collapse_Node;}//-----------------------------------------------------------------------------------------function _TC_render(){for (i=0;i<this.nodes.length;i++)	{	this.nodes[i].render();	}	}//--------------------------------------------------------------------------------------------------------------------------function _TC_addNode(txt,url){var node;node=new TreeNode;node.text=txt;node.url=url;node.control=this;node.id=this.nodes.length.toString();this.nodes[this.nodes.length]=nodereturn node;}//---------------------------------------------------------------------------------------------function _TC_addChildNode(pNode,txt,url){var node;node=new TreeNode;node.text=txt;node.url=url;node.control=this;node.parent=pNode;node.id=pNode.id+'.'+pNode.nodes.length.toString();node.level=pNode.level+1;pNode.nodes[pNode.nodes.length]=node;return node;}//----------------------------------------------------------------------------------------------------------------------function _TC_getNode(id){arr=id.split(".");cont=this;for (i=0;i<arr.length;i++)	{	node=cont.nodes[arr[i]];	cont=node;	}return node;}//------------------------------------------------------------------------------------------------------------------------------------------------------function _TC_expand_collapse_Node(id){node=this.getNode(id);if (node.status==0){node.expand();}else{node.collapse();}}//********************************************************function TreeNode(){this.style='';this.text='';this.url='';this.nodes=new Array();this.level=0;this.id='';this.status=0; // 0 - collapsed , 1- expandedthis.lastNodeId='';this.control='';this.parent='';this.render=_TN_render;this.expand=_TN_expand;this.collapse=_TN_collapse;}//---------------------------------------------------------------function _TN_render(){var i,j,arr;if (this.level>0 ) {	STL="STYLE='visibility:hidden;position:absolute;top:0px'";	}	else		{STL='';}document.write("<TABLE ID='N"+this.id+"'  CELLSPACING=0 CELLPADDING=0  WIDTH=100% "+STL+"   ><TR>");cont=this.control;arr=this.id.split(".")for (i=0;i<this.level;i++)	{		if (this.parent.level==i ) 			{						if ( (this.parent.nodes.length-1) > arr[i+1] )		  	 {document.write("<TD WIDTH=15 BACKGROUND='"+imagePath+"vert.gif' ><IMG  SRC='"+imagePath+"vilka.gif'></TD>")}		  	else			    {document.write("<TD WIDTH=15 > <IMG  SRC='"+imagePath+"ugol.gif'></TD>")}			}			else 	{			  if ( (cont.nodes.length-1)>arr[i] )		  	{document.write("<TD WIDTH=15 BACKGROUND='"+imagePath+"vert.gif' ><IMG  SRC='"+imagePath+"vert.gif'></TD>")}		  	else			    {document.write("<TD WIDTH=15 STYLE='color:#FFFFFF' >_</TD>")}			}					cont=cont.nodes[arr[i]];		}//end forif  (this.nodes.length>0 )	{	document.write("<TD WIDTH=15 onclick=\""+this.control.varName+ ".expandNode('"+this.id+"');\"  STYLE='cursor:hand'><IMG id='P"+this.id+"' SRC='"+imagePath+"plus.gif'><TD>");	}else	    {		if (this.level==0)				{document.write("<TD WIDTH=15 STYLE='color:#FFFFFF' >-</TD>")}		else				{document.write("<TD WIDTH=15  ><IMG  SRC='"+imagePath+"Arrow.gif'></TD>")}		} document.write("<TD STYLE='border:1px solid #FFFFFF'  ALIGN=left onmouseover='highlightTD(this);'  onmouseout='unhighlightTD(this)' ><A CLASS="+this.control.styles[this.level]+" HREF="+this.url+">"+this.text+"</A></TD>");document.write("</TR></TABLE>");for (j=0;j<this.nodes.length;j++)	{	this.nodes[j].render();	}	}///--------------------------------------------------------------------function _TN_expand(){this.status=1;img=document.getElementById("P"+this.id);img.src=imagePath+'minus.gif';for (j=0;j<this.nodes.length;j++)	{	tbl=document.getElementById("N"+this.nodes[j].id);	tbl.style.position='static';		tbl.style.visibility="visible";	}}//----------------------------------------------------------------------function _TN_collapse(){var j,k;this.status=0;if (this.nodes.length>0) {		img=document.getElementById("P"+this.id);		img.src=imagePath+'plus.gif';		}for (j=0;j<this.nodes.length;j++)	{	tbl=document.getElementById("N"+this.nodes[j].id);	tbl.style.visibility="hidden";	tbl.style.position='absolute';		subNode=this.nodes[j];	subNode.collapse();			}}//========================================================function highlightTD(td){td.style.backgroundColor='#EFEFEF';td.style.border='1px solid #AAAAAA'}//------------------------------------------------------------function unhighlightTD(td){td.style.backgroundColor='#FFFFFF';td.style.border='1px solid #FFFFFF'}