/////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2007, 2008, Oracle. All rights reserved.
// Function : dma_footer_nav
// Comments : 
/////////////////////////////////////////////////////////////////////////////

function dma_footer_nav(strSeparator, strShowHome)
{
	this.m_Separator  = '|';
	this.m_ShowHome   = false;
	this.m_NavPath    = g_navNode_Path;
			
	dma_footer_nav.prototype.Display = dma_footer_nav_Display;
		
	if (strSeparator != '')
		this.m_Separator = strSeparator;

	if (strShowHome == 'true')
		this.m_ShowHome = true;
}

function dma_footer_nav_Display (node)	
{
	var bSelected = false;
		
	var ds = new Array();
	var di = 0;
	var count =  this.m_ShowHome ? -1 : 0;

	var href = '';
	var label = '';
	
	/*
	ds[di++] = '<span';
	
	if ( this.m_ClassName != '')
		ds[di++] = ' class="' + this.m_ClassName + '"';

	if (this.m_TextColor != '')
		ds[di++] = ' style="color: ' + this.m_TextColor + ';"';
		
	ds[di++] = '>'; 
	*/

    ds[di++] = '\n<!-- DMA Footer Nav start -->\n';
	ds[di++] = '<div style="padding-top:10px;text-align:center">\n';
	
//	ds[di++] = '&nbsp;';
		
	for ( ; count < node.m_subNodes.length; count++)
	{
		bSelected = false;
		
		if (count == -1)	// Root link
		{
			if ( (this.m_NavPath.length == node.m_level+1) &&
				 (this.m_NavPath[node.m_level] == node.m_id) )
			{
				bSelected = true;
			}
			
			label = node.m_label;
			href  = node.m_href;
		}
		else
		{	
			if (this.m_NavPath.length > node.m_subNodes[count].m_level)
			{
				if (this.m_NavPath[node.m_subNodes[count].m_level] == node.m_subNodes[count].m_id)
				{
					bSelected = true;
				}
			}
			
			label = node.m_subNodes[count].m_label;
			href = node.m_subNodes[count].m_href;
		}
		
		if (bSelected)
		{
			// reserved
		}
		else
		{
			// reserved
		}
				
		if (getCustomSectionProperty(node.m_subNodes[count].cp_ShowInFooterNav).toLowerCase() == "true")
		{
		
			ds[di++] = '<a href="' + href + '">' + label + '</a>';
			
			/*
			ds[di++] = '<a href="' + href + '"';
			ds[di++] = ' class="' + nodeClass + '"';
			
			if (nodeColor != '')	
			{
				ds[di++] = ' style="color:' + nodeColor + ';"';

				if (!bSelected && this.m_HoverColor != '')
				{
					ds[di++] = ' onmouseover="this.style.color=\'' + this.m_HoverColor + '\'"';
					ds[di++] = ' onmouseout="this.style.color=\'' + nodeColor + '\'"';
				}
			}
			
			ds[di++] = '>';
			ds[di++] = label;
			ds[di++] = '</a>';
			*/

			if (count < node.m_subNodes.length - 1)
			{
				ds[di++] = '&nbsp;&nbsp;';
				ds[di++] = this.m_Separator;
				ds[di++] = '&nbsp;&nbsp;';
			}
			else
			{
				ds[di++] = '&nbsp;';
			}

		}
	} 

	/* ds[di++] = '</span>'; */
	ds[di++] = '</div>\n';
    ds[di++] = '<!-- DMA Footer Nav end -->\n';

	
	document.write(ds.join(''));
}

