/////////////////////////////////////////////////////////////////////////////
// Function : NavNode (constructor)
// Comments :
/////////////////////////////////////////////////////////////////////////////
function NavNode(id, label, href, parent)
{
	this.m_parent = null;
	this.m_level = 0;

	if (parent)
	{
		this.m_parent = parent;
		this.m_level = parent.m_level+1;
	}

	this.m_id = id;

	// assume that m_label will most often be used directly as HTML
	this.m_rawlabel = label;

	label = label.replace(/&/g, '&amp;');
	label = label.replace(/</g, '&lt;');
	label = label.replace(/>/g, '&gt;');
	label = label.replace(/"/g, '&quot;');

	this.m_label = label;

	this.m_href = href;
	this.m_subNodes = new Array();

	var argValues = NavNode.arguments;
	var argCount = NavNode.arguments.length;

	for (i = 4 ; i < argCount ; i++)
	{
		var attrName = argValues[i].split("==")[0];
		var attrValue = argValues[i].split("==")[1];

		eval("this.cp_" + attrName + " = '" + attrValue + "';");
	}

	NavNode.prototype.addNode = addNode;
	NavNode.prototype.isSelected = isSelected;
}

/////////////////////////////////////////////////////////////////////////////
// Function : addNode
// Comments :
/////////////////////////////////////////////////////////////////////////////
function addNode(id, label, href)
{
	var newIndex = this.m_subNodes.length;
	var newNode = new NavNode(id, label, href, this);

	var argValues = addNode.arguments;
	var argCount = addNode.arguments.length;

	for (i = 3 ; i < argCount ; i++)
	{
		var attrName = argValues[i].split("==")[0];
		var attrValue = argValues[i].split("==")[1];

		eval("newNode.cp_" + attrName + " = '" + attrValue + "';");
	}

	this.m_subNodes[newIndex] = newNode;
	return newNode;
}

/////////////////////////////////////////////////////////////////////////////
// Function : isSelected
// Comments :
/////////////////////////////////////////////////////////////////////////////
function isSelected()
{
    var pos = window.location.href.lastIndexOf("/");
    var docname = window.location.href.substring(pos+1, window.location.href.length);

    pos = this.m_href.lastIndexOf("/");
    var myname = this.m_href.substring(pos+1, this.m_href.length);

    if (docname == myname)
		return true;
	else
		return false;
}

/////////////////////////////////////////////////////////////////////////////
// Function : customSectionPropertyExists
// Comments :
/////////////////////////////////////////////////////////////////////////////
function customSectionPropertyExists(csp)
{
	return (typeof csp != _U && csp != null);
}

/////////////////////////////////////////////////////////////////////////////
// Function : getCustomSectionProperty
// Comments :
/////////////////////////////////////////////////////////////////////////////
function getCustomSectionProperty(csp)
{
	if (customSectionPropertyExists(csp))
	{
		return csp;
	}
	else
	{
		return "";
	}
}

/////////////////////////////////////////////////////////////////////////////

var g_navNode_Root = new NavNode('139','Department of Commerce',ssUrlPrefix + 'index.htm',null,'gNav_showEspanol==163','nodeLabelSpanish==Departamento de Comercio','rNav==TRUE','rNavCompetitivenessConferences==FALSE','rNavDepSecTrip==TRUE','rNavInitiatives==TRUE','rNavIntLOutreach==TRUE','rNavOutreach==TRUE','rNavPubInterests==TRUE','rNavRecent==FALSE','rNavRecentUpdates==TRUE','rNavRecoverygov==TRUE','rNavRelated==FALSE','rNavSecTrip==TRUE','rNavTariffTicker==FALSE');
g_navNode_0=g_navNode_Root.addNode('141','Secretary Gary Locke',ssUrlPrefix + 'CommerceSecretary/index.htm','IsLegacyLink==http\x3a//www.commerce.gov/bios/Gutierrez_bio.htm','rNav==TRUE','rNavInitiatives==FALSE','rNavMedia==TRUE');
g_navNode_1=g_navNode_Root.addNode('142','Deputy Secretary Dennis F. Hightower',ssUrlPrefix + 'CommerceDeputySecretary/index.htm','rNav==TRUE','rNavInitiatives==FALSE','rNavMedia==TRUE','secondaryUrlVariableField==region7');
g_navNode_3=g_navNode_Root.addNode('157','Commerce Services \x26 Offices Near You',ssUrlPrefix + 'Services/index.htm','secondaryUrlVariableField==region7');
g_navNode_5=g_navNode_Root.addNode('216','Office of the Secretary',ssUrlPrefix + 'OS/index.htm','secondaryUrlVariableField==region7');
g_navNode_5_0=g_navNode_5.addNode('223','Office of Business Liaison',ssUrlPrefix + 'OS/OBL/index.htm','secondaryUrlVariableField==region7');
g_navNode_5_1=g_navNode_5.addNode('231','Center for Faith Based and Neighborhood Partnerships',ssUrlPrefix + 'OS/CFBCI/index.htm','secondaryUrlVariableField==region7');
g_navNode_5_2=g_navNode_5.addNode('224','Office of the Chief Financial Officer and Assistant Secretary for Administration',ssUrlPrefix + 'OS/OCFO/index.htm','secondaryUrlVariableField==region7');
g_navNode_5_3=g_navNode_5.addNode('225','Office of the Chief Information Officer',ssUrlPrefix + 'OS/OCIO/index.htm','secondaryUrlVariableField==region7');
g_navNode_5_4=g_navNode_5.addNode('226','Office of General Counsel',ssUrlPrefix + 'OS/OGC/index.htm','secondaryUrlVariableField==region7');
g_navNode_5_5=g_navNode_5.addNode('227','Office of Inspector General',ssUrlPrefix + 'OS/OIG/index.htm','secondaryUrlVariableField==region7');
g_navNode_5_6=g_navNode_5.addNode('228','Office of Legislative and Intergovernmental Affairs',ssUrlPrefix + 'OS/OLIA/index.htm','secondaryUrlVariableField==region7');
g_navNode_5_7=g_navNode_5.addNode('229','Office of Policy and Strategic Planning',ssUrlPrefix + 'OS/OPSP/index.htm','secondaryUrlVariableField==region7');
g_navNode_5_8=g_navNode_5.addNode('230','Office of Public Affairs',ssUrlPrefix + 'OS/OPA/index.htm','secondaryUrlVariableField==region7');
g_navNode_6=g_navNode_Root.addNode('171','Newsroom',ssUrlPrefix + 'NewsRoom/index.htm','nodeLabelSpanish==Noticias en espa\x26\x23241\x3bol','persistLinkSpanish==TRUE','rNav==TRUE','rNavDeputySecretaryPictureBox==FALSE','rNavInitiatives==TRUE','rNavIntLOutreach==TRUE','rNavNoticesENespanol==TRUE','rNavOutreach==FALSE','rNavPubInterests==FALSE','rNavRecent==FALSE','rNavSecretaryPictureBox==FALSE','secondaryUrlVariableField==region7','showInTopNav==TRUE');
g_navNode_6_0=g_navNode_6.addNode('165','Economic News',ssUrlPrefix + 'NewsRoom/EconomicNews/index.htm','cspQueryText==dDocAccount \x3csubstring\x3e \x60DOC/OS/OPA\x60  \x3cAND\x3e  dSecurityGroup \x3csubstring\x3e \x60Public\x60  \x3cAND\x3e  xSubject \x3csubstring\x3e \x60Economic News\x60','nodeLabelSpanish==Noticias sobre la econom\x26\x23237\x3ba','rNav==TRUE','rNavAdditionalResources==TRUE');
g_navNode_6_1=g_navNode_6.addNode('176','Top News',ssUrlPrefix + 'NewsRoom/TopNews/index.htm','cspQueryText==dDocAccount \x3csubstring\x3e \x60DOC/OS/OPA\x60  \x3cAND\x3e  dSecurityGroup \x3csubstring\x3e \x60Public\x60  \x3cAND\x3e  xContent_Sub_Type \x3csubstring\x3e \x60TopNewsStory\x60','cspStartYear==2007','nodeLabelSpanish==Noticias principales','persistLinkSpanish==TRUE','rNav==FALSE','rNavInitiatives==FALSE','rNavNoticesENespanol==TRUE','rNavOutreach==FALSE','rNavPubInterests==FALSE','secondaryUrlVariableField==region7');
g_navNode_6_2=g_navNode_6.addNode('174','Press Releases, Fact Sheets and Opinion Editorials',ssUrlPrefix + 'NewsRoom/PressReleases_FactSheets/index.htm','cspQueryText==dDocAccount \x3csubstring\x3e \x60DOC/OS/OPA\x60  \x3cAND\x3e  dSecurityGroup \x3csubstring\x3e \x60Public\x60  \x3cAND\x3e  \x28xContent_Sub_Type \x3csubstring\x3e \x60Press Release\x60 \x3cOR\x3e xContent_Sub_Type \x3csubstring\x3e \x60Fact Sheet\x60 \x3cOR\x3e xContent_Sub_Type \x3csubstring\x3e \x60Opinion Editorial\x60\x29  \x3cAND\x3e  \x28dExtension \x3cmatches\x3e \x60doc\x60 \x3cOR\x3e dExtension \x3cmatches\x3e \x60pdf\x60\x29','cspStartYear==2005','nodeLabelSpanish==Comunicados de prensa, hojas informativas, opini\x26\x23243\x3bn editoriales','persistLinkSpanish==TRUE','rNav==TRUE','rNavDeputySecretaryPictureBox==FALSE','rNavInitiatives==TRUE','rNavNoticesENespanol==TRUE','rNavOutreach==FALSE','rNavPubInterests==FALSE','rNavSecretaryPictureBox==FALSE','secondaryUrlVariableField==region7');
g_navNode_6_3=g_navNode_6.addNode('175','Secretary\'s Speeches',ssUrlPrefix + 'NewsRoom/SecretarySpeeches/index.htm','cspQueryText==dDocAccount \x3csubstring\x3e \x60DOC/OS/OPA\x60  \x3cAND\x3e  dSecurityGroup \x3csubstring\x3e \x60Public\x60  \x3cAND\x3e  \x3cNOT\x3e \x28xContent_Sub_Type \x3csubstring\x3e \x60Deputy Secretary Speech\x60\x29  \x3cAND\x3e  xContent_Sub_Type \x3csubstring\x3e \x60Secretary Speech\x60  \x3cAND\x3e  \x28dExtension \x3cmatches\x3e \x60doc\x60 \x3cOR\x3e dExtension \x3cmatches\x3e \x60pdf\x60\x29','cspStartYear==2005','nodeLabelSpanish==Discursos del secretario','persistLinkSpanish==TRUE','rNav==TRUE','rNavDeputySecretaryPictureBox==FALSE','rNavInitiatives==TRUE','rNavNoticesENespanol==TRUE','rNavOutreach==FALSE','rNavPubInterests==FALSE','rNavSecretaryPictureBox==FALSE','secondaryUrlVariableField==region7');
g_navNode_6_4=g_navNode_6.addNode('177','Deputy Secretary\'s Speeches',ssUrlPrefix + 'NewsRoom/DeputySecretarySpeeches/index.htm','cspQueryText==dDocAccount \x3csubstring\x3e \x60DOC/OS/OPA\x60  \x3cAND\x3e  dSecurityGroup \x3csubstring\x3e \x60Public\x60  \x3cAND\x3e  xContent_Sub_Type \x3csubstring\x3e \x60Deputy Secretary Speech\x60  \x3cAND\x3e  \x28dExtension \x3cmatches\x3e \x60doc\x60 \x3cOR\x3e dExtension \x3cmatches\x3e \x60pdf\x60\x29','cspStartYear==2005','nodeLabelSpanish==Discursos del vicesecretario','rNav==TRUE','rNavDeputySecretaryPictureBox==FALSE','rNavInitiatives==TRUE','rNavNoticesENespanol==TRUE','rNavOutreach==FALSE','rNavPubInterests==FALSE','rNavSecretaryPictureBox==FALSE','secondaryUrlVariableField==region7');
g_navNode_6_5=g_navNode_6.addNode('192','Secretarial Trips',ssUrlPrefix + 'NewsRoom/SecretarialTrips/index.htm','cspQueryText==dDocType \x3csubstring\x3e \x60Content\x60  \x3cAND\x3e  dSecurityGroup \x3csubstring\x3e \x60Public\x60  \x3cAND\x3e  dDocAccount \x3csubstring\x3e \x60DOC/OS/OPA\x60  \x3cAND\x3e  xContent_Sub_Type \x3csubstring\x3e \x60Trip\x60  \x3cAND\x3e dExtension \x3cmatches\x3e \x60xml\x60','nodeLabelSpanish==Viajes del secretario','rNav==TRUE','rNavDepSecTrip==TRUE','rNavInitiatives==TRUE','rNavSecTrip==TRUE','secondaryUrlVariableField==region7');
g_navNode_6_6=g_navNode_6.addNode('179','Photo Gallery',ssUrlPrefix + 'NewsRoom/PhotoGallery/index.htm','nodeLabelSpanish==Galer\x26\x23237\x3ba de fotos','rNav==TRUE','rNavInitiatives==TRUE','rNavOutreach==TRUE','rNavPubInterests==TRUE','secondaryUrlVariableField==region7');
g_navNode_6_9=g_navNode_6.addNode('326','Videos',ssUrlPrefix + 'NewsRoom/Videos/index.htm','cspQueryText==dSecurityGroup \x3csubstring\x3e \x60Public\x60  \x3cAND\x3e  dDocAccount \x3csubstring\x3e \x60DOC/OS/OPA\x60  \x3cAND\x3e  xWebsiteSection \x3csubstring\x3e \x60DOC\x3a326\x60  \x3cAND\x3e  xContent_Sub_Type \x3csubstring\x3e \x60Video\x60  \x3cAND\x3e  xWebsiteObjectType \x3csubstring\x3e \x60Native Document\x60 \x3cAND\x3e  dExtension \x3cmatches\x3e \x60doc\x60','cspStartYear==2008','nodeLabelSpanish==Videos','secondaryUrlVariableField==region7');
g_navNode_7=g_navNode_Root.addNode('348','Budget and Performance',ssUrlPrefix + 'BudgetandPerformance/index.htm');
