// *************************************************
// pam berman Bloomsburg University 10/31/02
// cheat function for designers to navigate to any page
// *************************************************
//
function takeMeAway() {
	// provide an input box for a page number
	var changePage = prompt("Please input the number of the page you want to go to.", parseInt(numCurrentPage));
	// check to see if it is a number
	// if it is not alert the designer it isn't and ask for another input
	if (isNaN(changePage)) {
		//alert("Not a number.");
		var oldChangePage = changePage;
		alert(oldChangePage + " is not a number.");
		takeMeAway();
		//changePage = prompt(oldChangePage + " is not a number. Please input another number.", numCurrentPage);
	} else {
		// check to see if it is a valid page number for the current pageset
		var myObjPageSet = new Object(eval(varCurrentPageSet));
		//alert("takeMeAway function is looking at a myObjPageSet of " + myObjPageSet);
		//alert("takeMeAway function is looking at a myObjPageSet.length of " + myObjPageSet.length);
			if ((changePage - 1) < 0 | (changePage) > myObjPageSet.length) {
				var oldChangePage = changePage;
				alert(oldChangePage + " is out of range.");
				takeMeAway();
				//changePage = prompt(oldChangePage + " is not a valid page number for this section. Please input another number.", numCurrentPage);
			} else {
				// else set numCurrentPage to the new value and target the html source file to the content frame for the correct index number (changePage - 1) of the varCurrentPageset
				numCurrentPage = changePage;
				//alert("goToCheat function is changing numCurrentPage to " + numCurrentPage);
				// may need to check tabs
				// update nav_cues frame
				nav_cues.location.href="nav_cues.html";
				// update content frame
				content.location.href = myObjPageSet[parseInt(numCurrentPage)-1][0];
			}
	}
}
function skipto(whichPage) {
	var myObjPageSet = new Object(eval(varCurrentPageSet));
	//alert("skipto function is looking at a myObjPageSet of " + myObjPageSet);
	// else set numCurrentPage to the new value and target the html source file to the content frame for the correct index number (changePage - 1) of the varCurrentPageset
	numCurrentPage = whichPage;
	//alert("skipto function is changing numCurrentPage to " + numCurrentPage);
	//alert(myObjPageSet[parseInt(numCurrentPage)-1][0]);
	// update nav_cues frame
	nav_cues.location.href="../nav_cues.html";
	// update content frame
	// call only from content frames
	var skiptoLink = "../" + myObjPageSet[parseInt(numCurrentPage)-1][0];
	content.location.href = skiptoLink;
}

