/////////////////////////////////////////////////////////////////////////////
// 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('262','Home',ssUrlPrefix + 'default.aspx',null);
g_navNode_0=g_navNode_Root.addNode('263','HOME',ssUrlPrefix + 'HOME/index.htm','linkOnly==/EcoCareFeed/default.aspx','topNav==TRUE');
g_navNode_1=g_navNode_Root.addNode('266','PRODUCT RESOURCE',ssUrlPrefix + 'PRODUCTRESOURCE/default.aspx','DynamicListQuery==dDocType \x3cmatches\x3e \x60Web_Content\x60  \x3cAND\x3e  xWebsiteSection \x3csubstring\x3e \x60EcoCareFeed\x3a266\x60  \x3cAND\x3e \x3cNOT\x3e xRegionDefinition \x3csubstring\x3e \x60ECOCAREFEED_DL_RD\x60','DynamicQueryText==\x28dDocType \x3cmatches\x3e \x60Web_Content\x60 \x3cOR\x3e dDocType \x3cmatches\x3e \x60Native Document\x60\x29 \x3cAND\x3e  xApplicationID \x3cmatches\x3e \x60EcoCare Feed\x60  \x3cAND\x3e  xWebsiteObjectType \x3cmatches\x3e \x60Data File\x60  \x3cAND\x3e  xWebsiteSection \x3csubstring\x3e \x60EcoCareFeed\x3a266\x60','secondaryUrlVariableField==content','topNav==TRUE');
g_navNode_2=g_navNode_Root.addNode('265','TECHNICAL RESOURCE',ssUrlPrefix + 'TECHNICALRESOURCE/default.aspx','DynamicListQuery==dDocType \x3cmatches\x3e \x60Web_Content\x60 \x3cAND\x3e  xWebsiteSection \x3csubstring\x3e \x60EcoCareFeed\x3a265\x60 \x3cAND\x3e \x3cNOT\x3e xRegionDefinition \x3csubstring\x3e \x60ECOCAREFEED_DL_RD\x60','secondaryUrlVariableField==content','topNav==TRUE');
g_navNode_3=g_navNode_Root.addNode('272','USEFUL LINKS',ssUrlPrefix + 'LINKS/default.aspx','topNav==TRUE');
g_navNode_4=g_navNode_Root.addNode('267','CONTACT US',ssUrlPrefix + 'CONTACTUS/default.aspx','UCRegister==\x3c\x25\x40 Register Src\x3d\"\x7e/contactus/ContactUs_uc.ascx\" TagName\x3d\"ContactUs_uc\" TagPrefix\x3d\"ucContactUs\" \x25\x3e','UCTag==\x3cucContactUs\x3aContactUs_UC id\x3d\"ContactUs_UC\" runat\x3d\"server\" /\x3e','secondaryUrlVariableField==content','topNav==TRUE');

