var clickThreeTimesOnThree = 0;

var stopTheMadness = 0;

if (top.location != location) {

	top.location.href = document.location.href;

	}

function onloadStuff() {

	window.defaultStatus='This has been a production of Project Geoff Taylor 2 and Absolute Magic.';

	if (document.getElementById) {

		document.getElementById("phasechooser").setAttribute("style","display:inline;");

		}

	}

function showPhase(phaseNumber) {

	if (phaseNumber == 1) {

		document.getElementById("phase1nav").setAttribute("style","display:inline;");

		document.getElementById("phase2nav").setAttribute("style","display:none;");

		document.getElementById("phase3nav").setAttribute("style","display:none;");

		if (stopTheMadness == 0) {

			clickThreeTimesOnThree = 0;

			}

		}

	if (phaseNumber == 2) {

		document.getElementById("phase1nav").setAttribute("style","display:none;");

		document.getElementById("phase2nav").setAttribute("style","display:inline;");

		document.getElementById("phase3nav").setAttribute("style","display:none;");

		if (stopTheMadness == 0) {

			clickThreeTimesOnThree = 0;

			}

		}

	if (phaseNumber == 3) {

		document.getElementById("phase1nav").setAttribute("style","display:none;");

		document.getElementById("phase2nav").setAttribute("style","display:none;");

		document.getElementById("phase3nav").setAttribute("style","display:inline;");

		clickThreeTimesOnThree = clickThreeTimesOnThree + 1;

		if (clickThreeTimesOnThree == 3 && stopTheMadness == 0 && document.getElementById("humanlink")) {

			document.getElementById("humanlink").setAttribute("style","display:block;");

			clickThreeTimesOnThree = 0;

			setTimeout("hideLink()",2000);

			}

		}

	}

function popupSubmit() {

	if (document.getElementById("typedword").getAttribute("value")) {

		opener.location.href = './z' + document.getElementById("typedword").getAttribute("value") + '.html';

		window.close();

		}

	else if (document.getElementById("typedword").value) {

		opener.location.href = './z' + document.getElementById("typedword").value + '.html';

		window.close();

		}

	else {}

	}

function hiddenLink() {

	popUpWindow = window.open("popup.html", "popUpWindow", "location=no,width=450,height=600,resizable");

	document.getElementById("humanlink").setAttribute("style","display:none;");

	stopTheMadness = 1;

	}

function hideLink() {

	document.getElementById("humanlink").setAttribute("style","display:none;");

	}

function linkHover(link) {

	if (link==0) {

		window.status="";

		return true;

		}

	if (link==1) {

		window.status="Click here to show the links from Phase I."

		return true;

		}

	if (link==2) {

		window.status="Click here to show the links from Phase II."

		return true;

		}

	if (link==3) {

		window.status="Click here to show the links from Phase III."

		return true;

		}

	}