/////////////////////////////////////////////////////////////////////////////
// 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('27','Home',ssUrlPrefix + 'index.htm',null,'homeSection==TRUE','secondaryUrlVariableField==C10');
g_navNode_0=g_navNode_Root.addNode('28','Energy Basics',ssUrlPrefix + 'EnergyBasics/index.htm','Description==Find out what energy is, where it comes from and how we use it.','dynamicListIsIndex==true','secondaryUrlVariableField==C10');
g_navNode_0_0=g_navNode_0.addNode('295','What Is Energy?',ssUrlPrefix + 'EnergyBasics/WhatIsEnergy/index.htm','Description==Our bodies use food to make energy so we can play and read and clean our rooms. The other types of energy we use help make our lives easier.','secondaryUrlVariableField==C10');
g_navNode_0_1=g_navNode_0.addNode('293','All About Electricity',ssUrlPrefix + 'EnergyBasics/AllAboutElectricity/index.htm','Description==Take a look at how electricity is made, how it gets to your house and more.','dynamicListIsIndex==true','secondaryUrlVariableField==C10');
g_navNode_0_2=g_navNode_0.addNode('294','All About Natural Gas',ssUrlPrefix + 'EnergyBasics/AllAboutNaturalGas/index.htm','Description==From deep underground to your furnace, water heater and clothes dryer.','dynamicListIsIndex==true','secondaryUrlVariableField==C10');
g_navNode_0_3=g_navNode_0.addNode('296','Energy Inventors',ssUrlPrefix + 'EnergyBasics/EnergyInventors/index.htm','Description==Take a look at these famous scientists to find out how they changed the world with their experiments.','secondaryUrlVariableField==C10');
g_navNode_0_4=g_navNode_0.addNode('297','Energy Words',ssUrlPrefix + 'EnergyBasics/EnergyWords/index.htm','Description==Watts, volts, Btu - all those energy words can be pretty confusing. Here are some definitions that might help you understand.','secondaryUrlVariableField==C10');
g_navNode_1=g_navNode_Root.addNode('29','Playing It Safe',ssUrlPrefix + 'PlayingItSafe/index.htm','Description==Learn how to use electricity and natural gas safely - even when the power is out.','dynamicListIsIndex==true','secondaryUrlVariableField==C10');
g_navNode_1_0=g_navNode_1.addNode('301','Electric Safety',ssUrlPrefix + 'PlayingItSafe/ElectricSafety/index.htm','Description==From substations to outlets, see what the power of electricity can do.','dynamicListIsIndex==true','secondaryUrlVariableField==C10');
g_navNode_1_1=g_navNode_1.addNode('302','Natural Gas Safety',ssUrlPrefix + 'PlayingItSafe/NaturalGasSafety/index.htm','Description==You can be a natural gas detective to help prevent gas leaks and carbon monoxide.','dynamicListIsIndex==true','secondaryUrlVariableField==C10');
g_navNode_1_2=g_navNode_1.addNode('303','Storm Safety',ssUrlPrefix + 'PlayingItSafe/StormSafety/index.htm','Description==Find out how to stay safe, warm and comfy when Mother Nature brings high winds, snow and ice.','dynamicListIsIndex==true','secondaryUrlVariableField==C10');
g_navNode_2=g_navNode_Root.addNode('30','Energy and The Environment',ssUrlPrefix + 'EnergyandTheEnvironment/index.htm','dynamicListIsIndex==true','secondaryUrlVariableField==C10');
g_navNode_2_0=g_navNode_2.addNode('304','Energize the Earth',ssUrlPrefix + 'EnergyandTheEnvironment/EnergizetheEarth/index.htm','Description==Learn how you and your family can make a difference by celebrating Earth Day.','dynamicListIsIndex==false','secondaryUrlVariableField==C10');
g_navNode_2_1=g_navNode_2.addNode('305','Saving Energy',ssUrlPrefix + 'EnergyandTheEnvironment/SavingEnergy/index.htm','Description==It\\x27s easy to forget where energy comes from, or how much it costs - but it all adds up\x21','dynamicListIsIndex==true','secondaryUrlVariableField==C10');
g_navNode_2_2=g_navNode_2.addNode('306','Renewable Energy',ssUrlPrefix + 'EnergyandTheEnvironment/RenewableEnergy/index.htm','Description==Renewable energy is made from resources that Mother Nature will replace, like wind, water and sunshine.','dynamicListIsIndex==true','secondaryUrlVariableField==C10');
g_navNode_2_3=g_navNode_2.addNode('307','Energy and Recycling',ssUrlPrefix + 'EnergyandTheEnvironment/EnergyandRecycling/index.htm','Description==You already know that recycling helps keep tons of waste out of our landfills. But did you know that recycling helps save energy, too?','secondaryUrlVariableField==C10');
g_navNode_2_4=g_navNode_2.addNode('308','Energy and Trees',ssUrlPrefix + 'EnergyandTheEnvironment/EnergyandTrees/index.htm','Description==Trees are more than just pretty to look at - they also help us save energy and reduce air pollution\x21','secondaryUrlVariableField==C10');
g_navNode_2_5=g_navNode_2.addNode('309','Energy and Wildlife',ssUrlPrefix + 'EnergyandTheEnvironment/EnergyandWildlife/index.htm','Description==Some of the animals and plants that live near power lines are endangered, so we take special care to keep them safe.','secondaryUrlVariableField==C10');
g_navNode_2_6=g_navNode_2.addNode('310','Energy-Smart Inventions',ssUrlPrefix + 'EnergyandTheEnvironment/Energy-SmartInventions/index.htm','Description==All over the world, scientists are finding new ways to save energy and make energy - and sometimes the scientists are kids just like you\x21','secondaryUrlVariableField==C10');
g_navNode_3=g_navNode_Root.addNode('31','Fun and Games',ssUrlPrefix + 'FunandGames/index.htm','dynamicListIsIndex==true','secondaryUrlVariableField==C10');
g_navNode_3_0=g_navNode_3.addNode('311','Online Games',ssUrlPrefix + 'FunandGames/OnlineGames/index.htm','Description==Test your energy smarts by trying these interactive games and quizzes.','dynamicListIsIndex==TRUE','secondaryUrlVariableField==C10');
g_navNode_3_1=g_navNode_3.addNode('376','Cool Projects to Try at Home',ssUrlPrefix + 'FunandGames/CoolProjects/index.htm','Description==With stuff you find around the house, you can do some cool science experiments and even make new toys\x21 Just print out the instructions and find a grown-up to help.','dynamicListIsIndex==false','secondaryUrlVariableField==C10');
g_navNode_3_2=g_navNode_3.addNode('379','Fun Stuff to Print',ssUrlPrefix + 'FunandGames/FunStufftoPrint/index.htm','Description==If you like to color, do puzzles and test your smarts, you can print out these fun activity sheets.','secondaryUrlVariableField==C10');
g_navNode_4=g_navNode_Root.addNode('32','Teachers and Parents',ssUrlPrefix + 'TeachersandParents/index.htm','dynamicListIsIndex==true','secondaryUrlVariableField==C10');
g_navNode_4_0=g_navNode_4.addNode('380','About Alliant Energy Kids',ssUrlPrefix + 'TeachersandParents/AboutAlliantEnergyKids/index.htm','Description==Through interactive and engaging activities, your students can learn how to use electricity and natural gas wisely.','dynamicListIsIndex==false');
g_navNode_4_1=g_navNode_4.addNode('321','Request a Presentation',ssUrlPrefix + 'TeachersandParents/RequestaPresentation/index.htm','Description==Use this online form to request a classroom presentation.','secondaryUrlVariableField==C10');
g_navNode_4_2=g_navNode_4.addNode('209','Energy Safety Lessons',ssUrlPrefix + 'TeachersandParents/EnergySafetyLessons/index.htm','Description==Your students can learn from the experts about the hazards of electricity and natural gas.','dynamicListIsIndex==true','secondaryUrlVariableField==C10');
g_navNode_4_3=g_navNode_4.addNode('210','Energy Conservation Lessons',ssUrlPrefix + 'TeachersandParents/EnergyConservationLessons/index.htm','Description==This curriculum covers the basics of energy conservation, energy efficiency and renewable energy.','dynamicListIsIndex==true','secondaryUrlVariableField==C10');
g_navNode_4_4=g_navNode_4.addNode('211','Give Us Your Feedback',ssUrlPrefix + 'TeachersandParents/GiveUsYourFeedback/index.htm','Description==We need your feedback to improve and expand our energy education program.','secondaryUrlVariableField==C10');
g_navNode_5=g_navNode_Root.addNode('320','Contact Us',ssUrlPrefix + 'ContactUs/index.htm','secondaryUrlVariableField==C10');
