/////////////////////////////////////////////////////////////////////////////
// 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('2988','Home page',ssUrlPrefix + 'index.htm',null,'BreadcrumbPrefixNode==asia\x3a2642','NavigationRootLevel==1','SectionLabel_en==CO\u2013Colombo','SiteLabel_en==CO\u2013Colombo','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_0=g_navNode_Root.addNode('2989','About us',ssUrlPrefix + 'aboutus/index.htm','SectionLabel_en==About us','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2=g_navNode_Root.addNode('2991','Areas of work',ssUrlPrefix + 'areasofwork/index.htm','SectionLabel_en==Areas of work','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_0=g_navNode_2.addNode('5292','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('5315','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('5293','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('5314','facet',ssUrlPrefix + 'areasofwork/employment-promotion/facet/index.htm','Hide==TRUE','SectionLabelShort_en==Resources','SectionLabel_en==Employment promotion resources','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_2=g_navNode_2.addNode('5294','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('5313','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_3=g_navNode_2.addNode('5295','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('5312','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_4=g_navNode_2.addNode('5296','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('5311','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_5=g_navNode_2.addNode('5297','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('5310','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_6=g_navNode_2.addNode('5298','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('5309','facet',ssUrlPrefix + 'areasofwork/labour-market-governance-and-working-conditions/facet/index.htm','Hide==TRUE','SectionLabelShort_en==Resources','SectionLabel_en==Labour market governance and working conditions resources','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_7=g_navNode_2.addNode('5299','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('5308','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_8=g_navNode_2.addNode('5300','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('5307','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_9=g_navNode_2.addNode('5301','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('5306','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_10=g_navNode_2.addNode('5302','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('5305','facet',ssUrlPrefix + 'areasofwork/social-security/facet/index.htm','Hide==TRUE','SectionLabelShort_en==Resources','SectionLabel_en==Social security resources','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_11=g_navNode_2.addNode('5303','Workers and Employers Organizations',ssUrlPrefix + 'areasofwork/workers-and-employers-organizations/index.htm','SectionLabel_en==Workers and Employers Organizations','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_2_11_0=g_navNode_2_11.addNode('5304','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('2992','Decent work in Sri Lanka',ssUrlPrefix + 'dw/index.htm','SectionLabel_en==Decent Work in Sri Lanka','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_4=g_navNode_Root.addNode('2993','What we do',ssUrlPrefix + 'whatwedo/index.htm','SectionLabel_en==What we do','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_4_0=g_navNode_4.addNode('2994','Projects',ssUrlPrefix + 'whatwedo/projects/index.htm','SectionLabel_en==Projects','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_4_1=g_navNode_4.addNode('2995','Events and meetings',ssUrlPrefix + 'whatwedo/events/index.htm','SectionLabel_en==Events and meetings','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_4_2=g_navNode_4.addNode('2996','Publications',ssUrlPrefix + 'whatwedo/publications/index.htm','SectionLabel_en==Publications','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_5=g_navNode_Root.addNode('2998','Information resources',ssUrlPrefix + 'info/index.htm','SectionLabel_en==Information resources','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_5_0=g_navNode_5.addNode('2999','Public information',ssUrlPrefix + 'info/pub/index.htm','SectionLabel_en==Public information','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_5_0_0=g_navNode_5_0.addNode('3000','Press releases',ssUrlPrefix + 'info/pub/pr/index.htm','SectionLabel_en==Press releases','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_5_0_3=g_navNode_5_0.addNode('3003','Speeches',ssUrlPrefix + 'info/pub/sp/index.htm','SectionLabel_en==Speeches','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_5_0_4=g_navNode_5_0.addNode('3004','Videos',ssUrlPrefix + 'info/pub/vid/index.htm','SectionLabel_en==Videos','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_5_0_5=g_navNode_5_0.addNode('3005','Photo gallery',ssUrlPrefix + 'info/pub/ph/index.htm','SectionLabel_en==Photo gallery','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_5_1=g_navNode_5.addNode('3006','Library documentation center',ssUrlPrefix + 'info/lib/index.htm','SectionLabel_en==Library / documentation center','secondaryUrlVariableField==pl_replaceable_content');
g_navNode_5_5=g_navNode_5.addNode('3010','Links',ssUrlPrefix + 'info/links/index.htm','SectionLabel_en==Links','secondaryUrlVariableField==pl_replaceable_content');

