/////////////////////////////////////////////////////////////////////////////
// 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('270','Home',ssUrlPrefix + 'index.htm',null,'MetriwebKeyword==ra/viv/hom');
g_navNode_0=g_navNode_Root.addNode('323','EMISSIONS \x7c',ssUrlPrefix + 'emissions/index.htm','MetriwebKeyword==ra/viv/emi');
g_navNode_1=g_navNode_Root.addNode('306','PROGRAMMES \x7c',ssUrlPrefix + 'programmes/index.htm','AddParam==TRUE','MetriwebKeyword==ra/viv/emi');
g_navNode_2=g_navNode_Root.addNode('304','EN REGION \x7c',ssUrlPrefix + 'region/index.htm','MetriwebKeyword==ra/viv/reg');
g_navNode_3=g_navNode_Root.addNode('420','LA MUSIQUE \x7c',ssUrlPrefix + 'musique/index.htm','AddParam==TRUE','MetriwebKeyword==ra/viv/prog/play','NotInCache==TRUE');
g_navNode_4=g_navNode_Root.addNode('305','SPORT \x7c',ssUrlPrefix + 'sports/index.htm','MetriwebKeyword==ra/viv/spor');
g_navNode_5=g_navNode_Root.addNode('427','DICO RADIO \x7c',ssUrlPrefix + 'dico/index.htm','MetriwebKeyword==ra/viv/fyi');
g_navNode_6=g_navNode_Root.addNode('299','FREQUENCES \x7c',ssUrlPrefix + 'frequences/index.htm','MetriwebKeyword==ra/viv/freq');
g_navNode_7=g_navNode_Root.addNode('303','NEWSLETTER \x7c',ssUrlPrefix + 'newsletter/index.htm','MetriwebKeyword==ra/1ier/news');
g_navNode_8=g_navNode_Root.addNode('451','COULISSES \x7c',ssUrlPrefix + 'coulisses/index.htm','MetriwebKeyword==ra/viv/actu','secondaryUrlVariableField==region3');
g_navNode_9=g_navNode_Root.addNode('307','CONTACTS',ssUrlPrefix + 'contacts/index.htm','MetriwebKeyword==ra/viv/cont','secondaryUrlVariableField==region3');
