

//<![CDATA[

<!--


function Client(){
//if not a DOM browser, hopeless
	this.min = false; if (document.getElementById){this.min = true;};

	this.ua = navigator.userAgent;
	this.name = navigator.appName;
	this.ver = navigator.appVersion;  

//Get data about the browser
	this.mac = (this.ver.indexOf('Mac') != -1);
	this.win = (this.ver.indexOf('Windows') != -1);

//Look for Gecko
	this.gecko = (this.ua.indexOf('Gecko') > 1);
	if (this.gecko){
		this.geckoVer = parseInt(this.ua.substring(this.ua.indexOf('Gecko')+6, this.ua.length));
		if (this.geckoVer < 20020000){this.min = false;}
	}
	
//Look for Firebird
	this.firebird = (this.ua.indexOf('Firebird') > 1);
	
//Look for Safari
	this.safari = (this.ua.indexOf('Safari') > 1);
	if (this.safari){
		this.gecko = false;
	}
	
//Look for IE
	this.ie = (this.ua.indexOf('MSIE') > 0);
	if (this.ie){
		this.ieVer = parseFloat(this.ua.substring(this.ua.indexOf('MSIE')+5, this.ua.length));
		if (this.ieVer < 5.5){this.min = false;}
	}
	
//Look for Opera
	this.opera = (this.ua.indexOf('Opera') > 0);
	if (this.opera){
		this.operaVer = parseFloat(this.ua.substring(this.ua.indexOf('Opera')+6, this.ua.length));
		if (this.operaVer < 7.04){this.min = false;}
	}
	if (this.min == false){
		alert('Your browser may not be able to handle this page.');
	}
	
//Special case for the horrible ie5mac
	this.ie5mac = (this.ie&&this.mac&&(this.ieVer<6));
}

var C = new Client();

//for (prop in C){
//	alert(prop + ': ' + C[prop]);
//}



//CODE FOR HANDLING NAV BUTTONS AND FUNCTION BUTTONS

//[strNavBarJS]
function NavBtnOver(Btn){
	if (Btn.className != 'NavButtonDown'){Btn.className = 'NavButtonUp';}
}

function NavBtnOut(Btn){
	Btn.className = 'NavButton';
}

function NavBtnDown(Btn){
	Btn.className = 'NavButtonDown';
}
//[/strNavBarJS]

function FuncBtnOver(Btn){
	if (Btn.className != 'FuncButtonDown'){Btn.className = 'FuncButtonUp';}
}

function FuncBtnOut(Btn){
	Btn.className = 'FuncButton';
}

function FuncBtnDown(Btn){
	Btn.className = 'FuncButtonDown';
}

function FocusAButton(){
	if (document.getElementById('CheckButton1') != null){
		document.getElementById('CheckButton1').focus();
	}
	else{
		if (document.getElementById('CheckButton2') != null){
			document.getElementById('CheckButton2').focus();
		}
		else{
			document.getElementsByTagName('button')[0].focus();
		}
	}
}




//CODE FOR HANDLING DISPLAY OF POPUP FEEDBACK BOX

var topZ = 1000;

function ShowMessage(Feedback){
	var Output = Feedback + '<br /><br />';
	document.getElementById('FeedbackContent').innerHTML = Output;
	var FDiv = document.getElementById('FeedbackDiv');
	topZ++;
	FDiv.style.zIndex = topZ;
	FDiv.style.top = TopSettingWithScrollOffset(30) + 'px';

	FDiv.style.display = 'block';

	ShowElements(false, 'input');
	ShowElements(false, 'select');
	ShowElements(false, 'object');

//Focus the OK button
	setTimeout("document.getElementById('FeedbackOKButton').focus()", 50);
	
//
}

function ShowElements(Show, TagName){
//Special for IE bug -- hide all the form elements that will show through the popup
	if (C.ie){
		var Els = document.getElementsByTagName(TagName);
		for (var i=0; i<Els.length; i++){
			if (Show == true){
				Els[i].style.display = 'inline';
			}
			else{
				Els[i].style.display = 'none';
			}
		}
	} 
}

function HideFeedback(){
	document.getElementById('FeedbackDiv').style.display = 'none';
	ShowElements(true, 'input');
	ShowElements(true, 'select');
	ShowElements(true, 'object');
	if (Finished == true){
		Finish();
	}
}


//GENERAL UTILITY FUNCTIONS AND VARIABLES

//PAGE DIMENSION FUNCTIONS
function PageDim(){
//Get the page width and height
	this.W = 600;
	this.H = 400;
	this.W = document.getElementsByTagName('body')[0].clientWidth;
	this.H = document.getElementsByTagName('body')[0].clientHeight;
}

var pg = null;

function GetPageXY(El) {
	var XY = {x: 0, y: 0};
	while(El){
		XY.x += El.offsetLeft;
		XY.y += El.offsetTop;
		El = El.offsetParent;
	}
	return XY;
}

function GetScrollTop(){
	if (document.documentElement && document.documentElement.scrollTop){
		return document.documentElement.scrollTop;
	}
	else{
		if (document.body){
 			return document.body.scrollTop;
		}
		else{
			return window.pageYOffset;
		}
	}
}

function GetViewportHeight(){
	if (window.innerHeight){
		return window.innerHeight;
	}
	else{
		return document.getElementsByTagName('body')[0].clientHeight;
	}
}

function TopSettingWithScrollOffset(TopPercent){
	var T = Math.floor(GetViewportHeight() * (TopPercent/100));
	return GetScrollTop() + T; 
}

//CODE FOR AVOIDING LOSS OF DATA WHEN BACKSPACE KEY INVOKES history.back()
var InTextBox = false;

function SuppressBackspace(e){ 
	if (InTextBox == true){return;}
	if (C.ie) {
		thisKey = window.event.keyCode;
	}
	else {
		thisKey = e.keyCode;
	}

	var Suppress = false;

	if (thisKey == 8) {
		Suppress = true;
	}

	if (Suppress == true){
		if (C.ie){
			window.event.returnValue = false;	
			window.event.cancelBubble = true;
		}
		else{
			e.preventDefault();
		}
	}
}

if (C.ie){
	document.attachEvent('onkeydown',SuppressBackspace);
	window.attachEvent('onkeydown',SuppressBackspace);
}
else{
	if (window.addEventListener){
		window.addEventListener('keypress',SuppressBackspace,false);
	}
}

function ReduceItems(InArray, ReduceToSize){
	var ItemToDump=0;
	var j=0;
	while (InArray.length > ReduceToSize){
		ItemToDump = Math.floor(InArray.length*Math.random());
		InArray.splice(ItemToDump, 1);
	}
}

function Shuffle(InArray){
	var Num;
	var Temp = new Array();
	var Len = InArray.length;

	var j = Len;

	for (var i=0; i<Len; i++){
		Temp[i] = InArray[i];
	}

	for (i=0; i<Len; i++){
		Num = Math.floor(j  *  Math.random());
		InArray[i] = Temp[Num];

		for (var k=Num; k < (j-1); k++) {
			Temp[k] = Temp[k+1];
		}
		j--;
	}
	return InArray;
}

function WriteToInstructions(Feedback) {
	document.getElementById('InstructionsDiv').innerHTML = Feedback;

}




function EscapeDoubleQuotes(InString){
	return InString.replace(/"/g, '&quot;')
}

function TrimString(InString){
        var x = 0;

        if (InString.length != 0) {
                while ((InString.charAt(InString.length - 1) == '\u0020') || (InString.charAt(InString.length - 1) == '\u000A') || (InString.charAt(InString.length - 1) == '\u000D')){
                        InString = InString.substring(0, InString.length - 1)
                }

                while ((InString.charAt(0) == '\u0020') || (InString.charAt(0) == '\u000A') || (InString.charAt(0) == '\u000D')){
                        InString = InString.substring(1, InString.length)
                }

                while (InString.indexOf('  ') != -1) {
                        x = InString.indexOf('  ')
                        InString = InString.substring(0, x) + InString.substring(x+1, InString.length)
                 }

                return InString;
        }

        else {
                return '';
        }
}

function FindLongest(InArray){
	if (InArray.length < 1){return -1;}

	var Longest = 0;
	for (var i=1; i<InArray.length; i++){
		if (InArray[i].length > InArray[Longest].length){
			Longest = i;
		}
	}
	return Longest;
}

//UNICODE CHARACTER FUNCTIONS
function IsCombiningDiacritic(CharNum){
	var Result = (((CharNum >= 0x0300)&&(CharNum <= 0x370))||((CharNum >= 0x20d0)&&(CharNum <= 0x20ff)));
	Result = Result || (((CharNum >= 0x3099)&&(CharNum <= 0x309a))||((CharNum >= 0xfe20)&&(CharNum <= 0xfe23)));
	return Result;
}

function IsCJK(CharNum){
	return ((CharNum >= 0x3000)&&(CharNum < 0xd800));
}

//SETUP FUNCTIONS
//BROWSER WILL REFILL TEXT BOXES FROM CACHE IF NOT PREVENTED
function ClearTextBoxes(){
	var NList = document.getElementsByTagName('input');
	for (var i=0; i<NList.length; i++){
		if ((NList[i].id.indexOf('Guess') > -1)||(NList[i].id.indexOf('Gap') > -1)){
			NList[i].value = '';
		}
		if (NList[i].id.indexOf('Chk') > -1){
			NList[i].checked = '';
		}
	}
}

//EXTENSION TO ARRAY OBJECT
function Array_IndexOf(Input){
	var Result = -1;
	for (var i=0; i<this.length; i++){
		if (this[i] == Input){
			Result = i;
		}
	}
	return Result;
}
Array.prototype.indexOf = Array_IndexOf;

//IE HAS RENDERING BUG WITH BOTTOM NAVBAR
function RemoveBottomNavBarForIE(){
	if ((C.ie)&&(document.getElementById('Reading') != null)){
		if (document.getElementById('BottomNavBar') != null){
			document.getElementById('TheBody').removeChild(document.getElementById('BottomNavBar'));
		}
	}
}




//HOTPOTNET-RELATED CODE

var HPNStartTime = (new Date()).getTime();
var SubmissionTimeout = 30000;
var Detail = ''; //Global that is used to submit tracking data

function Finish(){
//If there's a form, fill it out and submit it
	if (document.store != null){
		Frm = document.store;
		Frm.starttime.value = HPNStartTime;
		Frm.endtime.value = (new Date()).getTime();
		Frm.mark.value = Score;
		Frm.detail.value = Detail;
		Frm.submit();
	}
}



//JQUIZ CORE JAVASCRIPT CODE

var CurrQNum = 0;
var CorrectIndicator = ':-)';
var IncorrectIndicator = 'X';
var YourScoreIs = 'Your score is ';
var ContinuousScoring = true;
var CorrectFirstTime = 'Questions answered correctly first time: ';
var ShowCorrectFirstTime = false;
var ShuffleQs = true;
var ShuffleAs = true;
var DefaultRight = 'Correct!';
var DefaultWrong = 'Sorry! Try again.';
var QsToShow = 10;
var Score = 0;
var Finished = false;
var Qs = null;
var QArray = new Array();
var ShowingAllQuestions = false;
var ShowAllQuestionsCaption = 'Show all questions';
var ShowOneByOneCaption = 'Show questions one by one';
var State = new Array();
var Feedback = '';
var TimeOver = false;
var strInstructions = '';

//The following variable can be used to add a message explaining that
//the question is finished, so no further marking will take place.
var strQuestionFinished = '';

function CompleteEmptyFeedback(){
	var QNum, ANum;
	for (QNum=0; QNum<I.length; QNum++){
//Only do this if not multi-select
		if (I[QNum][2] != '3'){
  		for (ANum = 0; ANum<I[QNum][3].length; ANum++){
  			if (I[QNum][3][ANum][1].length < 1){
  				if (I[QNum][3][ANum][2] > 0){
  					I[QNum][3][ANum][1] = DefaultRight;
  				}
  				else{
  					I[QNum][3][ANum][1] = DefaultWrong;
  				}
  			}
  		}
		}
	}
}

function SetUpQuestions(){
	var AList = new Array(); 
	var QList = new Array();
	var i, j;
	Qs = document.getElementById('Questions');
	while (Qs.getElementsByTagName('li').length > 0){
		QList.push(Qs.removeChild(Qs.getElementsByTagName('li')[0]));
	}
	var DumpItem = 0;
	if (QsToShow > QList.length){
		QsToShow = QList.length;
	}
	while (QsToShow < QList.length){
		DumpItem = Math.floor(QList.length*Math.random());
		for (j=DumpItem; j<(QList.length-1); j++){
			QList[j] = QList[j+1];
		}
		QList.length = QList.length-1;
	}
	if (ShuffleQs == true){
		QList = Shuffle(QList);
	}
	if (ShuffleAs == true){
		var As;
		for (var i=0; i<QList.length; i++){
			As = QList[i].getElementsByTagName('ol')[0];
			if (As != null){
  			AList.length = 0;
				while (As.getElementsByTagName('li').length > 0){
					AList.push(As.removeChild(As.getElementsByTagName('li')[0]));
				}
				AList = Shuffle(AList);
				for (j=0; j<AList.length; j++){
					As.appendChild(AList[j]);
				}
			}
		}
	}
	
	for (i=0; i<QList.length; i++){
		Qs.appendChild(QList[i]);
		QArray[QArray.length] = QList[i];
	}

//Show the first item
	QArray[0].style.display = '';
	
//Now hide all except the first item
	for (i=1; i<QArray.length; i++){
		QArray[i].style.display = 'none';
	}		
	SetQNumReadout();
}

function ChangeQ(ChangeBy){
//The following line prevents moving to another question until the current
//question is answered correctly. Uncomment it to enable this behaviour. 
//	if (State[CurrQNum][0] == -1){return;}
	if (((CurrQNum + ChangeBy) < 0)||((CurrQNum + ChangeBy) >= QArray.length)){return;}
	QArray[CurrQNum].style.display = 'none';
	CurrQNum += ChangeBy;
	QArray[CurrQNum].style.display = '';
	SetQNumReadout();
//if there's a textbox, set the focus in it
	if (QArray[CurrQNum].getElementsByTagName('input')[0] != null){
		QArray[CurrQNum].getElementsByTagName('input')[0].focus();
	}
}

function SetQNumReadout(){
	document.getElementById('QNumReadout').innerHTML = (CurrQNum+1) + ' / ' + QArray.length;
}

I=new Array();
I[0]=new Array();I[0][0]=100;
I[0][1]='';
I[0][2]='0';
I[0][3]=new Array();
I[0][3][0]=new Array('The Navy was quickly reduced in size.','Correct.  By 1870 it went from over 700 ships it went to less than 200, with only 50 actually Commissioned.',1,100,1);
I[0][3][1]=new Array('The Navy was allowed to continue to operate with the same number of ships.','Nope.  There were significant reductions after the war.',0,0,1);
I[0][3][2]=new Array('There were reductions in the numbers of ships overall, but a large number remained and in good condition.','Nope.  Not only were there reductions, the ships remaining were in generally poor condition.',0,0,1);
I[0][3][3]=new Array('An aggressive ship-building program replaced the older ships with new ones.','Sorry.  There was no new ship-building programs after the war.',0,0,1);
I[0][3][4]=new Array('Half of the Fleet was sold to Spain and the other half refurbished.','Nope.  This never happened.',0,0,1);
I[1]=new Array();I[1][0]=100;
I[1][1]='';
I[1][2]='0';
I[1][3]=new Array();
I[1][3][0]=new Array('1873 on the grounds of the Naval Academy','Correct.  Its purpose was and is to advance professional and scientific knowledge about the our Navy, world navies and maritime industry.',1,100,1);
I[1][3][1]=new Array('1865 in Annapolis, Maryland','Nope.  This was when the Naval Academy was moved back to Annapolis.',0,0,1);
I[1][3][2]=new Array('1865 in Newport, Rhode Island','Nope.  The Naval Academy had been in Newport during the war and moved in 1865.',0,0,1);
I[1][3][3]=new Array('1873 in Newport, Rhode Island','Nope.  It wasn\'t established in Rhode Island.',0,0,1);
I[1][3][4]=new Array('1898 in Washington D.C.','Sorry.  Wrong year and wrong location.',0,0,1);
I[2]=new Array();I[2][0]=100;
I[2][1]='';
I[2][2]='0';
I[2][3]=new Array();
I[2][3][0]=new Array('To advance professional and scientific knowledge about the U.S. Navy','Correct.  That is still the purpose today.',1,100,1);
I[2][3][1]=new Array('To train Naval Officers in the art of naval tactics.','Sorry.  You might be thinking of the Naval War College.',0,0,1);
I[2][3][2]=new Array('To provide an academic environment for Naval Officers to get their Masters Degrees.','Sorry.  You might be thinking of the Naval War College.',0,0,1);
I[2][3][3]=new Array('To publish naval books and charts to avoid the costs of buying these items from suppliers.','Nope.  This is something that is done at the U.S. Naval Institute, but that is not its purpose.',0,0,1);
I[2][3][4]=new Array('To control and approve all teaching materials within the U.S. Navy.','Nope.  This is done by the Naval Education & Training Command.',0,0,1);
I[3]=new Array();I[3][0]=100;
I[3][1]='';
I[3][2]='0';
I[3][3]=new Array();
I[3][3][0]=new Array('Proceedings','Excellent!  This journal is still the foremost naval and maritime publication of its type.',1,100,1);
I[3][3][1]=new Array('All The Worlds Navies','Sorry.  This excellent publication is produced by a company called Jane\'s.',0,0,1);
I[3][3][2]=new Array('Naval Customs and Traditions','Sorry.  While this book is published by the U.S. Naval Institute, it is not a professional journal.',0,0,1);
I[3][3][3]=new Array('Naval History','Nope.  While several naval history books are published by the U.S. Naval Institute, they are not professional journals.',0,0,1);
I[3][3][4]=new Array('Naval Strategy and Tactics','Nope.  No such professional journal is published by the U.s. Naval Institute.',0,0,1);
I[4]=new Array();I[4][0]=100;
I[4][1]='';
I[4][2]='0';
I[4][3]=new Array();
I[4][3][0]=new Array('Control of the sea.','Correct.  Mahan believe England\'s rise to World Power status was based on this principal.',1,100,1);
I[4][3][1]=new Array('A large land Army based upon the European model.','Nope.  This was the majority opinion in Europe at the time, but not what Mahan believed.',0,0,1);
I[4][3][2]=new Array('An economic system which relied on the gold standard.','Nope.  Mahan did not study or discuss economic systems.',0,0,1);
I[4][3][3]=new Array('A strong Merchant Marine.','Sorry.  While he noted the importance of a strong merchant Marine, he knew you could only have one if you had something else first.',0,0,1);
I[4][3][4]=new Array('A strong and robust Marine Corps.','Nope.  Mahan did not write about the Marine Corps.',0,0,1);
I[5]=new Array();I[5][0]=100;
I[5][1]='';
I[5][2]='0';
I[5][3]=new Array();
I[5][3][0]=new Array('In response to increased shipbuilding by other nations as well as to ensure an overseas market for U.S. goods.','Correct.  Germany, England and Japan started aggressive shipbuilding programs.',1,100,1);
I[5][3][1]=new Array('Foreign nations had begun the practice of impressing U.S. sailors by force.','Sorry.  That practice had ended by this time.',0,0,1);
I[5][3][2]=new Array('As a result of the war with Spain.','Nope.  The U.S. war with Spain would come much later.',0,0,1);
I[5][3][3]=new Array('As a response to the Franco-Prussian war in the 1870\'s.','Nope.  The Franco-Prussian war had no influence on the decision to expand the U.S. Navy.',0,0,1);
I[5][3][4]=new Array('Due to the writings of Alfred Thayer Mahan.','Nope.  While his writings did inspire a lot of powerful people, it wasn\'t the main reason for the pressure to build up the Navy.',0,0,1);
I[6]=new Array();I[6][0]=100;
I[6][1]='';
I[6][2]='0';
I[6][3]=new Array();
I[6][3][0]=new Array('6','Correct.  Four first-class and two second-class battleships.',1,100,1);
I[6][3][1]=new Array('10','Sorry.  It wasn\'t this many.',0,0,1);
I[6][3][2]=new Array('2','Nope.  While it was a small number, it wasn\'t this small.',0,0,1);
I[6][3][3]=new Array('4','Nope.  While it was a small number, it wasn\'t this small.',0,0,1);
I[6][3][4]=new Array('12','Sorry.  It wasn\'t this many.',0,0,1);
I[7]=new Array();I[7][0]=100;
I[7][1]='';
I[7][2]='0';
I[7][3]=new Array();
I[7][3][0]=new Array('The sinking of the USS Maine in Havana harbor.','Correct.  It is still uncertain who or what was responsible for this disaster, but the U.S. public blamed Spain.',1,100,1);
I[7][3][1]=new Array('The sinking of a U.S. steamship by a Spanish cruiser off Havana.','Nope.  This did not happen.',0,0,1);
I[7][3][2]=new Array('A letter was taken from the Spanish Ambassador calling the U.S. President "weak."','Sorry.  While such a letter had turned up earlier, this wasn\'t the incident that started the war.',0,0,1);
I[7][3][3]=new Array('A surprise attack on U.S. forces in Cuba by a Spanish Naval Squadron.','Nope.  This never happened.',0,0,1);
I[7][3][4]=new Array('The decision by the U.S. to enforce a blockade of Cuba to support the Cuban revolution movement.','Nope.  The blockade did not begin until after war was declared by Congress.',0,0,1);
I[8]=new Array();I[8][0]=100;
I[8][1]='';
I[8][2]='0';
I[8][3]=new Array();
I[8][3][0]=new Array('A small force was left on the East Coast to protect it and the bulk of the Fleet went to Key West to prepare for operations against Cuba.','Correct.  A small "flying squadron" was left to guard the East Coast.',1,100,1);
I[8][3][1]=new Array('The Fleet was split in two so that it could better cover the northern and southern portions of the East Coast.','Nope.  The bulk of the Fleet had to move against Cuba.',0,0,1);
I[8][3][2]=new Array('Half of the Fleet was sent to the Philippines while the other half sailed for Cuba.','Nope.  There were already U.S. naval forces deployed to the Pacific.',0,0,1);
I[8][3][3]=new Array('The Fleet was not divided but went in masse to the waters off of Cuba.','Sorry.  Both Cuba and the East Coast had to be accounted for.',0,0,1);
I[8][3][4]=new Array('It was split into three sections.  One to defend the East Coast, one to attack Cuba and one to attack Spain.','Nope.  There was never a planned U.S. naval attack on Spain.',0,0,1);
I[9]=new Array();I[9][0]=100;
I[9][1]='';
I[9][2]='0';
I[9][3]=new Array();
I[9][3][0]=new Array('Commodore Dewey','Correct.  Dewey was given advance orders to proceed to the Philippines at the outbreak of hostilities.',1,100,1);
I[9][3][1]=new Array('Admiral Sampson ','Nope.  He commanded U.S. forces off the coast of Cuba.',0,0,1);
I[9][3][2]=new Array('Admiral Cervera','Nope.  He was in command of the Spanish Fleet in Cuba.',0,0,1);
I[9][3][3]=new Array('Commodore Schley ','Nope.  He commanded the "flying Squadron" which protected the U.S. East Coast.',0,0,1);
I[9][3][4]=new Array('Admiral Roosevelt','Nope.  Not even close!  Roosevelt was the Secretary of the Navy up until the outbreak of the war.',0,0,1);
I[10]=new Array();I[10][0]=100;
I[10][1]='';
I[10][2]='0';
I[10][3]=new Array();
I[10][3][0]=new Array('Manila Bay','Correct.  Dewey moved quickly to trap the Spanish Fleet in Manila harbor.',1,100,1);
I[10][3][1]=new Array('Cape Verdes Islands','Nope.  The Cape Verdes Islands was from where the Spanish Fleet moved to defend Puerto Rico.',0,0,1);
I[10][3][2]=new Array('Hong Kong','Nope.  Dewey\'s forces sailed from Hong Kong but that is not where they fought the Spanish Fleet. ',0,0,1);
I[10][3][3]=new Array('Havana Bay','Nope.  Dewey\'s force was in the Pacific, not off of Cuba.',0,0,1);
I[10][3][4]=new Array('Off the Southern Spanish coast.','Nope.  Dewey\'s force was in the Pacific.',0,0,1);
I[11]=new Array();I[11][0]=100;
I[11][1]='';
I[11][2]='0';
I[11][3]=new Array();
I[11][3][0]=new Array('"You may fire when you are ready, Gridley."','Correct.  Captain Gridley was the Commanding Officer of the USS Olympia, Dewey\'s flagship.',1,100,1);
I[11][3][1]=new Array('"Damn the torpedoes, full speed ahead!"','Nope.  This was Admiral Farragut\'s famous saying during the battle of Mobile Bay.',0,0,1);
I[11][3][2]=new Array('"Don\'t give up the ship!"','Nope.  This was Captain Lawrence\'s famous saying during the battle of Lake Erie.',0,0,1);
I[11][3][3]=new Array('"I\'ve not yet begun to fight!"','Nope.  This was the famous saying by Captain John Paul Jones during the Revolutionary War.',0,0,1);
I[11][3][4]=new Array('"Commence firing."','Nope.  This is the standard order to begin firing on another ship.',0,0,1);
I[12]=new Array();I[12][0]=100;
I[12][1]='';
I[12][2]='0';
I[12][3]=new Array();
I[12][3][0]=new Array('Santiago de Cuba','Correct.  All Spanish ships were sunk or beached, with only one American killed and one wounded.',1,100,1);
I[12][3][1]=new Array('Havana Bay','Nope.  the U.S. thought this would be where the Spanish fleet would go, but it wasn\'t.',0,0,1);
I[12][3][2]=new Array('Guant\u00E1namo Bay ','Nope.  U.S. troops landed here but only to establish it as a coaling base for blockade operations.',0,0,1);
I[12][3][3]=new Array('Cienfuegos','Nope.  This was another possible choice for the Spanish Fleet, but they elected not to go here.',0,0,1);
I[12][3][4]=new Array('Cura\u00E7ao','Nope.  The Spanish Fleet did stop here, however, before going on to Cuba.',0,0,1);
I[13]=new Array();I[13][0]=100;
I[13][1]='';
I[13][2]='0';
I[13][3]=new Array();
I[13][3][0]=new Array('Puerto Rico, the Philippines, and Guam ','Correct.  In addition, Cuba was granted independence.',1,100,1);
I[13][3][1]=new Array('Puerto Rico, the Philippines, and Cuba','Nope.  Cuba did not become an American territory.',0,0,1);
I[13][3][2]=new Array('The Philippines, Guam and Cuba','Nope.  Cuba did not become an American territory.',0,0,1);
I[13][3][3]=new Array('Guam, Cuba and Puerto Rico','Nope.  Cuba did not become an American territory.',0,0,1);
I[13][3][4]=new Array('The Philippines, Cuba and the Dominican Republic','Nope.  Cuba and the Dominican Republic did not become American territory.',0,0,1);
I[14]=new Array();I[14][0]=100;
I[14][1]='';
I[14][2]='0';
I[14][3]=new Array();
I[14][3][0]=new Array('President Teddy Roosevelt ','Correct.  President Roosevelt\'s Administration stressed the importance of the U.S. world image.',1,100,1);
I[14][3][1]=new Array('President William Howard Taft ','Nope.  President Taft\'s Administration carried on the work begun by the previous Administration.',0,0,1);
I[14][3][2]=new Array('President William McKinley','Nope.  President McKinley\'s Administration did take the first steps forward however.',0,0,1);
I[14][3][3]=new Array('Alfred Thayer Mahan','Sorry.  Mahan\'s teachings did inspire the person primarily responsible for the rise in status, however.',0,0,1);
I[14][3][4]=new Array('President Woodrow Wilson','Nope.  By the time of President Wilson\'s Administration, the U.S. already had achieved world power status.',0,0,1);
I[15]=new Array();I[15][0]=100;
I[15][1]='';
I[15][2]='0';
I[15][3]=new Array();
I[15][3][0]=new Array('Turbine engine propulsion for battleships.','Correct.  This was one of the most important innovations unveiled with the commissioning of the HMS Dreadnought.',1,100,1);
I[15][3][1]=new Array('Nuclear propulsion','Nope.  This did not occur until later in the century.',0,0,1);
I[15][3][2]=new Array('Aircraft based on a warship.','Nope.  This concept did not come about until the British introduced it during WW I.',0,0,1);
I[15][3][3]=new Array('Sonar','Nope.  Sonar wasn\'t developed until WW II.',0,0,1);
I[15][3][4]=new Array('Radar','Nope.  Radar wasn\'t developed until WW II.',0,0,1);
I[16]=new Array();I[16][0]=100;
I[16][1]='';
I[16][2]='0';
I[16][3]=new Array();
I[16][3][0]=new Array('The Japanese felt they were due reparations from Russia, and the U.S.-brokered agreement did not give them to Japan.','Correct.  They felt President Roosevelt had given in to Russia.',1,100,1);
I[16][3][1]=new Array('Because Japan felt that the treaty should have been signed in Japan, not the U.S.','Nope.  Japan asked the Roosevelt Administration to come up with the agreement.',0,0,1);
I[16][3][2]=new Array('Because the U.S. decided in favor of Russia on all terms of the treaty.','Nope.  Overall Japan got the majority of the things it wanted out of the treaty.',0,0,1);
I[16][3][3]=new Array('Because it ended the war before Japan had completed her conquests.','Nope.  Japan had asked for the agreement.',0,0,1);
I[16][3][4]=new Array('Because Japan had not wanted the U.S. to become involved in the dispute with Russia.','Nope.  Japan asked the Roosevelt Administration to come up with the agreement.',0,0,1);
I[17]=new Array();I[17][0]=100;
I[17][1]='';
I[17][2]='0';
I[17][3]=new Array();
I[17][3][0]=new Array('War Plan Orange','Correct.  These plans would eventually form the basis of U.S. tactics and strategy in the Pacific theater in World War II.',1,100,1);
I[17][3][1]=new Array('Tora, Tora, Tora','Nope.  These were the code words used by the Japanese to begin the attack on Pearl Harbor.',0,0,1);
I[17][3][2]=new Array('Operation Typhoon','Nope.  This wasn\'t the name of the war plans.',0,0,1);
I[17][3][3]=new Array('War Plan Bravo','Nope.  This wasn\'t the name of the war plans.',0,0,1);
I[17][3][4]=new Array('The Roosevelt Doctrine','Nope.  This wasn\'t the name of the war plans.',0,0,1);
I[18]=new Array();I[18][0]=100;
I[18][1]='';
I[18][2]='0';
I[18][3]=new Array();
I[18][3][0]=new Array('1904','Excellent!  This came about because of German threats to collect debts in the Dominican Republic by force.',1,100,1);
I[18][3][1]=new Array('1907','Nope.  This was the year that the British unveiled the new battleship, the HMS Dreadnought.',0,0,1);
I[18][3][2]=new Array('1911','Nope.  This was the year the U.S. Navy started "War Plan Orange", the planning for the defense of the Pacific.',0,0,1);
I[18][3][3]=new Array('1898','Sorry.  This was the year of the Spanish-American War and came before the Roosevelt Corollary to the Monroe Doctrine.',0,0,1);
I[18][3][4]=new Array('1914','Sorry.  This was the year that the European powers began World War I.',0,0,1);
I[19]=new Array();I[19][0]=100;
I[19][1]='';
I[19][2]='0';
I[19][3]=new Array();
I[19][3][0]=new Array('Germany','Correct.  German threats against the Dominican Republic brought about this U.S. diplomatic response.',1,100,1);
I[19][3][1]=new Array('Japan','Nope.  Japan was a concern, however.',0,0,1);
I[19][3][2]=new Array('Spain','Nope.  Spain had given up most of her overseas holdings by this time.',0,0,1);
I[19][3][3]=new Array('England','Nope.  Relations with England were very good at this time.',0,0,1);
I[19][3][4]=new Array('France','Nope.  Relations with France were good at this time.',0,0,1);
I[20]=new Array();I[20][0]=100;
I[20][1]='';
I[20][2]='0';
I[20][3]=new Array();
I[20][3][0]=new Array('France','Correct.  The French began work on a canal in 1881 but the loss of 22,000 workers to yellow fever forced the end of the project.',1,100,1);
I[20][3][1]=new Array('Spain','Nope.  Spain was not involved with this project.',0,0,1);
I[20][3][2]=new Array('The United States','Sorry.  the U.s. finished the Canal in 1914, but they took over the work previously done by another country.',0,0,1);
I[20][3][3]=new Array('England','Nope.  England was not involved with this project.',0,0,1);
I[20][3][4]=new Array('Japan','Nope.  Japan was not involved with this project.',0,0,1);
I[21]=new Array();I[21][0]=100;
I[21][1]='';
I[21][2]='0';
I[21][3]=new Array();
I[21][3][0]=new Array('Alfred Thayer Mahan','Excellent!  His findings in <em>The Influence of Sea Power upon History, 1660 - 1783</em> dramatically changed naval military thinking.',1,100,1);
I[21][3][1]=new Array('Theodore Roosevelt','Nope.  He was a president, not an naval officer.',0,0,1);
I[21][3][2]=new Array('William Sampson','Nope.  Admiral Sampson was in charge of the naval blockade of Cuba during the Spanish-American War.',0,0,1);
I[21][3][3]=new Array('Stephen Luce','Nope.  Commodore Luce was the officer who convinced the Secretary of the Navy to establish the Naval War College in Newport, Rhode Island.',0,0,1);
I[21][3][4]=new Array('George Dewey','Sorry.  Commodore Dewey led the U.S. forces in the naval battles against the Spanish in the  Philippine Islands.',0,0,1);
I[22]=new Array();I[22][0]=100;
I[22][1]='';
I[22][2]='0';
I[22][3]=new Array();
I[22][3][0]=new Array('Theodore Roosevelt','Excellent.  He has resigned his position as Assistant Secretary of the Navy in order to participate in the conflict.',1,100,1);
I[22][3][1]=new Array('Alfred Thayer Mahan','Nope.  Admiral Mahan provided the basic Naval Philosophy for the U.S. Navy during the late 1800\'s.',0,0,1);
I[22][3][2]=new Array('William Sampson','Nope.  Admiral Sampson was in charge of the naval blockade of Cuba during the Spanish-American War.',0,0,1);
I[22][3][3]=new Array('Admiral Cervera','Sorry.  This Spanish Naval Officer was in charge of the Spanish Naval Forces in Cuba during the Spanish-American War.',0,0,1);
I[22][3][4]=new Array('Stephen Luce','Nope.  Commodore Luce was the officer who convinced the Secretary of the Navy to establish the Naval War College in Newport, Rhode Island.',0,0,1);
I[23]=new Array();I[23][0]=100;
I[23][1]='';
I[23][2]='0';
I[23][3]=new Array();
I[23][3][0]=new Array('Admiral Cervera','Excellent.  Cervera tried to tell the Spanish government that his fleet was not ready, but he was ordered to sail anyway.',1,100,1);
I[23][3][1]=new Array('Admiral Sampson','Nope.  Admiral Sampson was in charge of the U.S. naval blockade of Cuba during the Spanish-American War.',0,0,1);
I[23][3][2]=new Array('Commodore Dewey','Sorry.  Commodore Dewey led the U.S. forces in the naval battles against the Spanish in the  Philippine Islands.',0,0,1);
I[23][3][3]=new Array('Admiral Cordoba','Sorry.  No such officer played a part in the Spanish-American War.',0,0,1);
I[23][3][4]=new Array('Commodore Schley','Nope.  Commodore Schley headed one of the U.S. Naval Squadrons in the Caribbean during the war.',0,0,1);
I[24]=new Array();I[24][0]=100;
I[24][1]='';
I[24][2]='0';
I[24][3]=new Array();
I[24][3][0]=new Array('Alfred Thayer Mahan','Excellent.  It quickly became world-famous as the foremost text on sea power and naval strategy.',1,100,1);
I[24][3][1]=new Array('Theodore Roosevelt','Nope.  He was the Secretary of the Navy and the President of the United States during the late 1800\'s and early 1900\'s.',0,0,1);
I[24][3][2]=new Array('William Sampson','Nope.  Admiral Sampson was in charge of the naval blockade of Cuba during the Spanish-American War.',0,0,1);
I[24][3][3]=new Array('Stephen Luce','Nope.  Commodore Luce was the officer who convinced the Secretary of the Navy to establish the Naval War College in Newport, Rhode Island.',0,0,1);
I[24][3][4]=new Array('George Dewey','Sorry.  Commodore Dewey led the U.S. forces in the naval battles against the Spanish in the  Philippine Islands.',0,0,1);
I[25]=new Array();I[25][0]=100;
I[25][1]='';
I[25][2]='0';
I[25][3]=new Array();
I[25][3][0]=new Array('Cuba','Excellent.  Cuba was granted its independence at the end of the conflict.',1,100,1);
I[25][3][1]=new Array('All of the listed countries were turned over to the U.S. by Spain at the end of the war.','Nope.  There is one of the four that was not turned over to the U.S..',0,0,1);
I[25][3][2]=new Array('Guam','Nope.  Guam became a U.S. possession after the war.',0,0,1);
I[25][3][3]=new Array('Puerto Rico','Sorry.  Puerto Rico was turned over by Spain to the U.S. following the war.',0,0,1);
I[25][3][4]=new Array('The Philippines','Sorry.  The Philippine Islands were turned over by Spain to the U.S. following the war.',0,0,1);
I[26]=new Array();I[26][0]=100;
I[26][1]='';
I[26][2]='0';
I[26][3]=new Array();
I[26][3][0]=new Array('Great Britain','Excellent!  It could steam to America and back without refueling.',1,100,1);
I[26][3][1]=new Array('Italy','Nope.  This wasn\'t the country.',0,0,1);
I[26][3][2]=new Array('France','Nope.  This isn\'t the one.',0,0,1);
I[26][3][3]=new Array('The United States','Sorry.  The U.S. did not come up with this new battleship design.',0,0,1);
I[26][3][4]=new Array('Germany','Nope.  Although it was produced to counter the growing German Naval threat.',0,0,1);
I[27]=new Array();I[27][0]=100;
I[27][1]='';
I[27][2]='0';
I[27][3]=new Array();
I[27][3][0]=new Array('The USS Maine','Right!  Her destruction in Havana harbor on 16 February 1898 started the Spanish-American War.',1,100,1);
I[27][3][1]=new Array('The USS Oregon','Sorry.  Although the Oregon was a U.S. Battleship of this period, she was not the ship sent to Cuba.',0,0,1);
I[27][3][2]=new Array('The USS Arizona','Nope.  The Arizona didn\'t get built until much later.',0,0,1);
I[27][3][3]=new Array('The USS North Carolina','Nope.  The North Carolina didn\'t get built until much later.',0,0,1);
I[27][3][4]=new Array('The USS Indiana','Sorry.  Although the Indiana was a U.S. Battleship of this period, she was not the ship sent to Cuba.',0,0,1);
I[28]=new Array();I[28][0]=100;
I[28][1]='';
I[28][2]='0';
I[28][3]=new Array();
I[28][3][0]=new Array('Commodore Dewey','Right!  Dewey\'s task force of ships had been based in Hong Kong.',1,100,1);
I[28][3][1]=new Array('Commodore Luce','Nope.  Commodore Luce was the officer who convinced the Secretary of the Navy to establish the Naval War College in Newport, Rhode Island.',0,0,1);
I[28][3][2]=new Array('Admiral Sampson','Nope.  Admiral Sampson was in charge of the U.S. naval blockade of Cuba during the Spanish-American War.',0,0,1);
I[28][3][3]=new Array('Admiral Cervera','Sorry.  This Spanish Naval Officer was in charge of the Spanish Naval Forces in Cuba during the Spanish-American War.',0,0,1);
I[28][3][4]=new Array('Admiral Mahan','Nope.  Mahan provided the basic Naval Philosophy for the U.S. Navy during the late 1800\'s.',0,0,1);
I[29]=new Array();I[29][0]=100;
I[29][1]='';
I[29][2]='0';
I[29][3]=new Array();
I[29][3][0]=new Array('The USS Maine','Excellent!  The USS Maine had already been commissioned by this time.',1,100,1);
I[29][3][1]=new Array('The USS Indiana','Sorry.  The Indiana was one of the three authorized.',0,0,1);
I[29][3][2]=new Array('The USS Oregon','Sorry.  The Oregon was one of the three authorized.',0,0,1);
I[29][3][3]=new Array('The USS Massachusetts','Sorry.  The Massachusetts was one of the three authorized.',0,0,1);
I[29][3][4]=new Array('All of the listed battleships were authorized for construction in 1890.','Sorry.  One of them was not on the list.',0,0,1);
I[30]=new Array();I[30][0]=100;
I[30][1]='';
I[30][2]='0';
I[30][3]=new Array();
I[30][3][0]=new Array('He headed one of the U.S. squadrons in the Caribbean.','Excellent.  Schley was in charge of the decisive battle of Santiago De Cuba.',1,100,1);
I[30][3][1]=new Array('He was in charge of the Spanish Naval Forces in Cuba during the Spanish-American War.','Nope.  That would be Admiral Cervera.',0,0,1);
I[30][3][2]=new Array('He was in charge of the U.S. naval blockade of Cuba during the Spanish-American War.','Sorry.  Admiral Sampson had that distinction.',0,0,1);
I[30][3][3]=new Array('He led the U.S. forces in the naval battles against the Spanish in the  Philippine Islands.','Sorry.  That was Admiral Dewey.',0,0,1);
I[30][3][4]=new Array('He led the charge of the Rough Riders up San Juan Hill.','Nope.  That was Lt. Col Teddy Roosevelt.',0,0,1);
I[31]=new Array();I[31][0]=100;
I[31][1]='';
I[31][2]='0';
I[31][3]=new Array();
I[31][3][0]=new Array('Commodore Stephen Luce','Right.  The college was the first of its kind in the world.',1,100,1);
I[31][3][1]=new Array('Admiral Alfred Thayer Mahan','Nope.  Admiral Mahan provided the basic Naval Philosophy for the U.S. Navy during the late 1800\'s.',0,0,1);
I[31][3][2]=new Array('Commodore George Dewey','Sorry.  He led the U.S. forces in the naval battles against the Spanish in the  Philippine Islands.',0,0,1);
I[31][3][3]=new Array('Admiral William Sampson','Sorry.  He was in charge of the U.S. naval blockade of Cuba during the Spanish-American War.',0,0,1);
I[31][3][4]=new Array('Commodore Winfield Scott Schley','Nope.  He headed one of the U.S. squadrons in the Caribbean.',0,0,1);
I[32]=new Array();I[32][0]=100;
I[32][1]='';
I[32][2]='0';
I[32][3]=new Array();
I[32][3][0]=new Array('The Holland','Excellent.  She was named after her inventor, John Holland.',1,100,1);
I[32][3][1]=new Array('The Hunley','Sorry.  The CSS Hunley was a submarine used by the Confederate States in the Civil War.',0,0,1);
I[32][3][2]=new Array('The Virginia','Nope.  The CSS Virginia was the first Ironclad and was used by the Confederate Navy during the Civil War.',0,0,1);
I[32][3][3]=new Array('The Maine','Nope.  The USS Maine was the battleship sunk in Havana harbor prior to the Spanish-American War.',0,0,1);
I[32][3][4]=new Array('The Olympia','Sorry.  The USS Olympia was the flagship of Commodore Dewey during the battle of  Manila Bay during the Spanish-American War.',0,0,1);
I[33]=new Array();I[33][0]=100;
I[33][1]='';
I[33][2]='0';
I[33][3]=new Array();
I[33][3][0]=new Array('The United States','Right.  It was a triumphant cruise of 46,000 miles with stops in 20 foreign ports',1,100,1);
I[33][3][1]=new Array('Great Britain','Nope.  Although the greatest naval power of the time, it wasn\'t Great Britain.',0,0,1);
I[33][3][2]=new Array('France','Nope.  Although the fleet did visit France.',0,0,1);
I[33][3][3]=new Array('Japan','Sorry.  Japan did not launch the Great White Fleet.',0,0,1);
I[33][3][4]=new Array('Germany','Nope.  Although it was meant to impress Germany with this country\'s naval might.',0,0,1);
I[34]=new Array();I[34][0]=100;
I[34][1]='';
I[34][2]='0';
I[34][3]=new Array();
I[34][3][0]=new Array('Admiral Alfred Thayer Mahan','Excellent.  Mahan\'s book <em>The Influence Of Seapower upon History, 1660 - 1783</em> became the blueprint for U.S. Naval expansion.',1,100,1);
I[34][3][1]=new Array('Commodore George Dewey','Sorry.  He led the U.S. forces in the naval battles against the Spanish in the  Philippine Islands.',0,0,1);
I[34][3][2]=new Array('Commodore Stephen Luce','Nope.  Commodore Luce was the officer who convinced the Secretary of the Navy to establish the Naval War College in Newport, Rhode Island.',0,0,1);
I[34][3][3]=new Array('Admiral William Sampson','Nope.  Admiral Sampson was in charge of the U.S. naval blockade of Cuba during the Spanish-American  War',0,0,1);
I[34][3][4]=new Array('Commodore Winfield Schley','Nope.  He headed one of the U.S. squadrons in the Caribbean during the Spanish-American War.',0,0,1);
I[35]=new Array();I[35][0]=100;
I[35][1]='';
I[35][2]='0';
I[35][3]=new Array();
I[35][3][0]=new Array('1914','Right.  In August 1914, just as World War I was starting in Europe.',1,100,1);
I[35][3][1]=new Array('1918','Sorry.  This was the year the First World War ended.',0,0,1);
I[35][3][2]=new Array('1884','Nope.  This was the year the Naval War College was established.',0,0,1);
I[35][3][3]=new Array('1898','Nope.  This was the year the Spanish-American War began.',0,0,1);
I[35][3][4]=new Array('1907','Nope.  This was the year the HMS Dreadnought was launched.',0,0,1);
I[36]=new Array();I[36][0]=100;
I[36][1]='';
I[36][2]='0';
I[36][3]=new Array();
I[36][3][0]=new Array('All of the listed answers were accomplished under Roosevelt\'s leadership.','Excellent.  All of these important milestones in U.S. naval history owe their start to the support of Roosevelt.',1,100,1);
I[36][3][1]=new Array('A submarine program was developed','Sorry.  This was urged on by Roosevelt and the result, the USS Holland, was the first U.S. Submarine.',0,0,1);
I[36][3][2]=new Array('Flight experiments began','Nope.  Roosevelt was a prime supporter of experiments with manned aircraft both ashore and at sea.',0,0,1);
I[36][3][3]=new Array('The first real U.S. destroyer was commissioned.','Sorry.  The came about because of his urging and it would prove to be a critical ship type during World War I.',0,0,1);
I[36][3][4]=new Array('The first naval flight training unit was established.','Nope.  The establishment of naval flight training began under his watch.',0,0,1);
I[37]=new Array();I[37][0]=100;
I[37][1]='';
I[37][2]='0';
I[37][3]=new Array();
I[37][3][0]=new Array('The U.S. Naval Institute','Right.  These are still its primary goals today.',1,100,1);
I[37][3][1]=new Array('The Naval War College','Nope.  This institution was much older.',0,0,1);
I[37][3][2]=new Array('The Naval Academy Prep School','Nope.  This came much later.',0,0,1);
I[37][3][3]=new Array('The Mahan Institute','Sorry.  No such institute exists.',0,0,1);
I[37][3][4]=new Array('The Merchant Marine Academy','Nope.  The Merchant Marine Academy is not located at the Naval Academy.',0,0,1);
I[38]=new Array();I[38][0]=100;
I[38][1]='';
I[38][2]='0';
I[38][3]=new Array();
I[38][3][0]=new Array('France','Excellent!  The French accomplished this in 1872.',1,100,1);
I[38][3][1]=new Array('Great Britain','Sorry.  Great Britain was the second.',0,0,1);
I[38][3][2]=new Array('The United States','Nope.  The U.S. wasn\'t the first.',0,0,1);
I[38][3][3]=new Array('Japan','Nope.  Japan wasn\'t the first.',0,0,1);
I[38][3][4]=new Array('Germany','Sorry.  Germany wasn\'t the first.',0,0,1);
I[39]=new Array();I[39][0]=100;
I[39][1]='';
I[39][2]='0';
I[39][3]=new Array();
I[39][3][0]=new Array('Japan and Russia','Correct.  The Russo-Japanese War was fought from 1904 - 1905.',1,100,1);
I[39][3][1]=new Array('Japan and China','Sorry.  The Sino-Japanese War occurred in 1894-1895.',0,0,1);
I[39][3][2]=new Array('Russia and China','Nope.  These two countries did not go to war.',0,0,1);
I[39][3][3]=new Array('The United States and Spain','Sorry.  This conflict occurred in 1898 and wasn\'t between two Pacific countries.',0,0,1);
I[39][3][4]=new Array('Germany and Great Britain','Nope.  Neither were Pacific countries and were not at war during this time.',0,0,1);
I[40]=new Array();I[40][0]=100;
I[40][1]='';
I[40][2]='0';
I[40][3]=new Array();
I[40][3][0]=new Array('Germany','Right.  Dewey stood his ground against the Germans and threatened to fire on any ship that tired to interfere.',1,100,1);
I[40][3][1]=new Array('Great Britain','Sorry.  That\'s not the one.',0,0,1);
I[40][3][2]=new Array('France','Nope.  Better luck next time.',0,0,1);
I[40][3][3]=new Array('Japan','Nope.  Try again.',0,0,1);
I[40][3][4]=new Array('Russia','Sorry.  Russia wasn\'t involved.',0,0,1);
I[41]=new Array();I[41][0]=100;
I[41][1]='';
I[41][2]='0';
I[41][3]=new Array();
I[41][3][0]=new Array('After World War II','Correct!  They were considered a U.S. possession until then.',1,100,1);
I[41][3][1]=new Array('Just before World War I','Nope.  Later than this.',0,0,1);
I[41][3][2]=new Array('After World War I','Nope.  Later than this.',0,0,1);
I[41][3][3]=new Array('Just before World War II','Nope.  It wasn\'t then.',0,0,1);
I[41][3][4]=new Array('Immediately after the defeat of the Spanish in 1898.','Sorry.  It would be quite some time later before they received full independence.',0,0,1);
I[42]=new Array();I[42][0]=100;
I[42][1]='';
I[42][2]='0';
I[42][3]=new Array();
I[42][3][0]=new Array('Guantanamo Bay','Correct!  This has been an important American naval base ever since.',1,100,1);
I[42][3][1]=new Array('Havana','Sorry.  While Havana was and still is the capital of Cuba, it was not the target of the amphibious raid by the Marines.',0,0,1);
I[42][3][2]=new Array('Cienfuegos','Sorry.  This was a major deep-water port for the Spanish Navy in Cuba, but it was not the site of the U.S. Marine assault.',0,0,1);
I[42][3][3]=new Array('Santiago','Nope.  Santiago was the port chosen by the Spanish Navy to port the majority of their warships during this war, however.',0,0,1);
I[42][3][4]=new Array('Curacao','Nope.  Curacao is not a part of Cuba, but at the time was a Dutch island.  The Spanish fleet stopped there on their way to face the American fleet in Cuba.',0,0,1);
I[43]=new Array();I[43][0]=100;
I[43][1]='';
I[43][2]='0';
I[43][3]=new Array();
I[43][3][0]=new Array('The USS Nashville','Excellent.  The USS Nashville would not allow the Columbian military to land to oppose the rebels.',1,100,1);
I[43][3][1]=new Array('The USS Maine','Sorry.  The USS Maine was the battleship destroyed in the harbor at Havana that sparked the Spanish-American War.',0,0,1);
I[43][3][2]=new Array('The USS Olympia','Sorry.  The cruiser Olympia was Commodore Dewey\'s flagship at the Battle of Manila Bay.',0,0,1);
I[43][3][3]=new Array('The USS Dreadnought','Nope.  The HMS Dreadnought was the first example of a modern battleship when she was launched in 1907.',0,0,1);
I[43][3][4]=new Array('The USS Texas','Nope.  The USS Texas was one of the U.S. Battleships that took part in the Battle of Santiago De Cuba.',0,0,1);
I[44]=new Array();I[44][0]=100;
I[44][1]='';
I[44][2]='0';
I[44][3]=new Array();
I[44][3][0]=new Array('Columbia','Excellent.  Columbia had refused to allow the U.S. to buy out the French contract to build a canal, so the U.S. supported the Panamanian revolutionaries.',1,100,1);
I[44][3][1]=new Array('Spain','Sorry.  It wasn\'t one of Spain\'s possessions at this time in history.',0,0,1);
I[44][3][2]=new Array('Mexico','Nope.  Mexico did not control this area.',0,0,1);
I[44][3][3]=new Array('France','Sorry.  France had worked in this area before attempting to build a canal, but it was under of the control of another country.',0,0,1);
I[44][3][4]=new Array('England','Nope.  England did not have any colonies in the part of the world at this time.',0,0,1);


function StartUp(){
	RemoveBottomNavBarForIE();

//If there's only one question, no need for question navigation controls
	if (QsToShow < 2){
		document.getElementById('QNav').style.display = 'none';
	}
	
//Stash the instructions so they can be redisplayed
	strInstructions = document.getElementById('InstructionsDiv').innerHTML;
	

	

	
	CompleteEmptyFeedback();

	SetUpQuestions();
	ClearTextBoxes();
	CreateStatusArray();
	

	
//Check search string for q parameter
	if (document.location.search.length > 0){
		if (ShuffleQs == false){
			var JumpTo = parseInt(document.location.search.substring(1,document.location.search.length))-1;
			if (JumpTo <= QsToShow){
				ChangeQ(JumpTo);
			}
		}
	}
}

function ShowHideQuestions(){
	FuncBtnOut(document.getElementById('ShowMethodButton'));
	document.getElementById('ShowMethodButton').style.display = 'none';
	if (ShowingAllQuestions == false){
		for (var i=0; i<QArray.length; i++){
				QArray[i].style.display = '';
			}
		document.getElementById('Questions').style.listStyleType = 'decimal';
		document.getElementById('OneByOneReadout').style.display = 'none';
		document.getElementById('ShowMethodButton').innerHTML = ShowOneByOneCaption;
		ShowingAllQuestions = true;
	}
	else{
		for (var i=0; i<QArray.length; i++){
				if (i != CurrQNum){
					QArray[i].style.display = 'none';
				}
			}
		document.getElementById('Questions').style.listStyleType = 'none';
		document.getElementById('OneByOneReadout').style.display = '';
		document.getElementById('ShowMethodButton').innerHTML = ShowAllQuestionsCaption;
		ShowingAllQuestions = false;	
	}
	document.getElementById('ShowMethodButton').style.display = 'inline';
}

function CreateStatusArray(){
	var QNum, ANum;
//For each item in the item array
	for (QNum=0; QNum<I.length; QNum++){
//Check if the question still exists (hasn't been nuked by showing a random selection)
		if (document.getElementById('Q_' + QNum) != null){
			State[QNum] = new Array();
			State[QNum][0] = -1; //Score for this q; -1 shows question not done yet
			State[QNum][1] = new Array(); //answers
			for (ANum = 0; ANum<I[QNum][3].length; ANum++){
				State[QNum][1][ANum] = 0; //answer not chosen yet; when chosen, will store its position in the series of choices
			}
			State[QNum][2] = 0; //tries at this q so far
			State[QNum][3] = 0; //incrementing percent-correct values of selected answers
			State[QNum][4] = 0; //penalties incurred for hints
			State[QNum][5] = ''; //Sequence of answers chosen by number
		}
		else{
			State[QNum] = null;
		}
	}
}



function CheckMCAnswer(QNum, ANum, Btn){
//if question doesn't exist, bail
	if (State[QNum].length < 1){return;}
	
//Get the feedback
	Feedback = I[QNum][3][ANum][1];
	
//Now show feedback and bail if question already complete
	if (State[QNum][0] > -1){
//Add an extra message explaining that the question
// is finished if defined by the user
		if (strQuestionFinished.length > 0){Feedback += '<br />' + strQuestionFinished;}
//Show the feedback
		ShowMessage(Feedback);
		return;
	}
	
//Hide the button while processing
	Btn.style.display = 'none';

//Increment the number of tries
	State[QNum][2]++;
	
//Add the percent-correct value of this answer
	State[QNum][3] += I[QNum][3][ANum][3];
	
//Store the try number in the answer part of the State array, for tracking purposes
	State[QNum][1][ANum] = State[QNum][2];
	State[QNum][5] += String.fromCharCode(65+ANum) + ',';
	
//Should this answer be accepted as correct?
	if (I[QNum][3][ANum][2] < 1){
//It's wrong

//Mark the answer
		Btn.innerHTML = IncorrectIndicator;
		
//Remove any previous score unless exercise is finished (6.0.3.8+)
		if (Finished == false){
			WriteToInstructions(strInstructions);
		}	
		
//Check whether this leaves just one MC answer unselected, in which case the Q is terminated
		var RemainingAnswer = FinalAnswer(QNum);
		if (RemainingAnswer > -1){
//Behave as if the last answer had been selected, but give no credit for it
//Increment the number of tries
			State[QNum][2]++;		
		
//Calculate the score for this question
			CalculateMCQuestionScore(QNum);

//Get the overall score and add it to the feedback
			CalculateOverallScore();
			if ((ContinuousScoring == true)||(Finished == true)){
				Feedback += '<br />' + YourScoreIs + ' ' + Score + '%.';
				WriteToInstructions(YourScoreIs + ' ' + Score + '%.');
			}
		}
	}
	else{
//It's right
//Mark the answer
		Btn.innerHTML = CorrectIndicator;
				
//Calculate the score for this question
		CalculateMCQuestionScore(QNum);

//Get the overall score and add it to the feedback
		if (ContinuousScoring == true){
			CalculateOverallScore();
			if ((ContinuousScoring == true)||(Finished == true)){
				Feedback += '<br />' + YourScoreIs + ' ' + Score + '%.';
				WriteToInstructions(YourScoreIs + ' ' + Score + '%.');
			}
		}
	}
	
//Show the button again
	Btn.style.display = 'inline';
	
//Finally, show the feedback	
	ShowMessage(Feedback);
	
//Check whether all questions are now done
	CheckFinished();
}

function CalculateMCQuestionScore(QNum){
	var Tries = State[QNum][2] + State[QNum][4]; //include tries and hint penalties
	var PercentCorrect = State[QNum][3];
	var TotAns = GetTotalMCAnswers(QNum);
	var HintPenalties = State[QNum][4];
	
//Make sure it's not already complete

	if (State[QNum][0] < 0){
//Allow for Hybrids
		if (HintPenalties >= 1){
			State[QNum][0] = 0;
		}
		else{
//This line calculates the score for this question
			if (TotAns == 1){
				State[QNum][0] = 1;
			}
			else{
				State[QNum][0] = ((TotAns-((Tries*100)/State[QNum][3]))/(TotAns-1));
			}
		}
		if (State[QNum][0] < 0){
			State[QNum][0] = 0;
		}
	}
}

function GetTotalMCAnswers(QNum){
	var Result = 0;
	for (var ANum=0; ANum<I[QNum][3].length; ANum++){
		if (I[QNum][3][ANum][4] == 1){ //This is an MC answer
			Result++;
		}
	}
	return Result;
}

function FinalAnswer(QNum){
	var UnchosenAnswers = 0;
	var FinalAnswer = -1;
	for (var ANum=0; ANum<I[QNum][3].length; ANum++){
		if (I[QNum][3][ANum][4] == 1){ //This is an MC answer
			if (State[QNum][1][ANum] < 1){ //This answer hasn't been chosen yet
				UnchosenAnswers++;
				FinalAnswer = ANum;
			}
		}
	}
	if (UnchosenAnswers == 1){
		return FinalAnswer;
	}
	else{
		return -1;
	}
}





function CalculateOverallScore(){
	var TotalWeighting = 0;
	var TotalScore = 0;
	
	for (var QNum=0; QNum<State.length; QNum++){
		if (State[QNum] != null){
			if (State[QNum][0] > -1){
				TotalWeighting += I[QNum][0];
				TotalScore += (I[QNum][0] * State[QNum][0]);
			}
		}
	}
	if (TotalWeighting > 0){
		Score = Math.floor((TotalScore/TotalWeighting)*100);
	}
	else{
//if TotalWeighting is 0, no questions so far have any value, so 
//no penalty should be shown.
		Score = 100; 
	}
}

function CheckFinished(){
	var FB = '';
	var AllDone = true;
	for (var QNum=0; QNum<State.length; QNum++){
		if (State[QNum] != null){
			if (State[QNum][0] < 0){
				AllDone = false;
			}
		}
	}
	if (AllDone == true){
	
//Report final score and submit if necessary
		CalculateOverallScore();
		FB = YourScoreIs + ' ' + Score + '%.';
		if (ShowCorrectFirstTime == true){
			var CFT = 0;
			for (QNum=0; QNum<State.length; QNum++){
				if (State[QNum] != null){
					if (State[QNum][0] >= 1){
						CFT++;
					}
				}
			}
			FB += '<br />' + CorrectFirstTime + ' ' + CFT + '/' + QsToShow;
		}
		WriteToInstructions(FB);
		
		Finished == true;

		TimeOver = true;
		Locked = true;
		


		Finished = true;
		Detail = '<?xml version="1.0"?><hpnetresult><fields>';
		for (QNum=0; QNum<State.length; QNum++){
			if (State[QNum] != null){
				if (State[QNum][5].length > 0){
					Detail += '<field><fieldname>Question #' + (QNum+1) + '</fieldname><fieldtype>question-tracking</fieldtype><fieldlabel>Q ' + (QNum+1) + '</fieldlabel><fieldlabelid>QuestionTrackingField</fieldlabelid><fielddata>' + State[QNum][5] + '</fielddata></field>';
				}
			}
		}
		Detail += '</fields></hpnetresult>';
		setTimeout('Finish()', SubmissionTimeout);
	}
}










//-->

//]]>


