
function MarkSelectedNav() {
	//mark selected tab
	var rootURL = document.location.host;
	var thisLocation = location.href;
	var thisLCLink;

	//are we .dev?
	if(thisLocation.indexOf(".dev") > -1) {
		rootURL = "newdawnrecovery.dev";
	}
	
	//************************************************************************//
	
	//overview
	if(thisLocation.indexOf(rootURL +"/chemical-dependency/") > -1) {
		thisLCLink = document.$("overview");
	}
	
	//************************************************************************//
	
	//our story
	if(thisLocation.indexOf(rootURL +"/chemical-dependency/about/") > -1) {
		thisLCLink = document.$("about");
		thisLCLink.className = "selected";
	}
	else {
		document.$("about-group").style.display = "none";
	}
	//sub pages
	if(thisLocation.indexOf(rootURL +"/chemical-dependency/about/about-us.html") > -1) {
		thisLCLink = document.$("about-us");
	}
	else if(thisLocation.indexOf(rootURL +"/chemical-dependency/about/mission.html") > -1) {
		thisLCLink = document.$("mission");
	}
	else if(thisLocation.indexOf(rootURL +"/chemical-dependency/about/ethics.html") > -1) {
		thisLCLink = document.$("ethics");
	}
	else if(thisLocation.indexOf(rootURL +"/chemical-dependency/about/recent-news.html") > -1) {
		thisLCLink = document.$("recent-news");
	}
	else if(thisLocation.indexOf(rootURL +"/chemical-dependency/about/newsletter.html") > -1) {
		thisLCLink = document.$("newsletter");
	}
	else if(thisLocation.indexOf(rootURL +"/chemical-dependency/about/outcomes.html") > -1) {
		thisLCLink = document.$("outcomes");
	}
	
	//************************************************************************//
	
	//treatment options
	if(thisLocation.indexOf(rootURL +"/chemical-dependency/treatment-options/") > -1) {
		thisLCLink = document.$("treatment-options");
		thisLCLink.className = "selected";
	}
	else {
		document.$("treatment-options-group").style.display = "none";
	}
	//sub pages
	if(thisLocation.indexOf(rootURL +"/chemical-dependency/treatment-options/medically-monitored-detox.html") > -1) {
		thisLCLink = document.$("medically-monitored-detox");
	}
	else if(thisLocation.indexOf(rootURL +"/chemical-dependency/treatment-options/residential-program.html") > -1) {
		thisLCLink = document.$("residential-program");
	}
	if(thisLocation.indexOf(rootURL +"/chemical-dependency/treatment-options/day-treatment.html") > -1) {
		thisLCLink = document.$("day-treatment");
	}
	else if(thisLocation.indexOf(rootURL +"/chemical-dependency/treatment-options/intensive-outpatient.html") > -1) {
		thisLCLink = document.$("intensive-outpatient");
	}
	else if(thisLocation.indexOf(rootURL +"/chemical-dependency/treatment-options/teen-outpatient.html") > -1) {
		thisLCLink = document.$("teen-outpatient-treatment");
	}
	else if(thisLocation.indexOf(rootURL +"/chemical-dependency/treatment-options/lifetime-aftercare.html") > -1) {
		thisLCLink = document.$("lifetime-aftercare");
	}
	
	//************************************************************************//
	
	//our staff
	if(thisLocation.indexOf(rootURL +"/chemical-dependency/our-staff/") > -1) {
		thisLCLink = document.$("our-staff");
		thisLCLink.className = "selected";
	}
	else {
		document.$("our-staff-group").style.display = "none";
	}
	//sub pages
	if(thisLocation.indexOf(rootURL +"/chemical-dependency/our-staff/detox-residential.html") > -1) {
		thisLCLink = document.$("detox-residential");
	}
	else if(thisLocation.indexOf(rootURL +"/chemical-dependency/our-staff/adult-outpatient.html") > -1) {
		thisLCLink = document.$("adult-outpatient");
	}
	else if(thisLocation.indexOf(rootURL +"/chemical-dependency/our-staff/teen-outpatient.html") > -1) {
		thisLCLink = document.$("teen-outpatient");
	}
	else if(thisLocation.indexOf(rootURL +"/chemical-dependency/our-staff/leadership.html") > -1) {
		thisLCLink = document.$("leadership");
	}
	
	//************************************************************************//
	
	//success stories
	if(thisLocation.indexOf(rootURL +"/chemical-dependency/success-stories.html") > -1) {
		thisLCLink = document.$("success-stories");
		thisLCLink.className = "selected sright";
	}
	
	//************************************************************************//
	
	//treatment options
	if(thisLocation.indexOf(rootURL +"/chemical-dependency/facilities/") > -1) {
		thisLCLink = document.$("facilities");
		thisLCLink.className = "selected";
	}
	else {
		document.$("facilities-group").style.display = "none";
	}
	//sub pages
	if(thisLocation.indexOf(rootURL +"/chemical-dependency/facilities/detox.html") > -1) {
		thisLCLink = document.$("detox");
	}
	else if(thisLocation.indexOf(rootURL +"/chemical-dependency/facilities/residential.html") > -1) {
		thisLCLink = document.$("residential");
	}
	else if(thisLocation.indexOf(rootURL +"/chemical-dependency/facilities/adult-outpatient.html") > -1) {
		thisLCLink = document.$("adult-outpatient-facilities");
	}
	else if(thisLocation.indexOf(rootURL +"/chemical-dependency/facilities/teen-outpatient.html") > -1) {
		thisLCLink = document.$("teen-outpatient-facilities");
	}
	
	//************************************************************************//
	
	//admissions/fees
	if(thisLocation.indexOf(rootURL +"/chemical-dependency/admissions/") > -1) {
		thisLCLink = document.$("admissions");
		thisLCLink.className = "selected";
	}
	else {
		document.$("admissions-group").style.display = "none";
	}
	//sub pages
	if(thisLocation.indexOf(rootURL +"/chemical-dependency/admissions/our-fees.html") > -1) {
		thisLCLink = document.$("our-fees");
	}
	else if(thisLocation.indexOf(rootURL +"/chemical-dependency/admissions/using-insurance.html") > -1) {
		thisLCLink = document.$("using-insurance");
	}
	else if(thisLocation.indexOf(rootURL +"/chemical-dependency/admissions/extended-care-discount.html") > -1) {
		thisLCLink = document.$("extended-care-discount");
	}
	else if(thisLocation.indexOf(rootURL +"/chemical-dependency/admissions/what-to-bring.html") > -1) {
		thisLCLink = document.$("what-to-bring");
	}
	else if(thisLocation.indexOf(rootURL +"/chemical-dependency/admissions/financial-assistance.html") > -1) {
		thisLCLink = document.$("financial-assistance");
	}
	
	//************************************************************************//
	
	//resources
	if(thisLocation.indexOf(rootURL +"/chemical-dependency/resources/") > -1) {
		thisLCLink = document.$("resources");
		thisLCLink.className = "selected";
	}
	else {
		document.$("resources-group").style.display = "none";
	}
	//sub pages
	if(thisLocation.indexOf(rootURL +"/chemical-dependency/resources/accreditations-affiliations.html") > -1) {
		thisLCLink = document.$("accreditations-affiliations");
	}
	else if(thisLocation.indexOf(rootURL +"/chemical-dependency/resources/assessment-tool.html") > -1) {
		thisLCLink = document.$("assessment-tool");
	}
	else if(thisLocation.indexOf(rootURL +"/chemical-dependency/resources/helpful-links.html") > -1) {
		thisLCLink = document.$("helpful-links");
	}
	
	//************************************************************************//
	
	//contact us
	if(thisLocation.indexOf(rootURL +"/chemical-dependency/contact-us/") > -1) {
		thisLCLink = document.$("contact-us");
		thisLCLink.className = "selected";
	}
	else {
		document.$("contact-us-group").style.display = "none";
	}
	//sub pages
	if(thisLocation.indexOf(rootURL +"/chemical-dependency/contact-us/driving-directions.html") > -1) {
		thisLCLink = document.$("driving-directions");
	}
	else if(thisLocation.indexOf(rootURL +"/chemical-dependency/contact-us/request-brochure.html") > -1) {
		thisLCLink = document.$("request-brochure");
	}
	
	//************************************************************************//

	//alumni
	if(thisLocation.indexOf(rootURL +"/chemical-dependency/alumni/") > -1) {
		thisLCLink = document.$("alumni");
		thisLCLink.className = "selected";
	}
	else {
		document.$("alumni-group").style.display = "none";
	}
	//sub pages
	if(thisLocation.indexOf(rootURL +"/chemical-dependency/alumni/calendar.html") > -1) {
		thisLCLink = document.$("calendar");
	}
	else if(thisLocation.indexOf(rootURL +"/chemical-dependency/alumni/newsletter.html") > -1) {
		thisLCLink = document.$("newsletter");
	}
	
	//************************************************************************//

	//newsletter
	if(thisLocation.indexOf(rootURL +"/chemical-dependency/newsletter.html") > -1) {
		thisLCLink = document.$("newsletter");
	}

	//************************************************************************//

	//calendar
	if(thisLocation.indexOf(rootURL +"/chemical-dependency/calendar.html") > -1) {
		thisLCLink = document.$("calendar");
	}

	//************************************************************************//

	//faqs
	if(thisLocation.indexOf(rootURL +"/chemical-dependency/faqs.html") > -1) {
		thisLCLink = document.$("faqs");
	}

	//************************************************************************//
	
	//mark selected
	if(thisLCLink) thisLCLink.className = "selected sright";
	
}