/////////////////////////////////////////////////////////////////////////////
// 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('3486','CO-Manila',ssUrlPrefix + 'index.htm',null,'BreadcrumbPrefixNode==asia\x3a2642','NavigationRootLevel==1','SectionLabelShort_en==CO-Manila','SectionLabel_en==ILO Country Office for the Philippines \x28CO-Manila\x29','SiteLabel_en==CO-Manila','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_0=g_navNode_Root.addNode('3487','About the Office',ssUrlPrefix + 'aboutus/index.htm','SectionLabel_en==About the Office','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2=g_navNode_Root.addNode('3489','Areas of work',ssUrlPrefix + 'areasofwork/index.htm','SectionLabel_en==Areas of work','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_0=g_navNode_2.addNode('5112','Child labour',ssUrlPrefix + 'areasofwork/child-labour/index.htm','SectionLabel_en==Child labour','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_0_0=g_navNode_2_0.addNode('5124','facet',ssUrlPrefix + 'areasofwork/child-labour/facet/index.htm','Hide==TRUE','SectionLabel_en==Resources on child labour','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_1=g_navNode_2.addNode('5113','Employment promotion',ssUrlPrefix + 'areasofwork/employment-promotion/index.htm','SectionLabel_en==Employment promotion','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_1_0=g_navNode_2_1.addNode('5125','facet',ssUrlPrefix + 'areasofwork/employment-promotion/facet/index.htm','Hide==TRUE','SectionLabel_en==Resources on employment promotion','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_2=g_navNode_2.addNode('5114','Equality and discrimination',ssUrlPrefix + 'areasofwork/equality-and-discrimination/index.htm','SectionLabel_en==Equality and discrimination','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_2_0=g_navNode_2_2.addNode('5126','facet',ssUrlPrefix + 'areasofwork/equality-and-discrimination/facet/index.htm','Hide==TRUE','SectionLabel_en==Resources on equality and discrimination','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_3=g_navNode_2.addNode('5115','Green jobs',ssUrlPrefix + 'areasofwork/green-jobs/index.htm','SectionLabel_en==Green jobs','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_3_0=g_navNode_2_3.addNode('5127','facet',ssUrlPrefix + 'areasofwork/green-jobs/facet/index.htm','Hide==TRUE','SectionLabel_en==Resources on green jobs','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_4=g_navNode_2.addNode('5116','Informal economy',ssUrlPrefix + 'areasofwork/informal-economy/index.htm','SectionLabel_en==Informal economy','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_4_0=g_navNode_2_4.addNode('5128','facet',ssUrlPrefix + 'areasofwork/informal-economy/facet/index.htm','Hide==TRUE','SectionLabel_en==Resources on informal economy','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_5=g_navNode_2.addNode('5117','International labour standards',ssUrlPrefix + 'areasofwork/international-labour-standards/index.htm','SectionLabel_en==International labour standards','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_5_0=g_navNode_2_5.addNode('5129','facet',ssUrlPrefix + 'areasofwork/international-labour-standards/facet/index.htm','Hide==TRUE','SectionLabel_en==Resources on international labour standards','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_6=g_navNode_2.addNode('5118','Labour market governance and working conditions',ssUrlPrefix + 'areasofwork/labour-market-governance-and-working-conditions/index.htm','SectionLabel_en==Labour market governance and working conditions','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_6_0=g_navNode_2_6.addNode('5130','facet',ssUrlPrefix + 'areasofwork/labour-market-governance-and-working-conditions/facet/index.htm','Hide==TRUE','SectionLabel_en==Resources on labour market governance and working conditions','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_7=g_navNode_2.addNode('5119','Labour migration',ssUrlPrefix + 'areasofwork/labour-migration/index.htm','SectionLabel_en==Labour migration','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_7_0=g_navNode_2_7.addNode('5131','facet',ssUrlPrefix + 'areasofwork/labour-migration/facet/index.htm','Hide==TRUE','SectionLabel_en==Resources on labour migration','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_8=g_navNode_2.addNode('5120','Safety and health at work',ssUrlPrefix + 'areasofwork/safety-and-health-at-work/index.htm','SectionLabel_en==Safety and health at work','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_8_0=g_navNode_2_8.addNode('5132','facet',ssUrlPrefix + 'areasofwork/safety-and-health-at-work/facet/index.htm','Hide==TRUE','SectionLabel_en==Resources on safety and health at work','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_9=g_navNode_2.addNode('5121','Skills and employability',ssUrlPrefix + 'areasofwork/skills-and-employability/index.htm','SectionLabel_en==Skills and employability','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_9_0=g_navNode_2_9.addNode('5133','facet',ssUrlPrefix + 'areasofwork/skills-and-employability/facet/index.htm','Hide==TRUE','SectionLabel_en==Resources on skills and employability','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_10=g_navNode_2.addNode('5122','Social security',ssUrlPrefix + 'areasofwork/social-security/index.htm','SectionLabel_en==Social security','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_10_0=g_navNode_2_10.addNode('5134','facet',ssUrlPrefix + 'areasofwork/social-security/facet/index.htm','Hide==TRUE','SectionLabel_en==Resources on social security','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_11=g_navNode_2.addNode('5123','Workers\' and Employers\' Organizations',ssUrlPrefix + 'areasofwork/workers-and-employers-organizations/index.htm','SectionLabel_en==Workers\\x27 and Employers\\x27 Organizations','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_11_0=g_navNode_2_11.addNode('5135','facet',ssUrlPrefix + 'areasofwork/workers-and-employers-organizations/facet/index.htm','Hide==TRUE','SectionLabel_en==Resources on workers\\x27 and employers\\x27 organizations','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_3=g_navNode_Root.addNode('3490','Decent work in the Philippines',ssUrlPrefix + 'country/index.htm','SectionLabel_en==Decent work in the Philippines','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_4=g_navNode_Root.addNode('3491','What we do',ssUrlPrefix + 'whatwedo/index.htm','SectionLabel_en==What we do','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_4_0=g_navNode_4.addNode('3492','Projects',ssUrlPrefix + 'whatwedo/projects/index.htm','SectionLabel_en==Projects','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_4_1=g_navNode_4.addNode('3493','Events and meetings',ssUrlPrefix + 'whatwedo/eventsandmeetings/index.htm','SectionLabel_en==Events and meetings','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_4_2=g_navNode_4.addNode('3494','Publications',ssUrlPrefix + 'whatwedo/publications/index.htm','SectionLabel_en==Publications','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_5=g_navNode_Root.addNode('3496','Information resources',ssUrlPrefix + 'info/index.htm','SectionLabel_en==Information resources','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_5_0=g_navNode_5.addNode('3497','Public information',ssUrlPrefix + 'info/public/index.htm','SectionLabel_en==Public information','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_5_0_0=g_navNode_5_0.addNode('3498','Press releases',ssUrlPrefix + 'info/public/pr/index.htm','SectionLabel_en==Press releases','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_5_0_1=g_navNode_5_0.addNode('3499','Feature articles',ssUrlPrefix + 'info/public/fs/index.htm','SectionLabel_en==Feature articles','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_5_0_2=g_navNode_5_0.addNode('3500','Newsletters',ssUrlPrefix + 'info/public/nl/index.htm','SectionLabel_en==Newsletters','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_5_0_3=g_navNode_5_0.addNode('3501','Speeches',ssUrlPrefix + 'info/public/sp/index.htm','SectionLabel_en==Speeches','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_5_0_4=g_navNode_5_0.addNode('3502','Videos',ssUrlPrefix + 'info/public/vid/index.htm','SectionLabel_en==Videos','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_5_1=g_navNode_5.addNode('3504','Library documentation center',ssUrlPrefix + 'info/library/index.htm','SectionLabel_en==Library / documentation center','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_5_5=g_navNode_5.addNode('3508','Links',ssUrlPrefix + 'info/links/index.htm','SectionLabel_en==Links','secondaryUrlVariableField==pl_replaceable_content');

