/////////////////////////////////////////////////////////////////////////////
// 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('3238','Home',ssUrlPrefix + 'index.htm',null,'PageTitle==Wilbur Chocolate Experience');
g_navNode_0=g_navNode_Root.addNode('3244','Welcome',ssUrlPrefix + 'home/index.htm','Description==Wilbur Welcome Page','Keywords==Wilbur Chocolate, Confectionery, Bakery, The Chocolatier\\x27s Workshop','PageTitle==Welcome to Wilbur Chocolate\x21','contributorOnly==FALSE');
g_navNode_1=g_navNode_Root.addNode('508969','Wilbur for Confectionery',ssUrlPrefix + 'confectionery/index.htm','Description==Chocolate for Confectionery - ','Keywords==Wilbur Chocolate, Chocolate, Compounds, Confectionery','PageTitle==Chocolate and compound products for confectionery - Wilbur Chocolate','contributorOnly==FALSE');
g_navNode_2=g_navNode_Root.addNode('508970','Wilbur for Bakery',ssUrlPrefix + 'bakery/index.htm','Description==Wilbur Chocolate for Bakery','Keywords==Wilbur Chocolate, Chocolate, Compound, Bakery','PageTitle==Wilbur Chocolate for Bakery','contributorOnly==FALSE');
g_navNode_3=g_navNode_Root.addNode('508967','The Wilbur Story',ssUrlPrefix + 'story/index.htm','Description==The Wilbur Chocolate Story','Keywords==Wilbur Chocolate, H.O. Wilbur, Philadelphia Confectionery, Wilbur Bud, Lititz','PageTitle==The Wilbur Chocolate Story','contributorOnly==FALSE');
g_navNode_4=g_navNode_Root.addNode('508966','Wilbur News',ssUrlPrefix + 'news/index.htm','Description==Wilbur Chocolate News','Keywords==Wilbur Chocolate Press Release','PageTitle==Wilbur Chocolate News','contributorOnly==FALSE');
g_navNode_5=g_navNode_Root.addNode('508972','The Chocolatier\'s Workshop',ssUrlPrefix + 'workshop/index.htm','Description==The Chocolatier\\x27s Workshop','Keywords==Cargill, The Chocolatier\\x27s Workshop, Wilbur Chocolate, Chocolate Class, Chocolate Business','PageTitle==The Chocolatier\\x27s Workshop','contributorOnly==FALSE');
g_navNode_6=g_navNode_Root.addNode('508973','Chocolate Lore',ssUrlPrefix + 'chocolatelore/index.htm','Description==Chocolate Lore','Keywords==History of Chocolate, Wilbur Chocolate, Chocolate Stories','PageTitle==Chocolate Lore','contributorOnly==FALSE');
g_navNode_7=g_navNode_Root.addNode('508974','Working with Chocolate',ssUrlPrefix + 'workingchocolate/index.htm','Description==Working with Chocolate','Keywords==Wilbur Chocolate, Chocolate FAQs, Tempering Instructions, Chocolate Tips, Chocolate Techniques, Chocolate Storage, Chocolate Handling','PageTitle==Working with Chocolate','contributorOnly==FALSE');
g_navNode_8=g_navNode_Root.addNode('508976','Recipes',ssUrlPrefix + 'recipes/index.htm','Description==Recipes','Keywords==Wilbur Chocolate, Recipes, Chocolate, Brownie Recipes, Cookie Recipes, Truffle Recipes, Bourbon Ball Recipes','PageTitle==Recipes','contributorOnly==FALSE');
g_navNode_9=g_navNode_Root.addNode('508977','Our Distributors',ssUrlPrefix + 'distributors/index.htm','Description==Our Distributors','Keywords==Wilbur Chocolate, Distributors, Chocolate','PageTitle==Our Distributors','contributorOnly==FALSE');
g_navNode_10=g_navNode_Root.addNode('508978','Chocolate Links',ssUrlPrefix + 'links/index.htm','Description==Chocolate Links','Keywords==Cocoa Sustainability, Chocolate Trade Organizations, Chocolate Trade Shows, Cargill, Wilbur Chocolate, Candy Industry','contributorOnly==FALSE');
g_navNode_11=g_navNode_Root.addNode('3255','Contact Us',ssUrlPrefix + 'contactus/index.htm','Description==Contact Us','Keywords==Wilbur Chocolate Contact Us','PageTitle==Contact Us','contributorOnly==FALSE','secondaryUrlVariableField==region2');

