
	var v1=new Array;
	var v2=new Array;
	var _sbmID=null;
	var _tag=null;
	var icon=null;
	var a1=null;

// *****************************************************************************
function startSubmenu(_width, _sbmName, initial)
{	this._width=_width;
	document.write("<div id=\""+_sbmName+
 		"\" style=\""+"filter:"+(initial?this.efect[0]:this.efect[1])+this.efect[2]+this.efect[3]+this.efect[4]+
		";-moz-border-radius:"+this.PARAM[21]+";border-radius:"+this.PARAM[21]+
		";visibility:hidden;z-Index:91;background-color: "+this.PARAM[2]+";padding:"+this.PARAM[19]+
		";position:absolute;border: "+this.PARAM[6]+" "+this.PARAM[7]+" "+this.PARAM[8]+
		"\" onmouseout=\"_TimeOut('"+_sbmName+"')\" onmouseover=\"TOut_MOver('"+_sbmName+	"')\"><table cellpadding=\""+this.PARAM[14]+
		"\" cellspacing='0' style=\"cursor:default;font:"+this.PARAM[9]+" "+this.PARAM[10]+" "+this.PARAM[11]+
		"\" width="+_width+">");
	
	this._sbmID=_sbmName
}


// *****************************************************************************
function closeMenu()
{	document.write("</table></div>");
}


// *****************************************************************************
function menuItem (ic_off, ic_on, text, link, target, _sbmName, side)
{	side=side?side:0;
	ic_off="<div style=\"overflow:hidden;padding:"+(this.PARAM[14]/2-4)+"px;width:"+this.PARAM[15]+"px;height:"+this.PARAM[16]+"px\">"+(ic_off?("<img src=\""+ic_off+"\" width="+this.PARAM[15]+" height="+this.PARAM[16]+">"):"&nbsp;")+"</div>";
	ic_on=(ic_off&&ic_on)? "I_ItmOver=\""+ic_on+"\"":"";
	
	onclick=" onclick='window.open(\""+link+"\""+(target?(",\""+target+"\""):",\"_self\"")+")'";
	
	_timeout=_sbmName?";onDisplay('"+_sbmName+"','"+this._sbmID+"',this,"+side+")":"";
	_TOut=_sbmName?";_TimeOut('"+_sbmName+"')":"";
	
	a3='images/aw.gif';
	arrow_off=_sbmName?"<img src=\""+'images/ab.gif'+"\">":"&nbsp;";
	arrow_on=_sbmName? "IC2=\""+a3+"\"":"";

	{	document.write("<tr "+onclick+" onmouseover=\"_MOver(this)"+_timeout+"\"onmouseout=\"_MOut('"+this._sbmID+"')"+_TOut+
			"\"><td align=\"center\" valign=\"middle\" style=\"background-color:"+
			this.PARAM[5]+";border:"+this.PARAM[18]+
			" solid "+this.PARAM[5]+
			";border-right-width : 0px;\" width=\""+this.PARAM[15]+"\""+
			ic_on+">"+ic_off+
			"</td><td valign=\"middle\" style=\"cursor: hand;font:"+this.PARAM[9]+" "+this.PARAM[10]+" "+this.PARAM[11]+
			";background-color:"+this.PARAM[2]+";border:"+this.PARAM[18]+" solid "+this.PARAM[2]+
			";color:"+this.PARAM[0]+";border-left-width:0px;border-right-width:0px\" width=2000>&nbsp;"+text+
			"</td><td align=\"center\" valign=\"middle\" width=1 style=\"font:"+this.PARAM[9]+" "+this.PARAM[10]+" "+this.PARAM[11]+
			";background-color:"+this.PARAM[2]+";border:"+this.PARAM[18]+" solid "+this.PARAM[2]+";border-left-width:0px\""+arrow_on+">"+arrow_off+
			"</td></tr>")
	}

}


//*****************************************************************************
function _MOver(a2)
{	if(this._tag)this._MOut();
	this._tag=a2.getElementsByTagName("TD");
	this._tag[1].style.backgroundColor=this._tag[0].style.backgroundColor=this._tag[2].style.backgroundColor=this.PARAM[3];
	this._tag[1].style.color=this.PARAM[1];
	this._tag[1].style.borderTopColor=this._tag[1].style.borderBottomColor=this._tag[0].style.borderTopColor=this._tag[0].style.borderBottomColor=this._tag[2].style.borderTopColor=this._tag[2].style.borderBottomColor=this._tag[2].style.borderRightColor=this._tag[0].style.borderLeftColor=this.PARAM[17];
	this._tag[1].style.borderLeftColor=this._tag[1].style.borderRightColor=this._tag[2].style.borderLeftColor=this._tag[0].style.borderRightColor=this.PARAM[3];
	
	
	if(this._tag[0].getAttribute("I_ItmOver"))
 	{	this.icon_1=this._tag[0].getElementsByTagName("IMG")[0].src;
 		this._tag[0].getElementsByTagName("IMG")[0].src=this._tag[0].getAttribute("I_ItmOver")
 	}
 	if(this._tag[2].getAttribute("IC2"))
 	{	this.icon_2=this._tag[2].getElementsByTagName("IMG")[0].src;
 	 	this._tag[2].getElementsByTagName("IMG")[0].src=this._tag[2].getAttribute("IC2")
 	}

	
}


//*****************************************************************************
function _MOut(_sbmID)
{	this._tag[1].style.color=this.PARAM[0];
	this._tag[0].style.backgroundColor=this._tag[0].style.borderColor=this.PARAM[5];
	this._tag[2].style.backgroundColor=this._tag[2].style.borderColor=this._tag[1].style.backgroundColor=this._tag[1].style.borderColor=this.PARAM[2];
	
	if(this.icon_1)this._tag[0].getElementsByTagName("IMG")[0].src=this.icon_1;
 	if(this.icon_2)this._tag[2].getElementsByTagName("IMG")[0].src=this.icon_2;

	
	this._tag=null;
 	this.icon_1=null;this.icon_2=null;
}



//******* stabileste durata de afisare startSubmenu onmouseout ***********************
function _TimeOut(_timeout)				
{	clearTimeout(this.v2[_timeout]);
	
	this.v2[_timeout]=setTimeout('_TimeOutParent("'+_timeout+'")',500)
}


//******* durata de afisare a startSubmenu_parent dupa ce _sbmName_child dispare *****
function _TimeOutParent(_timeout)			
{	_submeniu=document.getElementById(_timeout);
 	if(document.all&&!window.opera&&_submeniu.style.visibility!='hidden')
		{_submeniu.filters[3].enabled=true;
		 _submeniu.filters[3].Apply();
		 _submeniu.style.visibility='hidden';
		 _submeniu.filters[3].Play();		
		}
	else
		{_submeniu.style.visibility='hidden'
		}

if(document.getElementById(_timeout))document.getElementById(_timeout).style.visibility = 'hidden';
	if((this.v1[_timeout]!=this.b6&&this.v1[_timeout]!='op'))
	{	this.v2[this.v1[_timeout]]=setTimeout('_TimeOut("'+this.v1[_timeout]+'")',100)
	}
	
}


//*****************************************************************************
function TOut_MOver(_timeout)
{	clearTimeout(this.v2[_timeout]);clearTimeout(this.v2[this.v1[_timeout]]);
	this.b6=_timeout
}


//*****************************************************************************
function _Fnc1()
{	this.b2=document.body.scrollTop||window.pageYOffset||1;
	this.b1=document.body.scrollLeft||window.pageXOffset||1;
	this.a9=(document.body.clientWidth)||(innerWidth-20);
	this.b0=(document.body.clientHeight)||(innerHeight-5);
	tmp=setTimeout('_Fnc1()',20)
}


//*****************************************************************************
function onDisplay(_timeout,c7,e2,d9)
{	clearTimeout(this.v2[_timeout]);
	clearTimeout(this.v2[c7]);
	this.v1[_timeout]=c7;
	c6=document.getElementById(c7);
	_submeniu=document.getElementById(_timeout);
	_submeniu.x=c6.offsetLeft;
	_submeniu.y=c6.offsetTop;
	if(c7!= null)
	{	_submeniu.x+=(1+c6.offsetWidth);
		_submeniu.y+=e2.offsetTop;
	}
	else
	{	if(this.a1)this.a5();
		_submeniu.x+=e2.offsetLeft;
		_submeniu.y+=-_submeniu.offsetHeight;
		
	}
	
	w=a9+b1;
	h=b0+b2;
	
	
	_submeniu.x=(_submeniu.x<this.b1)?this.b1:(_submeniu.x+_submeniu.offsetWidth)>w?(w-_submeniu.offsetWidth):_submeniu.x;
	
	if (navigator.appName == "Microsoft Internet Explorer")
		_submeniu.y=(_submeniu.y<this.b2)?this.b2:(_submeniu.y+_submeniu.offsetHeight)>h?(h-_submeniu.offsetHeight-this.PARAM[23]):_submeniu.y;
	else
		_submeniu.y=(_submeniu.y<this.b2)?this.b2:(_submeniu.y+_submeniu.offsetHeight)>h?(h-_submeniu.offsetHeight-7):_submeniu.y;

	_submeniu.style.left=_submeniu.x-((1)*this.PARAM[24])+"px";
//		_submeniu.style.top=_submeniu.y+(((d9==2||d9==3)?-1:1)*this.PARAM[23])+"px";
	_submeniu.style.top=_submeniu.y+((1)*this.PARAM[23])+"px";
	
	_submeniu.style.zIndex=90+c6.style.zIndex+1;
	if(document.all&&!window.opera&&efect[0]&&_submeniu.style.visibility!='visible')
	{	_submeniu.filters[0].enabled=true;
		_submeniu.filters[0].Apply();
		_submeniu.style.visibility='visible';
		_submeniu.filters[0].Play()
	}
	else
	{	_submeniu.style.visibility='visible'
	}
}


//*****************************************************************************
function menu(_sbmName,c7)
{	tx=c7.offsetLeft;
	ty=c7.offsetTop;
	w=a9+b1;
	h=b0+b2;
	e1=c7.offsetParent;
	while(e1!=null)
	{	ty+=e1.offsetTop;
		tx+=e1.offsetLeft;
		e1=e1.offsetParent
	}
	clearTimeout(this.v2[_sbmName]);
	this.v1[_sbmName]='op';

	_submeniu=document.getElementById(_sbmName);

	_submeniu.x=tx+(c7.offsetWidth);
	_submeniu.y=ty-16+(c7.offsetHeight);
	
	_submeniu.x=(_submeniu.x<this.b1)?this.b1:(_submeniu.x+_submeniu.offsetWidth)>w?(w-_submeniu.offsetWidth):_submeniu.x;

	if (navigator.appName == "Microsoft Internet Explorer")
		_submeniu.y=(_submeniu.y<this.b2)?this.b2:(_submeniu.y+_submeniu.offsetHeight)>h?(h-_submeniu.offsetHeight):_submeniu.y;	
	else
		_submeniu.y=(_submeniu.y<this.b2)?this.b2:(_submeniu.y+_submeniu.offsetHeight)>h?(h-_submeniu.offsetHeight)-2:_submeniu.y;	

	_submeniu.style.left=_submeniu.x+"px";
	_submeniu.style.top=_submeniu.y+"px";_submeniu.style.zIndex=1000;
	if(document.all&&!window.opera&&efect[0]&&_submeniu.style.visibility!='visible')
	{	_submeniu.filters[0].enabled=true;
		_submeniu.filters[0].Apply();
		_submeniu.style.visibility='visible';
		_submeniu.filters[0].Play();		
	}
	else
	{	_submeniu.style.visibility='visible'
	}
	
	if(this.a1)this.a5()
}


//*****************************************************************************
function _Fnc2(e)
{	w=a9+b1;
	h=b0+b2;
	x=b4;
	y=b5;
	x=(x+a1.offsetWidth)>w?(w-a1.offsetWidth):x;
	y=(y+a1.offsetHeight)>h?(h-a1.offsetHeight):y;
	a1.style.top=y+"px";
	a1.style.left=x+"px";
	if(document.all&&!window.opera&&efect[0]&&a1.style.visibility!='visible')
	{	a1.filters[0].enabled=true;
		a1.filters[0].Apply();
		a1.style.visibility='visible';
		a1.filters[0].Play()
	}
	else
	{	a1.style.visibility='visible'
	}
	return false
}


//*****************************************************************************
function a5()
{a1.style.visibility="hidden"
}


//*****************************************************************************
function Init(e)
{	v2['fx']=window.setTimeout('null',20);
	if(document.all&&!document.getElementById&&!window.opera)
	{	document.getElementById=function(el){return document.all[el]};
		document.getElementsByTagName=function(el){return document.all.tags(el)}
	}
	
	_doc_attr=document.all?document.all:document.getElementsByTagName('*');
	for(i=0;i<_doc_attr.length;i++)
	{	if(_doc_attr[i].getAttribute('ASmenu'))
		{	_SbmOver=new String(_doc_attr[i].onmouseover);
			_ItmOver=_SbmOver.substring(_SbmOver.indexOf("{")+1,_SbmOver.lastIndexOf("}"))+";";
			_doc_attr[i].setAttribute('overVechi',_ItmOver);
			_SbmOver=new String(_doc_attr[i].onmouseout);
			_ItmOver=_SbmOver.substring(_SbmOver.indexOf("{")+1,_SbmOver.lastIndexOf("}"))+";";
			_doc_attr[i].setAttribute('outVechi',_ItmOver);
			_doc_attr[i].onmouseover=function()
				{	eval(this.getAttribute('overVechi'));
					d1=this.getAttribute('ASmenu').lastIndexOf("|");
					menu(this.getAttribute('ASmenu').substring(0,d1),this,this.getAttribute('ASmenu').substring(d1+1,d1+2))
				};
			_doc_attr[i].onmouseout=function()
				{	eval(this.getAttribute('outVechi'));
					d1=this.getAttribute('ASmenu').lastIndexOf("|");
					_TimeOut(this.getAttribute('ASmenu').substring(0,d1))
				}
		}
	}
	
	if(!window.opera&&a1)
	{	document.oncontextmenu=_Fnc2;
		document.onclick=a5
	};

	_Fnc1();
}


//*****************************************************************************
function separator()
{
		document.write("<tr width=\""+this.a0+"\"><td height=\"1\" style=\"background-color:"+this.PARAM[8]+";font-size:0px;\" colspan=3> </td></tr>")
}



//*****************************************************************************
//*****************************************************************************
// ****************** FUNCTIILE PENTRU CONSTRUCTIA ARBORELUI *****************
//*****************************************************************************
//*****************************************************************************


// ************** Obiect nod ************************************************
function Node(id, pid, name, url, title, target, icon, iconOpen, open) 
{	this.id = id;
	this.pid = pid;
	this.name = name;
	this.url = url;
	this.title = title;
	this.target = target;
	this.icon = icon;
	this.iconOpen = iconOpen;
	this._io = open || false;
	this._is = false;
	this._ls = false;
	this._hc = false;
	this._ai = 0;
	this._p;
};



// ************** Obiect arbore **********************************************
function DVTree(objName) 
{	this.config = 
	{	target			: null,
		folderLinks		: true,
		useSelection	: true,
		useCookies		: true,
		useLines		: true,
		useIcons		: true,
		useStatusText	: false,
		closeSameLevel	: false,
		inOrder			: false
	}

	this.icon = 
	{	root			: 'img/base.gif',
		folder			: 'img/folder.gif',
		folderOpen		: 'img/folderopen.gif',
		node			: 'img/page.gif',
		empty			: 'img/empty.gif',
		line			: 'img/line.gif',
		join			: 'img/join.gif',
		joinBottom		: 'img/joinbottom.gif',
		plus			: 'img/plus.gif',
		plusBottom		: 'img/plusbottom.gif',
		minus			: 'img/minus.gif',
		minusBottom		: 'img/minusbottom.gif',
		nlPlus			: 'img/nolines_plus.gif',
		nlMinus			: 'img/nolines_minus.gif'
	};

	this.obj = objName;
	this.aNodes = [];
	this.aIndent = [];
	this.root = new Node(-1);
	this.selectedNode = null;
	this.selectedFound = false;
	this.completed = false;
};


// ************** Adaugare nod nou la sirul nodurilor *********************************
DVTree.prototype.add = function(id, pid, name, url, title, target, icon, iconOpen, open) 
{	this.aNodes[this.aNodes.length] = new Node(id, pid, name, url, title, target, icon, iconOpen, open);
};



// ************** Deschidere/Inchidere toate nodurile *********************************
DVTree.prototype.openAll = function() 
{	this.oAll(true);
};

DVTree.prototype.closeAll = function() 
{	this.oAll(false);
};



// ************** Afisare arbore pe pagina *******************************
DVTree.prototype.toString = function() 
{	var str = '<div class="DVtree">\n';
	if (document.getElementById) 
	{	if (this.config.useCookies) this.selectedNode = this.getSelected();
		str += this.addNode(this.root);
	} 
	else str += 'Browser not supported.';
	str += '</div>';

	if (!this.selectedFound) this.selectedNode = null;

	this.completed = true;
	return str;
};



// ************** Creare structura arbore *********************************
DVTree.prototype.addNode = function(pNode) 
{	var str = '';
	var n=0;
	if (this.config.inOrder) n = pNode._ai;
	for (n; n<this.aNodes.length; n++) 
	{	if (this.aNodes[n].pid == pNode.id) 
		{	var cn = this.aNodes[n];
			cn._p = pNode;
			cn._ai = n;
			this.setCS(cn);
			if (!cn.target && this.config.target) cn.target = this.config.target;
			if (cn._hc && !cn._io && this.config.useCookies) cn._io = this.isOpen(cn.id);
			if (!this.config.folderLinks && cn._hc) cn.url = null;
			if (this.config.useSelection && cn.id == this.selectedNode && !this.selectedFound) 
			{	cn._is = true;
				this.selectedNode = n;
				this.selectedFound = true;
			}
			str += this.node(cn, n);
			if (cn._ls) break;
		}
	}

	return str;

};



// ************** Creare icon, url si textul nodului ************************
DVTree.prototype.node = function(node, nodeId) 
{	var str = '<div class="DVTreeNode">' + this.indent(node, nodeId);
	
	if (this.config.useIcons) 
	{	if (!node.icon) node.icon = (this.root.id == node.pid) ? this.icon.root : ((node._hc) ? this.icon.folder : this.icon.node);
		if (!node.iconOpen) node.iconOpen = (node._hc) ? this.icon.folderOpen : this.icon.node;
		if (this.root.id == node.pid) 
		{	node.icon = this.icon.root;
			node.iconOpen = this.icon.root;
		}
		str += '<img id="i' + this.obj + nodeId + '" src="' + ((node._io) ? node.iconOpen : node.icon) + '" alt="" />';
	}

	if (node.url) 
	{	str += '<a id="s' + this.obj + nodeId + '" class="' + ((this.config.useSelection) ? ((node._is ? 'nodeSel' : 'node')) : 'node') + '" href="' + node.url + '"';
		if (node.title) str += ' title="' + node.title + '"';
		if (node.target) str += ' target="' + node.target + '"';
		if (this.config.useStatusText) str += ' onmouseover="window.status=\'' + node.name + '\';return true;" onmouseout="window.status=\'\';return true;" ';
		if (this.config.useSelection && ((node._hc && this.config.folderLinks) || !node._hc))
			str += ' onclick="javascript: ' + this.obj + '.s(' + nodeId + ');"';
		str += '>';
	}

	else if ((!this.config.folderLinks || !node.url) && node._hc && node.pid != this.root.id)
		str += '<a href="javascript: ' + this.obj + '.o(' + nodeId + ');" class="node">';
	str += node.name;

	if (node.url || ((!this.config.folderLinks || !node.url) && node._hc)) str += '</a>';
	str += '</div>';

	if (node._hc) 
	{	str += '<div id="d' + this.obj + nodeId + '" class="clip" style="display:' + ((this.root.id == node.pid || node._io) ? 'block' : 'none') + ';">';
		str += this.addNode(node);
		str += '</div>';
	}

	this.aIndent.pop();

	return str;

};



// ************** Adaugare icoane empty si line *******************************
DVTree.prototype.indent = function(node, nodeId) 
{	var str = '';
	if (this.root.id != node.pid) 
	{	for (var n=0; n<this.aIndent.length; n++)
			str += '<img src="' + ( (this.aIndent[n] == 1 && this.config.useLines) ? this.icon.line : this.icon.empty ) + '" alt="" />';
		(node._ls) ? this.aIndent.push(0) : this.aIndent.push(1);

		if (node._hc) 
		{	str += '<a href="javascript: ' + this.obj + '.o(' + nodeId + ');"><img id="j' + this.obj + nodeId + '" src="';
			if (!this.config.useLines) str += (node._io) ? this.icon.nlMinus : this.icon.nlPlus;
			else str += ( (node._io) ? ((node._ls && this.config.useLines) ? this.icon.minusBottom : this.icon.minus) : ((node._ls && this.config.useLines) ? this.icon.plusBottom : this.icon.plus ) );
			str += '" alt="" /></a>';

		} 
		else str += '<img src="' + ( (this.config.useLines) ? ((node._ls) ? this.icon.joinBottom : this.icon.join ) : this.icon.empty) + '" alt="" />';
	}

	return str;

};



// ************** Verificarea nodului daca are subnoduri si daca este ultimul din lista **********
DVTree.prototype.setCS = function(node) 
{	var lastId;
	for (var n=0; n<this.aNodes.length; n++) 
	{	if (this.aNodes[n].pid == node.id) node._hc = true;
		if (this.aNodes[n].pid == node.pid) lastId = this.aNodes[n].id;
	}

	if (lastId==node.id) node._ls = true;

};



// ************** Returnare nod selectat **************
DVTree.prototype.getSelected = function() 
{	var sn = this.getCookie('cs' + this.obj);
	return (sn) ? sn : null;
};



// ************** Highlight nod selectat **************
DVTree.prototype.s = function(id) 
{	if (!this.config.useSelection) return;
	var cn = this.aNodes[id];
	if (cn._hc && !this.config.folderLinks) return;
	if (this.selectedNode != id) 
	{	if (this.selectedNode || this.selectedNode==0) 
		{	eOld = document.getElementById("s" + this.obj + this.selectedNode);
			eOld.className = "node";
		}

		eNew = document.getElementById("s" + this.obj + id);
		eNew.className = "nodeSel";
		this.selectedNode = id;
		if (this.config.useCookies) this.setCookie('cs' + this.obj, cn.id);
	}

};



// Toggle Open or close
DVTree.prototype.o = function(id) 
{	var cn = this.aNodes[id];
	this.nodeStatus(!cn._io, id, cn._ls);
	cn._io = !cn._io;
	if (this.config.closeSameLevel) this.closeLevel(cn);
	if (this.config.useCookies) this.updateCookie();
};



// ************** Inchidere/deschidere toate nodurile **************
DVTree.prototype.oAll = function(status) 
{	for (var n=0; n<this.aNodes.length; n++) 
	{	if (this.aNodes[n]._hc && this.aNodes[n].pid != this.root.id) 
		{	this.nodeStatus(status, n, this.aNodes[n]._ls)
			this.aNodes[n]._io = status;
		}
	}

	if (this.config.useCookies) this.updateCookie();

};



// ************** Deschidere arbore la un anumit nod **************
DVTree.prototype.openTo = function(nId, bSelect, bFirst) 
{	if (!bFirst) 
	{	for (var n=0; n<this.aNodes.length; n++) 
		{	if (this.aNodes[n].id == nId) 
			{	nId=n;
				break;
			}
		}
	}

	var cn=this.aNodes[nId];
	if (cn.pid==this.root.id || !cn._p) return;
	cn._io = true;
	cn._is = bSelect;
	if (this.completed && cn._hc) this.nodeStatus(true, cn._ai, cn._ls);
	if (this.completed && bSelect) this.s(cn._ai);
	else if (bSelect) this._sn=cn._ai;
	this.openTo(cn._p._ai, false, true);

};



// ************** Inchiderea tuturor nodurilor de pe acelasi nivel la un anumit nod **************
DVTree.prototype.closeLevel = function(node) 
{	for (var n=0; n<this.aNodes.length; n++) 
	{	if (this.aNodes[n].pid == node.pid && this.aNodes[n].id != node.id && this.aNodes[n]._hc) 
		{	this.nodeStatus(false, n, this.aNodes[n]._ls);
			this.aNodes[n]._io = false;
			this.closeAllChildren(this.aNodes[n]);
		}
	}
}



// ************** Inchiderea tuturor subnodurilor unui nod **************
DVTree.prototype.closeAllChildren = function(node) 
{	for (var n=0; n<this.aNodes.length; n++) 
	{	if (this.aNodes[n].pid == node.id && this.aNodes[n]._hc) 
		{	if (this.aNodes[n]._io) this.nodeStatus(false, n, this.aNodes[n]._ls);
			this.aNodes[n]._io = false;
			this.closeAllChildren(this.aNodes[n]);		
		}
	}
}



// ************** Modificarea starii unui nod (inchis sau deschis) **************
DVTree.prototype.nodeStatus = function(status, id, bottom) 
{	eDiv	= document.getElementById('d' + this.obj + id);
	eJoin	= document.getElementById('j' + this.obj + id);
	if (this.config.useIcons) 
	{	eIcon	= document.getElementById('i' + this.obj + id);
		eIcon.src = (status) ? this.aNodes[id].iconOpen : this.aNodes[id].icon;
	}

	eJoin.src = (this.config.useLines)?
	((status)?((bottom)?this.icon.minusBottom:this.icon.minus):((bottom)?this.icon.plusBottom:this.icon.plus)):
	((status)?this.icon.nlMinus:this.icon.nlPlus);
	eDiv.style.display = (status) ? 'block': 'none';

};




// [Cookie]  ************** sterge o cookie **************
DVTree.prototype.clearCookie = function() 
{	var now = new Date();
	var yesterday = new Date(now.getTime() - 1000 * 60 * 60 * 24);
	this.setCookie('co'+this.obj, 'cookieValue', yesterday);
	this.setCookie('cs'+this.obj, 'cookieValue', yesterday);
};



// [Cookie] ************** Seteaza valoarea intr-o cookie **************
DVTree.prototype.setCookie = function(cookieName, cookieValue, expires, path, domain, secure) 
{	document.cookie =
		escape(cookieName) + '=' + escape(cookieValue)
		+ (expires ? '; expires=' + expires.toGMTString() : '')
		+ (path ? '; path=' + path : '')
		+ (domain ? '; domain=' + domain : '')
		+ (secure ? '; secure' : '');
};



// [Cookie] ************** Citeste valoarea dintr-o cookie **************
DVTree.prototype.getCookie = function(cookieName) 
{	var cookieValue = '';
	var posName = document.cookie.indexOf(escape(cookieName) + '=');
	if (posName != -1) 
	{	var posValue = posName + (escape(cookieName) + '=').length;
		var endPos = document.cookie.indexOf(';', posValue);
		if (endPos != -1) cookieValue = unescape(document.cookie.substring(posValue, endPos));
		else cookieValue = unescape(document.cookie.substring(posValue));
	}

	return (cookieValue);

};



// [Cookie] ************** Returneaza IDurile nodurilor deschise intr-un string **************
DVTree.prototype.updateCookie = function() 
{	var str = '';
	for (var n=0; n<this.aNodes.length; n++) 
	{	if (this.aNodes[n]._io && this.aNodes[n].pid != this.root.id) 
		{	if (str) str += '.';
			str += this.aNodes[n].id;
		}
	}

	this.setCookie('co' + this.obj, str);

};



// [Cookie] ************** Verifica daca Idul unui nod se afla intr-o cookie **************
DVTree.prototype.isOpen = function(id) 
{	var aOpen = this.getCookie('co' + this.obj).split('.');
	for (var n=0; n<aOpen.length; n++)
		if (aOpen[n] == id) return true;
	return false;
};



// ************** Daca Push si Pop nu sunt implementate de browser **************
if (!Array.prototype.push) 
{	Array.prototype.push = function array_push() 
							{	for(var i=0;i<arguments.length;i++)
								this[this.length]=arguments[i];
								return this.length;
							}

};

if (!Array.prototype.pop) 
{	Array.prototype.pop = function array_pop() 
							{	lastElement = this[this.length-1];
								this.length = Math.max(this.length-1,0);
								return lastElement;
							}

}


//*****************************************************************************
//*****************************************************************************
// ************************ FUNCTIILE PENTRU CEAS *****************************
//*****************************************************************************
//*****************************************************************************

function Ceas()
{
	data = new Date();
	anul = data.getYear();
	switch (data.getMonth() + 1) 
		{	case 1: luna = 'Ianuarie '; break;
			case 2: luna = 'Februarie '; break;
			case 3: luna = 'Martie '; break;
			case 4: luna = 'Aprilie '; break;
			case 5: luna = 'Mai '; break;
			case 6: luna = 'Iunie '; break;
			case 7: luna = 'Iulie '; break;
			case 8: luna = 'August '; break;
			case 9: luna = 'Septembrie '; break;
			case 10: luna = 'Octombrie '; break;
			case 11: luna = 'Noiembrie '; break;
			case 12: luna = 'Decembrie '; break;
		}
	switch (data.getDay()) 
		{	case 0: nume_zi = 'Duminica '; break;
			case 1: nume_zi = 'Luni '; break;
			case 2: nume_zi = 'Marti '; break;
			case 3: nume_zi = 'Miercuri '; break;
			case 4: nume_zi = 'Joi '; break;
			case 5: nume_zi = 'Vineri '; break;
			case 6: nume_zi = 'Sambata '; break;
			case 7: nume_zi = 'Duminica '; break;
		}
	ziua = data.getDate();	
	minutul = data.getMinutes();
	secunda = data.getSeconds();
	ora = data.getHours();
	if (ziua < 10) ziua = "0" + ziua;
	if (ora < 10) ora = "0" + ora;
	if (minutul < 10) minutul = "0" + minutul;
	if (secunda < 10) secunda = "0" + secunda;
	if (anul < 2000) {anul = anul + 1900;}

	document.getElementById("ceas").innerHTML = ziua + ' ' + luna + ' ' + anul + ', ' + ora + ':' + minutul + ':' + secunda;;
	setTimeout('Ceas()',1000);
}

// ***********************************************************************

function Ceas_e(){
	data = new Date();
	anul = data.getYear();
	switch (data.getMonth() + 1) 
		{	case 1: luna = 'January '; break;
			case 2: luna = 'February '; break;
			case 3: luna = 'March '; break;
			case 4: luna = 'April '; break;
			case 5: luna = 'May '; break;
			case 6: luna = 'June '; break;
			case 7: luna = 'July '; break;
			case 8: luna = 'August '; break;
			case 9: luna = 'September '; break;
			case 10: luna = 'October '; break;
			case 11: luna = 'November '; break;
			case 12: luna = 'December '; break;
		}
	switch (data.getDay()) {
			case 0: nume_zi = 'Sun'; break;
			case 1: nume_zi = 'Mon'; break;
			case 2: nume_zi = 'Tue'; break;
			case 3: nume_zi = 'Wed'; break;
			case 4: nume_zi = 'Thu'; break;
			case 5: nume_zi = 'Fri'; break;
			case 6: nume_zi = 'Sat'; break;
			case 7: nume_zi = 'Sun'; break;
	}
	ziua = data.getDate();	
	minutul = data.getMinutes();
	secunda = data.getSeconds();
	ora = data.getHours();
	if (ziua < 10) ziua = "0" + ziua;
	if (ora < 10) ora = "0" + ora;
	if (minutul < 10) minutul = "0" + minutul;
	if (secunda < 10) secunda = "0" + secunda;
	if (anul < 2000) {anul = anul + 1900;}
	
	if (ziua==1||ziua==21||ziua==31) art = 'st';
	else if (ziua==2||ziua==22) art = 'nd';
	else if (ziua==3||ziua==23) art = 'rd';
	else art='th';
	
	
	document.getElementById("ceas_e").innerHTML = nume_zi + ', ' + ziua + ' ' + luna + anul + ', ' + ora + ':' + minutul + ':' + secunda;;

	setTimeout('Ceas_e()',1000);
}






