

//<![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();
	
	SetFocusToTextbox();
}

function SetFocusToTextbox(){
//if there's a textbox, set the focus in it
	if (QArray[CurrQNum].getElementsByTagName('input')[0] != null){
		QArray[CurrQNum].getElementsByTagName('input')[0].focus();
	}
	else{
  	if (QArray[CurrQNum].getElementsByTagName('textarea')[0] != null){
  		QArray[CurrQNum].getElementsByTagName('textarea')[0].focus();	
		}
	}
}

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 = '';
//Undocumented function added 10/12/2004
	ShowSpecialReadingForQuestion();
	SetQNumReadout();
	SetFocusToTextbox();
}

var HiddenReadingShown = false;
function ShowSpecialReadingForQuestion(){
//Undocumented function for showing specific reading text elements which change with each question
//Added on 10/12/2004
	if (document.getElementById('ReadingDiv') != null){
		if (HiddenReadingShown == true){
			document.getElementById('ReadingDiv').innerHTML = '';
		}
		if (QArray[CurrQNum] != null){
			var Children = QArray[CurrQNum].childNodes;
			for (var i=0; i<Children.length; i++){
			if (Children[i].className=="HiddenReading"){
					document.getElementById('ReadingDiv').innerHTML = Children[i].innerHTML;
					HiddenReadingShown = true;
//Hide the ShowAllQuestions button to avoid confusion
					if (document.getElementById('ShowMethodButton') != null){
						document.getElementById('ShowMethodButton').style.display = 'none';
					}
				}
			}	
		}
	}
}

function SetQNumReadout(){
	document.getElementById('QNumReadout').innerHTML = (CurrQNum+1) + ' / ' + QArray.length;
	if ((CurrQNum+1) >= QArray.length){
		if (document.getElementById('NextQButton') != null){
			document.getElementById('NextQButton').style.visibility = 'hidden';
		}
	}
	else{
		if (document.getElementById('NextQButton') != null){
			document.getElementById('NextQButton').style.visibility = 'visible';
		}
	}
	if (CurrQNum <= 0){
		if (document.getElementById('PrevQButton') != null){
			document.getElementById('PrevQButton').style.visibility = 'hidden';
		}
	}
	else{
		if (document.getElementById('PrevQButton') != null){
			document.getElementById('PrevQButton').style.visibility = 'visible';
		}
	}
}

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('There were drastic reductions in all of the Armed Forces.','Right.  From a wartime high of over 8 million, the Services dropped to below 600,000 by 1950.',1,100,1);
I[0][3][1]=new Array('They remained at roughly the same numbers, but equipment wasn\'t replaced.','Nope.  The numbers did not remain the same.',0,0,1);
I[0][3][2]=new Array('They had a slight reduction in numbers and older equipment was eliminated.','Nope.  The reductions that were made were not slight.',0,0,1);
I[0][3][3]=new Array('There was a significant increase in the Armed Forces to cope with occupation duty in Germany and Japan.','Nope.  These duties were taken on by our Armed Forces, but the numbers did not increase.',0,0,1);
I[0][3][4]=new Array('They remained roughly the same in numbers and more modern equipment was added.','Nope.  The numbers did not remain the same.',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('Diplomatic protest or the use of the Atomic Bomb.','Right.  Our conventional forces were so small we couldn\'t fight a conventional war against the Soviet Union.',1,100,1);
I[1][3][1]=new Array('Atomic warfare or conventional warfare.','Nope.  Conventional warfare was out of the question given the small size of our remaining Armed Forces.',0,0,1);
I[1][3][2]=new Array('Diplomatic protest or conventional warfare.','Nope.  Conventional warfare was out of the question given the small size of our remaining Armed Forces.',0,0,1);
I[1][3][3]=new Array('Take over countries ourselves or stop the Soviet takeovers.','Sorry.  It was never our policy to take over countries after  War II.',0,0,1);
I[1][3][4]=new Array('Diplomatic protest or a veto in the United Nations.','Sorry.  There was one military option.',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 Air Force','Right.  Since only the Air force bombers of that time could carry nuclear weapons, they believed they would be the first to carry any future war to the enemy.',1,100,1);
I[2][3][1]=new Array('The Navy','Nope.  The Navy\'s position was that all of the Services would be needed.',0,0,1);
I[2][3][2]=new Array('The Army','Nope.  Although this view came from a part of the Army at that time.',0,0,1);
I[2][3][3]=new Array('The Marine Corps','Nope.  The Marine Corps was fighting just to remain a separate Service at this time.',0,0,1);
I[2][3][4]=new Array('The Coast Guard','Nope.  The Coast Guard did not attempt to become the nations new first line of defense.',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('The National Security Act','Correct.  This Act also kept the Navy\'s Aircraft Carriers under the Navy and gave permanent status to the U.S. Marine Corps.',1,100,1);
I[3][3][1]=new Array('The Defense Unification Act','Nope.  This wasn\'t the Act\'s name.',0,0,1);
I[3][3][2]=new Array('The Defense Department Act','Nope.  This wasn\'t the Act\'s name.',0,0,1);
I[3][3][3]=new Array('The Defense Security Act','Nope.  This wasn\'t the Act\'s name.',0,0,1);
I[3][3][4]=new Array('The Homeland Defense Act','Nope.  This wasn\'t the Act\'s name.',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('containment.','Right.  U.S. policy was aimed at preventing the expansion of Soviet Communism.',1,100,1);
I[4][3][1]=new Array('harassment.','Nope.  The Soviets might have thought it was harassment, but that wasn\'t the name.',0,0,1);
I[4][3][2]=new Array('embarrassment.','Nope.  This wasn\'t the name of the policy.',0,0,1);
I[4][3][3]=new Array('confrontation.','Nope.  Although the policy did lead to confrontation at times, this wasn\'t its name.',0,0,1);
I[4][3][4]=new Array('diplomacy.','Nope.  This wasn\'t the name of the policy.',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('Soviet attempts to undermine the governments of Greece and Turkey.','Right.  The 6th Fleet was deployed to the Mediterranean Sea as a show of force.  It is still based there today.',1,100,1);
I[5][3][1]=new Array('Soviet annexation of Eastern Poland.','Nope.  This did not start these deployments.',0,0,1);
I[5][3][2]=new Array('Soviet expansion moves in Northern Iran.','Nope.  Although important in shaping the overall policy, this did not cause the 6th Fleet to be deployed.',0,0,1);
I[5][3][3]=new Array('Soviet aid and expansion into North Korea.','Sorry.  this would bring about the Korean War, but did not cause the deployment of the 6th Fleet.',0,0,1);
I[5][3][4]=new Array('Soviet aid to the communist forces in China.','Nope.  This event was unrelated to the deployment of the 6th Fleet.',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('The Marshall Plan','Correct.  Named after then Secretary of State George Marshall.',1,100,1);
I[6][3][1]=new Array('The Truman Doctrine','Sorry.  This Doctrine dealt with stopping Soviet expansionism in Europe.',0,0,1);
I[6][3][2]=new Array('The International Relief Fund','Nope.  No such fund existed at this time.',0,0,1);
I[6][3][3]=new Array('The United Nations Fund','Nope.  No such fund existed at this time.',0,0,1);
I[6][3][4]=new Array('The North Atlantic Treaty Organization (NATO)','Nope.  NATO was created for the military defense of Western Europe, not for relief and reconstruction.',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 Berlin Blockade and the Soviet-sponsored communist takeover in Czechoslovakia.','Right.  The NATO Alliance was seen as Europe\'s only hope to stop the Soviet expansion.',1,100,1);
I[7][3][1]=new Array('The Berlin blockade and the annexation of Eastern Poland by the Soviet Union.','Nope.  The annexation had occurred a few years earlier.',0,0,1);
I[7][3][2]=new Array('The Soviet-sponsored revolutions in Greece and Turkey.','Nope.  This caused the deployment of the U.S. 6th fleet, not the creation of NATO.',0,0,1);
I[7][3][3]=new Array('The Soviet incursions into Greece and Northern Iran.','Nope.  It wasn\'t these events that led to the creation of NATO.',0,0,1);
I[7][3][4]=new Array('The Soviet support of the communist Chinese and the North Koreans.','Nope.  It wasn\'t these events that led to the creation of NATO.',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 Warsaw Pact','Correct.  This was also known as the Eastern European Mutual Assistance Treaty.',1,100,1);
I[8][3][1]=new Array('The Soviet Union','Nope.  The Soviet Union had been in existence for many years.',0,0,1);
I[8][3][2]=new Array('The CCCP','Sorry.  This is simply the Russian spelling of USSR, or the Union of Soviet Socialist Republics.  What we called the Soviet Union.',0,0,1);
I[8][3][3]=new Array('The USSR','Nope.  This is the Union of Soviet Socialist Republics.  What we called the Soviet Union.',0,0,1);
I[8][3][4]=new Array('The Russian Federation','Sorry.  The Russian Federation was created after the fall of the  Soviet Union, in the early 1990\'s.',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('Belgium','Correct.  The NATO Headquarters in Brussels is the political headquarters of the Alliance.',1,100,1);
I[9][3][1]=new Array('New York','Nope.  It isn\'t in the U.S.',0,0,1);
I[9][3][2]=new Array('London','Nope.  It isn\'t in England.',0,0,1);
I[9][3][3]=new Array('Paris','Nope.  It isn\'t in France',0,0,1);
I[9][3][4]=new Array('Switzerland','Nope.  The Swiss have prided themselves on being neutral for many years and so would not host such an organization.',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 Communist forces defeated the Nationalist forces.','Correct.  Supported by the Soviet Union, the Communist Chinese forces drove the Nationalist forces off of the  Chinese mainland.',1,100,1);
I[10][3][1]=new Array('The Nationalist forces defeated the Communist forces.','Nope.  The Nationalist forces lost the conflict.',0,0,1);
I[10][3][2]=new Array('The Soviet Union invaded and drove out the Nationalist forces.','Nope.  Soviet troops did not invade China.',0,0,1);
I[10][3][3]=new Array('The North Koreans invaded and drove out the Nationalist forces.','Nope.  North Korean troops were not involved.',0,0,1);
I[10][3][4]=new Array('Democratic elections brought the Communist Party to power.','Nope.  There were no democratic elections in China, then or now.',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('The Potsdam Conference','Correct.  This dividing line was established prior to the end of World War II.',1,100,1);
I[11][3][1]=new Array('The Truman Conference','Nope.  No such conference was ever held.',0,0,1);
I[11][3][2]=new Array('The Yalta Conference','Nope.  Korea was not discussed at the Yalta Conference.',0,0,1);
I[11][3][3]=new Array('The Tokyo Conference','Nope.  No such conference was ever held.',0,0,1);
I[11][3][4]=new Array('The United Nations Conference of 1946','Nope.  No such conference was ever held.',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('The South had the U.S. and the North the Soviet Union.','Right.  The forms of government in each country reflected that of the country that supported them.',1,100,1);
I[12][3][1]=new Array('The South had the Soviet Union and the North the U.S.','Nope.  The North was communist and not supported by the U.S.',0,0,1);
I[12][3][2]=new Array('The South had the U.S. and the North had Nationalist China.','Sorry.  The Nationalist Chinese were defeated by the Communist Chinese and were forced onto the island of Taiwan.  They supported the U.S. and South Korea.',0,0,1);
I[12][3][3]=new Array('The South had the Chinese and the North had the Soviet Union.','Nope.  China was not a major nation and did not support South Korea.',0,0,1);
I[12][3][4]=new Array('The South had the Soviet Union and the North had the Chinese.','Nope.  China was not a major nation and the Soviet Union did not support South Korea.',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('North Korean forces invaded South Korea.','Correct.  The North Koreans believed that the U.S. did not consider South Korea important enough to respond.',1,100,1);
I[13][3][1]=new Array('Fidel Castro came to power in Cuba.','Nope.  This happened much later.',0,0,1);
I[13][3][2]=new Array('The Soviet Union annexed Eastern Poland','Nope.  This happened right after World War II.',0,0,1);
I[13][3][3]=new Array('The Chinese Communist forces defeated the Nationalist Chinese forces.','Nope.  This happened in 1949.',0,0,1);
I[13][3][4]=new Array('The Truman Doctrine was issued.','Nope.  The Truman Doctrine was issued a few years before this.',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('The Soviets were boycotting the UN Security Council at the time.','Right.  Because they wouldn\'t attend, they couldn\'t use their veto to stop UN military action.',1,100,1);
I[14][3][1]=new Array('The U.S. threatened to use an atomic bomb against the Soviet Union unless they agreed to the action.','Nope.  This never happened.',0,0,1);
I[14][3][2]=new Array('The U.S. challenged the Soviet Union off of the Security Council for that session.','Nope.  The U.S. couldn\'t do this.',0,0,1);
I[14][3][3]=new Array('They paid the Soviet Union a large sum of money not to use their veto.','Nope.  This did not happen.',0,0,1);
I[14][3][4]=new Array('The U.S. had a two-thirds majority and was able to override the Soviet Union\'s veto.','Nope.  It doesn\'t work that way with a UN Security Council veto.  You can\'t override it.',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('Operation Chromite','Right.  This daring end run quickly had the North Korean Army defeated.',1,100,1);
I[15][3][1]=new Array('Operation Torch','Nope.  This was the code name for the World War II North African landings.',0,0,1);
I[15][3][2]=new Array('Operation Doomsday','Nope.  This was the code name to be used for the planned landings on the main islands of Japan in World War II.  It was never used.',0,0,1);
I[15][3][3]=new Array('Operation Overlord','Nope.  This was the code name for the Normandy landings in World War II.',0,0,1);
I[15][3][4]=new Array('Operation Pusan','Nope.  There was never such an Operation.',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 high tides at Inchon.','Right.  Inchon has some of the highest tide ranges in the world.',1,100,1);
I[16][3][1]=new Array('It was heavily defended.','Nope.  Overall there was only light defenses at Inchon.',0,0,1);
I[16][3][2]=new Array('The lack of available amphibious landing equipment.','Nope.  Enough equipment was available for the landings.',0,0,1);
I[16][3][3]=new Array('The lack of naval gunfire or air strikes to achieve surprise.','Nope.  There was no lack of naval gunfire support or air support for the operation.',0,0,1);
I[16][3][4]=new Array('It was an obvious place for a landing and we would not have the element of surprise.','Sorry.  It was though that Inchon would be a highly unlikely place to try an amphibious landing.',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('Chinese Communist Armies came across the border in support of the North Koreans.','Right.  Over 200,000 Chinese troops came across in support of the North Koreans.',1,100,1);
I[17][3][1]=new Array('Soviet Army forces came across the border in support of the North Koreans.','Nope.  Regular Soviet Army forces never participated.',0,0,1);
I[17][3][2]=new Array('North Korean forces made an amphibious landing inside the Pusan perimeter.','Nope.  This never happened.',0,0,1);
I[17][3][3]=new Array('The North Korean Army surrendered.','Nope.  This didn\'t happen.',0,0,1);
I[17][3][4]=new Array('President Truman fired General MacArthur.','Nope.  This didn\'t happen until later.',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('For insubordinate remarks made by MacArthur in a letter to a Congressman.','Right.  President Truman felt that General MacArthur had violated an order requiring him to clear information to Congress prior to its being released.',1,100,1);
I[18][3][1]=new Array('Because he could not defeat the North Koreans.','Nope.  General MacArthur\'s strategic and tactical abilities were always outstanding.',0,0,1);
I[18][3][2]=new Array('Because his actions had brought the Chinese into the war.','Nope.  MacArthur\'s actions did not cause this.',0,0,1);
I[18][3][3]=new Array('Because he would not fight the war in the way Truman wanted.','Nope.  His relief had nothing to do with his military actions.',0,0,1);
I[18][3][4]=new Array('For failing to work well with the other Services.','Nope.  This was not the reason for MacArthur\'s relief.',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('The defeat of the French at Dien Bien Phu in 1954.','Correct.  This event changed the political landscape of Southeast Asia.',1,100,1);
I[19][3][1]=new Array('The treaty ending the Korean War.','Nope.  This was not a factor in the partition of Indochina.',0,0,1);
I[19][3][2]=new Array('The Potsdam conference.','Nope.  This was not discussed at the Potsdam Conference.',0,0,1);
I[19][3][3]=new Array('The Pueblo Incident.','Nope.  The Pueblo incident had nothing to do with the partition of Indochina.',0,0,1);
I[19][3][4]=new Array('U.N. Council Resolution 100.','Sorry.  That U.N. Council Resolution has nothing to do with Indochina.',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('A defense treaty signed between the United States and Taiwan.','Right.  The Chinese were not ready to take on the U.S. to regain Taiwan.',1,100,1);
I[20][3][1]=new Array('They were too badly beaten from their fighting in Korea.','Nope.  The Chinese Army was still able to mount such an operation.',0,0,1);
I[20][3][2]=new Array('The death of their leader, Mao Tse Tung.','Nope.  Mao did not die in 1954.',0,0,1);
I[20][3][3]=new Array('Bad weather and old transports prevented Chinese troops from making the landings.','Nope.  This never happened.',0,0,1);
I[20][3][4]=new Array('They did not have an adequate amount of amphibious transport.','Nope.  What they had was old, but it would have been enough.',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('It was the first capture of an American ship on the high seas in over 150 years.','Correct.  The illegal boarding and seizure of the USS Pueblo and her crew was another sign to the world of the nature of the North Korean government.',1,100,1);
I[21][3][1]=new Array('It was the last time an American warship would be attacked in the 20th century.','Nope.  There would be several other occasions where U.S. warships would be attacked in the 20th  century.',0,0,1);
I[21][3][2]=new Array('It was the first time an American warship had been attacked in the 20th century.','Nope.  U.S. ships had been attacked countless times in World Wars I and II.',0,0,1);
I[21][3][3]=new Array('It was the first time a U.S. Captain had given up his ship without a fight.','Nope.  This wasn\'t the case.',0,0,1);
I[21][3][4]=new Array('It was the event that started the Korean War.','Nope.  This event happened well after the Korean War.',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('The Forestall Class','Right.  Named after the former Secretary of the Navy and the 1st Secretary of Defense.',1,100,1);
I[22][3][1]=new Array('The Nimitz Class','Nope.  This is the latest class of Aircraft Carriers.',0,0,1);
I[22][3][2]=new Array('The Enterprise Class','Nope.  This was, however, the first nuclear Aircraft Carrier.',0,0,1);
I[22][3][3]=new Array('The Lexington Class','Nope.  This was an earlier class.',0,0,1);
I[22][3][4]=new Array('The Hornet Class','Nope.  This was never a class of Aircraft Carriers.',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('Vertical Envelopment.','Right.  Being able to land Marines behind the enemy beach defenses proved a new and very useful tactic.',1,100,1);
I[23][3][1]=new Array('Rapid resupply of ammunition.','Nope.  This could occur but is not the main tactic.',0,0,1);
I[23][3][2]=new Array('Rapid movement of wounded out of the battle area.','Sorry.  While this is a very important use of helicopters in combat, it is not the major contribution of  helicopters to amphibious warfare.',0,0,1);
I[23][3][3]=new Array('Keeping troops out of the line of enemy fire.','Nope.  Helicopters can be shot down.',0,0,1);
I[23][3][4]=new Array('Allowing Generals to see large portions of the landing area from the sky.','Nope.  This is not a significant contribution.',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('A quarantine of all offensive equipment being shipped to Cuba.','Right.  President Kennedy hoped that this would cause the Soviet Union to dismantle and ship the missiles home.  He was right.',1,100,1);
I[24][3][1]=new Array('An amphibious operation against the missile storage facilities and missile sites.','Nope.  This never happened.',0,0,1);
I[24][3][2]=new Array('A formal protest in the United Nations.','Sorry.  The U.S. action was stronger than this.',0,0,1);
I[24][3][3]=new Array('A blockade of Soviet ports around the world.','Nope.  This never happened.',0,0,1);
I[24][3][4]=new Array('The mining of several major Cuban ports.','Nope.  This never happened.',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('The Tonkin Gulf incident.','Right.  It is still debated whether the North Vietnamese actually attacked the U.S. destroyers, but this event marked the beginning for active U.S. involvement in the war.',1,100,1);
I[25][3][1]=new Array('The French defeat at Dien Bien Phu.','Nope.  This occurred much earlier.',0,0,1);
I[25][3][2]=new Array('The assassination of Ho Chi Minh.','Nope.  This never happened.',0,0,1);
I[25][3][3]=new Array('The military coup in South Vietnam in 1963.','Nope.  Although the U.S. had advisors in the country at the time, this was not the even which brought the U.S. in on a major scale.',0,0,1);
I[25][3][4]=new Array('The Tet Offensive.','Nope.  The U.S. was already involved by this time.',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('5','Correct.  Naval Air strikes made a significant impact on the ground war.',1,100,1);
I[26][3][1]=new Array('8','Nope.  Try again.',0,0,1);
I[26][3][2]=new Array('3','Nope.  Try again.',0,0,1);
I[26][3][3]=new Array('2','Nope.  Try again.',0,0,1);
I[26][3][4]=new Array('10','Nope.  Try again.',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 mining of Haiphong Harbor.','Right.  Unable to get their resupply through this port, the North Vietnamese realized they had to sue for peace and get the mines cleared before once again attacking the South.',1,100,1);
I[27][3][1]=new Array('The bombing of Hanoi.','Nope. This had been done several times and failed to convince the North Vietnamese to negotiate.',0,0,1);
I[27][3][2]=new Array('The naval blockade of North Vietnam.','Nope.  No such blockade was ever enforced.',0,0,1);
I[27][3][3]=new Array('The sinking of the North Vietnamese Navy.','Nope.  The North Vietnamese had no Navy.',0,0,1);
I[27][3][4]=new Array('The naval bombardment of Haiphong Harbor.','Nope.  This did not take place.',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('The SS Mayaguez','Correct.  Disabled, she was seized in international waters.',1,100,1);
I[28][3][1]=new Array('The USS Maddox','Sorry.  This was the ship attacked in the Tonkin Gulf incident.',0,0,1);
I[28][3][2]=new Array('The SS Minnow','Nope.  This was the name of the boat in Gilligan\'s Island.',0,0,1);
I[28][3][3]=new Array('The USS Pueblo','Nope.  This was the ship seized in 1968 by the North Koreans.',0,0,1);
I[28][3][4]=new Array('The SS Albany','Nope.  This ship was never seized by the Khmer Rouge.',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('To end the state-sponsored drug smuggling of its dictator, General Manuel Noriega.','Correct.  Noriega had been defeated in elections earlier, but had refused to step down.',1,100,1);
I[29][3][1]=new Array('Because they had closed the Panama Canal.','Nope.  This didn\'t happen.',0,0,1);
I[29][3][2]=new Array('Because the government of Panama had thrown out U.S. military personnel stationed there.','Sorry.  U.S. troops and a base were there, but they were not thrown out.',0,0,1);
I[29][3][3]=new Array('Because of plans the U.S. had captured that showed that Panama planned to invade the U.S.','Nope.  This never happened.',0,0,1);
I[29][3][4]=new Array('Because of an impending communist takeover.','Nope.  There was no impending communist takeover.',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('In retaliation for continuing threats and several Libyan-sponsored terrorist acts against U.S. citizens in Europe.','Right.  Libya had been behind a number of terrorist acts against U.S. citizens and had challenged the right of the U.S. Navy to operate in the Gulf of Sidra.',1,100,1);
I[30][3][1]=new Array('Because the Libyans had shot down a U.S. fighter.','Nope.  This didn\'t happen.  U.S. F-14 fighters had shot down two Libyan fighters.',0,0,1);
I[30][3][2]=new Array('Because the Libyans had captured two U.S. merchant ships.','Nope.  This never happened.',0,0,1);
I[30][3][3]=new Array('Because the Libyans had tried to attack U.S. Navy ships operating in the Gulf of Sidra.','Sorry.  They did unsuccessfully attempt to attack U.S. naval ships, but had their ships sunk instead.  this wasn\'t what caused the U.S. to bomb Libya.',0,0,1);
I[30][3][4]=new Array('Libyan terrorist attacks against the World Trade Center.','Nope.  This never happened.',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 failure of its economy.','Right.  The Soviet communist model could not compete with the capitalistic model of the West.',1,100,1);
I[31][3][1]=new Array('The failure of its military.','Nope.  The Soviet Union always had a strong military.',0,0,1);
I[31][3][2]=new Array('The people had had enough with communism.','Nope.  The Russian people have always been long-suffering and would have continued under the communist model.',0,0,1);
I[31][3][3]=new Array('Through the direct military action of the United States.','Nope.  The U.S. never directly fought the Soviet Union in major action during the Cold War.',0,0,1);
I[31][3][4]=new Array('There were no more communist leaders to keep it going.','Nope.  There were plenty of communists in Russia then and now.',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('James Forrestal','Correct.  He had previously been the Secretary of the Navy.',1,100,1);
I[32][3][1]=new Array('Chester Nimitz','Sorry.  Admiral Nimitz was the CNO following World War II.',0,0,1);
I[32][3][2]=new Array('George Keenan','Nope.  Keenan was a prominent American diplomat stationed in Moscow who coined the phrase "containment".',0,0,1);
I[32][3][3]=new Array('Harry Truman','Nope.  Truman was the President during this time.',0,0,1);
I[32][3][4]=new Array('Dwight Eisenhower','Sorry.  Eisenhower was many things, but not ever the Secretary of Defense.',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 Truman Doctrine','Excellent.  President Truman formally announced this policy to Congress in March 1947.',1,100,1);
I[33][3][1]=new Array('The Marshall Plan','Nope.  The Marshall Plan  was the name of the European Recovery program announced by President Truman following World War II.',0,0,1);
I[33][3][2]=new Array('The Forrestal Initiative','Sorry.  There was no such initiative.',0,0,1);
I[33][3][3]=new Array('The Nimitz Charter','Nope.  There was no such charter.',0,0,1);
I[33][3][4]=new Array('The United Nations','Sorry.  The United Nations is an organization and not a U.S. policy.',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('Naval gunfire and carrier air strikes.','Correct.  This created a "no-man\'s land" around the Hungnam defense perimeter.',1,100,1);
I[34][3][1]=new Array('South Korean counterattacks.','Nope.  The South Koreans did not have the forces to launch a counterattacks.',0,0,1);
I[34][3][2]=new Array('A retreat by the Chinese forces.','Sorry.  This did not happen.',0,0,1);
I[34][3][3]=new Array('The greater mobility of the UN forces.','Nope.  This was not the reason for the orderly withdrawal.',0,0,1);
I[34][3][4]=new Array('Large minefields placed in front of the Chinese forces.','Sorry.  This was not the case.',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('Vice Admiral Hyman Rickover','Correct.  For 40 years he led the Navy\'s development of nuclear submarines.',1,100,1);
I[35][3][1]=new Array('Admiral King','Nope.  Admiral King was out of the Navy by the time Nuclear Submarines and ships were envisioned.',0,0,1);
I[35][3][2]=new Array('Admiral Turner Joy','Nope.  Admiral Joy was the U.S. Admiral who played a key role in the Korean War and post-war negotiations.',0,0,1);
I[35][3][3]=new Array('Admiral Nimitz','Sorry.  Admiral Nimitz was the CNO at the start of the push for a Nuclear Navy, but was not considered the "Father of the Nuclear Navy".',0,0,1);
I[35][3][4]=new Array('Vice Admiral Halsey','Nope.  Vice Admiral Halsey was out of the Navy by the time Nuclear Power was being considered for the Navy.',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('The USS Maddox','Correct.  One of the patrol boats was damaged and left dead in the water.',1,100,1);
I[36][3][1]=new Array('The USS Turner Joy','Nope.  The USS Turner Joy may have been attacked the following night, however.',0,0,1);
I[36][3][2]=new Array('The USS Ticonderoga','Nope.  However, the USS Ticonderoga was in the area when the attack  occurred.',0,0,1);
I[36][3][3]=new Array('The USS South Vietnam','Sorry.  There was never a U.S. destroyer by that name.',0,0,1);
I[36][3][4]=new Array('The USS Charleston','Nope.  There was never a U.S. destroyer by that name.',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('Sea Commandos','Excellent.  These were considered some of the most professional and effective South Vietnamese forces.',1,100,1);
I[37][3][1]=new Array('SEALs','Sorry.  SEALS are U.S. Naval Special Forces.',0,0,1);
I[37][3][2]=new Array('Force Recon','Sorry.  Force Recon is a name given to USMC special forces.',0,0,1);
I[37][3][3]=new Array('Viet Cong','Nope.  These were rebel forces aligned with the North Vietnamese.',0,0,1);
I[37][3][4]=new Array('SAS','Nope.  This is the term for British special forces.',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('Haiphong','Right!  This deep-water port was a critical life line of support for the North Vietnamese war effort.',1,100,1);
I[38][3][1]=new Array('Hanoi','Nope.  Hanoi is not a seaport.',0,0,1);
I[38][3][2]=new Array('Saigon','Nope.  Saigon was a city in South Vietnam.',0,0,1);
I[38][3][3]=new Array('Danang','Sorry.  Danang was a U.S. base in South Vietnam.',0,0,1);
I[38][3][4]=new Array('Hue','Sorry.  Hue was a provincial capital in South Vietnam.',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('Admiral Zumwalt','Excellent!  Always controversial, he modernized the Navy and brought it into line with modern organizational theory.',1,100,1);
I[39][3][1]=new Array('Admiral King','Nope.  This happened long after Admiral King\'s tour as the CNO.',0,0,1);
I[39][3][2]=new Array('Admiral Nimitz','Sorry.  This happened long after Admiral Nimitz\'s tour as CNO.',0,0,1);
I[39][3][3]=new Array('Admiral Rickover','Nope.  Vice Admiral Rickover was never the CNO.',0,0,1);
I[39][3][4]=new Array('Admiral Anderson','Sorry.  Admiral Anderson was the CNO during the Cuban Missile Crisis.',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('Operation Just Cause','Excellent.  This was the largest U.S. military operation in the 1980s.',1,100,1);
I[40][3][1]=new Array('Operation Earnest Will','Sorry.  This was the operation to escort reflaged Kuwaiti oil tankers into and out of the Persian Gulf.',0,0,1);
I[40][3][2]=new Array('Operation Downfall','Nope.  This was the code name for the invasion of the Japanese home islands during World War II.',0,0,1);
I[40][3][3]=new Array('Operation Desert Storm','Nope.  This was the code name of the operation to retake Kuwait from Iraq.',0,0,1);
I[40][3][4]=new Array('The Iran-Contra affair','Sorry.  This was the name given to the U.S. effort to gain money to support the Contra rebels in Nicaragua by selling arms to Iran.',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('The USS Vincennes','Correct.  The airliner did not respond to international radio calls warning it to change its course.',1,100,1);
I[41][3][1]=new Array('The USS Samuel B. Roberts','Sorry.  The Roberts was the U.S. ship that struck a mine in the Gulf and was gravely damaged.',0,0,1);
I[41][3][2]=new Array('The USS Stark','Sorry.  The Stark was the U.S. frigate which was hit by two Iraqi Exocet missiles.',0,0,1);
I[41][3][3]=new Array('The USS Fox','Nope.  The Fox was not involved in this incident.',0,0,1);
I[41][3][4]=new Array('The USS Ticonderoga','Nope.  The Ticonderoga was not involved in this incident.',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 Iron Curtain','Correct.  Winston Churchill used this term during a speech at Westminster College in Fulton, Missouri in March 1946.',1,100,1);
I[42][3][1]=new Array('The Berlin Wall','Nope.  This was an actual thing, not a term.',0,0,1);
I[42][3][2]=new Array('The Cold War','Sorry.  It sounds right, but Winston Churchill did not come up with this term.',0,0,1);
I[42][3][3]=new Array('The Sino-Soviet Conflict','Nope.  This isn\'t the term.',0,0,1);
I[42][3][4]=new Array('Class Warfare','Nope.  This isn\'t the term.',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('Nuclear ballistic missile submarines','Correct. The first version of this type of submarine carried Polaris missiles.',1,100,1);
I[43][3][1]=new Array('Hunter-killer attack submarines','Nope.  This was not a new kind of submarine introduced in the 1950s.',0,0,1);
I[43][3][2]=new Array('Trident submarines','Nope.  This class of subs came much later.',0,0,1);
I[43][3][3]=new Array('Poseidon submarines','Nope.  This class of subs came later.',0,0,1);
I[43][3][4]=new Array('Los Angeles class attack submarines','Nope.  This class of attack subs came much later.',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('The Brown Water Navy','Right.  Traditional Navy ships had been considered "Blue Water navy" ships.',1,100,1);
I[44][3][1]=new Array('The River Rats','Nope.  Sounds good but this isn\'t it.',0,0,1);
I[44][3][2]=new Array('The Delta Force','Sorry.  Delta Force is a modern-day special operations unit.',0,0,1);
I[44][3][3]=new Array('The Patrol Fleet','Nope.  This wasn\'t the name.',0,0,1);
I[44][3][4]=new Array('The Riverine Fleet','Nope.  This wasn\'t the name.',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('Britain and Argentina','Correct.  This war was fought over the right to possess the Falkland Islands.',1,100,1);
I[45][3][1]=new Array('Argentina and the United States','Nope.  The United States did not fight in this war.',0,0,1);
I[45][3][2]=new Array('Britain and Brazil','Nope.  Brazil did not fight in this war.',0,0,1);
I[45][3][3]=new Array('Britain and Chile','Nope.  Chile did not fight in this war.',0,0,1);
I[45][3][4]=new Array('The United States and Chile','Nope.  The United States did not fight in this war.',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('Granada','Correct.  In response to a Cuban-backed communist takeover which threatened U.S. citizens.',1,100,1);
I[46][3][1]=new Array('Panama','Nope.  This would come later.',0,0,1);
I[46][3][2]=new Array('Cuba','Nope.  The U.S. never invaded Cuba.',0,0,1);
I[46][3][3]=new Array('The Falklands','Nope.  The U.S. was not involved in the Falklands War.',0,0,1);
I[46][3][4]=new Array('Syria','Nope.  The U.S. never invaded Syria.',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('Ho Chi Minh','Right!  Ho Chi Minh was seen as the "George Washington" of his country for driving out the French.',1,100,1);
I[47][3][1]=new Array('Ngo Din Diem','Sorry.  Diem was the first president of South Vietnam.',0,0,1);
I[47][3][2]=new Array('Mao Tse-Tung','Sorry.  Mao was the leader of Communist China.',0,0,1);
I[47][3][3]=new Array('Chiang Kai-Shek','Nope.  Chiang Kai-Shek was the leader of the Nationalist Forces in China and later in Taiwan.',0,0,1);
I[47][3][4]=new Array('Syngman Rhee','Nope.  Syngman Rhee was elected as the first president of South Korea.',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('Sergei Gorshkov','Correct.  He was considered the "Father of the Soviet Navy".',1,100,1);
I[48][3][1]=new Array('Nikita Khrushchev','Nope.  Khrushchev was the leader of the Soviet Union at the start of the Naval build-up.',0,0,1);
I[48][3][2]=new Array('Joseph Stalin','Nope.  Joseph Stalin was the leader of the Soviet Union during World War II.',0,0,1);
I[48][3][3]=new Array('Hyman Rickover','Sorry.  Admiral Rickover was the "Father of the U.S. Nuclear Navy".',0,0,1);
I[48][3][4]=new Array('Mikhail Gorbachev','Sorry.  Gorbachev was the last leader of the Soviet Union.',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('Gamal Abdel Nasser','Correct.  Nasser was maneuvering at this time to become the leader of the Arab world.',1,100,1);
I[49][3][1]=new Array('Camille Chamoun','Sorry.  Chamoun was the president of Lebanon.',0,0,1);
I[49][3][2]=new Array('Syngman Rhee','Nope.  Syngman Rhee was elected as the first president of South Korea.',0,0,1);
I[49][3][3]=new Array('Muammar Qaddafi','Sorry.  Qaddafi is the leader of Libya.',0,0,1);
I[49][3][4]=new Array('Manuel Noriega','Nope.  Noriega, now in a federal prison in Florida, was the leader of Panama prior to Operation Just Cause.',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);
			}
		}
	}
//Undocumented function added 10/12/2004
	ShowSpecialReadingForQuestion();
}

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));
			}
		}
//Fix for Safari bug added for version 6.0.3.42 (negative infinity problem)
		if ((State[QNum][0] < 0)||(State[QNum][0] == Number.NEGATIVE_INFINITY)){
			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);
	}
}










//-->

//]]>


