// JavaScript Document

function goToPage (newURL, category, index) {
	if (newURL == "0" ) {
		resetList();
	} else if (newURL == "1") {
		if (category == "family") {
			if (index == "0")	
				document.location.href = "familyHistory.php";
			else
				document.location.href = "../familyHistory.php";
		}	else if (category == "interview") {
			if (index == "0")	
				document.location.href = "interviewIndex.php";
			else
				document.location.href = "../interviewIndex.php";
		}	else if (category == "archive") {
			if (index == "0")	
				document.location.href = "archiveIndex.php";
			else
				document.location.href = "../archiveIndex.php";
		}	else if (category == "english") {
			if (index == "0")	
				document.location.href = "englishMaterials.php";
			else
				document.location.href = "../englishMaterials.php";
		}	else if (category == "image") {
			if (index == "0")	
				document.location.href = "imageIndex.php";
			else
				document.location.href = "../imageIndex.php";
		}		
	} else {
		if (category == "family") {
			if (index == "0")	
				document.location.href = "./families/" + newURL;
			else
				document.location.href = newURL;
		}	else if (category == "interview") {
			if (index == "0")	
				document.location.href = "./interviews/" + newURL;
			else
				document.location.href = newURL;
		}	else if (category == "archive") {
			if (index == "0")	
				document.location.href = "./archives/" + newURL;
			else
				document.location.href = newURL;
		}	else if (category == "english") {
			if (index == "0")	
				document.location.href = "./english/" + newURL;
			else
				document.location.href = newURL;
		}	else if (category == "image") {
			if (index == "0")	
				document.location.href = "./images/" + newURL;
			else
				document.location.href = newURL;
		}
 	}
}

function resetList() {
   document.theFamilies.selector.selectedIndex = 0;
}
