/////////////////////////////////////////////////////////////////////////////
// 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('2924','ILO-Dhaka',ssUrlPrefix + 'index.htm',null,'BreadcrumbPrefixNode==asia\x3a2642','NavigationRootLevel==1','SectionLabel_en==CO\u2013Dhaka','SiteLabel_en==CO\u2013Dhaka','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_0=g_navNode_Root.addNode('2925','About us',ssUrlPrefix + 'Aboutus/index.htm','SectionLabel_en==About us','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2=g_navNode_Root.addNode('2927','Areas of work',ssUrlPrefix + 'Areasofwork/index.htm','SectionLabel_en==Areas of work','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_0=g_navNode_2.addNode('5252','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('5261','facet',ssUrlPrefix + 'Areasofwork/child-labour/facet/index.htm','Hide==TRUE','SectionLabelShort_en==Resources','SectionLabel_en==Child Labour resources','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_1=g_navNode_2.addNode('5253','Equality and discrimination',ssUrlPrefix + 'Areasofwork/equality-and-discrimination/index.htm','SectionLabel_en==Equality and discrimination','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_1_0=g_navNode_2_1.addNode('5262','facet',ssUrlPrefix + 'Areasofwork/equality-and-discrimination/facet/index.htm','Hide==TRUE','SectionLabelShort_en==Resources','SectionLabel_en==Equality and discrimination resources','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_2=g_navNode_2.addNode('5254','Green jobs',ssUrlPrefix + 'Areasofwork/green-jobs/index.htm','SectionLabel_en==Green jobs','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_2_0=g_navNode_2_2.addNode('5263','facet',ssUrlPrefix + 'Areasofwork/green-jobs/facet/index.htm','Hide==TRUE','SectionLabelShort_en==Resources','SectionLabel_en==Green jobs resources','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_3=g_navNode_2.addNode('5255','Informal economy',ssUrlPrefix + 'Areasofwork/informal-economy/index.htm','SectionLabel_en==Informal economy','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_3_0=g_navNode_2_3.addNode('5264','facet',ssUrlPrefix + 'Areasofwork/informal-economy/facet/index.htm','Hide==TRUE','SectionLabelShort_en==Resources','SectionLabel_en==Informal economy resources','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_4=g_navNode_2.addNode('5256','International Labour Standards',ssUrlPrefix + 'Areasofwork/international-labour-standards/index.htm','SectionLabel_en==International labour standards','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_4_0=g_navNode_2_4.addNode('5265','facet',ssUrlPrefix + 'Areasofwork/international-labour-standards/facet/index.htm','Hide==TRUE','SectionLabelShort_en==Resources','SectionLabel_en==International labour standards resources','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_5=g_navNode_2.addNode('5257','Labour migration',ssUrlPrefix + 'Areasofwork/labour-migration/index.htm','SectionLabel_en==Labour migration','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_5_0=g_navNode_2_5.addNode('5266','facet',ssUrlPrefix + 'Areasofwork/labour-migration/facet/index.htm','Hide==TRUE','SectionLabelShort_en==Resources','SectionLabel_en==Labour migration resources','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_6=g_navNode_2.addNode('5258','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_6_0=g_navNode_2_6.addNode('5267','facet',ssUrlPrefix + 'Areasofwork/safety-and-health-at-work/facet/index.htm','Hide==TRUE','SectionLabelShort_en==Resources','SectionLabel_en==Safety and health at work resources','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_7=g_navNode_2.addNode('5259','Skills and employability',ssUrlPrefix + 'Areasofwork/skills-and-employability/index.htm','SectionLabel_en==Skills and employability','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_7_0=g_navNode_2_7.addNode('5268','facet',ssUrlPrefix + 'Areasofwork/skills-and-employability/facet/index.htm','Hide==TRUE','SectionLabelShort_en==Resources','SectionLabel_en==Skills and employability resources','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_8=g_navNode_2.addNode('5260','Workers\u2019 and Employers\u2019 Organizations',ssUrlPrefix + 'Areasofwork/workers-and-employers-organizations/index.htm','SectionLabel_en==Workers and Employers Organizations','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_8_0=g_navNode_2_8.addNode('5269','facet',ssUrlPrefix + 'Areasofwork/workers-and-employers-organizations/facet/index.htm','Hide==TRUE','SectionLabelShort_en==Resources','SectionLabel_en==Workers and Employers Organizations resources','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_3=g_navNode_Root.addNode('2928','Decent work in Bangladesh',ssUrlPrefix + 'country/index.htm','SectionLabel_en==Decent work in Bangladesh','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_4=g_navNode_Root.addNode('2929','What we do',ssUrlPrefix + 'Whatwedo/index.htm','SectionLabel_en==What we do','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_4_0=g_navNode_4.addNode('2930','Projects',ssUrlPrefix + 'Whatwedo/Projects/index.htm','SectionLabel_en==Projects','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_4_1=g_navNode_4.addNode('2931','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('2932','Publications',ssUrlPrefix + 'Whatwedo/Publications/index.htm','SectionLabel_en==Publications','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_5=g_navNode_Root.addNode('2934','Information resources',ssUrlPrefix + 'Informationresources/index.htm','SectionLabel_en==Information resources','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_5_0=g_navNode_5.addNode('2935','Public information',ssUrlPrefix + 'Informationresources/Publicinformation/index.htm','SectionLabel_en==Public information','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_5_0_0=g_navNode_5_0.addNode('2936','Press releases',ssUrlPrefix + 'Informationresources/Publicinformation/Pressreleases/index.htm','SectionLabel_en==Press releases','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_5_0_3=g_navNode_5_0.addNode('2939','Speeches',ssUrlPrefix + 'Informationresources/Publicinformation/Speeches/index.htm','SectionLabel_en==Speeches','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_5_1=g_navNode_5.addNode('2942','Library documentation center',ssUrlPrefix + 'Informationresources/Librarydocumentationcenter/index.htm','SectionLabel_en==Library / documentation center','secondaryUrlVariableField==pl_replaceable_content');

