/////////////////////////////////////////////////////////////////////////////
// Function : brand_site_breadcrumb
// Comments : 
/////////////////////////////////////////////////////////////////////////////

function brand_site_breadcrumb(strActiveListName)
{
	this.m_ActiveListName = 'current';

	this.m_NavPath    = g_navNode_Path;

	if (strActiveListName != '')
		this.m_ActiveListName = strActiveListName;
	
		
	brand_site_breadcrumb.prototype.Display = brand_site_breadcrumb_Display;
	brand_site_breadcrumb.prototype.DisplayNode = brand_site_breadcrumb_DisplayNode;
}
function brand_site_breadcrumb_Display (node)
{
	this.DisplayNode(node);
}

function brand_site_breadcrumb_DisplayNode(node)	
{
	var level = node.m_level;
	var bExpand = false;
	var nodeId = "";

	var ds = new Array();
	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 (level == (this.m_NavPath.length-1))
	{
		nodeId = this.m_ActiveListName;
	}

	if (bExpand)
	{
		
	//	ds[di++] = '<li>';
		ds[di++] = '<a href="' + node.m_href + '" + " " + id='+nodeId+' ';	
		
		ds[di++] = '>'
		if (level == 0)
		{
			ds[di++] = node.m_label;
		}
		else
		{
			ds[di++] = '&nbsp;&gt;&nbsp;' + node.m_label;
		}
		ds[di++] = '</a>  ';
	//	ds[di++] = '</li>';
		

		document.write(ds.join(''));	// Write out the "live" path only
	
		// expand sub-levels (if any)
		for (var i = 0; i < node.m_subNodes.length; i++)
		{
			this.DisplayNode(node.m_subNodes[i]);
		}
		
	}
}
