/////////////////////////////////////////////////////////////////////////////
// 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('2924','ILO-Dhaka',ssUrlPrefix + 'index.htm',null,'EnglishSectionLabel==ILO-Dhaka','FrenchSectionLabel==Page d\u2019accueil','IsSurveyMonkeyOn==TRUE','SiteSupplementalSectionId==2948','secondaryUrlVariableField==region1');
g_navNode_0=g_navNode_Root.addNode('2925','About us',ssUrlPrefix + 'Aboutus/index.htm','EnglishSectionLabel==About us','FrenchSectionLabel==\xc0 propos de nous','SpanishSectionLabel==Qui\xe9nes somos','secondaryUrlVariableField==region1');
g_navNode_2=g_navNode_Root.addNode('2927','Areas of work',ssUrlPrefix + 'Areasofwork/index.htm','EnglishSectionLabel==Areas of work','FacetBoxTitleEnglish==by area of work','FacetQueryIndex==-1','FacetSetTitleEnglish==Browse resources','Facet_1==2929','FrenchSectionLabel==Domaines de travail','PrimaryFacetType==LOC.ASIA','SpanishSectionLabel==Ambitos de trabajo','secondaryUrlVariableField==region1');
g_navNode_3=g_navNode_Root.addNode('2928','Decent work in Bangladesh',ssUrlPrefix + 'country/index.htm','EnglishSectionLabel==Decent work in Bangladesh','FrenchSectionLabel==L\u2019OIT \xe0 Bangladesh','PrimaryFacetType==GEO','SpanishSectionLabel==La OIT en Bangladesh ','secondaryUrlVariableField==region1');
g_navNode_4=g_navNode_Root.addNode('2929','What we do',ssUrlPrefix + 'Whatwedo/index.htm','AlwaysExplode==TRUE','EnglishSectionLabel==What we do','FacetBoxTitleEnglish==by type','FacetSetTitleEnglish==Browse resources','FrenchSectionLabel==Activit\xe9s','PrimaryFacetType==TYP','SpanishSectionLabel==Actividades','secondaryUrlVariableField==region1');
g_navNode_4_0=g_navNode_4.addNode('2930','Projects',ssUrlPrefix + 'Whatwedo/Projects/index.htm','DefaultGroupType==1','EnglishSectionLabel==Projects','FacetBoxTitleEnglish==by type','FacetSetTitleEnglish==Browse projects','Facet_1==2927','FrenchSectionLabel==Projets','PrimaryFacetType==TYP','PrimaryFacetValue==Project','Query_1==dDocType \x3csubstring\x3e \x60Project\x60','SpanishSectionLabel==Proyectos','secondaryUrlVariableField==region1');
g_navNode_4_1=g_navNode_4.addNode('2931','Events and meetings',ssUrlPrefix + 'Whatwedo/Eventsandmeetings/index.htm','DefaultGroupFieldName==xDateAvailableStartDate','DefaultGroupType==1','EnglishSectionLabel==Events and meetings','FacetBoxTitleEnglish==by type','FacetQueryIndex==-1','FacetSetTitleEnglish==Browse events','Facet_1==2927','FeedQueryIndex==1','FeedRefreshTime==3600','FrenchSectionLabel==\xc9v\xe9nements et reunions','PrimaryFacetType==TYP','PrimaryFacetValue==Event','Query_1==dDocType \x3csubstring\x3e \x60Event\x60','SpanishSectionLabel==Eventos y reuniones','secondaryUrlVariableField==region1');
g_navNode_4_2=g_navNode_4.addNode('2932','Publications',ssUrlPrefix + 'Whatwedo/Publications/index.htm','DefaultGroupFieldName==xDateIssued','DefaultGroupType==1','EnglishSectionLabel==Publications','FacetBoxTitleEnglish==by type','FacetQueryIndex==-1','FacetSetTitleEnglish==Browse publications','Facet_1==2927','FeedQueryIndex==2','FeedRefreshTime==3600','FrenchSectionLabel==Publications','PrimaryFacetType==TYP','PrimaryFacetValue==Publication','Query_2==dDocType \x3csubstring\x3e \x60Publication\x60','SpanishSectionLabel==Publicaciones','secondaryUrlVariableField==region1');
g_navNode_5=g_navNode_Root.addNode('2934','Information resources',ssUrlPrefix + 'Informationresources/index.htm','AlwaysExplode==TRUE','EnglishSectionLabel==Information resources','FrenchSectionLabel==Ressources d\u2019information','SpanishSectionLabel==Recursos de Informaci\xf3n','secondaryUrlVariableField==region1');
g_navNode_5_0=g_navNode_5.addNode('2935','Public information',ssUrlPrefix + 'Informationresources/Publicinformation/index.htm','EnglishSectionLabel==Public information','FrenchSectionLabel==Information publique','ListNodeId_1==2936','Query_1==\x28dDocType \x3csubstring\x3e \x60PressRelease\x60\x29','SpanishSectionLabel==Informaci\xf3n p\xfablica','secondaryUrlVariableField==region1');
g_navNode_5_0_0=g_navNode_5_0.addNode('2936','Press releases',ssUrlPrefix + 'Informationresources/Publicinformation/Pressreleases/index.htm','DefaultGroupFieldName==xDateIssued','DefaultGroupType==1','EnglishSectionLabel==Press releases','FacetBoxTitleEnglish==by type','FacetQueryIndex==-1','FacetSetTitleEnglish==Browse press releases','Facet_1==2927','FeedQueryIndex==2','FeedRefreshTime==3600','FrenchSectionLabel==Communiqu\xe9s de presse','PrimaryFacetType==TYP','PrimaryFacetValue==PressRelease','Query_2==\x28dDocType \x3csubstring\x3e \x60PressRelease\x60\x29','SpanishSectionLabel==Comunicados de prensa','secondaryUrlVariableField==region1');
g_navNode_5_0_3=g_navNode_5_0.addNode('2939','Speeches',ssUrlPrefix + 'Informationresources/Publicinformation/Speeches/index.htm','DefaultGroupFieldName==xDateIssued','DefaultGroupType==1','EnglishSectionLabel==Speeches','FrenchSectionLabel==Discours','GroupClassificationId==0','MaxSizeDocInLineDisplayKB==0','Query_2==dDocType \x3csubstring\x3e \x60Statement\x60','SpanishSectionLabel==Discursos','secondaryUrlVariableField==region1');
g_navNode_5_1=g_navNode_5.addNode('2942','Library documentation center',ssUrlPrefix + 'Informationresources/Librarydocumentationcenter/index.htm','EnglishSectionLabel==Library / documentation center','FrenchSectionLabel==Bibliotheque / Centre de documentation','SpanishSectionLabel==Biblioteca / Centro de documentaci\xf3n','secondaryUrlVariableField==region1');
g_navNode_6=g_navNode_Root.addNode('2948','Supplemental Navigation',ssUrlPrefix + 'SupplementalNavigation/index.htm','HideInNav==TRUE');
g_navNode_6_3=g_navNode_6.addNode('2954','Site map',ssUrlPrefix + 'SupplementalNavigation/Sitemap/index.htm');
g_navNode_6_4=g_navNode_6.addNode('2950','Contact us',ssUrlPrefix + 'SupplementalNavigation/Contactus/index.htm');
g_navNode_7=g_navNode_Root.addNode('2955','Error Handler',ssUrlPrefix + 'ErrorHandler/index.htm','HideInNav==TRUE');
g_navNode_8=g_navNode_Root.addNode('2947','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');
