/////////////////////////////////////////////////////////////////////////////
// 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 eqPos = argValues[i].indexOf("==");
		var attrName = argValues[i].substring(0,eqPos);
		var attrValue = argValues[i].substring(eqPos+2);

		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 eqPos = argValues[i].indexOf("==");
		var attrName = argValues[i].substring(0,eqPos);
		var attrValue = argValues[i].substring(eqPos+2);

		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('2912','EMP/SKILLS',ssUrlPrefix + 'index.htm',null,'BreadcrumbPrefixNode==employment\x3a2769','NavigationRootLevel==1','SectionLabel_en==Skills and Employability Department \x28EMP/SKILLS\x29','SectionLabel_es==Departamento de Conocimientos Te\xf3ricos y Pr\xe1cticos y Empleabilidad \x28EMP/SKILLS\x29 ','SectionLabel_fr==D\xe9partement des comp\xe9tences et de l\\x27employabilit\xe9 \x28EMP/SKILLS\x29 ','SiteLabel_en==EMP/SKILLS','SiteLabel_es==EMP/SKILLS','SiteLabel_fr==EMP/SKILLS','SiteLanguages==en,es,fr','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2=g_navNode_Root.addNode('3066','Areas of work',ssUrlPrefix + 'areas/index.htm','SectionLabel_en==Areas of work','SectionLabel_es==Ambitos de trabajo','SectionLabel_fr==Domaines de travail','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_0=g_navNode_2.addNode('22','Employment services',ssUrlPrefix + 'areas/employment-services/index.htm','SectionLabel_en==Employment services','SectionLabel_es==Servicios de empleo','SectionLabel_fr==Services de l\u2019emploi','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_0_0=g_navNode_2_0.addNode('27','facet',ssUrlPrefix + 'areas/employment-services/facet/index.htm','Hide==TRUE','SectionLabelShort_en==Resources','SectionLabelShort_es==Recursos','SectionLabelShort_fr==Ressources','SectionLabel_en==Employment services resources','SectionLabel_es==Recursos de Servicios de empleo','SectionLabel_fr==Ressources de Services de l\u2019emploi','hide==TRUE','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_1=g_navNode_2.addNode('23','Inclusion of persons with disabilities',ssUrlPrefix + 'areas/inclusion-of-persons-with-disabilities/index.htm','SectionLabel_en==Inclusion of persons with disabilities','SectionLabel_es==Inclusi\xf3n de las personas con discapacidad','SectionLabel_fr==L\u2019int\xe9gration des personnes handicap\xe9es','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_1_0=g_navNode_2_1.addNode('5077','facet',ssUrlPrefix + 'areas/inclusion-of-persons-with-disabilities/facet/index.htm','Hide==TRUE','SectionLabelShort_en==Resources','SectionLabelShort_es==Recursos','SectionLabelShort_fr==Ressources','SectionLabel_en==Inclusion of persons with disabilities resources','SectionLabel_es==Recursos de Inclusi\xf3n de las personas con discapacidad','SectionLabel_fr==Ressources de L\u2019int\xe9gration des personnes handicap\xe9es','hide==TRUE','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_2=g_navNode_2.addNode('24','Skills policies and systems',ssUrlPrefix + 'areas/skills-policies-and-systems/index.htm','SectionLabel_en==Skills policies and systems','SectionLabel_es==Pol\xedticas y sistemas de capacitaci\xf3n','SectionLabel_fr==Politiques et syst\xe8mes de formation','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_2_0=g_navNode_2_2.addNode('5078','facet',ssUrlPrefix + 'areas/skills-policies-and-systems/facet/index.htm','Hide==TRUE','SectionLabelShort_en==Resources','SectionLabelShort_es==Recursos','SectionLabelShort_fr==Ressources','SectionLabel_en==Skills policies and systems resources','SectionLabel_es==Recursos de Pol\xedticas y sistemas de capacitaci\xf3n','SectionLabel_fr==Ressources de Politiques et syst\xe8mes de formation','hide==TRUE','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_3=g_navNode_2.addNode('25','Skills training for poverty reduction',ssUrlPrefix + 'areas/skills-training-for-poverty-reduction/index.htm','SectionLabel_en==Skills training for poverty reduction','SectionLabel_es==Capacitaci\xf3n para reducir la pobreza','SectionLabel_fr==Formation des comp\xe9tences pour la lutte contre la pauvret\xe9','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_3_0=g_navNode_2_3.addNode('5079','facet',ssUrlPrefix + 'areas/skills-training-for-poverty-reduction/facet/index.htm','Hide==TRUE','SectionLabelShort_en==Resources','SectionLabelShort_es==Recursos','SectionLabelShort_fr==Ressources','SectionLabel_en==Skills training for poverty reduction resources','SectionLabel_es==Recursos de Capacitaci\xf3n para reducir la pobreza','SectionLabel_fr==Ressources de Formation des comp\xe9tences pour la lutte contre la pauvret\xe9','hide==TRUE','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_4=g_navNode_2.addNode('26','Skills for youth employment',ssUrlPrefix + 'areas/skills-for-youth-employment/index.htm','SectionLabel_en==Skills for youth employment','SectionLabel_es==Calificaciones para el empleo de los j\xf3venes','SectionLabel_fr==Des comp\xe9tences pour l\\x27emploi des jeunes','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_4_0=g_navNode_2_4.addNode('5080','facet',ssUrlPrefix + 'areas/skills-for-youth-employment/facet/index.htm','Hide==TRUE','SectionLabelShort_en==Resources','SectionLabelShort_es==Recursos','SectionLabelShort_fr==Ressources','SectionLabel_en==Skills for youth employment resources','SectionLabel_es==Recursos de Calificaciones para el empleo de los j\xf3venes','SectionLabel_fr==Ressources de Des comp\xe9tences pour l\\x27emploi des jeunes','hide==TRUE','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_4=g_navNode_Root.addNode('3069','Projects',ssUrlPrefix + 'projects/index.htm','SectionLabel_en==Programmes and projects','SectionLabel_es==Programas y proyectos','SectionLabel_fr==Programmes et projets','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_5=g_navNode_Root.addNode('3070','Events and meetings',ssUrlPrefix + 'events/index.htm','SectionLabel_en==Events and meetings','SectionLabel_es==Eventos y reuniones','SectionLabel_fr==\xc9v\xe9nements et reunions','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_6=g_navNode_Root.addNode('3071','Publications',ssUrlPrefix + 'pubs/index.htm','SectionLabel_en==Publications','SectionLabel_es==Publicaciones','SectionLabel_fr==Publications','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_8=g_navNode_Root.addNode('3085','Links',ssUrlPrefix + 'links/index.htm','SectionLabel_en==Links','SectionLabel_es==Enlaces \xfatiles','SectionLabel_fr==Liens utiles','secondaryUrlVariableField==pl_replaceable_content');

