

/////////////////////////////////////////////////////////////////////////////
// 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('905','HOME',ssUrlPrefix + 'index.htm',null,'SectionShowNode==TRUE','checkinDefaultValues==_dSecurityGroup\x3d\"ElectedOfficials\",_docAccount\x3d\"MYR_CH_Contributor\"','checkinMetadataFields==xIssueDate');
g_navNode_0=g_navNode_Root.addNode('913','MEET THE MAYOR',ssUrlPrefix + 'MeettheMayor/index.htm','SectionShowNode==TRUE','checkinDefaultValues==_dSecurityGroup\x3d\"Departments\",_docAccount\x3d\"MYR_CH_Contributor\"','checkinMetadataFields==xIssueDate');
g_navNode_0_0=g_navNode_0.addNode('929','Biography',ssUrlPrefix + 'MeettheMayor/Biography/index.htm','SectionShowNode==TRUE','checkinDefaultValues==_dSecurityGroup\x3d\"ElectedOfficials\",_docAccount\x3d\"MYR_CH_Contributor\"','checkinMetadataFields==xIssueDate');
g_navNode_0_1=g_navNode_0.addNode('930','Ask the Mayor',ssUrlPrefix + 'MeettheMayor/AsktheMayor/index.htm','SectionShowNode==TRUE','checkinDefaultValues==_dSecurityGroup\x3d\"ElectedOfficials\",_docAccount\x3d\"MYR_CH_Contributor\"','checkinMetadataFields==xIssueDate');
g_navNode_0_2=g_navNode_0.addNode('931','Follow',ssUrlPrefix + 'MeettheMayor/Follow/index.htm','SectionShowNode==TRUE','checkinDefaultValues==_dSecurityGroup\x3d\"ElectedOfficials\",_docAccount\x3d\"MYR_CH_Contributor\"','checkinMetadataFields==xIssueDate');
g_navNode_0_3=g_navNode_0.addNode('932','Jobs with the Mayor',ssUrlPrefix + 'MeettheMayor/JobswiththeMayor/index.htm','SectionShowNode==TRUE','checkinDefaultValues==_dSecurityGroup\x3d\"ElectedOfficials\",_docAccount\x3d\"MYR_CH_Contributor\"','checkinMetadataFields==xIssueDate');
g_navNode_0_4=g_navNode_0.addNode('933','Intern for the Mayor',ssUrlPrefix + 'MeettheMayor/InternfortheMayor/index.htm','SectionShowNode==TRUE','checkinDefaultValues==_dSecurityGroup\x3d\"ElectedOfficials\",_docAccount\x3d\"MYR_CH_Contributor\"','checkinMetadataFields==xIssueDate');
g_navNode_0_4_0=g_navNode_0_4.addNode('122','New Media Internship',ssUrlPrefix + 'MeettheMayor/InternfortheMayor/NewMediaInternship/index.htm');
g_navNode_0_5=g_navNode_0.addNode('934','The Blog',ssUrlPrefix + 'MeettheMayor/TheBlog/index.htm','SectionShowNode==TRUE','checkinDefaultValues==_dSecurityGroup\x3d\"ElectedOfficials\",_docAccount\x3d\"MYR_CH_Contributor\"','checkinMetadataFields==xIssueDate');
g_navNode_1=g_navNode_Root.addNode('916','ISSUES',ssUrlPrefix + 'Issues/index.htm','SectionShowNode==TRUE','checkinDefaultValues==_dSecurityGroup\x3d\"ElectedOfficials\",_docAccount\x3d\"MYR_CH_Contributor\"','checkinMetadataFields==xIssueDate');
g_navNode_1_0=g_navNode_1.addNode('943','Transportation',ssUrlPrefix + 'Issues/Transportation/index.htm','SectionShowNode==TRUE','checkinDefaultValues==_dSecurityGroup\x3d\"ElectedOfficials\",_docAccount\x3d\"MYR_CH_Contributor\"','checkinMetadataFields==xIssueDate');
g_navNode_1_1=g_navNode_1.addNode('944','Public Safety',ssUrlPrefix + 'Issues/PublicSafety/index.htm','SectionShowNode==TRUE','checkinDefaultValues==_dSecurityGroup\x3d\"ElectedOfficials\",_docAccount\x3d\"MYR_CH_Contributor\"','checkinMetadataFields==xIssueDate');
g_navNode_1_2=g_navNode_1.addNode('945','Environment',ssUrlPrefix + 'Issues/Environment/index.htm','SectionShowNode==TRUE','checkinDefaultValues==_dSecurityGroup\x3d\"ElectedOfficials\",_docAccount\x3d\"MYR_CH_Contributor\"','checkinMetadataFields==xIssueDate');
g_navNode_1_3=g_navNode_1.addNode('946','Job Creation',ssUrlPrefix + 'Issues/JobCreation/index.htm','SectionShowNode==TRUE','checkinDefaultValues==_dSecurityGroup\x3d\"ElectedOfficials\",_docAccount\x3d\"MYR_CH_Contributor\"','checkinMetadataFields==xIssueDate');
g_navNode_1_4=g_navNode_1.addNode('947','Housing',ssUrlPrefix + 'Issues/Housing/index.htm','SectionShowNode==TRUE','checkinDefaultValues==_dSecurityGroup\x3d\"ElectedOfficials\",_docAccount\x3d\"MYR_CH_Contributor\"','checkinMetadataFields==xIssueDate');
g_navNode_1_5=g_navNode_1.addNode('948','Balanced Budget',ssUrlPrefix + 'Issues/FiscalManagement/index.htm','SectionShowNode==TRUE','checkinDefaultValues==_dSecurityGroup\x3d\"ElectedOfficials\",_docAccount\x3d\"MYR_CH_Contributor\"','checkinMetadataFields==xIssueDate');
g_navNode_1_6=g_navNode_1.addNode('949','Clean Tech',ssUrlPrefix + 'Issues/CleanTech/index.htm','SectionShowNode==TRUE','checkinDefaultValues==_dSecurityGroup\x3d\"ElectedOfficials\",_docAccount\x3d\"MYR_CH_Contributor\"','checkinMetadataFields==xIssueDate');
g_navNode_1_9=g_navNode_1.addNode('952','Education',ssUrlPrefix + 'Issues/Education/index.htm','SectionShowNode==TRUE','checkinDefaultValues==_dSecurityGroup\x3d\"ElectedOfficials\",_docAccount\x3d\"MYR_CH_Contributor\"','checkinMetadataFields==xIssueDate');
g_navNode_1_10=g_navNode_1.addNode('953','Gang Reduction',ssUrlPrefix + 'Issues/GangReduction/index.htm','SectionShowNode==TRUE','checkinDefaultValues==_dSecurityGroup\x3d\"ElectedOfficials\",_docAccount\x3d\"MYR_CH_Contributor\"','checkinMetadataFields==xIssueDate');
g_navNode_2=g_navNode_Root.addNode('914','PRESS ROOM',ssUrlPrefix + 'PressRoom/index.htm','SectionShowNode==TRUE','checkinDefaultValues==_dSecurityGroup\x3d\"ElectedOfficials\",_docAccount\x3d\"MYR_CH_Contributor\"','checkinMetadataFields==xIssueDate');
g_navNode_2_0=g_navNode_2.addNode('937','Video',ssUrlPrefix + 'PressRoom/Video/index.htm','SectionShowNode==TRUE','checkinDefaultValues==_dSecurityGroup\x3d\"ElectedOfficials\",_docAccount\x3d\"MYR_CH_Contributor\"','checkinMetadataFields==xIssueDate');
g_navNode_2_1=g_navNode_2.addNode('936','Gallery',ssUrlPrefix + 'PressRoom/Gallery/index.htm','SectionShowNode==TRUE','checkinDefaultValues==_dSecurityGroup\x3d\"ElectedOfficials\",_docAccount\x3d\"MYR_CH_Contributor\"','checkinMetadataFields==xIssueDate');
g_navNode_2_2=g_navNode_2.addNode('938','Press Releases',ssUrlPrefix + 'PressRoom/PressReleases/index.htm','SectionShowNode==TRUE','checkinDefaultValues==_dSecurityGroup\x3d\"ElectedOfficials\",_docAccount\x3d\"MYR_CH_Contributor\"','checkinMetadataFields==xIssueDate','secondaryUrlVariableField==region7');
g_navNode_2_2_0=g_navNode_2_2.addNode('939','Press Release Pages',ssUrlPrefix + 'PressRoom/PressReleases/PressReleasePages/index.htm');
g_navNode_2_5=g_navNode_2.addNode('280','Top Stories',ssUrlPrefix + 'PressRoom/TopStories/index.htm','secondaryUrlVariableField==region7');
g_navNode_5=g_navNode_Root.addNode('915','SERVICES',ssUrlPrefix + 'Services/index.htm','SectionShowNode==TRUE','checkinDefaultValues==_dSecurityGroup\x3d\"ElectedOfficials\",_docAccount\x3d\"MYR_CH_Contributor\"','checkinMetadataFields==xIssueDate');
g_navNode_5_0=g_navNode_5.addNode('940','Request a Service',ssUrlPrefix + 'Services/RequestaService/index.htm','SectionShowNode==TRUE','checkinDefaultValues==_dSecurityGroup\x3d\"ElectedOfficials\",_docAccount\x3d\"MYR_CH_Contributor\"','checkinMetadataFields==xIssueDate');
g_navNode_5_1=g_navNode_5.addNode('941','Resident Resources',ssUrlPrefix + 'Services/ResidentResources/index.htm','SectionShowNode==TRUE','checkinDefaultValues==_dSecurityGroup\x3d\"Departments\",_docAccount\x3d\"MYR_CH_Contributor\"','checkinMetadataFields==xIssueDate');
g_navNode_5_2=g_navNode_5.addNode('942','Business Resources',ssUrlPrefix + 'Services/BusinessResources/index.htm','SectionShowNode==TRUE','checkinDefaultValues==_dSecurityGroup\x3d\"ElectedOfficials\",_docAccount\x3d\"MYR_CH_Contributor\"','checkinMetadataFields==xIssueDate');
g_navNode_5_3=g_navNode_5.addNode('173','LARx',ssUrlPrefix + 'Services/LARx/index.htm');
g_navNode_6=g_navNode_Root.addNode('917','OUR CITY',ssUrlPrefix + 'OurCity/index.htm','SectionShowNode==TRUE','checkinDefaultValues==_dSecurityGroup\x3d\"ElectedOfficials\",_docAccount\x3d\"MYR_CH_Contributor\"','checkinMetadataFields==xIssueDate');
g_navNode_6_0=g_navNode_6.addNode('918','Government Contacts',ssUrlPrefix + 'OurCity/GovernmentContacts/index.htm','SectionShowNode==TRUE','checkinDefaultValues==_dSecurityGroup\x3d\"ElectedOfficials\",_docAccount\x3d\"MYR_CH_Contributor\"','checkinMetadataFields==xIssueDate');
g_navNode_6_1=g_navNode_6.addNode('919','Volunteer',ssUrlPrefix + 'OurCity/Volunteer/index.htm','SectionShowNode==TRUE','checkinDefaultValues==_dSecurityGroup\x3d\"ElectedOfficials\",_docAccount\x3d\"MYR_CH_Contributor\"','checkinMetadataFields==xIssueDate');
g_navNode_6_1_0=g_navNode_6_1.addNode('179','True Angels',ssUrlPrefix + 'OurCity/Volunteer/TrueAngels/index.htm');
g_navNode_6_2=g_navNode_6.addNode('691','Executive Directives',ssUrlPrefix + 'OurCity/EXECUTIVEDIRECTIVES/index.htm');
