/////////////////////////////////////////////////////////////////////////////
// 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('167','Home',ssUrlPrefix + 'index.htm',null,'secondaryUrlVariableField==C10');
g_navNode_0=g_navNode_Root.addNode('169','About Us',ssUrlPrefix + 'AboutUs/index.htm','dynamicListIsIndex==TRUE','secondaryUrlVariableField==C10');
g_navNode_0_0=g_navNode_0.addNode('197','Our Location',ssUrlPrefix + 'AboutUs/OurLocation/index.htm','Description==Our main line runs through the heart of eastern Iowa\\x27s technology corridor.','secondaryUrlVariableField==C10');
g_navNode_0_1=g_navNode_0.addNode('198','Facts \x26 Figures',ssUrlPrefix + 'AboutUs/FactsFigures/index.htm','Description==Learn more about our operations, including traffic, track and fleet.');
g_navNode_0_2=g_navNode_0.addNode('200','Our Customers',ssUrlPrefix + 'AboutUs/OurCustomers/index.htm','Description==We\\x27re proud to serve some of the largest companies in the world.','secondaryUrlVariableField==C10');
g_navNode_0_3=g_navNode_0.addNode('199','Our Crew',ssUrlPrefix + 'AboutUs/OurCrew/index.htm','Description==Our staff has the experience and expertise to handle your shipping needs.','secondaryUrlVariableField==C10');
g_navNode_0_4=g_navNode_0.addNode('188','Frequently Asked Questions',ssUrlPrefix + 'AboutUs/FrequentlyAskedQuestions/index.htm','Description==Find answers to your questions about CRANDIC operations.','dynamicListIsIndex==FALSE');
g_navNode_0_5=g_navNode_0.addNode('201','News',ssUrlPrefix + 'AboutUs/News/index.htm','Description==Read the latest news releases and announcements from The CRANDIC Route.','dynamicListIsIndex==true','secondaryUrlVariableField==C10');
g_navNode_1=g_navNode_Root.addNode('172','Customer Services',ssUrlPrefix + 'CustomerServices/index.htm','dynamicListIsIndex==TRUE','secondaryUrlVariableField==C10');
g_navNode_1_0=g_navNode_1.addNode('202','Current Fuel Surcharge',ssUrlPrefix + 'CustomerServices/CurrentFuelSurcharge/index.htm','Description==Check out this month\\x27s fuel surcharge rate.','secondaryUrlVariableField==C10');
g_navNode_1_1=g_navNode_1.addNode('203','Contact Information',ssUrlPrefix + 'CustomerServices/ContactInformation/index.htm','Description==Find names, phone numbers and e-mail addresses for the CRANDIC management team.','secondaryUrlVariableField==C10');
g_navNode_1_2=g_navNode_1.addNode('206','Railcar Tracing',ssUrlPrefix + 'CustomerServices/RailcarTracing/index.htm','Description==RailConnect provides online transportation and revenue management services.','secondaryUrlVariableField==C10');
g_navNode_1_4=g_navNode_1.addNode('208','Published Rates',ssUrlPrefix + 'CustomerServices/PublishedRates/index.htm','Description==Find the most recent published tariff rates for CRANDIC rail shipments.','secondaryUrlVariableField==C10');
g_navNode_1_5=g_navNode_1.addNode('423','Real Estate Contract Information',ssUrlPrefix + 'CustomerServices/RealEstateContractInfo/index.htm','Description==Information you need to know to perform work on CRANDIC right-of way. ','secondaryUrlVariableField==C10');
g_navNode_1_6=g_navNode_1.addNode('424','Contractor Safety Rules',ssUrlPrefix + 'CustomerServices/ContractorSafetyRules/index.htm','Description==Please view these important safety rules prior to performing work on CRANDIC property. ','secondaryUrlVariableField==C10');
g_navNode_2=g_navNode_Root.addNode('173','Equipment for Sale',ssUrlPrefix + 'EquipmentforSale/index.htm','dynamicListIsIndex==false','secondaryUrlVariableField==C10');
g_navNode_3=g_navNode_Root.addNode('174','Company History',ssUrlPrefix + 'CompanyHistory/index.htm','dynamicListIsIndex==TRUE','secondaryUrlVariableField==C10');
g_navNode_3_0=g_navNode_3.addNode('212','Views from the Station',ssUrlPrefix + 'CompanyHistory/ViewsfromtheStation/index.htm','Description==Take an interactive trip through the history of the CRANDIC Railway.','secondaryUrlVariableField==C10');
g_navNode_3_1=g_navNode_3.addNode('213','Timeline',ssUrlPrefix + 'CompanyHistory/Timeline/index.htm','Description==Read about a few of the significant milestones in CRANDIC history.','secondaryUrlVariableField==C10');
g_navNode_3_2=g_navNode_3.addNode('214','The Beginning',ssUrlPrefix + 'CompanyHistory/TheBeginning/index.htm','Description==Formally established under the name Iowa Railway \x26 Light Company, the little railroad eventually became known and nationally recognized as CRANDIC.','secondaryUrlVariableField==C10');
g_navNode_3_3=g_navNode_3.addNode('215','The \'Interurban\'',ssUrlPrefix + 'CompanyHistory/TheInterurban/index.htm','Description==On August 13, 1904, the first electric cars carrying passengers made their inaugural over the \"interurban.\"','secondaryUrlVariableField==C10');
g_navNode_3_4=g_navNode_3.addNode('216','The First Passengers',ssUrlPrefix + 'CompanyHistory/TheFirstPassengers/index.htm','Description==CRANDIC\\x27s first passengers traveled on the \"Hot Shot\" and the \"Milk Can Special.\"','secondaryUrlVariableField==C10');
g_navNode_3_5=g_navNode_3.addNode('217','\'Swing \x26 Sway\'',ssUrlPrefix + 'CompanyHistory/SwingSway/index.htm','Description==With a peculiar swaying motion, the 120-mph Comets led to the popular jingle \"Swing and sway the CRANDIC way.\"','secondaryUrlVariableField==C10');
g_navNode_3_6=g_navNode_3.addNode('218','The Last Passengers',ssUrlPrefix + 'CompanyHistory/TheLastPassengers/index.htm','Description==The last official run of a CRANDIC passenger train occured in July 1953.','secondaryUrlVariableField==C10');
g_navNode_3_7=g_navNode_3.addNode('219','The Next 50 Years',ssUrlPrefix + 'CompanyHistory/TheNext50Years/index.htm','Description==Today, CRANDIC operates 60 miles of main line track and nearly 40 miles of industry track and switching gears.','secondaryUrlVariableField==C10');
g_navNode_3_8=g_navNode_3.addNode('220','Celebrating Our Centennial',ssUrlPrefix + 'CompanyHistory/CelebratingOurCentennial/index.htm','Description==The CRANDIC marked 100 years of service with year-long festivities in 2004.','secondaryUrlVariableField==C10');
g_navNode_4=g_navNode_Root.addNode('175','Merchandise',ssUrlPrefix + 'Merchandise/index.htm','dynamicListIsIndex==false','secondaryUrlVariableField==C10');
g_navNode_5=g_navNode_Root.addNode('176','Links',ssUrlPrefix + 'Links/index.htm','secondaryUrlVariableField==C10');
g_navNode_6=g_navNode_Root.addNode('177','Careers',ssUrlPrefix + 'Careers/index.htm','secondaryUrlVariableField==C10');
g_navNode_7=g_navNode_Root.addNode('178','Gallery',ssUrlPrefix + 'Gallery/index.htm','secondaryUrlVariableField==C10');
g_navNode_8=g_navNode_Root.addNode('168','Contact Us',ssUrlPrefix + 'ContactUs/index.htm','secondaryUrlVariableField==C10');
