

//<![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 North was industrial, the South was agricultural. ','Right!  And even though the South\'s economy was mostly agricultural, it was in cotton.  Few areas could support their requirements for food without imports.',1,100,1);
I[0][3][1]=new Array('The North was agricultural, the South was industrial.','Sorry.  It is exactly the opposite.',0,0,1);
I[0][3][2]=new Array('The North was sea commerce, the South was agricultural.','Nope.  Sea commerce was important to both the North and the South, but it wasn\'t the primary factor for either.',0,0,1);
I[0][3][3]=new Array('The North was industrial, the South was on sea commerce.','Nope.  Sea commerce was important to both the North and the South, but it wasn\'t the primary factor for either.',0,0,1);
I[0][3][4]=new Array('Both the North and South were based on agricultural economies, but the South more so.','Nope.  The North had moved on to a different basis for its economy.',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('The election of the Republican candidate to the White House in 1860.','Right!  The election of President Lincoln meant that the anti-slavery Republican party would be in power.',1,100,1);
I[1][3][1]=new Array('The election of the Democratic candidate to the White House in 1860.','Nope.  The Democratic Party split between two candidates and did not win this Presidential election.',0,0,1);
I[1][3][2]=new Array('The attack on Fort Sumter.','Nope.  This wasn\'t a political act and occurred after the Southern states seceded.',0,0,1);
I[1][3][3]=new Array('The admission of Texas into the Union, upsetting the Slave / Anti-Slave State balance.','Sorry.  Texas had already been a p-art of the U.S. for some time before this.',0,0,1);
I[1][3][4]=new Array('The assassination of President Lincoln.','Nope.  This occurred in 1865, after the Civil War.',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('The siege and capture of Fort Sumter.','Correct.  This event in April 1860 marked the start of military action.',1,100,1);
I[2][3][1]=new Array('The siege and capture of Fort Pickens.','Nope.  Fort Pickens in Pensacola, Florida never fell to Southern forces.',0,0,1);
I[2][3][2]=new Array('The first battle of Bull Run.','Nope.  This was the first significant meeting of the Northern and Southern armies, but not the first significant military action of the war.',0,0,1);
I[2][3][3]=new Array('The siege and capture of Fort Taylor.','Nope.  Fort Taylor at Key West, Florida was not captured by Southern forces.',0,0,1);
I[2][3][4]=new Array('The battle of Mobile Bay.','Nope.  This naval battle did not take place until much later in the war.',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('Because it wasn\'t believed the North could fight as one Unit, and Southern Generalship was of high caliber.','Right.  These were two of several factors which convinced some that the South could win.',1,100,1);
I[3][3][1]=new Array('Because the North didn\'t seem interested in keeping the Southern states.','Nope.  The North was very interested in keeping the Southern states.',0,0,1);
I[3][3][2]=new Array('Because the South was self-sufficient for food while the North was not.','nope.  The South was not self-sufficient in food.',0,0,1);
I[3][3][3]=new Array('Because the South could field a much larger Army than the North.','Nope.  The Northern army was always larger than the Southern army.',0,0,1);
I[3][3][4]=new Array('Because the lack of Northern industry meant they couldn\'t equip an army.','Sorry.  One of the North\'s strengths was its heavy industry compared to the South.',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('That it would draw British and French support and recognition for the South.','Right. It didn\'t turn out this way however, as these countries only gave moral support to the Southern cause.',1,100,1);
I[4][3][1]=new Array('That the Southern Navy would fight through the blockades.','Nope.  The South never had a Navy large enough to challenge the Northern Navy.',0,0,1);
I[4][3][2]=new Array('That the Northern Navy would be spread too thin to be effective.','Sorry.  Some thought this would be the case, but it wasn\'t a factor seriously considered by Davis.',0,0,1);
I[4][3][3]=new Array('That the Southern Forts would destroy the Northern Navy.','Nope.  The Northern navy could maintain the blockade out of range of the forts.',0,0,1);
I[4][3][4]=new Array('That the Southern navy would be free to sink unprotected Northern merchant shipping.','Nope.  Although there was some Southern action against Northern merchant shipping, it was insignificant overall.',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('3','Correct.  Very quickly however a shipbuilding program and the  <span lang="en-us"></span>refitting of merchant ships brought this number to 264.',1,100,1);
I[5][3][1]=new Array('189','Nope.  This was the number of harbors and ports the Union had to blockade.',0,0,1);
I[5][3][2]=new Array('264','Sorry.  The North quickly built up to this number of ships but they didn\'t start with this many.',0,0,1);
I[5][3][3]=new Array('100','Nope.',0,0,1);
I[5][3][4]=new Array('84','Sorry.',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('By capturing and holding coaling bases through the use of Amphibious Landings.','Correct.  A number of advanced coaling bases were established this way.',1,100,1);
I[6][3][1]=new Array('By developing underway replenishment techniques.','Nope.  This didn\'t occur until the 20th century.',0,0,1);
I[6][3][2]=new Array('By hiring coaling ships from foreign nations.','Nope.  This never occurred.',0,0,1);
I[6][3][3]=new Array('By mining coal from the sea floor off of the Southern coast.','Nope.  The technology to be able to do this wasn\'t available, even if such deposits existed.',0,0,1);
I[6][3][4]=new Array('They did not need coal because they had sails and wind power.','Sorry.  Steam powered ships of the age needed coal to perform in all conditions.',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('When a U.S. sloop stopped and boarded a British transport on the High Seas, causing an international incident.','Right.  This was a violation of International Law and came close to gaining British support for the South.',1,100,1);
I[7][3][1]=new Array('When a U.S. sloop of war engaged and sank the British transport, HMS Trent.','Nope, the Trent had shots fired across her bow but was not hit or sunk.',0,0,1);
I[7][3][2]=new Array('When the HMS Trent, a British transport, successfully ran the Union blockade.','Nope.  The Trent was not a blockade runner.',0,0,1);
I[7][3][3]=new Array('When the USS Trent sank a British warship carrying southern Ambassadors.','Nope.  The Trent was a British steamship, not a U.S. warship.',0,0,1);
I[7][3][4]=new Array('When the Southern spy, Nicolas Trent, was captured by a Union Sloop while trying to run the Union blockade.','Nope.  No such person existed.',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('The U.S. released the Southern Ambassadors it had taken to British representatives.','Correct.  Swift diplomatic efforts by the U.S. prevented this from being a major victory for the South.',1,100,1);
I[8][3][1]=new Array('Britain declared war on the United States.','Nope.  This never happened.',0,0,1);
I[8][3][2]=new Array('The South paid a tribute to the North and the prisoners were released.','Nope.  No tribute was asked and none paid.',0,0,1);
I[8][3][3]=new Array('The U.S. Navy returned the Trent to British custody.','Nope.  The U.S. Navy only stopped the Trent.  They did not capture it.',0,0,1);
I[8][3][4]=new Array('Through diplomacy, England released the U.S. warship that had fired on the Trent.','Sorry.  England never captured a U.S. warship during the Civil War.',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('Because it was the South\'s largest port.','Correct.  The capture of this port also quieted the voices in France and England to support the South.',1,100,1);
I[9][3][1]=new Array('Because it was where the main Southern Army was located.','Nope.  The main Southern Armies were in the East.',0,0,1);
I[9][3][2]=new Array('Because the Southern Navy was based here.','Nope.  The South never had a main Navy base.',0,0,1);
I[9][3][3]=new Array('Because it was the heart of the South\'s food production area.','Sorry.  New Orleans was an important trading port, not an agriculture center.',0,0,1);
I[9][3][4]=new Array('Because it would act as a beachhead for a Northern invasion of the South from behind.','Nope.  A major thrust by the Union Army from New Orleans was never considered.',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('The Southern Ironclad CSS Virginia.','Right!  This new ironclad was converted from the former USS Merrimack.',1,100,1);
I[10][3][1]=new Array('The Southern Ironclad CSS Monitor.','Nope.  the Monitor was a Northern Ironclad.',0,0,1);
I[10][3][2]=new Array('The new Southern Steamship CSS Congress.','Nope.  The USS Congress was one of the two U.S. Navy ships engaged by the Southern Ironclad CSS Virginia.',0,0,1);
I[10][3][3]=new Array('New and improved-range coastal guns in secret emplacements along the coast.','Nope.  No such guns or plan existed.',0,0,1);
I[10][3][4]=new Array('The use of the first submarine, the CSS Hunley.','Sorry.  The use of the Hunley as a method of attacking the Northern blockade did not happen until some time later.',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('It was the first time Ironclad ships fought in combat.','Correct.  Though an indecisive battle, this showed the importance of ironclad ships to navies.',1,100,1);
I[11][3][1]=new Array('It was the first naval victory for the Southern Navy.','Nope.  this wasn\'t a decisive victory for either side.',0,0,1);
I[11][3][2]=new Array('It ended all further attempts by the South to run the Union blockade.','Nope.  The south continued to attempt to run the blockade for the rest of the war.',0,0,1);
I[11][3][3]=new Array('It marked the first use of rifled guns by naval warships.','Nope.  Rifled naval guns were not developed at this time.',0,0,1);
I[11][3][4]=new Array('It meant that Union forces could land unopposed and capture Richmond.','Nope.  There was never a plan to land and invade Richmond.',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('It gave the Union control of the Mississippi river, cutting the South in half.','Correct.  This cut Southern communications and ended Southern trade along the Mississippi.',1,100,1);
I[12][3][1]=new Array('It was the largest Southern city to fall to the Union forces.','Nope.  Though a large city, it wasn\'t the largest.',0,0,1);
I[12][3][2]=new Array('It gave the agricultural heartland of the South to the Northern forces.','Nope.  Vicksburg was not in the agricultural heartland of the south.',0,0,1);
I[12][3][3]=new Array('The entire Southern Congress was captured.','Nope.  The Southern congress was located in Richmond, Virginia.',0,0,1);
I[12][3][4]=new Array('It showed that an inland military victory could be accomplished by naval forces alone.','Nope.  The Navy supported the Union Army, but it was mainly an Army operation.',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('Gettysburg','Correct.  This was the South\'s last major offensive of the war.',1,100,1);
I[13][3][1]=new Array('Vicksburg','Nope.  This occurred at the same time, but was in the West.',0,0,1);
I[13][3][2]=new Array('New Orleans','Nope.  Although an important victory early in the war, this was not the turning point and was not in the East.',0,0,1);
I[13][3][3]=new Array('Hampton Roads','Nope.  While a significant naval battle because it was the first using ironclads, it was not a major turning point in the war.',0,0,1);
I[13][3][4]=new Array('Antietam ','Sorry.  Antietam was an important early battle in the war, but not the decisive turning point of the war.',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('Davids','Correct.  These had some limited success in several engagements.',1,100,1);
I[14][3][1]=new Array('Hunleys','Nope.  The CSS Hunley was the South\'s attempt at submarine warfare.',0,0,1);
I[14][3][2]=new Array('Ironclads','Nope.  Ironclads were designed to fight with guns, not powder charges on spars.',0,0,1);
I[14][3][3]=new Array('Torpedoes','Nope.  These were early forms of mines.',0,0,1);
I[14][3][4]=new Array('Mines','Nope.  Mines, called Torpedoes at the time, were another form of harassment of the Union blockade ships.',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('The USS Housatonic','Right!  This Union Sloop was the first ship sunk by a submarine.',1,100,1);
I[15][3][1]=new Array('The USS Constitution','Nope.  The USS Constitution never met the CSS Hunley.',0,0,1);
I[15][3][2]=new Array('The USS Constellation','Nope.  The USS Constellation never met the CSS Hunley.',0,0,1);
I[15][3][3]=new Array('The USS Monitor','Nope.  The USS Monitor never met the CSS Hunley.',0,0,1);
I[15][3][4]=new Array('The USS Minnesota','Sorry.  The USS Minnesota was sunk by the CSS Virginia during the battle of Hampton Roads.',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 Declaration of Paris of 1856 had declared privateering illegal and was followed by most of the nations of Europe.','Correct.  This lack of international support hurt privateer efforts.',1,100,1);
I[16][3][1]=new Array('Because there wasn\'t enough Northern shipping to attack.','Nope.  There was a lot of Union shipping available.',0,0,1);
I[16][3][2]=new Array('Because the Northern Navy protected its shipping with strong Naval forces.','Nope.  The Union Navy did not have enough forces to maintain the blockade and run convoys, although efforts to stop privateers and cruisers did draw away some Union naval forces.',0,0,1);
I[16][3][3]=new Array('Privateers were successful and had a major impact on the war','Sorry.  Southern privateers had some effect, but it was never a major factor in the war.',0,0,1);
I[16][3][4]=new Array('Because Jefferson Davis refused to support the use of privateers.','Nope.  Davis always supported and encouraged the use of privateers.',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('To draw away Union ships from Southern blockade duty.','Correct!  This had the effect of weakening the blockade and allowed more blockade runners to get through.',1,100,1);
I[17][3][1]=new Array('Ultimately, the defeat of the Union Navy.','Nope.  This never happened.',0,0,1);
I[17][3][2]=new Array('To draw the European powers into the war on the side of the South.','Sorry.  Southern cruisers did not have this effect.',0,0,1);
I[17][3][3]=new Array('The total destruction of Northern Merchant Marine ships.','Sorry.  While they did cause problems for Northern shipping companies, this wasn\'t the principal effect.',0,0,1);
I[17][3][4]=new Array('Significant damage to the Northern economy.','Nope.  While they did have a limited impact, they did not cause significant economic impact on the North.',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('The CSS Alabama','Right.  This ship captured 71 Union ships over the course of the war.',1,100,1);
I[18][3][1]=new Array('The CSS Virginia','Nope.  This was a southern Ironclad, not a cruiser.',0,0,1);
I[18][3][2]=new Array('The CSS Hunley','Nope.  This was the South\'s submarine.',0,0,1);
I[18][3][3]=new Array('The CSS Sumter','Sorry.  While a successful Southern Cruiser, it was not the most successful.',0,0,1);
I[18][3][4]=new Array('CSS Shenandoah','Nope.  Although successful, particularly against the whaling fleet, it was not the most successful Southern cruiser.',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('She all but destroyed the American whaling industry.','Correct.  Concentrating on Union whaling ships in the Aleutian Islands near Alaska, she had a major impact on the decline of U.S. Whaling. ',1,100,1);
I[19][3][1]=new Array('The breaking of the Union blockade at Charleston in August, 1864.','Sorry.  This never occurred.',0,0,1);
I[19][3][2]=new Array('The collapse of more than 600 Northern shipping companies.','Sorry.  While a large number of northern shipping companies did go out of business, this was due to the combined efforts of the Southern cruisers and the privateers.',0,0,1);
I[19][3][3]=new Array('The Northern Navy forming the 6th Fleet to find and destroy her.','Nope.  This never happened.',0,0,1);
I[19][3][4]=new Array('The CSS Shenandoah was ineffective and had only a few minor victories.','Nope.  The CSS Shenandoah was very effective.',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('Southern Torpedoes (mines)','Correct.  This had the temporary effect of halting the advancing Union Naval forces.',1,100,1);
I[20][3][1]=new Array('Gunfire from Southern forts','Nope.  While the forts did engage the Union Ironclads, they did not sink the Tecumseh.',0,0,1);
I[20][3][2]=new Array('The CSS Hunley','Nope.  The CSS Hunley had already been sunk by this point in the war.',0,0,1);
I[20][3][3]=new Array('Southern Ironclads','Nope.  While Southern Ironclads did engage the Northern Ironclads, they did not  send the Tecumseh.',0,0,1);
I[20][3][4]=new Array('The CSS Shenandoah','Nope.  The CSS Shenandoah was a Southern commerce raider and did not take part in this battle.',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('Because he believed that the mines would be ineffective due to the length of time they had been in the water.','Correct.  Also, he knew that not moving forward would result in his ships taking fire from the Southern forts.',1,100,1);
I[21][3][1]=new Array('Because he had sent in SEALs to deactivate the mines the night before.','Nope.  The SEALs had not been formed at this point in U.S. naval history.',0,0,1);
I[21][3][2]=new Array('Because he knew the location of the minefield and could avoid it.','Nope.  He did not have specific knowledge of the location of the minefield.',0,0,1);
I[21][3][3]=new Array('Because Union spies had cleared the minefield during the night.','Nope. This never happened.',0,0,1);
I[21][3][4]=new Array('Because he believed his Ironclad ships could withstand the impact of the mines.','Sorry.  While sturdy, Ironclads could be destroyed by mines.',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('Fort Fisher was the key to Confederate defenses at the mouth of the Cape Fear River and Wilmington, the last Southern port supporting the Southern Army.','Right.  The fall of this last line of supply meant the ultimate surrender of the Southern Army.',1,100,1);
I[22][3][1]=new Array('It was the Headquarters of General Lee\'s Southern Army.','Nope.  General Lee\'s Army was in the Richmond area.',0,0,1);
I[22][3][2]=new Array('It was the Southern Navy\'s major stronghold in the East.','Nope.  The South did not have a major naval presence here.',0,0,1);
I[22][3][3]=new Array('It contained the South\'s primary supply of gold used to finance the war.','Sorry.  It sounds good but isn\'t true.',0,0,1);
I[22][3][4]=new Array('It was needed as a coaling base for the blockade of Wilmington.','Nope.  It was never used or needed as a coaling base.',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('Mines','Correct.  35 Union ships were lost this way.',1,100,1);
I[23][3][1]=new Array('Costal gun batteries','Nope.  Overall they proved ineffective.',0,0,1);
I[23][3][2]=new Array('Southern Ironclads','Nope.  While there were a number of engagements with Ironclads, they did not cause a large number of Union losses.',0,0,1);
I[23][3][3]=new Array('Davids','Nope.  Davids were effective, but not the most effective method of sinking Union ships.',0,0,1);
I[23][3][4]=new Array('Southern cruisers','Nope.  Cruisers concentrated on merchant shipping and whalers, not on U.S. warships.',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('The USS Red Rover','Correct.  This was a side-wheeler put into service in 1862 at St. Louis on the Mississippi River. ',1,100,1);
I[24][3][1]=new Array('The USS Mercy','Sorry.  While this would later be a hospital ship, it wasn\'t the first.',0,0,1);
I[24][3][2]=new Array('The USS Hope','Sorry.  While this would later be a hospital ship, it wasn\'t the first.',0,0,1);
I[24][3][3]=new Array('The CSS Mercy','Nope.  It was a Union ship, not a Confederate ship.',0,0,1);
I[24][3][4]=new Array('The CSS Comfort','Nope.  It was a Union ship, not a Confederate ship.',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('Jefferson Davis','Right!  He was approved by popular vote on Feb. 22, 1862.',1,100,1);
I[25][3][1]=new Array('Abraham Lincoln','Nope.  But he was a President.',0,0,1);
I[25][3][2]=new Array('Ulysses S. Grant','Nope.  He was a Union General.',0,0,1);
I[25][3][3]=new Array('Robert E. Lee','Nope.  He was a Confederate General.',0,0,1);
I[25][3][4]=new Array('Raphael Semmes','Nope.  He was a successful Confederate Blockade Runner.',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('South Carolina','Right!  And it was here that the first shots of the war, at Fort Sumter, were fired.',1,100,1);
I[26][3][1]=new Array('Virginia','Sorry.  Think south.',0,0,1);
I[26][3][2]=new Array('North Carolina','Sorry.  Think south.',0,0,1);
I[26][3][3]=new Array('Texas','Sorry.  Think north.',0,0,1);
I[26][3][4]=new Array('Georgia','Sorry.  Think north.',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('Robert E. Lee','Correct.  Although he wasn\'t the primary leader at the start of the war, he held this position for most of the war.',1,100,1);
I[27][3][1]=new Array('Ulysses S. Grant','Nope.  Although he did command a large Army.',0,0,1);
I[27][3][2]=new Array('Raphael Semmes','Nope.  All he commanded was a ship!',0,0,1);
I[27][3][3]=new Array('Stonewall Jackson','Sorry.  Jackson was a Confederate General, but he never commanded the main Confederate Army.',0,0,1);
I[27][3][4]=new Array('Jefferson Davis','Sorry.  He was the President of the Confederacy, but not the General in charge of its main Army.',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('Captain Semmes','Correct.  As the Captain of the CSS Alabama, Semmes captured 71 Union ships.',1,100,1);
I[28][3][1]=new Array('Captain Grant','Nope.  Union General.',0,0,1);
I[28][3][2]=new Array('Captain Farragut','Nope.  Union Admiral.',0,0,1);
I[28][3][3]=new Array('Captain Welles','Nope.  Union Secretary of the Navy.',0,0,1);
I[28][3][4]=new Array('Captain Hunley','Nope.  No such person.',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 Merrimack','Right!  Although retreating Union forces tried to burn the Merrimack, she was raised and refitted by the South.',1,100,1);
I[29][3][1]=new Array('The CSS Shenandoah','Nope.  This was a Southern Raider.',0,0,1);
I[29][3][2]=new Array('The USS Red Rover','Nope.  This was a Union Hospital Ship.',0,0,1);
I[29][3][3]=new Array('The USS Housatonic','Nope.  This was the ship sunk by the first submarine, the CSS Hunley.',0,0,1);
I[29][3][4]=new Array('The CSS Hunley','Nope.  The CSS Hunley was the first submarine.',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('Gideon Welles','Right!  Welles continued at that post until the end of Andrew Johnson\u2019s term.',1,100,1);
I[30][3][1]=new Array('Ulysses S. Grant','Nope.  Union General.',0,0,1);
I[30][3][2]=new Array('Raphael Semmes','Nope.  Confederate Raider',0,0,1);
I[30][3][3]=new Array('David Farragut','Nope.  Union Admiral.',0,0,1);
I[30][3][4]=new Array('Gordon Hunley','Nope.  No such person existed.',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('The CSS Hunley','Correct!  She sank the USS Housatonic off Charleston, SC, February 17. 1864.',1,100,1);
I[31][3][1]=new Array('The USS Monitor','Nope.  Union Ironclad.',0,0,1);
I[31][3][2]=new Array('The CSS Virginia','Nope.  Confederate Ironclad.',0,0,1);
I[31][3][3]=new Array('The CSS Shenandoah','Nope.  Confederate Raider.',0,0,1);
I[31][3][4]=new Array('The CSS Alabama','Nope.  Confederate Ironclad.',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('That forts were vulnerable to accurate naval gunfire.','Correct.  The Union Navy was able to reduce a number of forts this way.',1,100,1);
I[32][3][1]=new Array('That Naval gunfire had little effect on forts.','Nope.  Quite the opposite.',0,0,1);
I[32][3][2]=new Array('That sneak attacks and landings were better than naval bombardments.','Nope.  This wasn\'t the case at all.',0,0,1);
I[32][3][3]=new Array('That U.S. Marines and Sailors were not useful in assaults on forts.','Nope.  They were used almost without exception.',0,0,1);
I[32][3][4]=new Array('That not enough ships could be brought to bear on the forts to be effective.','Nope.  Quite the opposite.',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('Molasses','Right.  Most molasses comes from northern states.',1,100,1);
I[33][3][1]=new Array('Tobacco','Nope.  This still is a big cash crop.',0,0,1);
I[33][3][2]=new Array('Indigo','Nope.  This plant was harvested for the blue dye that could be made from it.',0,0,1);
I[33][3][3]=new Array('Cotton','Nope.  Cotton was king in the South.',0,0,1);
I[33][3][4]=new Array('Rice','Nope.  Rice was a major Southern export.',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('David Farragut','Right!  Admiral Farragut\'s ability to make the right decision under pressure proved the difference.',1,100,1);
I[34][3][1]=new Array('Ulysses S. Grant','Nope.  You got the Union part right but the hero part wrong.',0,0,1);
I[34][3][2]=new Array('Robert E. Lee','Nope.  Your looking on the wrong side!',0,0,1);
I[34][3][3]=new Array('Gideon Welles','Nope.  He was the Secretary of the Navy.',0,0,1);
I[34][3][4]=new Array('Raphael Semmes','Nope.  He was a Southern Raider.',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('13th','Right.  Ratification was completed on December 6, 1865. ',1,100,1);
I[35][3][1]=new Array('15th','Nope.  Think lower.',0,0,1);
I[35][3][2]=new Array('9th','Nope.  Think higher.',0,0,1);
I[35][3][3]=new Array('8th','Nope.  Think higher.',0,0,1);
I[35][3][4]=new Array('4th','Nope.  Think higher.',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('George Dixon','Right!  Dixon piloted the Hunley on the night of February 17, 1864 when he and his crew were lost after sinking the Housatonic. ',1,100,1);
I[36][3][1]=new Array('Raphael Semmes','Nope.  Confederate Raider Captain.',0,0,1);
I[36][3][2]=new Array('David Farragut','Nope.  Union Admiral.',0,0,1);
I[36][3][3]=new Array('Gideon Welles','Nope.  Union Secretary of the Navy.',0,0,1);
I[36][3][4]=new Array('Robert E. Lee','Nope.  Confederate General.',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('It succeeded in running the Confederate batteries and destroyed the Confederate guns on the Tennessee side of the Mississippi river.','Right.  This led to the surrender of 7,000 Confederates soldiers on Island #10.',1,100,1);
I[37][3][1]=new Array('It successfully dodged the torpedoes and made it into Mobile Bay.','Nope.  The Carondelet did not participate in this action.',0,0,1);
I[37][3][2]=new Array('It forced the surrender of New Orleans.','Nope.  Never happened.',0,0,1);
I[37][3][3]=new Array('It fought off the CSS Alabama off the Virginia coast.','Nope.  Never happened.',0,0,1);
I[37][3][4]=new Array('It sank the Confederate Raider CSS Alabama.','Nope.  This was done by the USS Kearsarge.',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('England and France','Right!  Both had a trading relationship with the South for cotton.',1,100,1);
I[38][3][1]=new Array('France and Spain','Sorry.  Half right.',0,0,1);
I[38][3][2]=new Array('Spain and England','Sorry.  Half right.',0,0,1);
I[38][3][3]=new Array('Italy and Spain','Sorry.  Completely wrong.',0,0,1);
I[38][3][4]=new Array('England and Portugal','Nope.  Half right.',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('To cut off the South\'s ability to import and export goods.','Right!  This would have the most lasting effect on the South\'s economy and Army.',1,100,1);
I[39][3][1]=new Array('To prevent the Confederate Navy from putting to sea.','Nope.  There was no Confederate Navy.',0,0,1);
I[39][3][2]=new Array('To prevent the Southern Armies from making an amphibious landing in the North.','Nope.  The South did not have that capability.',0,0,1);
I[39][3][3]=new Array('To prevent the English or French from landing reinforcements in the South.','Nope.  This was never contemplated.',0,0,1);
I[39][3][4]=new Array('To keep the new Southern submarines in port.','Nope.  There was only one Southern sub and she went down in action.',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('Appomattox','Right.  In the parlor of Wilmer McLean\'s home.',1,100,1);
I[40][3][1]=new Array('Vicksburg','Nope.  Major battle site, though.',0,0,1);
I[40][3][2]=new Array('Gettysburg','Nope.  Major battle site, though.',0,0,1);
I[40][3][3]=new Array('Bull Run','Nope.  This was the first major battle of the war.',0,0,1);
I[40][3][4]=new Array('Charleston','Nope.  This was where the war started, not ended.',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('1861','Right!  With the opening shots at Fort Sumter on 12 April.',1,100,1);
I[41][3][1]=new Array('1865','Nope.  But it ended in that year.',0,0,1);
I[41][3][2]=new Array('1858','Nope.  Too early.',0,0,1);
I[41][3][3]=new Array('1867','Nope.  Too late.',0,0,1);
I[41][3][4]=new Array('1863','Sorry.  It had already started by 1863.',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('The CSS Shenandoah','Right!  This area was poorly protected by Union warships.',1,100,1);
I[42][3][1]=new Array('The CSS Alabama','Nope.  Right type of ship, wrong area of the world.',0,0,1);
I[42][3][2]=new Array('The CSS Hunley','Nope.  This was a Confederate submarine.',0,0,1);
I[42][3][3]=new Array('The CSS Carondelet','Nope.  This was a Union gunboat.',0,0,1);
I[42][3][4]=new Array('The CSS Virginia','Sorry.  This was a Southern Ironclad.',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 Mississippi River','Right!  The South needed to control this river to allow for food from Texas to make it to the East.',1,100,1);
I[43][3][1]=new Array('The Cape Fear River','Nope.  This river in North Carolina was important, but not of major importance.',0,0,1);
I[43][3][2]=new Array('The Snake River','Nope.  The Snake River didn\'t play a role in the war.',0,0,1);
I[43][3][3]=new Array('The Columbia River','Nope.  This river between Washington and Oregon did not play a significant role in the war.',0,0,1);
I[43][3][4]=new Array('The Potomac River','Nope.  Although an important river separating the two sides, it did not cut through the heartland of the South.',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('"Damn the torpedoes!  Full speed ahead!"','Right.  He needed his ships to keep moving forward and out of the range of the Confederate forts.',1,100,1);
I[44][3][1]=new Array('"You may fire when ready, Gridley."','Nope.  This famous line is out of the Spanish-American War.',0,0,1);
I[44][3][2]=new Array('"I have not yet begun to fight!"','Sorry.  John Paul Jones for this one.',0,0,1);
I[44][3][3]=new Array('"Don\'t Give Up The Ship!"','Nope.  Capt. Lawrence\'s famous words during the war of 1812.',0,0,1);
I[44][3][4]=new Array('"We have met the enemy, and they are ours!"','Sorry.  Oliver Hazard Perry\'s famous words from the Battle of Lake Erie.',0,0,1);
I[45]=new Array();I[45][0]=100;
I[45][1]='';
I[45][2]='0';
I[45][3]=new Array();
I[45][3][0]=new Array('Fort Fisher','Right!  The fall of this fort meant the Southern Army could not get supplies.',1,100,1);
I[45][3][1]=new Array('Fort Monroe','Nope.  This wasn\'t the one.',0,0,1);
I[45][3][2]=new Array('Fort Sumter','Nope.  The war started here, but this fort is in South Carolina.',0,0,1);
I[45][3][3]=new Array('Fort Taylor','Nope.  Fort Taylor never fell to the Confederates.',0,0,1);
I[45][3][4]=new Array('Fort Pickens','Nope.  Fort Pickens never fell to the Confederates.',0,0,1);
I[46]=new Array();I[46][0]=100;
I[46][1]='';
I[46][2]='0';
I[46][3]=new Array();
I[46][3][0]=new Array('The San Jacinto','Correct.  This breach of international law almost caused England to enter the war.',1,100,1);
I[46][3][1]=new Array('The Carondelet','Nope.  This was a Union gunboat during the Mississippi campaign. ',0,0,1);
I[46][3][2]=new Array('The Shenandoah','Sorry.  This was a Confederate Raider.',0,0,1);
I[46][3][3]=new Array('The Alabama','Sorry.  This was a Confederate Raider.',0,0,1);
I[46][3][4]=new Array('The Hartford','Nope.  This was Admiral Farragut\'s flagship during the Battle of Mobile Bay.',0,0,1);
I[47]=new Array();I[47][0]=100;
I[47][1]='';
I[47][2]='0';
I[47][3]=new Array();
I[47][3][0]=new Array('Franklin Buchanan','Right!  He had tendered his resignation from the US Navy on April 22, 1861.',1,100,1);
I[47][3][1]=new Array('Raphael Semmes','Nope.  He was a Southern Raider.',0,0,1);
I[47][3][2]=new Array('John Worden','Nope.  He was the Union Commander of the USS Monitor.',0,0,1);
I[47][3][3]=new Array('Gideon Welles','Nope.  He was the Union Secretary of the Navy.',0,0,1);
I[47][3][4]=new Array('David Farragut','Nope.  He was a Union Admiral.',0,0,1);
I[48]=new Array();I[48][0]=100;
I[48][1]='';
I[48][2]='0';
I[48][3]=new Array();
I[48][3][0]=new Array('John Dahlgren','Correct.  His efforts proved that forts could be reduced by naval gunfire.',1,100,1);
I[48][3][1]=new Array('James Mason','Nope.  He was a Confederate ambassador.',0,0,1);
I[48][3][2]=new Array('John Slidell','Nope.  He was a Confederate ambassador.',0,0,1);
I[48][3][3]=new Array('Charles Wilkes','Sorry.  He was the Captain of the Union sloop San Jacinto that stopped the British steamship Trent and touched off an international incident.',0,0,1);
I[48][3][4]=new Array('Gideon Welles','Nope.  He was the Union Secretary of the Navy.',0,0,1);
I[49]=new Array();I[49][0]=100;
I[49][1]='';
I[49][2]='0';
I[49][3]=new Array();
I[49][3][0]=new Array('To drive up the price for later sale to blockade runners.','Right.  Also because of the affect he hoped it would have in bringing England into the war on the South\'s side.',1,100,1);
I[49][3][1]=new Array('To make more money selling it to the Union Forces.','Nope.  They were fighting each other, not trading.',0,0,1);
I[49][3][2]=new Array('To hurt the British and French economies.','Nope.   This wasn\'t his goal.',0,0,1);
I[49][3][3]=new Array('To ensure that the Southern Armies had enough for uniforms.','Nope.  This wasn\'t a consideration.',0,0,1);
I[49][3][4]=new Array('Davis did not place an embargo on cotton at the start of the war.','Sorry.  He did.',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);
	}
}










//-->

//]]>


