/////////////////////////////////////////////////////////////////////////////
// Function : EDOMEX_IES_BREADCRUMBPLAIN
// Comments : 
/////////////////////////////////////////////////////////////////////////////

function EDOMEX_IES_BREADCRUMBPLAIN(strClassName)
{
	
	this.m_TextColor  = '';
	this.m_HoverColor = '';
	this.m_Separator  = '&nbsp;&gt;&nbsp;';
	this.m_ClassName  = 'migas';

	this.m_NavPath    = g_navNode_Path;

			
	if (strClassName != '')
		this.m_ClassName = strClassName;
		
	EDOMEX_IES_BREADCRUMBPLAIN.prototype.Display = EDOMEX_IES_BREADCRUMBPLAIN_Display;
	EDOMEX_IES_BREADCRUMBPLAIN.prototype.DisplayNode = EDOMEX_IES_BREADCRUMBPLAIN_DisplayNode;
}

function EDOMEX_IES_BREADCRUMBPLAIN_Display (node)
{
	document.write ('<span');
	
	if (this.m_className != '')
		document.write (' class="' + this.m_ClassName + '"');
	
	if (this.textColor != '')
		document.write(' style="color: ' + this.m_TextColor + ';"');
		
	document.write ('>');
	
	this.DisplayNode(node);
	
	document.write ('</span>');
}

function EDOMEX_IES_BREADCRUMBPLAIN_DisplayNode(node)	
{
	var level = node.m_level;

	var bExpand = false;
	var nodeColor = this.m_TextColor;
	var nodeClass = this.m_ClassName;

	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)
	{
		if (node.m_level < this.m_NavPath.length - 1) {
	
			ds[di++] = '<a href="' + node.m_href + '"';
			
			if (nodeClass != '')
				ds[di++] = ' class="' + nodeClass + '"';
			
			ds[di++] = '>'
			ds[di++] = node.m_label;
			ds[di++] = '</a>';
	
		} else {
			ds[di++] = node.m_label;
		}
	
		if (this.m_NavPath.length > 0 && node.m_level < this.m_NavPath.length-1)
			ds[di++] = this.m_Separator;

		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]);
		}
	}

}
