/*questions is 2-column array with --- questions[x][0]=question# --- and --- questions[x][1]=correct answer --- and --- questions[x][2]=hint1, questions[x][3]=hint2*/
questions = new Array(10);
for (i=0; i < 10; i++) {   
	questions[i] = new Array(6);   
		for (j=0; j < 6; j++) {   
			questions[i][j] = null;
		}
}		

function make_new_quest(qnum,qans,hint1,hint2,hint3,hint4)	{
	questions[qnum-1][0] = qnum;
	questions[qnum-1][1] = qans;
	questions[qnum-1][2] = hint1;
	questions[qnum-1][3] = hint2;
	questions[qnum-1][4] = hint3;
	questions[qnum-1][5] = hint4;
}

leftpos=0
vertpos=0
if (screen) 
		{
		leftpos=screen.width-350
		vertpos=50
		}

hi = 1;
function setHint(form,qnum)	{			
	hi++; 
	if (hi<questions[qnum-1].length && questions[qnum-1][hi]!=null)	{
		form.hintfield.value = questions[qnum-1][hi];		}
	else	{
		form.hintfield.value = form.hintfield.defaultValue;
		hi=1	}
}

function showhint(qnum,resnum) {
	var hintwind=null,hintnum=null;	
	hintwind = window.open('',qnum,'width=300,height=250,left='+leftpos+', top='+vertpos+'');
	hintwind.document.open('text/html','replace');
	hintwind.document.write("<html><head><title> HINT </title><style>body {font-family: Arial, Helvetica, sans-serif; font-weight: lighter; font-size: 14pt; text-align: center;}</style></head><body bgcolor='#DDDDDD'><br>"+questions[qnum-1][resnum+1]+"</body></html>");
	hintwind.document.close();
	hintwind.focus();
	
}

function rightorwrong(qnum,resletter) {
	var q=rightorwrong.arguments[0],r=rightorwrong.arguments[1],correctwind=null,incorrectwind=null;
	if (r == questions[q-1][1]) {
		correctwind = window.open('correct.html','correct','width=300,height=200,left='+leftpos+', top='+vertpos+'');
		correctwind.focus();
	}
	else {
		incorrectwind = window.open('incorrect.html',qnum,'width=300,height=200,left='+leftpos+', top='+vertpos+'');
		incorrectwind.focus();
	}		
}


/*The content of questions array follows. To make a new question, copy and paste and replace args with appropriate content*/
make_new_quest(1,'b','True, but this is not unusual.','Correct! The depths of most mountains that flank midocean ridges or oceanic spreading centers are 2,500 m below sea level.  The depth to the top of the Atlantis Massif is less than 1,000 m below sea level.','Incorrect. The Atlantis Massif is a large undersea mountain.  Choose again.','Incorrect.  The Atlantis Massif is part of the left flank of the Mid-Atlantic Ridge.  Choose again.');
