/////////////////////////////////////////////////////////////////////////////
// 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('2530','Home',ssUrlPrefix + 'index.htm',null,'EnglishBreadCrumbLabel==Home','EnglishSectionLabel==ILO Bureau of Statistics','FrenchBreadCrumbLabel==Page d\\x27accueil','FrenchSectionLabel==Oficina de Estad\xedstica de la OIT','IsSurveyMonkeyOn==TRUE','SiteSupplementalSectionId==2531','SpanishBreadCrumbLabel==P\xe1gina de entrada ','SpanishSectionLabel==Bureau de statistique du BIT ');
g_navNode_0=g_navNode_Root.addNode('2536','About us',ssUrlPrefix + 'Aboutus/index.htm','EnglishBreadCrumbLabel==About us','EnglishSectionLabel==About us','FrenchBreadCrumbLabel==\xc0 notre sujet','FrenchSectionLabel==\xc0 notre sujet','SpanishBreadCrumbLabel==Qui\xe9nes somos','SpanishSectionLabel==Qui\xe9nes somos','secondaryUrlVariableField==region1');
g_navNode_0_0=g_navNode_0.addNode('2566','History',ssUrlPrefix + 'Aboutus/History/index.htm','EnglishSectionLabel==History','FrenchSectionLabel==Aper\xe7u historique','SpanishSectionLabel==Historia','secondaryUrlVariableField==region1');
g_navNode_1=g_navNode_Root.addNode('2537','Areas of work',ssUrlPrefix + 'Areasofwork/index.htm','EnglishSectionLabel==Areas of work','FrenchSectionLabel==Domaines d\u2019activit\xe9','SpanishSectionLabel==Ambitos de trabajo','secondaryUrlVariableField==region1');
g_navNode_1_0=g_navNode_1.addNode('2540','Compilation of statistics',ssUrlPrefix + 'Areasofwork/Compilation/index.htm','EnglishSectionLabel==Compilation of statistics','FrenchSectionLabel==Compilation et diffusion de statistiques','SpanishSectionLabel==Acopio y difusi\xf3n de estad\xedsticas','secondaryUrlVariableField==region1');
g_navNode_1_1=g_navNode_1.addNode('2541','International standard setting',ssUrlPrefix + 'Areasofwork/Standards/index.htm','EnglishSectionLabel==International standard setting ','FrenchSectionLabel==Elaboration de normes internationales sur les statistiques du travail','SpanishSectionLabel==Establecimiento de normas internacionales sobre estad\xedsticas del trabajo','secondaryUrlVariableField==region1');
g_navNode_1_2=g_navNode_1.addNode('2542','Technical assistance',ssUrlPrefix + 'Areasofwork/Technicalassistance/index.htm','EnglishSectionLabel==Technical assistance','FrenchSectionLabel==Assistance technique','SpanishSectionLabel==Asistencia t\xe9cnica','secondaryUrlVariableField==region1');
g_navNode_1_3=g_navNode_1.addNode('2543','Training programme',ssUrlPrefix + 'Areasofwork/Training/index.htm','EnglishSectionLabel==Training programme','FrenchSectionLabel==Programme de formation','SpanishSectionLabel==Programa de formaci\xf3n','secondaryUrlVariableField==region1');
g_navNode_2=g_navNode_Root.addNode('2538','Publications',ssUrlPrefix + 'Publications/index.htm','EnglishSectionLabel==Publications','FrenchSectionLabel==Publications','SpanishSectionLabel==Publicaciones ','secondaryUrlVariableField==region1');
g_navNode_2_0=g_navNode_2.addNode('2563','By title',ssUrlPrefix + 'Publications/Bytitle/index.htm','DefaultGroupType==-1','EnglishBreadCrumbLabel==By title','EnglishSectionLabel==Publications by title ','FrenchSectionLabel==Publications par titre','Query_1==\x28dDocType \x3csubstring\x3e \x60Publication\x60  \x3cAND\x3e  dDocAccount \x3csubstring\x3e \x60DGREPORTS/INTEGRATION/STAT\x60\x29 \x3cOR\x3e xCollectionID \x3d \x60545\x60 \x3c\x24SortSpec\x3d\"dDocTitle ASC\"\x24\x3e','SpanishSectionLabel==Publicaciones por t\xedtulo','secondaryUrlVariableField==region1');
g_navNode_2_1=g_navNode_2.addNode('2564','By subject',ssUrlPrefix + 'Publications/Bysubject/index.htm','DefaultGroupFieldName==xClassification','DefaultGroupType==5','EnglishBreadCrumbLabel==By subject','EnglishSectionLabel==Publications by subject','FrenchSectionLabel==Publications par th\xe8me','GroupClassificationId==STAT','Query_1==\x28\x28dDocType \x3csubstring\x3e \x60Publication\x60  \x3cAND\x3e  dDocAccount \x3csubstring\x3e \x60DGREPORTS/INTEGRATION/STAT\x60\x29 \x3cOR\x3e xCollectionID \x3d \x60545\x60\x29 \x3c\x24SortSpec\x3d\"xClassification ASC\"\x24\x3e','SpanishSectionLabel==Publicaciones por tema','secondaryUrlVariableField==region1');
g_navNode_2_3=g_navNode_2.addNode('2567','Yearbook of Labour Statistics',ssUrlPrefix + 'Publications/Yearbook/index.htm','EnglishSectionLabel==Yearbook of Labour Statistics','HideInNav==TRUE','SpanishSectionLabel==Anuario de estad\xedsticas laborales','secondaryUrlVariableField==region1');
g_navNode_2_4=g_navNode_2.addNode('2568','Bulletin of Labour Statistics',ssUrlPrefix + 'Publications/bulletin/index.htm','EnglishSectionLabel==Bulletin of Labour Statistics','HideInNav==TRUE','SpanishSectionLabel==Bolet\xedn de Estad\xedsticas Laborales','secondaryUrlVariableField==region1');
g_navNode_2_5=g_navNode_2.addNode('2569','The ILO October Inquiry',ssUrlPrefix + 'Publications/octoberinquiry/index.htm','EnglishSectionLabel==The ILO October Inquiry','FrenchSectionLabel==Enqu\xeate d\\x27octobre du BIT','HideInNav==TRUE','SpanishSectionLabel==Encuesta de octubre de la OIT','secondaryUrlVariableField==region1');
g_navNode_2_6=g_navNode_2.addNode('2570','Sources and Methods in Labour Statistics',ssUrlPrefix + 'Publications/sources/index.htm','EnglishSectionLabel==Sources and Methods in Labour Statistics','FrenchSectionLabel==Sources et M\xe9thodes, Statistiques du Travail','HideInNav==TRUE','SpanishSectionLabel==Fuentes y M\xe9todos, estad\xedsticas del trabajo','secondaryUrlVariableField==region1');
g_navNode_3=g_navNode_Root.addNode('2531','Supplemental Navigation',ssUrlPrefix + 'SupplementalNavigation/index.htm','HideInNav==TRUE');
g_navNode_3_0=g_navNode_3.addNode('2532','Site Search',ssUrlPrefix + 'SupplementalNavigation/SiteSearch/index.htm','HideInNav==TRUE');
g_navNode_3_0_0=g_navNode_3_0.addNode('2533','Contextual Search Results',ssUrlPrefix + 'SupplementalNavigation/SiteSearch/ContextualSearchResults/index.htm');
g_navNode_3_0_1=g_navNode_3_0.addNode('2534','Search Results',ssUrlPrefix + 'SupplementalNavigation/SiteSearch/SearchResults/index.htm');
g_navNode_3_0_2=g_navNode_3_0.addNode('2535','Advanced Search Result',ssUrlPrefix + 'SupplementalNavigation/SiteSearch/AdvancedSearchResult/index.htm');
g_navNode_3_1=g_navNode_3.addNode('2544','Contact us',ssUrlPrefix + 'SupplementalNavigation/Contactus/index.htm','EnglishSectionLabel==Contact us','FrenchSectionLabel==Nous contacter ','SpanishSectionLabel==Cont\xe1ctenos');
g_navNode_3_2=g_navNode_3.addNode('2545','Site index',ssUrlPrefix + 'SupplementalNavigation/Siteindex/index.htm','HideInNav==TRUE');
g_navNode_3_3=g_navNode_3.addNode('2546','Site map',ssUrlPrefix + 'SupplementalNavigation/Sitemap/index.htm','EnglishSectionLabel==Site map','FrenchSectionLabel==Plan du site');
g_navNode_4=g_navNode_Root.addNode('2641','Error handler',ssUrlPrefix + 'errorhandler/index.htm','HideInNav==TRUE');
