/////////////////////////////////////////////////////////////////////////////
// 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('2098','Home',ssUrlPrefix + 'index.htm',null,'AlwaysExplode==FALSE','DontShowChildrenNodes==TRUE','EnglishSectionLabel==GENDER\x3a Home page','FrenchSectionLabel==GENDER\x3a Page d\\x27accueil','IsSurveyMonkeyOn==TRUE','SiteSupplementalSectionId==2105','SpanishSectionLabel==GENDER\x3a P\xe1gina de entrada ','secondaryUrlVariableField==region1');
g_navNode_0=g_navNode_Root.addNode('2099','About us',ssUrlPrefix + 'Aboutus/index.htm','AlwaysExplode==FALSE','EnglishSectionLabel==About us','FrenchSectionLabel==A propos de nous','NavigationRootLevel==0','SpanishSectionLabel==Sobre nosotros');
g_navNode_0_0=g_navNode_0.addNode('2102','Team at Headquarters',ssUrlPrefix + 'Aboutus/TeamatHeadquarters/index.htm','EnglishSectionLabel==Team at headquarters','FrenchSectionLabel==Equipe au si\xe8ge','SpanishSectionLabel==El equipo en la Sede');
g_navNode_0_1=g_navNode_0.addNode('2103','Team in field offices',ssUrlPrefix + 'Aboutus/Teaminfieldoffices/index.htm','EnglishSectionLabel==Team in field offices','FrenchSectionLabel==Equipe dans les bureaux ext\xe9rieurs','SpanishSectionLabel==El equipo en las oficinas exteriores');
g_navNode_0_2=g_navNode_0.addNode('2104','ILO and gender equality',ssUrlPrefix + 'Aboutus/ILOandgenderequality/index.htm','EnglishSectionLabel==ILO and gender equality','FrenchSectionLabel==L\u2019OIT et l\u2019\xe9galit\xe9 entre hommes et femmes','HideInNav==TRUE','SpanishSectionLabel==La OIT y la igualdad de g\xe9nero');
g_navNode_0_3=g_navNode_0.addNode('2138','Gender mainstreaming',ssUrlPrefix + 'Aboutus/Gendermainstreaming/index.htm','EnglishSectionLabel==Gender mainstreaming','HideInNav==TRUE');
g_navNode_1=g_navNode_Root.addNode('2100','Events',ssUrlPrefix + 'Events/index.htm','DefaultGroupFieldName==xDateAvailableStartDate','DefaultGroupType==1','DontShowChildrenNodes==TRUE','EnglishSectionLabel==Events','FrenchSectionLabel==Ev\xe9nements','Query_1==dDocType \x3csubstring\x3e \x60Event\x60','SpanishSectionLabel==Eventos','secondaryUrlVariableField==region1');
g_navNode_1_0=g_navNode_1.addNode('2659','Gender equality at the heart of decent work, Campaign 2008 - 2009',ssUrlPrefix + 'Events/Campaign2008-2009/index.htm','EnglishSectionLabel==Gender equality at the heart of decent work, Campaign 2008-2009','FrenchSectionLabel==L\u2019\xe9galit\xe9 hommes-femmes au coeur du travail d\xe9cent, campagne 2008-2009','HideInNav==FALSE','SpanishSectionLabel==La igualdad de g\xe9nero en el coraz\xf3n del trabajo decente, campa\xf1a 2008-2009','secondaryUrlVariableField==region1');
g_navNode_2=g_navNode_Root.addNode('2101','Information resources',ssUrlPrefix + 'Informationresources/index.htm','AlwaysExplode==FALSE','EnglishSectionLabel==Information resources','FrenchSectionLabel==Ressources d\\x27informations','SpanishSectionLabel==Recursos de informaci\xf3n','secondaryUrlVariableField==region1');
g_navNode_2_0=g_navNode_2.addNode('2120','Publications',ssUrlPrefix + 'Informationresources/Publications/index.htm','DefaultGroupType==1','EnglishSectionLabel==Publications','FrenchSectionLabel==Publications','Query_1==\x28dDocType \x3csubstring\x3e \x60Publication\x60 \x3cOR\x3e dDocType \x3csubstring\x3e \x60InstructionalMaterial\x60\x29','SpanishSectionLabel==Publicaciones','secondaryUrlVariableField==region1');
g_navNode_3=g_navNode_Root.addNode('2105','Supplemental Navigation ',ssUrlPrefix + 'SupplementalNavigation/index.htm','HideInNav==TRUE');
g_navNode_3_0=g_navNode_3.addNode('2106','Contact us',ssUrlPrefix + 'SupplementalNavigation/Contactus/index.htm','EnglishSectionLabel==Contact us','FrenchSectionLabel==Contactez-nous','SpanishSectionLabel==Cont\xe1ctenos');
g_navNode_3_1=g_navNode_3.addNode('2107','Disclaimer',ssUrlPrefix + 'SupplementalNavigation/Disclaimer/index.htm','HideInNav==TRUE');
g_navNode_3_3=g_navNode_3.addNode('2137','Site map',ssUrlPrefix + 'SupplementalNavigation/Sitemap/index.htm','EnglishSectionLabel==Site map','FrenchSectionLabel==Plan du site','SpanishSectionLabel==Mapa del sitio');
g_navNode_4=g_navNode_Root.addNode('2112','Error Handler',ssUrlPrefix + 'ErrorHandler/index.htm','HideInNav==TRUE','secondaryUrlVariableField==region1');
g_navNode_5=g_navNode_Root.addNode('2121','Technical cooperation projects',ssUrlPrefix + 'Projects/index.htm','DefaultGroupType==1','EnglishSectionLabel==Technical cooperation projects','FrenchSectionLabel==Projets de coop\xe9ration technique','Query_1==dDocType \x3cmatches\x3e \x60Project\x60','SpanishSectionLabel==Proyectos de cooperaci\xf3n t\xe9cnica','secondaryUrlVariableField==region1');
g_navNode_6=g_navNode_Root.addNode('2122','Links',ssUrlPrefix + 'Links/index.htm','DefaultGroupType==2','EnglishSectionLabel==Links','FrenchSectionLabel==Liens utiles','Query_1==dDocType \x3csubstring\x3e \x60WebPage\x60  \x3cAND\x3e  xWebsiteSection \x3csubstring\x3e \x60gender\x3a2122\x60','SpanishSectionLabel==Enlaces','secondaryUrlVariableField==region1');
