/////////////////////////////////////////////////////////////////////////////
// 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('2158','Home',ssUrlPrefix + 'index.htm',null,'EnglishSectionLabel==EVAL Home','FrenchSectionLabel==EVAL\x3a Page d\\x27accueil','IsSurveyMonkeyOn==TRUE','SiteSupplementalSectionId==2168','SpanishSectionLabel==EVAL\x3a P\xe1gina de entrada','secondaryUrlVariableField==region1');
g_navNode_0=g_navNode_Root.addNode('2159','Evaluation policy',ssUrlPrefix + 'Evaluationpolicy/index.htm','EnglishSectionLabel==Evaluation policy','FrenchSectionLabel==Politique d\u2019\xe9valuation','SpanishSectionLabel==Pol\xedtica de evaluaci\xf3n ','secondaryUrlVariableField==region1');
g_navNode_1=g_navNode_Root.addNode('2160','Evaluation guidance',ssUrlPrefix + 'Evaluationguidance/index.htm','EnglishSectionLabel==Evaluation guidance','FrenchSectionLabel==Principes directeurs d\u2019\xe9valuation','SpanishSectionLabel==Gu\xeda de evaluaci\xf3n','secondaryUrlVariableField==region1');
g_navNode_2=g_navNode_Root.addNode('2161','Evaluation reports',ssUrlPrefix + 'Evaluationreports/index.htm','DefaultGroupType==1','EnglishSectionLabel==Evaluation reports','FrenchSectionLabel==Rapports d\u2019\xe9valuation','ListNodeId_1==2161','Query_1==xSubjectKeywords \x3csubstring\x3e \x60evalreport\x60','SpanishSectionLabel==Informes de evaluaci\xf3n ','secondaryUrlVariableField==region1');
g_navNode_2_0=g_navNode_2.addNode('2162','Strategy and policy evaluations',ssUrlPrefix + 'Evaluationreports/Strategyandpolicyevaluations/index.htm','DefaultGroupType==1','EnglishSectionLabel==Strategy and policy evaluations','FrenchSectionLabel==Evaluations des strat\xe9gies et politiques','ListNodeId_1==2162','Query_1==xSubjectKeywords \x3ccontains\x3e \x60evalreport, stratpol\x60','SpanishSectionLabel==Evaluaciones estrat\xe9gicas y de pol\xedticas','secondaryUrlVariableField==region1');
g_navNode_2_1=g_navNode_2.addNode('2182','Country programme evaluations',ssUrlPrefix + 'Evaluationreports/Countryprogramme/index.htm','DefaultGroupType==1','EnglishSectionLabel==Country programme evaluations','FrenchSectionLabel==Evaluations des programmes par pays','ListNodeId_1==2182','Query_1==xSubjectKeywords \x3ccontains\x3e \x60evalreport, country\x60','SpanishSectionLabel==Evaluaciones de programas por pa\xedses');
g_navNode_2_2=g_navNode_2.addNode('2163','Thematic evaluations',ssUrlPrefix + 'Evaluationreports/Thematicevaluations/index.htm','DefaultGroupType==1','EnglishSectionLabel==Thematic evaluations','FrenchSectionLabel==Evaluations th\xe9matiques','ListNodeId_1==2163','Query_1==xSubjectKeywords \x3ccontains\x3e \x60evalreport, thematic\x60','SpanishSectionLabel==Evaluaciones tem\xe1ticas','secondaryUrlVariableField==region1');
g_navNode_2_3=g_navNode_2.addNode('2164','Project evaluations',ssUrlPrefix + 'Evaluationreports/Projectevaluationreports/index.htm','DefaultGroupType==1','EnglishSectionLabel==Project evaluations','FrenchSectionLabel==Evaluations de projets','ListNodeId_1==2164','Query_1==xSubjectKeywords \x3ccontains\x3e \x60evalreport, summary\x60','SpanishSectionLabel==Evaluaciones de proyectos','secondaryUrlVariableField==region1');
g_navNode_3=g_navNode_Root.addNode('2165','Information resources',ssUrlPrefix + 'Informationresources/index.htm','EnglishSectionLabel==Information resources','FrenchSectionLabel==Ressources d\\x27informations','RedirectLink==ssNODELINK/2166','SpanishSectionLabel==Recursos de informaci\xf3n');
g_navNode_3_0=g_navNode_3.addNode('2166','External resources',ssUrlPrefix + 'Informationresources/external/index.htm','EnglishSectionLabel==External resources','FrenchSectionLabel==Ressources externes','SpanishSectionLabel==Fuentes externas','secondaryUrlVariableField==region1');
g_navNode_3_1=g_navNode_3.addNode('2167','Links',ssUrlPrefix + 'Informationresources/Links/index.htm','EnglishSectionLabel==Links','FrenchSectionLabel==Liens','SpanishSectionLabel==Enlaces','secondaryUrlVariableField==region1');
g_navNode_4=g_navNode_Root.addNode('2168','Supplemental Navigation',ssUrlPrefix + 'SupplementalNavigation/index.htm','HideInNav==TRUE');
g_navNode_4_0=g_navNode_4.addNode('2169','Contact us',ssUrlPrefix + 'SupplementalNavigation/Contactus/index.htm','EnglishSectionLabel==Contact us','FrenchSectionLabel==Contactez-nous','SpanishSectionLabel==Cont\xe1ctenos','secondaryUrlVariableField==region1');
g_navNode_4_1=g_navNode_4.addNode('2170','Site search',ssUrlPrefix + 'SupplementalNavigation/ContextualSearchResults/index.htm','HideInNav==TRUE');
g_navNode_4_1_0=g_navNode_4_1.addNode('2171','Contextual Search Results',ssUrlPrefix + 'SupplementalNavigation/ContextualSearchResults/ContextualSearchResults/index.htm','secondaryUrlVariableField==region1');
g_navNode_4_1_1=g_navNode_4_1.addNode('2172','Search Results',ssUrlPrefix + 'SupplementalNavigation/ContextualSearchResults/SearchResults/index.htm','secondaryUrlVariableField==region1');
g_navNode_4_2=g_navNode_4.addNode('2173','Site Map',ssUrlPrefix + 'SupplementalNavigation/SiteMap/index.htm','HideInNav==TRUE','secondaryUrlVariableField==region1');
g_navNode_5=g_navNode_Root.addNode('2174','Error Handler',ssUrlPrefix + 'ErrorHandler/index.htm','HideInNav==TRUE');
