/////////////////////////////////////////////////////////////////////////////
// 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('3251','EMP/ELM',ssUrlPrefix + 'index.htm',null,'BreadCrumbParent==employment\x3a2769','EnglishBreadCrumbLabel==EMP/ELM','EnglishSectionLabel==Economic and Labour Market Analysis Department \x28EMP/ELM\x29','FrenchSectionLabel==D\xe9partement de l\\x27analyse \xe9conomique et des march\xe9s du travail \x28EMP/ELM\x29','IsSurveyMonkeyOn==TRUE','Property_3==fr,es','SiteSupplementalSectionId==3274','SpanishSectionLabel==El Departamento de An\xe1lisis de los Mercados Econ\xf3micos y Laborales \x28EMP/ELM\x29','secondaryUrlVariableField==region1');
g_navNode_0=g_navNode_Root.addNode('3252','About us',ssUrlPrefix + 'about/index.htm','BreadCrumbParent==employment\x3a2769','EnglishSectionLabel==About us','FrenchSectionLabel==\xc0 propos de nous','SpanishSectionLabel==Qui\xe9nes somos','secondaryUrlVariableField==region1');
g_navNode_1=g_navNode_Root.addNode('3253','Departments /  Offices',ssUrlPrefix + 'units/index.htm','BreadCrumbParent==employment\x3a2769','EnglishSectionLabel==Units','FacetBoxTitleEnglish==by department/unit','FacetQueryIndex==-1','FacetSetTitleEnglish==Our work','Facet_1==3256','Facet_2==3254','Facet_3==3255','FrenchSectionLabel==D\xe9partements / Bureaux dans la Region','HideInNav==FALSE','PrimaryFacetType==ORG','SpanishSectionLabel==Departamentos / Oficinas','secondaryUrlVariableField==region1');
g_navNode_2=g_navNode_Root.addNode('3254','Areas of work',ssUrlPrefix + 'areas/index.htm','BreadCrumbParent==employment\x3a2769','DefaultGroupFieldName==xDateIssued','DefaultGroupType==1','EnglishSectionLabel==Areas of work','FacetBoxTitleEnglish==by area of work','FacetBoxTitleFrench==par domaine du travail','FacetBoxTitleSpanish==por ambito de trabajo','FacetQueryIndex==-1','FacetSetTitleEnglish==Resources','Facet_1==3256','Facet_2==3255','FrenchSectionLabel==Domaines de travail','PrimaryFacetType==LOC.EMP','SpanishSectionLabel==Ambitos de trabajo','secondaryUrlVariableField==region1');
g_navNode_3=g_navNode_Root.addNode('3255','Countries covered',ssUrlPrefix + 'countries/index.htm','BreadCrumbParent==employment\x3a2769','EnglishSectionLabel==Countries covered','FacetBoxTitleEnglish==by region/country','FacetBoxTitleFrench==par r\xe9gion/pays','FacetBoxTitleSpanish==por region/pa\xeds','FacetQueryIndex==-1','FacetSetTitleEnglish==Resources','Facet_1==3256','Facet_2==3254','Facet_3==3253','FrenchSectionLabel==Pays couverts','HideInNav==TRUE','PrimaryFacetType==GEO','SpanishSectionLabel==Pa\xedses abarcados','secondaryUrlVariableField==region1');
g_navNode_4=g_navNode_Root.addNode('3256','What we do',ssUrlPrefix + 'what/index.htm','AlwaysExplode==TRUE','BreadCrumbParent==employment\x3a2769','EnglishSectionLabel==What we do','FacetBoxTitleEnglish==by type','FacetQueryIndex==-1','Facet_1==3254','Facet_2==3255','Facet_3==3253','FrenchSectionLabel==Activit\xe9s','PrimaryFacetType==TYP','SpanishSectionLabel==Actividades','secondaryUrlVariableField==region1');
g_navNode_4_0=g_navNode_4.addNode('3257','Projects',ssUrlPrefix + 'what/projects/index.htm','BreadCrumbParent==employment\x3a2769','DefaultGroupType==1','EnglishSectionLabel==Programmes and projects','FacetBoxTitleEnglish==by type','FacetQueryIndex==1','FacetSetTitleEnglish==Browse programmes and projects','Facet_1==3254','Facet_2==3255','FrenchSectionLabel==Programmes et projets','PrimaryFacetType==TYP','PrimaryFacetValue==Project','Query_1==\x28dDocType \x3cmatches\x3e \x60Project\x60\x29 \x3c\x24SortSpec\x3d\"dDocTitle ASC\"\x24\x3e','SpanishSectionLabel==Programas y proyectos','secondaryUrlVariableField==region1');
g_navNode_4_2=g_navNode_4.addNode('3259','Publications',ssUrlPrefix + 'what/pubs/index.htm','BreadCrumbParent==employment\x3a2769','DefaultGroupFieldName==xDateIssued','DefaultGroupType==1','EnglishSectionLabel==Publications','FacetBoxTitleEnglish==by type','FacetQueryIndex==-1','FacetSetTitleEnglish==Browse publications','Facet_1==3254','Facet_2==3255','FrenchSectionLabel==Publications','PrimaryFacetType==TYP','PrimaryFacetValue==Publication','Query_2==\x28dDocType \x3csubstring\x3e \x60Publication\x60\x29','SpanishSectionLabel==Publicaciones','secondaryUrlVariableField==region1');
g_navNode_5=g_navNode_Root.addNode('3261','Information resources',ssUrlPrefix + 'info/index.htm','AlwaysExplode==TRUE','BreadCrumbParent==employment\x3a2769','EnglishSectionLabel==Information resources','FrenchSectionLabel==Ressources d\u2019information','SpanishSectionLabel==Recursos de Informaci\xf3n','secondaryUrlVariableField==region1');
g_navNode_5_5=g_navNode_5.addNode('3273','Links',ssUrlPrefix + 'info/links/index.htm','BreadCrumbParent==employment\x3a2769','EnglishSectionLabel==Links','FrenchSectionLabel==Liens utiles','HideInNav==FALSE','SpanishSectionLabel==Enlaces \xfatiles','secondaryUrlVariableField==region1');
g_navNode_6=g_navNode_Root.addNode('3274','Supplemental Navigation',ssUrlPrefix + 'SupplementalNavigation/index.htm','HideInNav==TRUE');
g_navNode_6_0=g_navNode_6.addNode('3275','Disclaimer',ssUrlPrefix + 'SupplementalNavigation/Disclaimer/index.htm','HideInNav==TRUE');
g_navNode_6_1=g_navNode_6.addNode('3276','Site Search',ssUrlPrefix + 'SupplementalNavigation/SiteSearch/index.htm','HideInNav==TRUE');
g_navNode_6_1_0=g_navNode_6_1.addNode('3277','Contextual Search Results',ssUrlPrefix + 'SupplementalNavigation/SiteSearch/ContextualSearchResults/index.htm');
g_navNode_6_3=g_navNode_6.addNode('3279','Site map',ssUrlPrefix + 'SupplementalNavigation/Sitemap/index.htm','EnglishSectionLabel==Site map','FrenchSectionLabel==Plan du site','SpanishSectionLabel==Mapa del sitio');
g_navNode_6_4=g_navNode_6.addNode('3280','Contact us',ssUrlPrefix + 'SupplementalNavigation/Contactus/index.htm','EnglishSectionLabel==Contact us','FrenchSectionLabel==Contactez-nous','SpanishSectionLabel==Cont\xe1ctenos');
g_navNode_7=g_navNode_Root.addNode('3281','Error Handler',ssUrlPrefix + 'ErrorHandler/index.htm','HideInNav==TRUE');
g_navNode_8=g_navNode_Root.addNode('3282','What\'s new',ssUrlPrefix + 'Whatsnew/index.htm','EnglishSectionLabel==What\\x27s new','FrenchSectionLabel==Actualit\xe9s','HideInNav==TRUE','Query_3==\x28dDocType \x3csubstring\x3e \x60NewsItem\x60\x29 \x3c\x24SortSpec\x3d\"xDateIssued DESC\"\x24\x3e','SpanishSectionLabel==Novedades','secondaryUrlVariableField==region1');
