function cbubreadcrumbs(node)
{
	this.m_Separator  = '<img src = "http://www2.cbu.edu/idc/groups/admissions/documents/web_assets/breadcrumbs_arrow.gif" style="vertical-align: 1px;"/>';
	this.m_NavPath    = g_navNode_Path;

	cbubreadcrumbs.prototype.Display = cbubreadcrumbs_Display;
	cbubreadcrumbs.prototype.DisplayNode = cbubreadcrumbs_DisplayNode;
    this.Display (node);
}

function cbubreadcrumbs_Display (node)
{
	document.write ('<span>');
	this.DisplayNode(node);
	document.write ('</span>');
}

function cbubreadcrumbs_DisplayNode(node)
{
	var level = node.m_level;

	var bExpand = false;

	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 (bExpand)
	{
		ds[di++] = '<a href="' + node.m_href + '"';
		ds[di++] = '>';
		ds[di++] = node.m_label;
		ds[di++] = '</a>';

		if (this.m_NavPath.length > 0 && node.m_level <this.m_NavPath.length-1 )
			ds[di++] = this.m_Separator;

		document.write(ds.join(''));

        for (var i = 0; i < node.m_subNodes.length; i++)
		{
			this.DisplayNode(node.m_subNodes[i]);
		}
	}
}
