// JavaScript Document



var n;
n=1;
function  getNumber(){
document.write("Question Number "+ n+"<br />");
n++
}

//flag regarding pword
var goodToGo;
var j2;
var j;
goodToGo=true;

function checkCode(whatOne){
j2="hobBit";
whatOne;
if(whatOne== j||whatOne==j2)
{
alert("Thanks! You can see the answers now.");
goodToGo=true;
if(document.getElementById("codeChecker").style.visibility!="hidden")
	{document.getElementById("codeChecker").style.visibility="hidden";}
}
else {alert(whatOne +" is not the Correct Password. Please try again.");}
}



function showAns(which)
{
//if(goodToGo)
{
			if(	document.getElementById(which).style.visibility!="visible"){
			document.getElementById(which).style.visibility="visible";}
			else{	document.getElementById(which).style.visibility="hidden"}
		}
	//else{alert("To see answers and explanations input the passcode please");  }
}

function assess(){
if (top.location.href==self.location.href){		
		goodToGo=true;
if(document.getElementById("code_div") ){
	document.getElementById("code_div").style.visibility="hidden";

		return goodToGo;
				}
	else{
		goodToGo=false;
		return goodToGo;}
	}	
}
assess();

function divWriter(){
	html="<div style="
	
	if (goodToGo){
		document.write(html+" 'visibility:hidden' >");
		}
	else{  
			document.write(html+ " 'visibility:visible' >");
		}
document.close();	
}