

/////////////////////////////////////////////////////////////////////////////
// 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('276','Home',ssUrlPrefix + 'index.htm',null,'SectionShowNode==TRUE','checkinDefaultValues==_dSecurityGroup\x3d\"ElectedOfficials\",_docAccount\x3d\"MYR_AAHM_Contributor\"','maxAge==300');
g_navNode_0=g_navNode_Root.addNode('284','Start Your Business',ssUrlPrefix + 'start_business/index.htm','SectionShowNode==TRUE','checkinDefaultValues==_dSecurityGroup\x3d\"ElectedOfficials\",_docAccount\x3d\"MYR_AAHM_Contributor\"','maxAge==300');
g_navNode_1=g_navNode_Root.addNode('285','Green Your Business',ssUrlPrefix + 'green_business/index.htm','SectionShowNode==TRUE','checkinDefaultValues==_dSecurityGroup\x3d\"ElectedOfficials\",_docAccount\x3d\"MYR_AAHM_Contributor\"','maxAge==300');
g_navNode_2=g_navNode_Root.addNode('286','File Taxes',ssUrlPrefix + 'file_taxes/index.htm','SectionShowNode==TRUE','checkinDefaultValues==_dSecurityGroup\x3d\"ElectedOfficials\",_docAccount\x3d\"MYR_AAHM_Contributor\"','maxAge==300');
g_navNode_3=g_navNode_Root.addNode('287','Find Financing',ssUrlPrefix + 'find_financing/index.htm','SectionShowNode==TRUE','checkinDefaultValues==_dSecurityGroup\x3d\"ElectedOfficials\",_docAccount\x3d\"MYR_AAHM_Contributor\"','maxAge==300');
g_navNode_3_0=g_navNode_3.addNode('296','Small Business Financing',ssUrlPrefix + 'find_financing/small_business_financing/index.htm','SectionShowNode==TRUE');
g_navNode_3_1=g_navNode_3.addNode('297','Established Business Financing',ssUrlPrefix + 'find_financing/established_business_financing/index.htm','SectionShowNode==TRUE');
g_navNode_4=g_navNode_Root.addNode('288','Assess Business Incentives',ssUrlPrefix + 'assess_incentives/index.htm','SectionShowNode==TRUE','checkinDefaultValues==_dSecurityGroup\x3d\"ElectedOfficials\",_docAccount\x3d\"MYR_AAHM_Contributor\"','maxAge==300');
g_navNode_5=g_navNode_Root.addNode('289','Develop Real Estate',ssUrlPrefix + 'develop_real_estate/index.htm','SectionShowNode==TRUE','checkinDefaultValues==_dSecurityGroup\x3d\"ElectedOfficials\",_docAccount\x3d\"MYR_AAHM_Contributor\"','maxAge==300');
g_navNode_6=g_navNode_Root.addNode('290','Hire Employees',ssUrlPrefix + 'hire_employees/index.htm','SectionShowNode==TRUE','checkinDefaultValues==_dSecurityGroup\x3d\"ElectedOfficials\",_docAccount\x3d\"MYR_AAHM_Contributor\"','maxAge==300');
g_navNode_7=g_navNode_Root.addNode('291','Film in LA',ssUrlPrefix + 'film_in_la/index.htm','SectionShowNode==TRUE','checkinDefaultValues==_dSecurityGroup\x3d\"ElectedOfficials\",_docAccount\x3d\"MYR_AAHM_Contributor\"','maxAge==300');
g_navNode_8=g_navNode_Root.addNode('292','Prepare for an Emergency',ssUrlPrefix + 'prep_for_emergency/index.htm','SectionShowNode==TRUE','checkinDefaultValues==_dSecurityGroup\x3d\"ElectedOfficials\",_docAccount\x3d\"MYR_AAHM_Contributor\"','maxAge==300');
g_navNode_9=g_navNode_Root.addNode('293','Discover Contracting Opportunities',ssUrlPrefix + 'discover_opps/index.htm','SectionShowNode==TRUE','checkinDefaultValues==_dSecurityGroup\x3d\"ElectedOfficials\",_docAccount\x3d\"MYR_AAHM_Contributor\"','maxAge==300');
g_navNode_9_0=g_navNode_9.addNode('298','City of Los Angeles',ssUrlPrefix + 'discover_opps/la_city_opps/index.htm','SectionShowNode==TRUE','maxAge==300');
g_navNode_9_1=g_navNode_9.addNode('299','County of Los Angeles',ssUrlPrefix + 'discover_opps/la_county_opps/index.htm','SectionShowNode==TRUE','maxAge==300');
g_navNode_9_2=g_navNode_9.addNode('300','Supplier Diversity Programs',ssUrlPrefix + 'discover_opps/supplier_diversity_opps/index.htm','SectionShowNode==TRUE','maxAge==300');
g_navNode_10=g_navNode_Root.addNode('294','Review Key Economic Data',ssUrlPrefix + 'review_econ_data/index.htm','SectionShowNode==TRUE','checkinDefaultValues==_dSecurityGroup\x3d\"ElectedOfficials\",_docAccount\x3d\"MYR_AAHM_Contributor\"','maxAge==300');
g_navNode_11=g_navNode_Root.addNode('295','Partner with Local Business Organizations',ssUrlPrefix + 'partner_with_orgs/index.htm','SectionShowNode==TRUE','checkinDefaultValues==_dSecurityGroup\x3d\"ElectedOfficials\",_docAccount\x3d\"MYR_AAHM_Contributor\"','maxAge==300');
if (SSContributor)
{
g_navNode_12=g_navNode_Root.addNode('315','Admin',ssUrlPrefix + 'admin/index.htm','checkinDefaultValues==_dSecurityGroup\x3d\"ElectedOfficials\",_docAccount\x3d\"MYR_AAHM_Contributor\"','checkinMetadataFields==xIssueDate','contributorOnly==TRUE');
}
