

//<![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');
	ShowElements(true, 'object', 'FeedbackContent');

//Focus the OK button
	setTimeout("document.getElementById('FeedbackOKButton').focus()", 50);
	
//
}

function ShowElements(Show, TagName, ContainerToReverse){
// added third argument to allow objects in the feedback box to appear
//IE bug -- hide all the form elements that will show through the popup
//FF on Mac bug : doesn't redisplay objects whose visibility is set to visible
//unless the object's display property is changed

	//get container object (by Id passed in, or use document otherwise)
	TopNode = document.getElementById(ContainerToReverse);
	var Els;
	if (TopNode != null) {
		Els = TopNode.getElementsByTagName(TagName);
	} else {
		Els = document.getElementsByTagName(TagName);
	}

	for (var i=0; i<Els.length; i++){
		if (TagName == "object") {
			//manipulate object elements in all browsers
			if (Show == true){
				Els[i].style.visibility = 'visible';
				//get Mac FireFox to manipulate display, to force screen redraw
				if (C.mac && C.gecko) {Els[i].style.display = '';}
			}
			else{
				Els[i].style.visibility = 'hidden';
				if (C.mac && C.gecko) {Els[i].style.display = 'none';}
			}
		} 
		else {
			// tagName is either input or select (that is, Form Elements)
			// ie6 has a problem with Form elements, so manipulate those
			if (C.ie) {
				if (C.ieVer < 7) {
					if (Show == true){
						Els[i].style.visibility = 'visible';
					}
					else{
						Els[i].style.visibility = 'hidden';
					}
				}
			}
		}
	}
}



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 (typeof(window.pageYOffset) == 'number'){
		return window.pageYOffset;
	}
	else{
		if ((document.body)&&(document.body.scrollTop)){
			return document.body.scrollTop;
		}
		else{
			if ((document.documentElement)&&(document.documentElement.scrollTop)){
				return document.documentElement.scrollTop;
			}
			else{
				return 0;
			}
		}
	}
}

function GetViewportHeight(){
	if (typeof window.innerHeight != 'undefined'){
		return window.innerHeight;
	}
	else{
		if (((typeof document.documentElement != 'undefined')&&(typeof document.documentElement.clientHeight !=
     'undefined'))&&(document.documentElement.clientHeight != 0)){
			return document.documentElement.clientHeight;
		}
		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 ';

//New for 6.2.2.0
var CompletedSoFar = 'Questions completed so far: ';
var ExerciseCompleted = 'You have completed the exercise.';
var ShowCompletedSoFar = true;

var ContinuousScoring = false;
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 = 15;
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 = '';
var Locked = false;

//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();
//and show a keypad if there is one
		if (document.getElementById('CharacterKeypad') != null){
			document.getElementById('CharacterKeypad').style.display = 'block';
		}
	}
	else{
  	if (QArray[CurrQNum].getElementsByTagName('textarea')[0] != null){
  		QArray[CurrQNum].getElementsByTagName('textarea')[0].focus();	
//and show a keypad if there is one
			if (document.getElementById('CharacterKeypad') != null){
				document.getElementById('CharacterKeypad').style.display = 'block';
			}
		}
//This added for 6.0.4.11: hide accented character buttons if no textbox
		else{
			if (document.getElementById('CharacterKeypad') != null){
				document.getElementById('CharacterKeypad').style.display = 'none';
			}
		}
	}
}

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){
//Fix for 6.0.4.25
			var Children = QArray[CurrQNum].getElementsByTagName('div');
			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';
		}
	}
}

var 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('Matthew Fontaine Maury','Correct.  He was a U.S. Naval Officer as well.',1,100,1);
I[0][3][1]=new Array('Townshend Cromwell','Sorry.  Townshend Cromwell was scientist for the U.S. fish and Wildlife Service.',0,0,1);
I[0][3][2]=new Array('Dr. John Swallow','Nope.  Dr. Swallow invented the "Swallow buoy" which can free-float at any chosen depth.',0,0,1);
I[0][3][3]=new Array('Zuyder Zee','Nope.  The Zuyder Zee is an area reclaimed from the sea by the Dutch using dikes and pumps.',0,0,1);
I[0][3][4]=new Array('Jacques Cousteau','Sorry.  Dr. Cousteau is a famous oceanographer but he is not considered the founder of modern oceanography.',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('Snow','Right.  Filtered water, de-ionized water, and distilled water are more pure, but are man-made.',1,100,1);
I[1][3][1]=new Array('Rain','Sorry.  It is second in line for the title of "purest".',0,0,1);
I[1][3][2]=new Array('Spring Water','Nope.  Although some spring water can be quite pure, it is not normally the purest source.',0,0,1);
I[1][3][3]=new Array('Well Water','Sorry.  Well water quality varies significantly from region to region.',0,0,1);
I[1][3][4]=new Array('Sea Water','Nope.  Sea water contains many other elements than just pure water.',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('It contracts until it\'s close to freezing then expands rapidly.','Correct.  It contracts until about 39 degrees then rapidly expands to 109% of its normal volume as it freezes.',1,100,1);
I[2][3][1]=new Array('It expands as it is heated and contracts as it is cooled.','Nope.  This is, however, the way most material reacts to heat and cold.',0,0,1);
I[2][3][2]=new Array('It expands until it\'s close to freezing, then contracts rapidly.','Sorry.  It doesn\'t contract when frozen.',0,0,1);
I[2][3][3]=new Array('Heat and cold have no effect on the volume of water.','Nope.  Water does react to both heat and cold in terms of volume.',0,0,1);
I[2][3][4]=new Array('It expands as it nears freezing but then contracts rapidly when frozen.','Sorry.  Water does not act this way as it is frozen.',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('Ammonia','Right.  The chemical structure of ammonia allows it to store more heat than water.',1,100,1);
I[3][3][1]=new Array('Iron','Nope.  Iron loses heat rapidly.',0,0,1);
I[3][3][2]=new Array('Calcium sulfate','Sorry.  This common component of seawater cannot match the heat storing ability of water.',0,0,1);
I[3][3][3]=new Array('Fluorine','Nope.  Although an element of sea water, fluorine cannot retain heat as well as water.',0,0,1);
I[3][3][4]=new Array('Topsoil','Sorry.  Topsoil loses its heat rapidly.',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('Because water retains heat better than land.','Right.  The heat trapped by the water makes for milder weather near the seacoast in the winter.',1,100,1);
I[4][3][1]=new Array('Because cold air masses and low pressure areas are more easily supported over land than water.','Nope.  Low pressure systems move over land and water equally.',0,0,1);
I[4][3][2]=new Array('Because the sun reflects more brightly off of the water than the land.','Sorry.  The sun actually reflects more brightly off of snow covered land than the oceans.',0,0,1);
I[4][3][3]=new Array('The sea coast is actually colder than the inland lands in the winter.','Nope.  The seacoasts do tend to be milder in the winter.',0,0,1);
I[4][3][4]=new Array('Because land retains heat better than water.','Sorry.  If this was the case, it would have exactly the opposite effect.',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('Under extreme pressure, such as great ocean depths or under laboratory conditions','Right.  Otherwise, water is not compressible.',1,100,1);
I[5][3][1]=new Array('Water will compress when frozen.','Nope.  Quite the opposite, it will expand.',0,0,1);
I[5][3][2]=new Array('You can compress it by mixing it with ammonia.','Sorry.  This mixture would not aid the compression of water.',0,0,1);
I[5][3][3]=new Array('You cannot compress water.','Nope.  It\'s hard, but possible.',0,0,1);
I[5][3][4]=new Array('Water will compress when heated to extreme temperatures.','Sorry.  This won\'t compress water at all.',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('Sound travels faster in water than air and increases with temperature and salinity.','Right.  It will also increase speed with pressure increases.',1,100,1);
I[6][3][1]=new Array('Sound travels slower in water than air and increases with temperature and salinity.','Sorry.  Sound travels faster in water than air.',0,0,1);
I[6][3][2]=new Array('Sound travels faster in water than air and decreases with temperature and salinity.','Nope.  Temperature drops and salinity increases have the opposite effect on sound.',0,0,1);
I[6][3][3]=new Array('Sound travels slower in water than air and decreases with temperature and salinity.','Nope.  Wrong on both counts.',0,0,1);
I[6][3][4]=new Array('The speed of sound does not vary between water or air.','Sorry.  You may be thinking of light.  The speed of sound is affected by these factors.',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('Temperature','Correct.  Cooler waters transmit sound faster.',1,100,1);
I[7][3][1]=new Array('Salinity','Nope.  This affects it but it is not the greatest thing that affects sound travel in water.',0,0,1);
I[7][3][2]=new Array('Pressure','Sorry.  This affects it but it is not the greatest thing that affects sound travel in water.',0,0,1);
I[7][3][3]=new Array('The volume of the sound','Nope.  Sounds right, but this is not an important factor.',0,0,1);
I[7][3][4]=new Array('The pitch and tone of the sound.','Sorry.  These factors have little to no bearing on the velocity of sound in water.',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('95%','Right.  It is a very pure substance.',1,100,1);
I[8][3][1]=new Array('85%','Nope.  Think higher.',0,0,1);
I[8][3][2]=new Array('75%','Sorry.  It is more than that.',0,0,1);
I[8][3][3]=new Array('50%','Nope.  Think much higher.',0,0,1);
I[8][3][4]=new Array('87%','Sorry.  You\'re close though.',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('80','Right.  Page 189 of the textbook lists the 19 most common ones.',1,100,1);
I[9][3][1]=new Array('15','Sorry.  There are many more known elements in seawater.',0,0,1);
I[9][3][2]=new Array('42','Nope.  There are quite a bit more known elements in seawater.',0,0,1);
I[9][3][3]=new Array('33','Nope.  There are quite a bit more known elements in seawater.',0,0,1);
I[9][3][4]=new Array('67','Sorry.  You are getting close though.',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('Land-locked lakes','Correct.  Examples are the Dead Sea and the Great Salt Lake.',1,100,1);
I[10][3][1]=new Array('The Mediterranean and Red Seas','Nope.  They have higher than normal concentrations, but they are not the highest.',0,0,1);
I[10][3][2]=new Array('The open oceans','Nope.  This is where you find the lowest concentrations of salt.',0,0,1);
I[10][3][3]=new Array('Gulfs and bays','Sorry.  Gulfs and Bays may or may not have higher elevations of salt, but they are not the highest.',0,0,1);
I[10][3][4]=new Array('Lagoons','Sorry.  Lagoons can be saltwater, freshwater or a mixture of both.  They do not stand out as having the highest concentrations of salt.',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 has remained fairly stable over that time.','Right.  Most sedimentary rocks have gone through several cycles of erosion over this time and therefore don\'t have a lot of material that can dissolve into seawater.',1,100,1);
I[11][3][1]=new Array('The seas were much more salty millions of years ago.','Sorry.  Scientists believe they were not.',0,0,1);
I[11][3][2]=new Array('The seas were much less salty millions of years ago.','Nope.  Scientists believe this wasn\'t the case.',0,0,1);
I[11][3][3]=new Array('The seas were "salt-free" millions of years ago.','Sorry.  This wasn\'t the case at all.',0,0,1);
I[11][3][4]=new Array('Seas and oceans are fairly new features and haven\'t been around for millions of years.','Nope.  They have been around for almost all of the history of our earth.',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('They allow evaporated water to form droplets and grow until they fall as rain back to the surface of the earth.','Right.  If these droplets were not there rain would be much more scarce and life on earth much more difficult.',1,100,1);
I[12][3][1]=new Array('They prevent more water vapor from being evaporated and therefore prevent the oceans from drying up.','Nope.  They have no such effect.',0,0,1);
I[12][3][2]=new Array('They reflect sunlight down to the oceans and warm up the waters.','Sorry.  Any reflected sunlight would go back up into space if this were the case.',0,0,1);
I[12][3][3]=new Array('They do not have a significant importance in regards to weather or the oceans.','Nope.  The presence of these particles is crucial to the cycle of life on the earth.',0,0,1);
I[12][3][4]=new Array('They store water vapor for long periods of time in the upper atmosphere and by doing so act as a warming blanket for the earth.','Sorry.  They have no such effect.',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('The hydrologic cycle.','Correct.  This "round trip" of water is what makes life possible on earth.',1,100,1);
I[13][3][1]=new Array('The transpiration process.','Sorry.  Transpiration is the evaporation process through plants and trees.',0,0,1);
I[13][3][2]=new Array('The rainfall cycle.','Nope.  More than just rainfall is involved.  Precipitation can also be in the form of snow, ice and hail, for example.',0,0,1);
I[13][3][3]=new Array('The humidity effect.','Nope.  Humidity has to do with the moisture content of the air and while affected by this process, it isn\'t the name of the process.',0,0,1);
I[13][3][4]=new Array('The moisture transportation cycle.','Sorry.  There is not the name of the process.',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 transpiration process','Correct.  Transpiration is a special term used to identify the evaporation process through plants and trees.',1,100,1);
I[14][3][1]=new Array('The hydrologic cycle','Sorry.  This is the "round trip" of water through evaporation,  condensation and return travel to the sea by way of precipitation.',0,0,1);
I[14][3][2]=new Array('Photosynthesis','Sorry.  This is the formation of carbohydrates from carbon dioxide and a source of hydrogen (as water) in the chlorophyll-containing tissues of plants exposed to light',0,0,1);
I[14][3][3]=new Array('Ambient hydration','Nope.  There is no such process.',0,0,1);
I[14][3][4]=new Array('The irrigation process','Nope.  This irrigation is a method of providing water needed by plants, not the process of how plants give off water vapor into the air.',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('Sodium chloride','Correct.  This is another name for common salt and it is by far the most common mineral found in seawater.',1,100,1);
I[15][3][1]=new Array('Calcium sulfate','Sorry.  While calcium sulfate is present in seawater, it is not the most common mineral.',0,0,1);
I[15][3][2]=new Array('Bromine','Sorry.  While bromine is present in seawater, it is not the most common mineral.',0,0,1);
I[15][3][3]=new Array('Boron','Nope.  While Boron is present in seawater, it is not the most common mineral.',0,0,1);
I[15][3][4]=new Array('Silver','Nope.  While silver is present in seawater, it is not the most common mineral.',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('Aluminum','Correct.  There are no significant quantities of aluminum in seawater.',1,100,1);
I[16][3][1]=new Array('Rubidium','Sorry.  There are small but significant quantities of rubidium found in seawater.',0,0,1);
I[16][3][2]=new Array('Strontium','Sorry.  There are small but significant quantities of strontium found in seawater.',0,0,1);
I[16][3][3]=new Array('Sodium chloride','Nope.  Sodium chloride (common salt) is the most common mineral in seawater.',0,0,1);
I[16][3][4]=new Array('Arsenic','Nope.  There are small but significant quantities of arsenic found in seawater.',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('Because it is easier to get the other minerals from mines on land.','Correct.  Since it is cheaper to get these minerals on land, that is where they are mined.',1,100,1);
I[17][3][1]=new Array('Because it is not possible to extract the other minerals.','Nope.  It is hard to do, but not impossible.',0,0,1);
I[17][3][2]=new Array('Because these are the only two minerals found in seawater.','Nope.  There are a large number of minerals in seawater.',0,0,1);
I[17][3][3]=new Array('Because they collect at the bottom of the ocean naturally and are easy to collect.','Sorry.  They are not extracted from the oceans in this manner.',0,0,1);
I[17][3][4]=new Array('Because there is concern that extracting other minerals would result in damage to life in the oceans.','Sorry.  This isn\'t the reason that other minerals are not extracted from ocean water.',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('32 degrees to 85 degrees','Right.  32 degrees around the poles to approximately 85 degrees in the Persian Gulf.',1,100,1);
I[18][3][1]=new Array('0 degrees to 26 degrees','Nope.  Although you would be close if the question asked for the Celsius temperature range.',0,0,1);
I[18][3][2]=new Array('28 degrees to 90 degrees','Nope.  You are a little off on both ends of the scale.',0,0,1);
I[18][3][3]=new Array('32 degrees to 90 degrees','Sorry.  You\'ve got one end of the scale right though.',0,0,1);
I[18][3][4]=new Array('36 degrees to 85 degrees','Sorry.  You\'ve got one end of the scale right though.',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 more salt content, the lower it\'s freezing point.','Correct.  With normal salt content, seawater freezes around 28 degrees F.',1,100,1);
I[19][3][1]=new Array('The more salt content, the higher it\'s freezing point.','Nope.  In fact, quite the opposite is true.',0,0,1);
I[19][3][2]=new Array('The more salt content, the more quickly objects will sink.','Sorry.  The more salty the water, the more objects will float.',0,0,1);
I[19][3][3]=new Array('The concentration of salt in seawater has varied widely over the past 10,000 years.','Nope.  It has remained fairly stable for many millions of years.',0,0,1);
I[19][3][4]=new Array('Colder water tends to be saltier than warm water.','Sorry.  There is no significant difference in the quantity of salt in warm or cold waters.',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 bathythermograph','Correct.  Water temperature has a significant affect on sonar, and is therefore an important part of undersea warfare.',1,100,1);
I[20][3][1]=new Array('A Nansen bottle','Sorry.  Nansen bottles are used to take water samples at various depths.  They also record temperatures, but they are not used on most Navy combatants.',0,0,1);
I[20][3][2]=new Array('A Forward Looking Infrared Receiver (FLIR)','Nope.  These are used by aircraft to observe infrared emissions.',0,0,1);
I[20][3][3]=new Array('A fathometer','Sorry.  Fathometers check on the depth of the water under a ship.',0,0,1);
I[20][3][4]=new Array('A echo sounder','Sorry.  Echo sounders check on the depth of the water under a ship.',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('Nansen Bottles','Correct.  They also record the exact temperature of the water sample.',1,100,1);
I[21][3][1]=new Array('Bathythermographs','Sorry.  Bathythermographs only measure water temperature.  They do not retrieve a sample of the seawater for further study.',0,0,1);
I[21][3][2]=new Array('Fathometers','Sorry.  Fathometers check on the depth of the water under a ship.',0,0,1);
I[21][3][3]=new Array('Piston corers','Nope.  Piston corers did down into the ocean floor and bring back samples of the sediment layers.',0,0,1);
I[21][3][4]=new Array('Swallow buoys','Nope.  This is an underwater device designed to free-float at a precise depth and is used to track ocean currents.',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('Seawater is colorless','Right.  Colors that are seen are caused by the reflection of the sky or scattering of light in the water.',1,100,1);
I[22][3][1]=new Array('Light Green','Sorry.  This effect is caused by the scattering of light in the water and is not the color of the water itself.',0,0,1);
I[22][3][2]=new Array('Blue','Sorry.  This effect is caused by the scattering of light in the water and is not the color of the water itself.',0,0,1);
I[22][3][3]=new Array('Gray','Sorry.  This effect is caused by the scattering of light in the water and is not the color of the water itself.',0,0,1);
I[22][3][4]=new Array('Dark Green','Sorry.  This effect is caused by the scattering of light in the water and is not the color of the water itself.',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('Red phytoplankton in the water.','Correct.  These plankton "blooms" make the water appear red at times.',1,100,1);
I[23][3][1]=new Array('Red clay silt carried into it by the rivers of northern China.','Nope.  River silt from northern China colors the Yellow Sea, not the Red Sea.',0,0,1);
I[23][3][2]=new Array('Large amounts of red-tinted krill and shrimp in these waters.','Sorry.  Neither shrimp nor krill are found in the Red Sea.',0,0,1);
I[23][3][3]=new Array('The Red Sea does not appear red.','Nope.  It does indeed appear red at times, and there is a reason it does.',0,0,1);
I[23][3][4]=new Array('Copper deposits on the bottom of the Red Sea.','Sorry.  There are no such copper deposits.',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('China','Correct.  The yellow clay silt of northern China colors this sea.',1,100,1);
I[24][3][1]=new Array('Somalia','Nope.  The Yellow Sea is not off the coast of Somalia.',0,0,1);
I[24][3][2]=new Array('Kuwait','Sorry.  Kuwait borders the Persian Gulf, not the Yellow Sea.',0,0,1);
I[24][3][3]=new Array('Japan','Nope.  The Yellow Sea is not off the coast of Japan.',0,0,1);
I[24][3][4]=new Array('Pakistan','Sorry.  Pakistan\'s coastline is along the Indian Ocean, not the Yellow Sea.',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('Blue','Correct.  Water scatters various wavelengths of light, starting at the red end of the spectrum and moving towards the blue end.',1,100,1);
I[25][3][1]=new Array('Red','Nope.  This is one of the first wavelengths of light that is scattered by water.',0,0,1);
I[25][3][2]=new Array('Yellow','Sorry.  This is one of the first wavelengths of light that is scattered by water.',0,0,1);
I[25][3][3]=new Array('They all penetrate ocean water evenly.','Nope.  Ocean water scatters some wavelengths of light before others.',0,0,1);
I[25][3][4]=new Array('Green','Sorry.  This isn\'t the color that penetrates the farthest.',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('The twilight zone','Right.  No effective plant production can take place in these low light levels.',1,100,1);
I[26][3][1]=new Array('The lighted zone','Nope.  This is the topmost layer of the oceans and marks the extent that most light wavelengths can penetrate.',0,0,1);
I[26][3][2]=new Array('The dark zone','Sorry.  This is the zone of total darkness which lies below 200 meters.',0,0,1);
I[26][3][3]=new Array('The violet zone','Nope.  There is no such zone.',0,0,1);
I[26][3][4]=new Array('The continental slope','Sorry.  The continental slope generally lies deeper than this zone.',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 dark zone','Correct.  Since the limit of light penetration is around 200 meters, the dark zone is an area of total and eternal darkness.',1,100,1);
I[27][3][1]=new Array('The dead zone','Sorry.  There is no such zone in the oceans.',0,0,1);
I[27][3][2]=new Array('The twilight zone','Sorry.  Deep violet wavelengths of light do make it into the twilight zone.',0,0,1);
I[27][3][3]=new Array('The lighted zone','Nope.  The lighted zone is uppermost layer of the ocean and is well-lit by the sun.',0,0,1);
I[27][3][4]=new Array('The omega zone','Nope.  There is no such zone.',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('Wind','Correct.  Storm winds, in particular, form waves on the sea.',1,100,1);
I[28][3][1]=new Array('Earthquakes','Nope.  While earthquakes can cause tsunami waves, they are not the most common cause.',0,0,1);
I[28][3][2]=new Array('Solar flares','Nope.  Solar flares do not have a direct affect on sea waves.',0,0,1);
I[28][3][3]=new Array('Submarine landslides','Sorry.  While these landslides do have an affect on waves, they are not the most common cause.',0,0,1);
I[28][3][4]=new Array('Upwelling','Sorry.  Upwelling may have an affect on wave patterns but they are not the most common cause of ordinary sea waves.',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('Swell','Correct.  They may indicate an approaching storm and are common in the advance of a hurricane.',1,100,1);
I[29][3][1]=new Array('Pitch','Nope.  Pitching is what ships or objects do when nose on to these types of waves.',0,0,1);
I[29][3][2]=new Array('Roll','Nope.  Rolling is what ships or objects do when broadside to these types of waves.',0,0,1);
I[29][3][3]=new Array('Crest','Sorry.  A Crest is the breaking or top part of a wave.',0,0,1);
I[29][3][4]=new Array('Trough','Sorry.  A trough is the space between two waves.',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('Length of the fetch','Correct.  This is the distance the wind blows over the water.',1,100,1);
I[30][3][1]=new Array('Depth of the water','Sorry.  This is an factor in wave height on the open ocean.',0,0,1);
I[30][3][2]=new Array('Salinity of the water','Nope.  The salt content of the water has nothing to do with wave height.',0,0,1);
I[30][3][3]=new Array('Temperature of the water','Nope.  The temperature of the water has nothing to do with wave height.',0,0,1);
I[30][3][4]=new Array('The spacing of the waves','Sorry.  There is not a direct relationship between wave spacing and wave height.',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('13 knots','Correct.  This can be a good visual indication of wind speed for aircraft.',1,100,1);
I[31][3][1]=new Array('25 knots','Sorry. Whitecaps form well before this wind speed.',0,0,1);
I[31][3][2]=new Array('8 knots','Nope.  8 knots of wind won\'t form whitecaps.',0,0,1);
I[31][3][3]=new Array('50 knots','Sorry. Whitecaps form well before this wind speed.',0,0,1);
I[31][3][4]=new Array('20 knots','Nope.  Whitecaps form well before this wind speed.',0,0,1);
I[32]=new Array();I[32][0]=100;
I[32][1]='';
I[32][2]='0';
I[32][3]=new Array();
I[32][3][0]=new Array('The length of time it takes for complete wave to pass a given point.','Correct.  Normal wind waves have periods ranging from 2 to 5 seconds.',1,100,1);
I[32][3][1]=new Array('The horizontal distance between two successive crests.','Sorry.  This is the wavelength.',0,0,1);
I[32][3][2]=new Array('The vertical distance between the crest and the trough.','Sorry.  This is the height of the wave.',0,0,1);
I[32][3][3]=new Array('The length of time between the crest and the trough.','Nope.  The period of time between the crest and the trough would be one-half of the wave period.',0,0,1);
I[32][3][4]=new Array('The count of the number of waves that pass by a point in a minute.','Nope.  This is not the way wave periods are measured.',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('Spilling breaker','Right.  In this case the breaker is slight and can be seen advancing as a line of foam toward the beach.',1,100,1);
I[33][3][1]=new Array('Plunging breaker','Sorry.  A plunging breaker requires a steep bottom slope.',0,0,1);
I[33][3][2]=new Array('Surging breaker','Sorry.  A surging breaker requires a very steep bottom slope with sudden rock formations.',0,0,1);
I[33][3][3]=new Array('Rolling breaker','Nope.  This is not one of the three types of breakers.',0,0,1);
I[33][3][4]=new Array('Sloping breaker','Nope.  This is not one of the three types of breakers.',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('Surging breakers','Correct.  It is extremely dangerous to be on a ship near such areas in bad weather.',1,100,1);
I[34][3][1]=new Array('Spilling breakers','Sorry.  Spilling breakers require mild and gradual slopes.',0,0,1);
I[34][3][2]=new Array('Plunging breakers','Sorry.  Plunging breakers require steep slopes but not very steep slopes with rock formations.',0,0,1);
I[34][3][3]=new Array('Rolling breakers','Nope.  This is not one of the three types of breakers.',0,0,1);
I[34][3][4]=new Array('Heaving breakers','Nope.  This is not one of the three types of breakers.',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('One foot','Correct.  This may not seem like a lot, but it is over a long distance and really adds up over time.',1,100,1);
I[35][3][1]=new Array('One mile','Nope.  That is far too high a rate of erosion.',0,0,1);
I[35][3][2]=new Array('50 yards','Sorry.  It is less than this.',0,0,1);
I[35][3][3]=new Array('100 yards','Nope.  This is far too high a rate of erosion.',0,0,1);
I[35][3][4]=new Array('One yard','Sorry.  It\'s not this amount.',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('Four feet','Correct.  Above that amount and the landing craft may broach.',1,100,1);
I[36][3][1]=new Array('Ten feet','Nope.  It is less than 10 feet.',0,0,1);
I[36][3][2]=new Array('Two feet','Sorry.  It is more than this.',0,0,1);
I[36][3][3]=new Array('Six feet','Sorry.  There would be too great a chance of broaching at this height.',0,0,1);
I[36][3][4]=new Array('12 feet','Nope.  This is way too high a surf state for safe amphibious landings.',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('Refraction','Correct.  This is important information when planning an amphibious assault.',1,100,1);
I[37][3][1]=new Array('Reflection','Sorry.  While the waves may appear to have "reflected" off of the shore, this is not the term used for this.',0,0,1);
I[37][3][2]=new Array('Surge barrier','Nope.  There is no such term.',0,0,1);
I[37][3][3]=new Array('Breakwater','Sorry.  A breakwater is a common structure built to protect harbors.',0,0,1);
I[37][3][4]=new Array('Groins','Nope.  Groins are walls of stone or wooden pilings built at right angles to the shore to help prevent erosion.',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('The Gulf Stream','Correct.  This water current flows along the Gulf Coast and up the Eastern U.S. seaboard.',1,100,1);
I[38][3][1]=new Array('The North Equatorial Current','Nope.  This current carries warmer waters northwestward along the West Indies.',0,0,1);
I[38][3][2]=new Array('The North Atlantic Drift','Nope.  This current carries cooler waters northeastward from Canada and the U.S. northeast seacoast to northern  Europe.',0,0,1);
I[38][3][3]=new Array('The Prevailing Westerlies','Sorry.  These are the winds in the belt from 30 to 60 degrees north.',0,0,1);
I[38][3][4]=new Array('The Polar Northeasterlies','Sorry.  These are the winds that blow mainly from the northeast, causing surface current movement toward the west.',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('In the North Atlantic Ocean off of the southeastern U.S. coast.','Right.  This is a vast area of floating plants.',1,100,1);
I[39][3][1]=new Array('In the Pacific Ocean, off of the southwestern U.S. coast.','Nope.  It isn\'t in the Pacific Ocean.',0,0,1);
I[39][3][2]=new Array('In the Indian Ocean, between Pakistan and India.','Nope.  It isn\'t in the Indian Ocean',0,0,1);
I[39][3][3]=new Array('In the Arctic Ocean, off the coast of Russia.','Sorry.  It isn\'t in the Arctic Ocean',0,0,1);
I[39][3][4]=new Array('In the Southern Atlantic Ocean, off of Brazil.','Nope.  It isn\'t in the Southern Atlantic Ocean.',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('Townsend Cromwell','Right.  He made this discovery while experimenting with deep-sea fishing techniques.',1,100,1);
I[40][3][1]=new Array('Henry Stommel','Sorry.  He had theorized in 1955 that a countercurrent flowed beneath the Gulf Stream.',0,0,1);
I[40][3][2]=new Array('Dr. John Swallow','Sorry  Dr. Swallow invented a device called the Swallow Buoy which can free-float at a chosen depth underwater.',0,0,1);
I[40][3][3]=new Array('Sir Isaac Newton','Nope.  Sir Isaac Newton lived well before this discovery.',0,0,1);
I[40][3][4]=new Array('Matthew Fontaine Maury','Nope.  Maury is considered the founder of modern oceanography, but he did not make this discovery.',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('Henry Stommel','Correct.  His theory was proven correct in 1957.',1,100,1);
I[41][3][1]=new Array('Townsend Cromwell','Sorry.  Cromwell discovered in 1952 that near the equator, the deepest water was moving opposite from the surface water flow.',0,0,1);
I[41][3][2]=new Array('Dr. John Swallow','Sorry  Dr. Swallow invented a device called the Swallow Buoy which can free-float at a chosen depth underwater.',0,0,1);
I[41][3][3]=new Array('Sir Isaac Newton','Nope.  Sir Isaac Newton lived well before this theory was produced.',0,0,1);
I[41][3][4]=new Array('Matthew Fontaine Maury','Nope.  Maury is considered the founder of modern oceanography, but he did not make this discovery.',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 Swallow Buoy','Correct.  Invented by Dr. John Swallow, this device allows oceanographers to study currents at the different depths of the oceans.',1,100,1);
I[42][3][1]=new Array('The Nansen Bottle','Nope.  Nansen bottles are used to record water temperatures and to bring back to the surface water samples from different depths.',0,0,1);
I[42][3][2]=new Array('The Bathythermograph','Nope.  Bathythermographs are dropped from ships to check water temperatures at  various depths.',0,0,1);
I[42][3][3]=new Array('The Hovercraft','Sorry.  Hovercraft are designed to hover above the surface of the ocean, not below it.',0,0,1);
I[42][3][4]=new Array('The Coriolis Broach','Sorry.  There is no such device.',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 Moon\'s gravity.','Correct.  This was finally proven in 1687 by Sir Isaac Newton, but it was known to the ancient Greeks.',1,100,1);
I[43][3][1]=new Array('The Sun\'s gravity.','Sorry.  The Sun has a minor effect on tides, but it is not the primary cause.',0,0,1);
I[43][3][2]=new Array('Countercurrents within the deep oceans.','Nope.  Countercurrents do not affect tides.',0,0,1);
I[43][3][3]=new Array('The flow of Magma within the outer mantle of the earth.','Nope.  This has no affect at all on ocean tides.',0,0,1);
I[43][3][4]=new Array('The rotation of the earth and the resultant Coriolis effect.','Sorry.  The Coriolis effect has no significant impact on ocean tides.',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('Because the Sun is 390 times farther away than the Moon.','Correct.  Even though the Sun is more massive, it\'s greater distance makes it\'s gravitational effect less.',1,100,1);
I[44][3][1]=new Array('Because the orbit of the Earth counters some of the gravitational pull of the Sun.','Nope.  The Earth\'s orbit has no effect in this regard.',0,0,1);
I[44][3][2]=new Array('Because the Moon is larger than the Sun.','Nope.  The Sun is far and away more massive than the Moon.',0,0,1);
I[44][3][3]=new Array('Because the Moon is made of rock and metal while the Sun is a ball of burning gas.','Sorry.  Mass and distance are the only things that matter for gravitational pull.',0,0,1);
I[44][3][4]=new Array('Because sunlight can only penetrate the first 200 meters of the oceans.','Sorry.  This fact has nothing to do with the gravitational forces that affect tides.',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('New and Full Moons','Correct.  This is because at these times the force of the Moon and the Sun are working in the same direction.',1,100,1);
I[45][3][1]=new Array('New Moon only','Nope.  There is another time as well',0,0,1);
I[45][3][2]=new Array('Full Moon only','Nope.  There is another time as well.',0,0,1);
I[45][3][3]=new Array('The New Moon and the first Quarter Moon','Sorry.  The first and third quarter Moons are when the tides have the lowest range.',0,0,1);
I[45][3][4]=new Array('The Full Moon and the first Quarter Moon','Sorry.  The first and third quarter Moons are when the tides have the lowest range.',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('A period when there is the least difference between high and low tides.','Correct.  This occurs when we see the half Moon during the first and third quarters, and the tidal forces of the Moon and the Sun are opposed.',1,100,1);
I[46][3][1]=new Array('A period when there is the most difference between high and low tides.','Nope.  This is known as a Spring Tide',0,0,1);
I[46][3][2]=new Array('A period when there is no difference between high and low tides.','Nope.  There is always a difference between high and low tides.',0,0,1);
I[46][3][3]=new Array('A tide that fails to rise or fall more than one foot.','Sorry.  This term has nothing to do with the specific height of a tide.',0,0,1);
I[46][3][4]=new Array('A tide that fails to rise or fall more than three feet.','Sorry.  This term has nothing to do with the specific height of a tide.',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('The ebb is the flow away from shore and the flood is the flow toward shore.','Right.  The direction is the important part as the ebb and flood of tides varies widely around the world.',1,100,1);
I[47][3][1]=new Array('The ebb is the flow towards the shore and the flood is the flow away from shore.','Nope.  You\'re thinking directions and that\'s good, but you\'ve got the directions wrong.',0,0,1);
I[47][3][2]=new Array('The ebb is the highest point of tide and the flood is the lowest point.','Sorry.  The terms do not reflect height, but relative direction of travel.',0,0,1);
I[47][3][3]=new Array('The ebb is the lowest point of a tide and the flood is the highest.','Sorry.  The terms do not reflect height, but relative direction of travel.',0,0,1);
I[47][3][4]=new Array('These terms refer to ocean currents and not to tides.','Nope.  They are tidal terms and are not related to ocean currents.',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('The Mediterranean Sea','Correct.  They average only a few feet in the Mediterranean.',1,100,1);
I[48][3][1]=new Array('Mont-St-Michel, France','Nope.  The 41-foot tide found here is one of the largest in the world.',0,0,1);
I[48][3][2]=new Array('The Bay of Fundy','Nope.  The tides often exceed 50 feet here and are the greatest in the world.',0,0,1);
I[48][3][3]=new Array('Alaska','Sorry.  Alaska experiences some of the highest tides in the world.',0,0,1);
I[48][3][4]=new Array('Inchon, Korea','Sorry.  This port city experiences very high tidal ranges.',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('The Amazon River','Correct.  The other river that matches the Amazon\'s bore tied is the Hangchow River in China.',1,100,1);
I[49][3][1]=new Array('The Columbia River','Nope.  The Columbia River doesn\'t have a significant bore tide.',0,0,1);
I[49][3][2]=new Array('The Mississippi River','Nope.  The Mississippi River doesn\'t have a significant bore tide.',0,0,1);
I[49][3][3]=new Array('The Nile River','Sorry.  The Nile River is not known for it\'s bore tide.',0,0,1);
I[49][3][4]=new Array('The Rhone River','Sorry.  The Rhone River does not have a significant bore tide.',0,0,1);
I[50]=new Array();I[50][0]=100;
I[50][1]='';
I[50][2]='0';
I[50][3]=new Array();
I[50][3][0]=new Array('France','Correct.  It is near St. Malo, at the mouth of the Rance River estuary.',1,100,1);
I[50][3][1]=new Array('The United States','Nope.  The largest tidal energy plant is not in the U.S.',0,0,1);
I[50][3][2]=new Array('Russia','Sorry.  While there are tidal energy plants in Russia, the most successful one is not located there.',0,0,1);
I[50][3][3]=new Array('Brazil','Nope.  While there are tidal energy plants in Brazil, the most successful one is not located there.',0,0,1);
I[50][3][4]=new Array('India','Sorry.  While there are tidal energy plants in India, the most successful one is not located there.',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);
//New for 6.2.2.1: If you want to mark an answer as correct even when it's the final choice, uncomment this line.
//		if (I[QNum][3][ANum][2] >= 1){Btn.innerHTML = CorrectIndicator;}else{Btn.innerHTML = IncorrectIndicator;}	
		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];
	if (State[QNum][5].length > 0){State[QNum][5] += ' | ';}
	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();
//New for 6.2.2.1
			var QsDone = CheckQuestionsCompleted();
			if ((ContinuousScoring == true)||(Finished == true)){
				Feedback += '<br />' + YourScoreIs + ' ' + Score + '%.' + '<br />' + QsDone;
				WriteToInstructions(YourScoreIs + ' ' + Score + '%.' + '<br />' + QsDone);
			}
			else{
				WriteToInstructions(QsDone);
			}
		}
	}
	else{
//It's right
//Mark the answer
		Btn.innerHTML = CorrectIndicator;
				
//Calculate the score for this question
		CalculateMCQuestionScore(QNum);
		
//New for 6.2.2.0
		var QsDone = CheckQuestionsCompleted();

//Get the overall score and add it to the feedback
		if (ContinuousScoring == true){
			CalculateOverallScore();
			if ((ContinuousScoring == true)||(Finished == true)){
				Feedback += '<br />' + YourScoreIs + ' ' + Score + '%.' + '<br />' + QsDone;
				WriteToInstructions(YourScoreIs + ' ' + Score + '%.' + '<br />' + QsDone);
			}
		}
		else{
			WriteToInstructions(QsDone);
		}
	}
	
//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; 
	}
}

//New for 6.2.2.0
function CheckQuestionsCompleted(){
	if (ShowCompletedSoFar == false){return '';}
	var QsCompleted = 0;
	for (var QNum=0; QNum<State.length; QNum++){
		if (State[QNum] != null){
			if (State[QNum][0] >= 0){
				QsCompleted++;
			}
		}
	}
//Fixes for 6.2.2.2
	if (QsCompleted >= QArray.length){
		return ExerciseCompleted;
	}
	else{
		return CompletedSoFar + ' ' + QsCompleted + '/' + QArray.length + '.';
	}
}

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;
		}
		
//New for 6.2.2.0
		FB += '<br />' + ExerciseCompleted;
		
		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);
	}

}










//-->

//]]>


