
function toChap(old) {
	oldSitemapPage = old;

	if (teachersEdition == 1) {
		changeSitemap("sitemapChapterInstructor");
	} else {
		changeSitemap("sitemapChapter");
	}
}

function toResource() {
	changeSitemap(oldSitemapPage);
}

function changeSitemap(newmap) {
	if ((newmap == "sitemapInstructor") && (teachersEdition == 0)) {
		alert("You must be logged in to the Instructor Edition to access the Instructor Resources.");
	} else {
		hideLayer("sitemapChapter");
		hideLayer("sitemapChapterInstructor");
		hideLayer("sitemapNews");
		hideLayer("sitemapQuiz");
		hideLayer("sitemapAssign");
		hideLayer("sitemapLearn");
		hideLayer("sitemapReel");
		hideLayer("sitemapMore");
		hideLayer("sitemapInstructor");
		showLayer(newmap);
	}
}

function startSiteMap() {
		var thePage = document.location.search.substring(1);
		if (thePage == "Mor") {
			changeSitemap("sitemapMore");
		} else if (thePage == "Lea") {
			changeSitemap("sitemapLearn");
		} else if (thePage == "Lin") {
			changeSitemap("sitemapNews");
		} else if (thePage == "Qui") {
			changeSitemap("sitemapQuiz");
		} else if (thePage == "Ass") {
			changeSitemap("sitemapAssign");
		} else if (thePage == "Ins") {
			changeSitemap("sitemapInstructor");
		} else if (thePage == "Ree") {
			changeSitemap("sitemapReel");
		} else {
			if (teachersEdition == 1) {
				changeSitemap("sitemapChapterInstructor");
			} else {
				changeSitemap("sitemapChapter");
			}
		}
}

