var oCurrentSelectedNode

function selectTreeNode(oTitle)
{
	if(oCurrentSelectedNode == null)
	{
		oCurrentSelectedNode = document.all[oTitle.sourceIndex];

		for(var i = 0;i < document.all.length;i++)
		{
			if(document.all[i].className == "treeActivated")
			{
				document.all[i].className = "treeText";
			}
		}
	}
	else
	{
		oCurrentSelectedNode.className = "treeText";
	}
    document.all[oTitle.sourceIndex].className = "treeActivated";
    oCurrentSelectedNode = document.all[oTitle.sourceIndex];
}

function slinkyNode(oTitle)
{
	oTree=document.all[oTitle.sourceIndex + 3];
    
    if(oTree.name == "children")
    {
		if(oTree.className=="treeItemHide")
		{
		   oTree.className="treeItemShow";
		}
		else
		{
		   oTree.className="treeItemHide";
		}
	}
}

function expandAll()
{
    for(var i = 0;i < document.all.length;i++)
    {
		if(document.all[i].name == "children")
		{
			document.all[i].className = "treeItemShow";
		}
	}
}

function collapseAll()
{
    for(var i = 0;i < document.all.length;i++)
    {
		if(document.all[i].name == "children")
		{
			document.all[i].className = "treeItemHide";
		}
	}
}

function refreshTree()
{
	self.location = './nav_tree.aspx';
}

function highlightIcon(oTitle)
{
	document.all[oTitle.sourceIndex].className = "navTreeIconActivated";
}

function unHighlightIcon(oTitle)
{
	document.all[oTitle.sourceIndex].className = "navTreeIcon";
}

function changeClass(oTitle, strNewClass)
{
	document.all[oTitle.sourceIndex].className = strNewClass;
}

function launchHelp()
{
	window.open('./help-center.aspx', 'helpWindow', 'width=625,height=450,status=no,resizable=no,location=no,toobar=no,menubar=no');
}

function confirmDeleteMessage()
{
	if (confirm('Delete this Message?'))
	{	
		return TRUE;
	}
	else
	{
		return FALSE;
	}
}
