/////////////////////////////////////////////////////////////////////////////
// Function : asq_nave_multi_vertical
// Comments : 
/////////////////////////////////////////////////////////////////////////////

function asq_nave_multi_vertical(strClassName, strShowHome, strStartLevel, strNumLevels, strCustomNodeLabel, strCustomNodeLocation, strCustomNodeURL, strMarkerNode, strMarkerLocation, isSearchBox)
{
	
	

	this.m_ClassName  = 'asq_nave_multi_vertical';
	
	this.m_ShowHome   = false;
	
	this.m_StartLevel = 2;
	this.m_NumLevels  = 10;
	this.m_EndLevel   = 11;
	
	this.m_NavPath    = g_navNode_Path;
			
	asq_nave_multi_vertical.prototype.Display = asq_nave_multi_vertical_Display;
	asq_nave_multi_vertical.prototype.DisplayNode = asq_nave_multi_vertical_DisplayNode;
	

	if (strClassName != '')
		this.m_ClassName = strClassName;

	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;
	}
	if (strCustomNodeLabel != '')
	{
		this.m_NodeLabel = strCustomNodeLabel;
	}else {
		this.m_NodeLabel="";
	}
	if (strCustomNodeLocation != '')
	{
		this.m_NodeLocation = strCustomNodeLocation;
	}else{
		this.m_NodeLocation ="";
	}
	if (strCustomNodeURL != '')
	{
		this.m_NodeURL = strCustomNodeURL;
	}else{
		this.m_NodeURL="";
	}
	if (strMarkerNode != ''){
	        this.m_MarkerNode = strMarkerNode;
	}else {
		this.m_MarkerNode = "";
	}
	if (strMarkerLocation != '') {
		
		this.m_MarkerLocation = strMarkerLocation;
	}else {
		this.m_MarkerLocation = "";
	}
	if (isSearchBox != '') {
		
		this.m_IsSearchBox = isSearchBox;
	}


	this.m_EndLevel = this.m_StartLevel + this.m_NumLevels - 1 ;
}

function asq_nave_multi_vertical_Display (node)
{
	document.write('<ul>');
		this.DisplayNode(node);
	document.write('</ul>');
	
}

function asq_nave_multi_vertical_DisplayNode(node)
{
	var bSelected = false;
	var nodeClass = this.m_ClassName

	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;
			}
		}
	}

	
		
	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 CustomNodeLocationArray = this.m_NodeLocation.split(",");
		var CustomNodeLabelArray = this.m_NodeLabel.split(",");
		var CustomNodeLinkArray = this.m_NodeURL.split(",");
		
		

		for(var i=0;i < CustomNodeLocationArray.length; i++){
			
			

			if(CustomNodeLocationArray[i].replace(/^(\s)/, '') == node.m_label) {
				
				
				ds[di++] = '<li><a href="' + CustomNodeLinkArray[i] + '"';		 
				ds[di++] = '>'
				ds[di++] = CustomNodeLabelArray[i];
				ds[di++] = '</a></li>';
			
				
				//ds[di++]="<div class='sectiontitle'>I Want To&#8230; </div>"

			}
		} 



		if(this.m_MarkerLocation.replace(/^(\s)/, '') == node.m_label){
			ds[di++] = '</ul>';

			if(this.m_IsSearchBox == "true") {
				ds[di++]='<table width="100%" border="0" bgcolor="#eeeeee">'
				ds[di++]='<tr><td><form method="get" action="/quality-press/search-results/index.html">'
				ds[di++]='<table border="0" cellspacing="0" cellpadding="3"><tr><td><strong class="bluebold">Search Books &amp; Standards</strong><br /><br /><select class="searchinput" name="search_mode" size="1"><option value="keyword" selected="selected">by Keywords</option><option value="author">by Author</option><option value="title">by Title</option><option value="ISBN">by ISBN</option><option value="item_number">by Item Number</option></select><br /><br /><input class="searchinput" type="text" name="search_query" size="15" />&nbsp;<input name="Search" type="image" id="Search2" src="groups/public/documents/web_asset/imgbtnblueblockgo.gif" alt="Search"  align="top" border="0" /><br /><a href="/quality-press/index.html">More Ways to Search</a></td></tr></table></form></td></tr></table><br />'
			}

			ds[di++] = '<div class=sectiontitle>';		 
			ds[di++] =  this.m_MarkerNode + "&#8230";
			ds[di++] = '</div>';
			ds[di++] = '<ul>';
		}

		
		

		ds[di++] = '<li><a href="' + node.m_href + '"';		 
		ds[di++] = '>'
		ds[di++] = node.m_label;
		ds[di++] = '</a></li>';
		
		document.write(ds.join(''));
		
	}
	
	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]);
		}
	}
}
