/////////////////////////////////////////////////////////////////////////////
// Function : tsocorpbreadcrumb
// Comments : 
/////////////////////////////////////////////////////////////////////////////

function tsocorpbreadcrumb()
{
	this.m_NavPath    = g_navNode_Path;
		
	tsocorpbreadcrumb.prototype.Display = tsocorpbreadcrumb_Display;
	tsocorpbreadcrumb.prototype.DisplayNode = tsocorpbreadcrumb_DisplayNode;
}

function tsocorpbreadcrumb_Display (node)
{
	document.write ('<span class="tsocorpbreadcrumb">');

        /********************************************/
        /************ TUTORIAL HYPERLINK ************/
        /********************************************/
        if (SSContributor)
	   generateTutorialLink('tsocorpbreadcrumb', 'click here to learn more about the breadcrumb fragment');
        /********************************************/
        /************ TUTORIAL HYPERLINK ************/
        /********************************************/

	this.DisplayNode(node);
	document.write ('&nbsp;&nbsp;</span>');
}

function tsocorpbreadcrumb_DisplayNode(node)	
{
	var level = node.m_level;

	var bExpand = false;

	var di = 0;
	
	if (this.m_NavPath.length > 0 && node.m_level < this.m_NavPath.length)
	{
		if (this.m_NavPath[node.m_level] == node.m_id)
			bExpand = true;
	}
	
	if (bExpand)
	{
		document.write('<a href="' + node.m_href + '" class="tsocorpbreadcrumb">');
		document.write(node.m_label);
		document.write('</a>');
		
		if (this.m_NavPath.length > 0 && node.m_level < this.m_NavPath.length-1)
			document.write('&nbsp;&gt;&nbsp;');

		// expand sub-levels (if any)
		for (var i = 0; i < node.m_subNodes.length; i++)
		{
			this.DisplayNode(node.m_subNodes[i]);
		}
	}
}
