/////////////////////////////////////////////////////////////////////////////
// Function : grfc_nav_multi_vertical
// Comments : 
/////////////////////////////////////////////////////////////////////////////

function grfc_nav_multi_vertical(strClassName, strActiveClassName, strFontClassName, strActiveFontClassName, strShowHome, strStartLevel, strNumLevels, strImage, ssSiteAbsPath)
{
	this.m_ClassName  = 'unit_menu';
	this.m_FontClassName  = 'font_menu';
	this.m_ActiveClassName  = 'unit_menu_active';
	this.m_ActiveFontClassName  = 'font_menu_active';
	
	this.m_ShowHome   = false;
	
	this.m_StartLevel = 2;
	this.m_NumLevels  = 10;
	this.m_EndLevel   = 11;
	this.m_Image = strImage;
	this.m_ssSiteAbsPath = ssSiteAbsPath;
	
	this.m_NavPath    = g_navNode_Path;
			
	grfc_nav_multi_vertical.prototype.Display = grfc_nav_multi_vertical_Display;
	grfc_nav_multi_vertical.prototype.DisplayNode = grfc_nav_multi_vertical_DisplayNode;
		
	if (strClassName != '')
		this.m_ClassName = strClassName;

	if (strFontClassName != '')
		this.m_FontClassName = strFontClassName;

	if (strShowHome == 'true')
		this.m_ShowHome = true;
		
	if (strStartLevel != '')
	{
		var value = parseInt(strStartLevel);
		if (value != NaN)
			this.m_StartLevel = value;
	}
	
	if (strNumLevels != '')
	{
		var value = parseInt(strNumLevels);
		if (value != NaN)
			this.m_NumLevels = value;
	}

	this.m_EndLevel = this.m_StartLevel + this.m_NumLevels - 1 ;
}

function grfc_nav_multi_vertical_Display(node)
{
        
        this.DisplayNode(node);	
        
	

}

function grfc_nav_multi_vertical_DisplayNode(node)
{
	var bSelected = false;
	var nodeClass = this.m_ClassName;
	var ClassName = this.m_ClassName;
	var FontClassName = this.m_FontClassName;
	
	
	
	var nodeLevel = node.m_level;
	
	if (nodeLevel > 6)
		nodeLevel = 6;
	
	if (this.m_NavPath.length > 0 && node.m_level < this.m_NavPath.length)
	{
		if (this.m_NavPath[node.m_level] == node.m_id)
		{
			if (node.m_level > 0 || (node.m_level == 0 && this.m_NavPath.length == 1))
			{
				bSelected = true;
				nodeClass += '-focus';
				
			}
		}
	}

	if (nodeLevel > 0)
		nodeClass += '-' + nodeLevel;
		
	if ( (node.m_level == 0 && this.m_ShowHome) || 
     	 (node.m_level >= this.m_StartLevel && node.m_level <= this.m_EndLevel)
	   )
	{
		var ds = new Array();
		var di = 0;
	var pi = 0;

	if (nodeLevel>1)
	{
		pi = (nodeLevel)*8;
		if (bSelected)
		{
			ClassName = 'unit_submenu_active';
			FontClassName = 'font_submenu_active';
		}
		else
		{
			ClassName = 'unit_submenu';
			FontClassName = 'font_submenu';

		}
	}
	else
	{
	        if (bSelected)
		{
			ClassName = this.m_ActiveClassName;
			FontClassName = this.m_ActiveFontClassName;
		}
		else
		{
			ClassName = this.m_ClassName;
			FontClassName = this.m_FontClassName;
		}

	}



	document.write('<div class="' + ClassName +'">');	
	document.write('<p style="font-size: 10px; font-family: Verdana; padding-top: 0px; padding-right: ' + pi +'px; padding-bottom: 0px; padding-left: 0px; margin: 0px;">');	
/********** !!!!!! DO NOT CHANGE THIS FEATURE !!!!!!! **********/
//        document.write('<a href="'+ g_httpCgiUrl + 'nodeId=' + node.m_id + '"');   
        document.write('<a href="'+ this.m_ssSiteAbsPath + node.m_href + '"');   
/********** !!!!!! DO NOT CHANGE THIS FEATURE !!!!!!! **********/

	document.write(' class="' + FontClassName +'"');
	if (node.cp_Shortname!=null && node.cp_Shortname.length>0)
	{
		document.write('>'+node.cp_Shortname);
	}
	else
	{
		document.write('>'+node.m_label);	
	}    		
	document.write('</a>');
	document.write('</p>');
	document.write('</div>');

	}
	
	if (bSelected || node.m_level == 0)
	{	// expand sub-levels (if any)
		for (var i = 0; i < node.m_subNodes.length; i++)
		{
			this.DisplayNode(node.m_subNodes[i]);
		}
	}
}

