//SET YOUR DEFAULT PAGE BELOW.
var defaultPage = "default.html"
var globalNav = "<ul>"+
                    "<li><a href='/our-programs/program-overview/TX-school-ready/default.html'>About TSR!</a>"+
						"<ul>"+
							"<li><a href='/our-programs/program-overview/TX-school-ready/background/research-background.html'>Background</a></li>"+
						"</ul>"+
					"</li>"+
					"<li><a href='/our-programs/program-overview/TX-school-ready/find-a-program'>Find a TSR!&trade; Program</a></li>"+
						"<ul>"+
							"<li><a href='/our-programs/program-overview/TX-school-ready/find-a-program/search-by-program.aspx'>Search by Program</a></li>"+
							"<li><a href='/our-programs/program-overview/TX-school-ready/find-a-program/search-by-city.aspx'>Search by City</a></li>"+
						"</ul>"+
// FULL					"<li><a href='/our-programs/program-overview/TX-school-ready/certification'>How to become Texas School Ready!&trade;</a></li>"+
					"<li><a href='/our-programs/program-overview/TX-school-ready/technical-assistance/'>Certification Technical Assistance</a>"+
						"<ul>"+
							"<li><a href='/our-programs/program-overview/TX-school-ready/community-tools/'>Community Tools</a></li>"+
							"<li><a href='/our-programs/program-overview/TX-school-ready/technical-assistance/Preparing.html'>Preparing for TSR!</a></li>"+
							"<li><a href='/our-programs/program-overview/TX-school-ready/technical-assistance/TA-Tools.html'>Technical Assistance Tools</a></li>"+
						"</ul>"+
					"</li>"+
					"<li><a href='/our-programs/program-overview/TX-school-ready/contact-us'>Contact Us</a></li>"+
               	"</ul>";

var pathName = new String(location.pathname);//Firefox represents the href value as /filename.html
var fullHref = new String(location.href);//IE represents the href value as http://www.domain.com/filename.html

if(fullHref.charAt(fullHref.length-1) == "/"){
	fullHref = fullHref + defaultPage;
}

//set '/' to the correct default Page
if(pathName =="/"){
	pathName = "/"+defaultPage;
}

//write the navigation
document.write(globalNav);


var navList = document.getElementsByTagName('LI');
for(i in navList){
	if(navList[i].hasChildNodes){
		if(navList[i].firstChild.attributes.href){
			var hrefPath = navList[i].firstChild.attributes.href.value;
			if((hrefPath == pathName) || (fullHref == hrefPath)){
				navList[i].className="active";
			}
		}
	}
}