/////////////////////////////////////////////////////////////////////////////
// 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('491','Home',ssUrlPrefix + 'index.htm',null,'AlwaysExplode==FALSE','EnglishSectionLabel==From the World of Work','FrenchSectionLabel==Fen\xeatre sur le monde du travail','IsSurveyMonkeyOn==TRUE','LeftColumnSize==75','ListNodeId_1==492','ListNodeId_2==493','ListNodeId_3==494','NavigationRootLevel==1','Query_1==dDocType \x3csubstring\x3e \x60Publication\x60  \x3cAND\x3e  xTypeSubtype \x3csubstring\x3e \x601\x60  \x3cAND\x3e  xWebsites \x3ccontains\x3e \x60wow\x60  \x3cAND\x3e  xWebsiteSection \x3csubstring\x3e \x60wow\x3a492\x60','Query_2==dDocType \x3cmatches\x3e \x60Publication\x60  \x3cAND\x3e  xTypeSubtype \x3csubstring\x3e \x601\x60  \x3cAND\x3e  xWebsites \x3ccontains\x3e \x60wow\x60  \x3cAND\x3e  xWebsiteSection \x3cmatches\x3e \x60wow\x3a493\x60','Query_3==dDocType \x3cmatches\x3e \x60Publication\x60  \x3cAND\x3e  xTypeSubtype \x3csubstring\x3e \x601\x60  \x3cAND\x3e  xWebsites \x3ccontains\x3e \x60wow\x60  \x3cAND\x3e  xWebsiteSection \x3cmatches\x3e \x60wow\x3a494\x60','SiteSupplementalSectionId==501','SpanishSectionLabel==Panorama sobre el mundo del trabajo','maxAge==3600','secondaryUrlVariableField==region1');
g_navNode_0=g_navNode_Root.addNode('492','Articles',ssUrlPrefix + 'Articles/index.htm','AlwaysExplode==FALSE','EnglishSectionLabel==Articles','FrenchSectionLabel==Reportages','NavigationRootLevel==0','Query_1==dDocType \x3cmatches\x3e \x60Publication\x60\x3cAND\x3e  xTypeSubtype \x3csubstring\x3e \x601\x60  \x3cAND\x3e  xWebsites \x3ccontains\x3e \x60wow\x60  \x3cAND\x3e  xWebsiteSection \x3cmatches\x3e \x60wow\x3a492\x60','Redirect==FALSE','SpanishSectionLabel==Reportajes','secondaryUrlVariableField==region1');
g_navNode_1=g_navNode_Root.addNode('493','News briefs',ssUrlPrefix + 'Newsbriefs/index.htm','EnglishSectionLabel==News briefs','FrenchSectionLabel==En bref','NavigationRootLevel==0','Query_1==dDocType \x3cmatches\x3e \x60Publication\x60  \x3cAND\x3e  xTypeSubtype \x3csubstring\x3e \x601\x60  \x3cAND\x3e  xWebsites \x3ccontains\x3e \x60wow\x60  \x3cAND\x3e  xWebsiteSection \x3cmatches\x3e \x60wow\x3a493\x60','SpanishSectionLabel==Noticias','secondaryUrlVariableField==region1');
g_navNode_2=g_navNode_Root.addNode('494','Around the continents',ssUrlPrefix + 'Aroundthecontinents/index.htm','EnglishSectionLabel==Around the continents\x3a review on ILO related activities','FrenchSectionLabel==Autour du monde\x3a activit\xe9s organis\xe9es ou soutenues par l\u2019OIT','NavigationRootLevel==0','Query_1==dDocType \x3cmatches\x3e \x60Publication\x60  \x3cAND\x3e  xTypeSubtype \x3csubstring\x3e \x601\x60  \x3cAND\x3e  xWebsites \x3ccontains\x3e \x60wow\x60  \x3cAND\x3e  xWebsiteSection \x3cmatches\x3e \x60wow\x3a494\x60','SpanishSectionLabel==Recorrido por los continentes','secondaryUrlVariableField==region1');
g_navNode_3=g_navNode_Root.addNode('495','Planet Work',ssUrlPrefix + 'PlanetWork/index.htm','EnglishSectionLabel==Planet Work','FrenchSectionLabel==Plan\xe8te Travail','NavigationRootLevel==0','Query_1==dDocType \x3cmatches\x3e \x60Publication\x60  \x3cAND\x3e  xTypeSubtype \x3csubstring\x3e \x601\x60  \x3cAND\x3e  xWebsites \x3ccontains\x3e \x60wow\x60  \x3cAND\x3e  xWebsiteSection \x3cmatches\x3e \x60wow\x3a495\x60','SpanishSectionLabel==Planeta Trabajo','secondaryUrlVariableField==region1');
g_navNode_4=g_navNode_Root.addNode('496','ILO in History',ssUrlPrefix + 'ILOinHistory/index.htm','EnglishSectionLabel==ILO in History','FrenchSectionLabel==L\u2019OIT dans l\u2019Histoire','NavigationRootLevel==0','Query_1==dDocType \x3cmatches\x3e \x60Publication\x60  \x3cAND\x3e  xTypeSubtype \x3csubstring\x3e \x601\x60  \x3cAND\x3e  xWebsites \x3ccontains\x3e \x60wow\x60  \x3cAND\x3e  xWebsiteSection \x3cmatches\x3e \x60wow\x3a496\x60','SpanishSectionLabel==La OIT en la Historia','secondaryUrlVariableField==region1');
g_navNode_5=g_navNode_Root.addNode('497','Featured book',ssUrlPrefix + 'Featuredbook/index.htm','EnglishSectionLabel==Featured book','FrenchSectionLabel==A lire','NavigationRootLevel==0','Query_1==dDocType \x3cmatches\x3e \x60Publication\x60  \x3cAND\x3e  xTypeSubtype \x3csubstring\x3e \x601\x60  \x3cAND\x3e  xWebsites \x3ccontains\x3e \x60wow\x60  \x3cAND\x3e  xWebsiteSection \x3cmatches\x3e \x60wow\x3a497\x60','SpanishSectionLabel==Libro destacado','secondaryUrlVariableField==region1');
g_navNode_6=g_navNode_Root.addNode('498','World of Work Magazine print editions',ssUrlPrefix + 'PrintEditions/index.htm','DefaultGroupType==1','EnglishSectionLabel==World of Work Magazine print editions','FrenchSectionLabel==Editions imprim\xe9es du magazine Travail ','NavigationRootLevel==0','Query_1==dDocType \x3cmatches\x3e \x60Publication\x60  \x3cAND\x3e  xTypeSubtype \x3cmatches\x3e \x6012\x60  \x3cAND\x3e  xWebsites \x3ccontains\x3e \x60wow\x60  \x3cAND\x3e  xWebsiteSection \x3cmatches\x3e \x60wow\x3a498\x60','SpanishSectionLabel==Ediciones impresas de la revista Trabajo','secondaryUrlVariableField==region1');
g_navNode_7=g_navNode_Root.addNode('501','Supplemental Navigation',ssUrlPrefix + 'SupplementalNavigation/index.htm','EnglishSectionLabel==Supplemental navigation','HideInNav==TRUE');
g_navNode_7_0=g_navNode_7.addNode('500','Subscribe to the magazine',ssUrlPrefix + 'SupplementalNavigation/Subscribe/index.htm','EnglishSectionLabel==Subscribe to the magazine','FrenchSectionLabel==Abonnez-vous au magazine','HideInNav==TRUE','NavigationRootLevel==0','SpanishSectionLabel==Suscribase a la revista');
g_navNode_7_0_0=g_navNode_7_0.addNode('2092','Confirmation of Subscription',ssUrlPrefix + 'SupplementalNavigation/Subscribe/ConfirmationofSubscription/index.htm','EnglishSectionLabel==Subscribe to the magazine','FrenchSectionLabel==Abonnez-vous au magazine','HideInNav==TRUE','SpanishSectionLabel==Suscribase a la revista');
g_navNode_7_1=g_navNode_7.addNode('499','Contact us',ssUrlPrefix + 'SupplementalNavigation/Contactus/index.htm','EnglishSectionLabel==Contact Us','FrenchSectionLabel==Contactez-nous','SpanishSectionLabel==Cont\xe1ctenos');
g_navNode_7_2=g_navNode_7.addNode('505','Site Search',ssUrlPrefix + 'SupplementalNavigation/SiteSearch/index.htm','EnglishSectionLabel==Site search','HideInNav==TRUE');
g_navNode_7_2_0=g_navNode_7_2.addNode('503','Contextual Search Results',ssUrlPrefix + 'SupplementalNavigation/SiteSearch/ContextualSearchResults/index.htm','EnglishSectionLabel==Contextual search results','HideInNav==TRUE');
g_navNode_7_2_1=g_navNode_7_2.addNode('504','Search Results',ssUrlPrefix + 'SupplementalNavigation/SiteSearch/SearchResults/index.htm','EnglishSectionLabel==Search results','HideInNav==TRUE');
g_navNode_8=g_navNode_Root.addNode('167','Error Handler',ssUrlPrefix + 'ErrorHandler/index.htm','EnglishSectionLabel==Error handler','HideInNav==TRUE','secondaryUrlVariableField==region1');

