

//<![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';
//IE can't focus a hidden div; Moz needs to focus before display to avoid jumping
	if (C.gecko){
		document.getElementById('FeedbackOKButton').focus();
	}
	FDiv.style.display = 'block';

	ShowElements(false, 'input');
	ShowElements(false, 'select');
	ShowElements(false, 'object');
	if (C.ie){
		document.getElementById('FeedbackOKButton').focus();
	}
	
//
}

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.innerWidth){
		return window.innerWidth;
	}
	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{
	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){
	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; k++) {
			Temp[k] = Temp[k+1];
		}
		j--;
	}
	return InArray;
}

function WriteToInstructions(Feedback) {
//	Feedback = '<span class="FeedbackText">' + Feedback + '</span>';
	document.getElementById('InstructionsDiv').innerHTML = Feedback;

}




function EscapeDoubleQuotes(InString){
	return InString.replace(/"/g, '&quot;')
}

function FocusAButton(){
	if (document.getElementById('CheckButton1') != null){
		document.getElementById('CheckButton1').focus();
	}
	else{
		document.getElementsByTagName('button')[0].focus();
	}
}

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].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 = '';

//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;
	while (QsToShow < QList.length){
		DumpItem = Math.floor(QList.length*Math.random());
		for (j=DumpItem; j<(QList.length-1); j++){
			QList[j] = QList[j+1];
		}
		QList.length = QList.length-1;
	}
	if (ShuffleQs == true){
		QList = Shuffle(QList);
	}
	if (ShuffleAs == true){
		var As;
		for (var i=0; i<QList.length; i++){
			As = QList[i].getElementsByTagName('ol')[0];
			if (As != null){
  			AList.length = 0;
				while (As.getElementsByTagName('li').length > 0){
					AList.push(As.removeChild(As.getElementsByTagName('li')[0]));
				}
				AList = Shuffle(AList);
				for (j=0; j<AList.length; j++){
					As.appendChild(AList[j]);
				}
			}
		}
	}
	
	for (i=0; i<QList.length; i++){
		Qs.appendChild(QList[i]);
		QArray[QArray.length] = QList[i];
	}

//Show the first item
	QArray[0].style.display = '';
	
//Now hide all except the first item
	for (i=1; i<QArray.length; i++){
		QArray[i].style.display = 'none';
	}		
	SetQNumReadout();
}

function ChangeQ(ChangeBy){
	if (((CurrQNum + ChangeBy) < 0)||((CurrQNum + ChangeBy) >= QArray.length)){return;}
	QArray[CurrQNum].style.display = 'none';
	CurrQNum += ChangeBy;
	QArray[CurrQNum].style.display = '';
	SetQNumReadout();
//if there's a textbox, set the focus in it
	if (QArray[CurrQNum].getElementsByTagName('input')[0] != null){
		QArray[CurrQNum].getElementsByTagName('input')[0].focus();
	}
}

function SetQNumReadout(){
	document.getElementById('QNumReadout').innerHTML = (CurrQNum+1) + ' / ' + QArray.length;
}

I=new Array();
I[0]=new Array();I[0][0]=100;
I[0][1]='';
I[0][2]='0';
I[0][3]=new Array();
I[0][3][0]=new Array('To get revenge for the misdeed','Right.  Revenge has no place within the military justice system.',1,100,1);
I[0][3][1]=new Array('To deter offenders from breaking the rules again','Sorry.  This is the main goal of punishment.  You are using it as a tool to prevent the person from having problems in the future.',0,0,1);
I[0][3][2]=new Array('To encourage offenders to do their duty','Nope.  This is a key element in awarding punishment.  By encouraging them to do their duty in the future, you make things better both for them and for the Navy overall.',0,0,1);
I[0][3][3]=new Array('To set an example','Sorry.  Punishment must serve as an example to others that the rules will be monitored and enforced fairly for everyone.',0,0,1);
I[0][3][4]=new Array('These are all reasons that punishment is imposed.','Nope.  There is one on the list that is negative in nature.  The other three are positive.  Can you tell which of these is negative?',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('Discipline based on force.','Right!  Discipline based on outside force alone cannot hope to succeed.',1,100,1);
I[1][3][1]=new Array('Discipline based on respect for leaders','Sorry.  Respect for those in authority over you is essential to build a strong organization.',0,0,1);
I[1][3][2]=new Array('Discipline based on confidence in the justice system','Nope.  We must have confidence in our system of military justice if we are going to build teamwork and esprit de corps.',0,0,1);
I[1][3][3]=new Array('Discipline based on fairness','Nope.  We all want and expect to be treated equally and fairly by the system.',0,0,1);
I[1][3][4]=new Array('Discipline based on the compulsion of moral force','Sorry.  Compulsion of moral force is another way of saying self-discipline.  When your conscience compels you to do the right thing, even when no one is watching.  That is a goal of the Navy and should be a personal goal of everyone.',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('Apprehension','Correct.  This would be the first step in the legal process for someone suspected of a crime.',1,100,1);
I[2][3][1]=new Array('Arrest','Sorry.  Arrest is the restraint of a person by an order directing that person to remain within certain specified limits.',0,0,1);
I[2][3][2]=new Array('Confinement','Sorry.  Confinement is physical restraint that deprives a person of freedom.',0,0,1);
I[2][3][3]=new Array('Restraint','Nope.  Restraint refers to the state of being physically constrained, such as when a suspect is handcuffed. ',0,0,1);
I[2][3][4]=new Array('Restriction','Nope.  Restriction is defined as limiting a person to a specific area for a specific period of time.',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('Arrest','Right!  If under arrest, a person cannot be required to perform full military duty.',1,100,1);
I[3][3][1]=new Array('Apprehension','Sorry.  Apprehension is the taking of a person into custody.',0,0,1);
I[3][3][2]=new Array('Restriction','Sorry.  Persons under restriction may be restricted to specified areas, but they may also be required to perform all usual military duties while under such restriction.',0,0,1);
I[3][3][3]=new Array('Confinement','Nope.  Confinement is physical restraint that deprives a person of freedom and it is much more restrictive than arrest.',0,0,1);
I[3][3][4]=new Array('Admonition','Nope.  An admonition is a verbal or written official statement which is a form of punishment under the UCMJ.',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('Restriction','Correct.  Restriction limits an accused person to a specified area and is commonly used to restrain persons awaiting captain\'s mast.',1,100,1);
I[4][3][1]=new Array('Apprehension','Sorry.  Apprehension is the taking of a person into custody.  While still in custody, the person cannot be expected to perform their usual military duties.',0,0,1);
I[4][3][2]=new Array('Arrest','Sorry.  Persons under arrest are specifically forbidden to perform their usual military duties.',0,0,1);
I[4][3][3]=new Array('Confinement','Nope.  Confinement is the physical restraint of a person in a brig or jail.  when this happens the person in question cannot be expected to perform their usual military duties.',0,0,1);
I[4][3][4]=new Array('Incarceration','Nope.  Incarceration is another word for locking someone up, and when that occurs the person cannot be expected to perform their full military duty.',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('Confinement','Correct!  Confinement is not imposed pending trail unless deemed necessary to ensure the presence of the accused or because of the seriousness of the offense charged.',1,100,1);
I[5][3][1]=new Array('Apprehension','Sorry.  Apprehension is the taking of a person into custody.  While still in custody, the person cannot be expected to perform their usual military duties.  Since this is the case they cannot be deprived of their freedom.',0,0,1);
I[5][3][2]=new Array('Arrest','Sorry.  Arrest is the restraint of a person by an order directing that person to remain within certain specified limits, but they are not physically locked in a brig or a jail.',0,0,1);
I[5][3][3]=new Array('Restriction','Nope.  Persons under restriction may be restricted to specified areas, but they may also be required to perform all usual military duties while under such restriction.  Since this is the case they cannot be deprived of their freedom.',0,0,1);
I[5][3][4]=new Array('Restraint','Sorry.  While you are, in effect, restraining them, this is not the proper term that is used when the form of restraint is a brig or a jail.',0,0,1);
I[6]=new Array();I[6][0]=100;
I[6][1]='';
I[6][2]='0';
I[6][3]=new Array();
I[6][3][0]=new Array('By oral or written orders','Correct.  Should time and circumstances allow, these should always be written orders.',1,100,1);
I[6][3][1]=new Array('By oral orders only','Sorry.  While a verbal or oral order can be used, there is another method as well.',0,0,1);
I[6][3][2]=new Array('By written order only','Sorry.  While a written order may be used, there is another method as well.',0,0,1);
I[6][3][3]=new Array('By verbal orders from a military judge only','Nope.  Military officials other than a military judge can order confinement.',0,0,1);
I[6][3][4]=new Array('By written orders from a military judge only','Nope.  Military officials other than a military judge can order confinement.',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('They have the right to choose to receive nonjudicial punishment instead of a courts-martial.','Right!  In fact, it is only the opposite that is true.  A member who is scheduled for nonjudicial punishment has the right to instead ask for a courts-martial.  It doesn\'t work the other way around, however.',1,100,1);
I[7][3][1]=new Array('They have the right to consult with a lawyer.','Sorry.  This is a fundamental right in both civilian law and military law.',0,0,1);
I[7][3][2]=new Array('They have the right to have a lawyer present at any investigations.','Sorry.  This is another fundamental right that is in place to ensure that an accused had the ability to have a professional defense.',0,0,1);
I[7][3][3]=new Array('They have a right to retain their own lawyer at their own expense.','Nope.  If they have the means to hire their own civilian lawyer to help with their defense, they have the right to do so.',0,0,1);
I[7][3][4]=new Array('They have a right to have a lawyer appointed for them without cost.','Nope.  This is a fundamental right to ensure that an accused has professional and adequate means to defend themselves.',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('Any commissioned officer or petty officer.','Correct!  It is important that this authority be broad to give the greatest number of "eyes" to record misconduct.  This also speaks to the additional authority and responsibility of officers and petty officers.',1,100,1);
I[8][3][1]=new Array('The Commanding Officer only','Sorry.  While the CO could fill this slip out, this seldom occurs in practice.',0,0,1);
I[8][3][2]=new Array('The Master Chief Petty Officer only','Sorry.  While the MCPO will review this document and may, in some cases, fill it out, this is generally not the case.',0,0,1);
I[8][3][3]=new Array('The Legal Officer only','Nope.  While the Legal Officer can do this, he or she is not the only one so empowered.',0,0,1);
I[8][3][4]=new Array('Master at Arms personnel only','Nope.  While certain members of the Master at Arms group can fill out this slip, it isn\'t their rating that authorizes them to do this.',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('The article of the <a href="javascript:alert(\'Uniform Code of Military Justice\')">UCMJ </a>the accused is alleged to have violated.','Right!  The sole purpose of this part of the slip is to refer to the specific article(s) of the UCMJ that the accused is thought to have violated.',1,100,1);
I[9][3][1]=new Array('The specific facts and circumstances involved with the violation.','Sorry.  This information is included under the specification portion of the slip.',0,0,1);
I[9][3][2]=new Array('Facts in <a href="javascript:alert(\'Facts that provide plausible reasons for the offense\')">extenuation and mitigation</a> concerning the charge.','Sorry.  Facts in extenuation and mitigation are discovered during the preliminary inquiry and are not included on the slip itself.',0,0,1);
I[9][3][3]=new Array('The names of the accused and any witnesses.','Nope.  This information is included at the top of this slip, but it is not in the charge portion.',0,0,1);
I[9][3][4]=new Array('The article of Naval Regulations the accused is thought to have violated.','Sorry.  While Naval Regulations provide the guidance and general rules of standards and conduct within the Navy, it is the articles of the UCMJ that are used to define misconduct and to prescribe punishments for this misconduct.',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 specific facts and circumstances involved with the violation.','Correct!  It is the responsibility of the Executive Officer to check that these specifications are legally correct.',1,100,1);
I[10][3][1]=new Array('The article of the <a href="javascript:alert(\'Uniform Code of Military Justice\')">UCMJ </a>the accused is alleged to have violated.','Sorry.  The sole purpose of this part of the slip is to refer to the specific article(s) of the UCMJ that the accused is thought to have violated.',0,0,1);
I[10][3][2]=new Array('Facts in <a href="javascript:alert(\'Facts that provide plausible reasons for the offense\')">extenuation and mitigation</a> concerning the charge.','Sorry.  Facts in extenuation and mitigation are discovered during the preliminary inquiry and are not included on the slip itself.',0,0,1);
I[10][3][3]=new Array('The names of the accused and any witnesses.','Nope.  This information is included at the top of this slip, but it is not in the charge portion.',0,0,1);
I[10][3][4]=new Array('The article of Naval Regulations the accused is thought to have violated.','Sorry.  While Naval Regulations provide the guidance and general rules of standards and conduct within the Navy, it is the articles of the UCMJ that are used to define misconduct and to prescribe punishments for this misconduct.',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 Executive Officer','Right.  The Executive Officer acts as the primary point of contact for legal matters within the command and this is one of his or her responsibilities.',1,100,1);
I[11][3][1]=new Array('The Legal Officer','Sorry.  The Legal Officer and the legal office personnel will also check this information, but the primary responsibility is not theirs.',0,0,1);
I[11][3][2]=new Array('The Commanding Officer','Sorry.  While the Commanding Officer has ultimate responsibility for everything that takes place within his or her command, there is another person with this specific responsibility.',0,0,1);
I[11][3][3]=new Array('The Officer or Petty Officer making the report','Nope.  This person is not a legal expert and will not have even filled out this portion of the slip.',0,0,1);
I[11][3][4]=new Array('The lawyer of the accused.','Nope.  The accused may not even have a lawyer at this stage.  Someone within the command itself has this responsibility.',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 facts are reported to the <a href="javascript:alert(\'Executive Officer\')">XO </a>and the accused is scheduled for <a href="javascript:alert(\'NonJudicial Punishment\')">NJP.</a>','Right!  The Executive Officer will conduct a preliminary inquiry to determine if the case should go before a captains mast.',1,100,1);
I[12][3][1]=new Array('The charges and specifications are dropped','Nope.  The investigating officer does not have the authority to drop the charges.',0,0,1);
I[12][3][2]=new Array('The accused is given a verbal warning and released','Sorry.  There is another step below the level of court-martial that the accused would face.',0,0,1);
I[12][3][3]=new Array('The accused is given a written warning and released','Sorry.  There is another step below the level of court-martial that the accused would face.',0,0,1);
I[12][3][4]=new Array('The investigating officer assigns a number of work details to the accused.','Nope.  The investigating officer does not have this authority.',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('Preliminary Inquiry','Right.  This is also called and Executive Officer\'s Inquiry or XOI for short.',1,100,1);
I[13][3][1]=new Array('Charge Sheet Investigation','Sorry.  There is no such thing as a Charge Sheet Investigation.',0,0,1);
I[13][3][2]=new Array('The Report and Disposition of Offenses Slip','Nope.  This is the form used to report alleged violations to the rules and regulations of the UCMJ.',0,0,1);
I[13][3][3]=new Array('Captains Mast','Sorry.  The captain\'s mast, or NJP, is a formal proceeding and follows the informal investigation if it is determined that a chargeable offense has been committed.',0,0,1);
I[13][3][4]=new Array('Summary Court-Martial','Nope.  This is a formal trial and would follow an informal and formal investigation.',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 Executive Officer','Correct.  This is also known as the Executive Officer\'s Inquiry, or XOI for short.',1,100,1);
I[14][3][1]=new Array('The Commanding Officer','Sorry.  The CO conducts the NJP or Captain&#x2019;s Mast and so is not a part of the preliminary inquiry, which determines whether in fact a violation of the UCMJ has occurred and whether it should go on to a Captain\'s Mast.',0,0,1);
I[14][3][2]=new Array('The local Judge Advocate General','Sorry.  The &#x003C;a href="javascript:alert(\'Judge Advocate General\')"&#x003E;JAG &#x003C;/a&#x003E;does not get involved with preliminary inquiries of independent commands.',0,0,1);
I[14][3][3]=new Array('The Command Duty Officer','Nope.  This is an in-port watch and is not associated with legal matters.',0,0,1);
I[14][3][4]=new Array('The Officer of the Deck','Nope.  This is an underway watch and is not associated with legal matters.',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('Facts in mitigation or extenuation.','Right.  It is important to know why a crime was committed, if it has been committed.  For example, someone stealing a loaf of bread is more easy to understand and forgive if you learn that the accused had not eaten anything in the previous week.',1,100,1);
I[15][3][1]=new Array('Extemporaneous facts.','Nope.  There is no such term in the military legal system.  Extemporaneous  means with little or no preparation or forethought.',0,0,1);
I[15][3][2]=new Array('Details of Offenses.','Sorry.  The details of the offenses are going to be included on the charge sheet and they generally do not provide any information in this regard.',0,0,1);
I[15][3][3]=new Array('Charges and specifications.','Sorry.  The formal charges and specifications refer to the specific articles of the UCMJ that are alleged to have been violated.',0,0,1);
I[15][3][4]=new Array('Articles for consideration.','Nope.  there is no such term in the military legal system.',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('Informal oral or written rebukes.','Right.  While not as serious as the other punishments listed, these are still considered punishments and can affect other aspects of a sailor\'s career.',1,100,1);
I[16][3][1]=new Array('Formal oral or written rebukes.','Sorry.  While not as serious as other punishments listed, formal rebukes are still not the least serious of these punishments.',0,0,1);
I[16][3][2]=new Array('Forfeiture of pay','Sorry.  Forfeiture of pay is always considered a serious punishment and is certainly not the least possible punishment of those listed.',0,0,1);
I[16][3][3]=new Array('Restriction','Nope.  Restriction is not a particularly harsh punishment, but there are other less serious punishments listed.',0,0,1);
I[16][3][4]=new Array('Confinement','Nope.  Confinement is a serious matter that is reserved for more serious violations of the UCMJ.  It is not the least of the possible punishments listed.',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('All of the listed exceptions are correct.','Correct.  In each of these cases the General, Flag Officer or officer exercising court-martial jurisdiction may be called upon to convene a courts-martial.  This would prevent them ethically from participating in an NJP.',1,100,1);
I[17][3][1]=new Array('When the CO is a general','Nope.  While this is true, it is not the only circumstance that could cause NJP authority to be delegated.',0,0,1);
I[17][3][2]=new Array('When the CO is a Flag Officer','Nope.  While this is true, it is not the only circumstance that could cause NJP authority to be delegated.',0,0,1);
I[17][3][3]=new Array('When the CO exercises general court-martial jurisdiction','Sorry.  While this is true, it is not the only circumstance that could cause NJP authority to be delegated.',0,0,1);
I[17][3][4]=new Array('This authority cannot be delegated.','Sorry.  While it generally cannot be delegated, exceptions are made for certain circumstances.',0,0,1);
I[18]=new Array();I[18][0]=100;
I[18][1]='';
I[18][2]='0';
I[18][3]=new Array();
I[18][3][0]=new Array('The Captain\'s Mast','Right!  The demonstrated leadership and responsibility of persons serving as COs enables the Military to trust them to fairly try minor legal cases and award appropriate punishment quickly.  This makes the legal system flow more smoothly and strengthens discipline overall.',1,100,1);
I[18][3][1]=new Array('The Preliminary Inquiry','Nope.  This is just an informal investigation process designed to determine whether or not a violation of the UCMJ or Naval Regulations has occurred.',0,0,1);
I[18][3][2]=new Array('The Screening Mast','Sorry.  This is another name for the Executive Officer\'s Inquiry and is simply a formal method to ensure that an offense has been committed and whether it should go on to a Captain\'s Mast, a court-martial or be dismissed.',0,0,1);
I[18][3][3]=new Array('The Executive Officer\'s Inquiry','Sorry.  The Executive Officer\'s Inquiry is simply a formal method to ensure that an offense has been committed and whether it should go on to a Captain\'s Mast, a court-martial or be dismissed.',0,0,1);
I[18][3][4]=new Array('The Courts-Martial','Nope.  Courts-martial are fairly rare in the Services, given the number of people subject to military law.',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('Whether there was a deliberate violation of instructions, orders, or regulations.','Correct!  Such offenses are often of concern more for the defiance of authority they display rather than for the consequences of the actions themselves.',1,100,1);
I[19][3][1]=new Array('Whether there was a specific neglect of duty.','Sorry.  Neglect of duty is something that is taken into consideration, but only if that is all that is involved.  This alone does not determine whether a case should go to a court-martial or not.',0,0,1);
I[19][3][2]=new Array('The dollar amount involved in the offense.','Sorry.  The dollar amount involved in an offense does not play into the decision process as to whether a case should go to a court-martial or not.',0,0,1);
I[19][3][3]=new Array('Whether personal injury resulted during the commission of the offence.','Nope.  This is always an important factor but does not come into play when determining whether a case should go to court-martial or not.',0,0,1);
I[19][3][4]=new Array('The media attention that resulted form the offense.','Nope.  The amount of media attention is not a factor in determining whether a case should go to court-martial or not.',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('Sixty days restriction.','Right!  The maximum amount of restriction that can be given at a Captain\'s Mast is 45 days.',1,100,1);
I[20][3][1]=new Array('Confinement on bread and water for 3 days.','Sorry.  This punishment can be given at Captain\'s Mast but only to enlisted members and only while at sea.',0,0,1);
I[20][3][2]=new Array('Fine of one-half pay for two months.','Sorry.  This is maximum forfeiture of pay allowed at a Captain\'s Mast.  A smaller amount than this is possible, however.',0,0,1);
I[20][3][3]=new Array('Correctional custody for thirty days.','Nope.  Correctional custody (jail or brig) for a period of no longer than 30 days is a valid punishment at a Captain\'s Mast.',0,0,1);
I[20][3][4]=new Array('Reduction in pay grade to the next lower level.','Nope.  Reduction of one pay grade, but no more than one, is a valid punishment at a Captain\'s Mast.',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('Dismissing of the charges','Correct.  Executive Officers have the responsibility for the routine efficiency and discipline of their units and have the authority to dismiss charges at the screening mast if they feel it appropriate.',1,100,1);
I[21][3][1]=new Array('Reduction in rank by two pay grades','Sorry.  The Executive Officer runs the screening mast and cannot award punishment of any kind.',0,0,1);
I[21][3][2]=new Array('Restriction for 30 days','Sorry.  The Executive Officer runs the screening mast and cannot award punishment of any kind.',0,0,1);
I[21][3][3]=new Array('Confinement for up to three days on bread and water','Nope.  This is a punishment that can be awarded to enlisted members only and only at a Captain\'s mast while at sea.',0,0,1);
I[21][3][4]=new Array('The Commanding Officer may elect to forward the case on to a court-martial','Nope.  The Commanding Officer is not a part of the screening mast.  He or she is in charge of the Captain\'s Mast, not the screening mast.',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('An officer placed under arrest in quarters.','Right!  This would normally be done at sea.  During the time the officer is under arrest in his/her quarters (being in hack), they have their meals delivered to them and are not allowed to carry out routine duties.  They may leave their quarters only for religious ceremonies and visits to the head, and must be escorted.',1,100,1);
I[22][3][1]=new Array('An officer placed in confinement in a brig.','Nope.  This would just be called confinement and is not a punishment that could be awarded at a Captain\'s Mast.  It would require a Court-Martial.',0,0,1);
I[22][3][2]=new Array('An enlisted member under arrest in quarters.','Sorry.  Enlisted members are not placed under arrest in quarters.',0,0,1);
I[22][3][3]=new Array('An enlisted member placed in confinement in a brig for three days on rations of only bread and water.','Sorry.  This is a valid punishment at Captain\'s Mast while at sea, but it is simply known as confinement and not as "being in hack".',0,0,1);
I[22][3][4]=new Array('An officer placed on restriction and not allowed to leave the ship.','Nope.  Officers cannot be placed on restriction at Captain\'s Mast.  This could be done by a courts-martial, but it would be rare indeed and it is not the definition of being "in hack".',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('The punishment could be modified or set aside.','Right!  The senior can only modify (lessen) or set aside the punishment.  He or she cannot increase the punishment nor award a different punishment than was awarded at the Captain\'s Mast.',1,100,1);
I[23][3][1]=new Array('The punishment could be modified or increased.','Sorry.  The senior cannot increase a punishment upon review.',0,0,1);
I[23][3][2]=new Array('The punishment could be set aside or increased.','Sorry.  The senior cannot increase a punishment upon review.',0,0,1);
I[23][3][3]=new Array('The punishment could be modified or a different punishment awarded.','Nope.  The senior cannot award a different punishment upon review.',0,0,1);
I[23][3][4]=new Array('The punishment could be set aside or a different punishment awarded.','Nope.  The senior cannot award a different punishment upon review.',0,0,1);
I[24]=new Array();I[24][0]=100;
I[24][1]='';
I[24][2]='0';
I[24][3]=new Array();
I[24][3][0]=new Array('The degree of punishment that can be awarded by the courts-martial.','Correct.  A courts-martial type is considered to be more severe if it can award a greater amount of punishment on a convicted service member.',1,100,1);
I[24][3][1]=new Array('The rank of the members running the courts-martial.','Sorry.  As a general rule it is true that more severe forms of courts-martial are run by more senior personnel, but there is not a direct relationship.',0,0,1);
I[24][3][2]=new Array('The degree of seriousness of the charges.','Sorry.  While more serious charges generally warrant more severe courts-martial, there is not a direct relationship between the severity and the seriousness of the charges.',0,0,1);
I[24][3][3]=new Array('The rank or rate of the individual being tried.','Nope.  Severity is not tied to the rank or rate of an individual.',0,0,1);
I[24][3][4]=new Array('How long the courts-martial is scheduled to take.','Nope.  The amount of time spent in a particular courts-martial does not play into the severity of the courts-martial.',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('Summary courts-martial','Right!  This simple court procedure is designed to administer prompt justice for relatively minor offenses through a simple court procedure.  It is intended strictly for enlisted members.',1,100,1);
I[25][3][1]=new Array('General courts-martial','Sorry.  This is generally the type of courts-martial that an officer will appear before when charged with a serious offense.',0,0,1);
I[25][3][2]=new Array('Special courts-martial','Sorry.  Special courts-martial are the first level of courts-martial that can try officers.',0,0,1);
I[25][3][3]=new Array('Captain\'s Mast','Nope.  Captains Mast, or NJP, can be used as a legal proceeding against both officers and enlisted members alike.',0,0,1);
I[25][3][4]=new Array('<a href="javascript:alert(\'NonJudicial Punishment\')">NJP</a>','Nope.  NJP, or Captains Mast, can be used as a legal proceeding against both officers and enlisted members alike.',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('A Summary Court-Martial','Correct!  In the Navy, this officer is generally a lieutenant or senior and should not have been either the accuser nor the investigator in the case, nor closely associated with the accused in normal daily work.',1,100,1);
I[26][3][1]=new Array('A General Court-Martial','Sorry.  A General Courts-Martial always has a military judge ( a commissioned officer) and at least five members, one of which may be enlisted.',0,0,1);
I[26][3][2]=new Array('A Special Court-Martial','Sorry.  There are always at least three members on a Special Court-Martial, two of which must be officers.',0,0,1);
I[26][3][3]=new Array('A Captain\'s Mast','Nope.  Although there is only one commissioned officer present (the CO), this is not a type of courts-martial.',0,0,1);
I[26][3][4]=new Array('An Executive Officer\'s Inquiry','Nope.  Although there is only one commissioned officer present (the XO), this is not a type of courts-martial.',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('They are similar except that the maximum limits of time and dollars are larger at a Summary Court-Martial.','Right!  Longer amounts of time spent in restriction and a greater forfeiture of pay is possible at a Summary Court-Martial than for a Captain\'s Mast.',1,100,1);
I[27][3][1]=new Array('They are the same in terms of the level of punishments awarded.','Nope.  While there are the same in some areas of punishment, they are not the same in all areas.',0,0,1);
I[27][3][2]=new Array('A Summary Court-Martial may award significantly higher punishments in all categories.','Sorry.  The punishments are not higher in some of the categories.',0,0,1);
I[27][3][3]=new Array('A Summary court-Martial may award slightly higher punishments in all categories.','Sorry.  The punishments are not higher in some of the categories.',0,0,1);
I[27][3][4]=new Array('Punishments can be awarded at both of these proceedings for the same charges.','Nope.  A Service member will only be charged and have punishments awarded at one of these proceedings.  You cannot try a person a second time for the same offense under military law.',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('<a href="javascript:alert(\'Cases where the death penalty is not an authorized punishment.\')">Noncapital</a>','Correct!  Cases where capital punishment could be awarded are normally tried at General Courts-Martial.',1,100,1);
I[28][3][1]=new Array('Capital','Sorry.  Capital cases, where a possible authorized punishment is death, are normally handled in a General Court-Martial.',0,0,1);
I[28][3][2]=new Array('Navy-related','Sorry.  Remember, the Uniform Code of Military Justice applies to all of the services equally.',0,0,1);
I[28][3][3]=new Array('Crimes committed at sea','Nope.  The location of where the crime is alleged to have occurred has no bearing on a Special Court-Martial.',0,0,1);
I[28][3][4]=new Array('Cases involving civilians','Nope.  Civilians are not subject to the UCMJ unless martial law is established.',0,0,1);
I[29]=new Array();I[29][0]=100;
I[29][1]='';
I[29][2]='0';
I[29][3]=new Array();
I[29][3][0]=new Array('The Commanding Officer, Three','Correct!  There can be more than three members, and there generally are.',1,100,1);
I[29][3][1]=new Array('The Executive Officer, Three','Nope.  The Executive Officer is not the officer who has the authority to do this.',0,0,1);
I[29][3][2]=new Array('The Commanding Officer, Five','Sorry.  Although there can be five members, that is not the minimum number of members.',0,0,1);
I[29][3][3]=new Array('The Executive Officer, Five','Nope.  The Executive Officer is not the officer who has the authority to do this.',0,0,1);
I[29][3][4]=new Array('The Judge Advocate General, Three','Nope.  Except for providing advice when asked, JAGs do not get involved in drawing up convening orders for Special Courts-Martial.',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('A military judge','Right!  If the accused requests this in writing after consultation with their defense counsel, and if the military judge approves, that judge may sit as a one-person Special Court-Martial.',1,100,1);
I[30][3][1]=new Array('The Senior Officer on the Court-Martial','Sorry.  The Senior Officer can only act as the judge when there are three or more members, not in the rare case of a one-person Special Court-Martial.',0,0,1);
I[30][3][2]=new Array('The Senior Enlisted Member on the Court-Martial','Sorry.  There may or may not be an enlisted member on the court-martial and in any case he or she would not be the one acting as the judge in a one-person Special Court-Martial.',0,0,1);
I[30][3][3]=new Array('The Commanding Officer','Nope.  The Commanding Officer, as the convening authority for the court-martial, cannot play a role in the court-martial itself.',0,0,1);
I[30][3][4]=new Array('The Executive Officer','Nope.  The Executive Officer does not generally play a part in Special Courts-Martial.',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('He or she is not considered a member of the court and does not vote.','Right!  He or she will rule on legal procedures during the trail and instruct the court on the elements of each offense charged prior to closure of the court for vote.',1,100,1);
I[31][3][1]=new Array('He or she must be the senior member of the court.','Sorry.  While they might be the senior member, whether or not they are they are appointed as the president of the court based upon their knowledge and experience.',0,0,1);
I[31][3][2]=new Array('He or she must be assigned to the accused\'s defense team.','Nope.  A defense council will either be appointed or provided by the accused at their own expense for these proceedings.',0,0,1);
I[31][3][3]=new Array('He or she casts the tie-breaking vote in the event the courts-martial members deadlock','Nope.  As president, the military judge would not be allowed to vote at all.',0,0,1);
I[31][3][4]=new Array('He or she has sole responsibility for the conduct of the trail.','Sorry.  This is only true if the military judge is the only member of the special courts-martial.',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('A peremptory challenge','Right.  The accused, through his or her counsel, may request that any of the members be dismissed without having to give a reason.  If the challenge reduces the court membership below three, the convening authority must appoint another member.',1,100,1);
I[32][3][1]=new Array('A challenge "for cause"','Sorry.  The defense counsel for the accused can exercise more than one challenge for cause if there is a reason that a particular member of the board might not be able to impartially judge the case.',0,0,1);
I[32][3][2]=new Array('An impromptu challenge','Nope.  There is no such thing as an impromptu challenge.',0,0,1);
I[32][3][3]=new Array('An immediate challenge','Nope.  There is no such thing as an immediate challenge.',0,0,1);
I[32][3][4]=new Array('A prescribed challenge','Nope.  There is no such thing as a prescribed challenge.',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('Two thirds','Correct!  For a three-person court (the minimum) at least two of the three members need to concur on the guilt of the accused and on the proper sentence.',1,100,1);
I[33][3][1]=new Array('Three quarters','Sorry.  The standard is not this high.  Voting is by secret ballot and all members must vote.',0,0,1);
I[33][3][2]=new Array('One hundred percent','Sorry.  Unanimous agreement on the guild of the accused and/or the degree of punishment awarded is not required.',0,0,1);
I[33][3][3]=new Array('Simple','Nope. A simple majority means greater than fifty percent.  The standard is higher than this.  Voting is by secret ballot and all members must vote.',0,0,1);
I[33][3][4]=new Array('Fifty one percent or greater.','Nope. The standard is higher than this.  Voting is by secret ballot and all members must vote.',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('A Bad Conduct Discharge','Correct!  In addition to this, the convicted member can receive up to 6 months confinement, hard labor without confinement for up to three months and forfeiture of pay of up to two-thirds pay per month for 3 months.',1,100,1);
I[34][3][1]=new Array('A Dishonorable Discharge','Sorry.  Dishonorable discharges can only be awarded by a General Courts-Martial.',0,0,1);
I[34][3][2]=new Array('An Honorable Discharge','Sorry.  This is the best kind of discharge you can get and is not considered a punishment.',0,0,1);
I[34][3][3]=new Array('A Good Of The Service Discharge','Nope.  This type of discharge is an administrative action and not a legal action.',0,0,1);
I[34][3][4]=new Array('A General Discharge','Nope.  A general discharge is an administrative action and not a legal action.',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('Hard labor without confinement for six months.','Right.  The maximum time limit for hard labor without confinement is three months for a special court-martial.',1,100,1);
I[35][3][1]=new Array('A Bad Conduct Discharge.','Sorry.  This is the most severe discharge that can be awarded at a special court-martial.',0,0,1);
I[35][3][2]=new Array('Confinement for three months','Sorry.  Confinement for up to 6 months can be authorized at special courts-martial.',0,0,1);
I[35][3][3]=new Array('Forfeiture of two-thirds pay per month for three months','Nope.  This is the maximum authorized amount of money that can be taken away from a member convicted at a special court-martial.',0,0,1);
I[35][3][4]=new Array('Detention of two-thirds pay per month for three months.','Nope.  This is a legal punishment at a special court-martial.  Detention of pay means that the pay is withheld for the period of the detention and then given back to the convicted member.  It is sometimes used as a "forced savings plan".',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('A Squadron Commanding Officer','Right!  The highest form of courts-martial that a Squadron or Ship\'s Commanding Officer could convene is a special court-martial.',1,100,1);
I[36][3][1]=new Array('The President','Sorry.  The President, as the Commander In Chief, is the most senior military officer and has the right to convene a general court-martial.',0,0,1);
I[36][3][2]=new Array('Any General officer','Nope.  General officers in all of the Services have the power to convene a general court-martial on the basis of their rank alone.',0,0,1);
I[36][3][3]=new Array('Any Flag officer','Nope.  The term "Flag" officer refers to Navy Admirals.  Admirals do have convening authority as a result of their rank.',0,0,1);
I[36][3][4]=new Array('The Commanding Officer of a Naval Station','Sorry.  Commanding officers of Naval Stations have General court-martial convening authority, but only if the station or base lies outside of the continental limits of the United States.',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('Six','Right.  Five members and a military judge.',1,100,1);
I[37][3][1]=new Array('Five','Sorry.  While there must be at least five jurors, there are more officers required to make up the minimum number.',0,0,1);
I[37][3][2]=new Array('Three','Sorry.  You may be thinking of the minimum requirement for a special court-martial, which is three.',0,0,1);
I[37][3][3]=new Array('Seven','Nope.  Although there could be seven members, this is not the minimum number possible.',0,0,1);
I[37][3][4]=new Array('Twelve','Nope.  You may be thinking of the requirement in the civilian criminal law system for a trial by a jury of 12 peers.  this is not a requirement of a military general court-martial.',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('If martial law has been declared.','Right.  This has to be officially declared and is usually the result of a breakdown of normal civilian authority.',1,100,1);
I[38][3][1]=new Array('Civilians cannot be tired under the system of military justice.','Sorry.  Under certain circumstances, they can.',0,0,1);
I[38][3][2]=new Array('If the civilian commits a crime onboard a military installation.','Sorry.  Civilians committing crimes on board bases or installations are turned over to civilian authorities to be charged and tried.',0,0,1);
I[38][3][3]=new Array('If a civilian commits a crime onboard a military ship or aircraft.','Nope.  In these cases the civilian would be held and turned over to the first available civilian authorities to be prosecuted by the civilian legal system.',0,0,1);
I[38][3][4]=new Array('If a civilian commits a crime against a military member stationed outside of the limits of the United States.','Nope.  These cases would normally be handled by the local authorities.',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('Inciting a riot','Right!  While a serious act and deserving of severe punishment, it is not punishable by death under the UCMJ.',1,100,1);
I[39][3][1]=new Array('Desertion in time of war','Sorry.  This crime warrants punishment up to and including the death sentence.  The last time it was carried out was by the Army during World War II.',0,0,1);
I[39][3][2]=new Array('Mutiny','Sorry.  In fact, the last hanging in the U.S. Navy happened over 100 years ago when a Midshipman accused and convicted of mutiny was given the death sentence and hanged at sea.',0,0,1);
I[39][3][3]=new Array('<a href="javascript:alert(\'an illegal action inciting resistance to lawful authority and tending to cause the disruption or overthrow of the government\')">Sedition</a>','Nope.  Sedition, defined as inciting resistance to lawful authority and tending to cause the disruption or overthrow of the government, is an act that is punishable by the death penalty under the UCMJ. ',0,0,1);
I[39][3][4]=new Array('Spying','Nope.  The death sentence is an allowable punishment for spying and it has been used in the past.',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('Appeal of a court-martial conviction is automatic.  Civilians must show reasonable grounds for appeal.','Correct!  Each and every courts-martial conviction is automatically reviewed for accuracy of procedures and for the legality of the punishments.  Convicted civilians must demonstrate reasonable grounds for appeal before they can proceed.',1,100,1);
I[40][3][1]=new Array('Appeal of a conviction within the military court system is free where it is not in the civilian court system.','Sorry.  While it is free within the military court system, it may not be so in the civilian court system, depending on the circumstances and the financial status of the convicted person.',0,0,1);
I[40][3][2]=new Array('Appeal of a conviction within the military court system requires reasonable grounds where it does not in the civilian court system.','Sorry.  Reasonable grounds for appeal are not required to have a courts-martial conviction appealed within the military justice system.',0,0,1);
I[40][3][3]=new Array('Appeals of court-martial convictions are not allowed.','Nope.  Not only are they allowed, they are automatic.',0,0,1);
I[40][3][4]=new Array('Only officers may appeal their convictions to higher authority.','Nope.  Appeal of a court-martial conviction is automatic for all members of the Armed Forces.',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('He or she has none.','Right.  The Convening Authority must accept the decision of the court.',1,100,1);
I[41][3][1]=new Array('He or she can reduce the sentence, but not increase it.','Sorry.  How cold you reduce the sentence of acquittal?  The person is not guilty of anything and so cannot receive a punishment.',0,0,1);
I[41][3][2]=new Array('He or she can increase the sentence within prescribed limits.','Sorry.  A reviewing authority can never increase the sentence awarded at trial.',0,0,1);
I[41][3][3]=new Array('He or she can order the case to be retried.','Nope.  If the first court-martial acquitted the accused, the convening authority must accept this verdict.',0,0,1);
I[41][3][4]=new Array('He or she can order a review of the case by another court.','Nope.  If the first court-martial acquitted the accused, the convening authority must accept this verdict.',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('If a Bad Conduct Discharge was awarded.','Correct!  A Bad Conduct Discharge is such a severe punishment with life-long effects that it requires an automatic review at this level.',1,100,1);
I[42][3][1]=new Array('If confinement of more than three months was awarded.','Sorry.  The amount of time in confinement, as long as it did not exceed the legal limit, would not be cause for an automatic review at this level.',0,0,1);
I[42][3][2]=new Array('If hard labor in excess of two months was awarded.','Sorry.  The amount of hard labor, as long as it did not exceed the legal limit, would not be cause for an automatic review at this level.',0,0,1);
I[42][3][3]=new Array('All special court-martial convictions are automatically reviewed by the Office of the Judge Advocate General of the Navy.','Nope.  The vast majority are not reviewed at this level.  It takes a special set of circumstances for this to be an automatic review.',0,0,1);
I[42][3][4]=new Array('This office only reviews the decisions of General Courts-Martial, not Special.','Nope.  While it is true that General Courts-Martial convictions are reviewed at this level, there are times when Special Court-Martial convictions are reviewed as well.',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('Terrorism conviction','Right!  Being convicted of participating in a terrorist act would not in and of itself warrant the automatic review at this level.  It would depend on the severity of the punishment awarded.',1,100,1);
I[43][3][1]=new Array('Death penalty sentence','Sorry.  This is the highest form of punishment and therefore it is given the greatest levels of automatic review.',0,0,1);
I[43][3][2]=new Array('Dismissal of an officer','Sorry.  As officers get their commissions from Congress, the dismissal of an officer for cause is a serious matter that requires automatic review at this level.',0,0,1);
I[43][3][3]=new Array('Bad Conduct Discharge','Nope.  A Bad Conduct Discharge is such a severe punishment with life-long effects that it requires an automatic review at this level.',0,0,1);
I[43][3][4]=new Array('Confinement for more than one year.','Sorry.  All convictions that award confinement for periods over one year are automatically reviewed by the Court of Military Review.',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 Court of Military Appeals','Right!  This court is composed of three civilian judges appointed by the President and confirmed by the U.S. Senate.  Appeals to this level are not automatic, but a convicted military member may petition to have their case reviewed for just cause.',1,100,1);
I[44][3][1]=new Array('The Court of Military Review','Sorry.  This is a high level body which reviews all convictions of General Courts-Martial and some Special courts-Martial cases, but it is not the highest level of review in the military system.',0,0,1);
I[44][3][2]=new Array('The U.S. Supreme Court','Sorry.  While this is the supreme law body of the United States, it is not the highest level of review within the military justice system.',0,0,1);
I[44][3][3]=new Array('The Office of the Judge Advocate General of the Navy','Nope.  This office handles the second or third level of appeal within the Navy\'s justice system, but it is not used by the other Services nor is it the highest level of appeal within the military justice system.',0,0,1);
I[44][3][4]=new Array('The Convening Authority','Nope.  The officer who orders a courts-martial is considered to be the convening authority.  He or she also serves as the first level of appeal in the process, not the highest.',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('Dishonorable','Correct.  This type of discharge is considered to be such a harsh punishment with lifelong consequences that it can only be awarded as punishment at the most severe type of courts-martial.',1,100,1);
I[45][3][1]=new Array('Bad conduct','Sorry.  Bad Conduct Discharges can be awarded by either a Special or a General Courts-Martial.',0,0,1);
I[45][3][2]=new Array('Good of the Service','Sorry.  This is an administrative discharge and not the type of discharge given as punishment.',0,0,1);
I[45][3][3]=new Array('General','Nope.  This is an administrative discharge and not the type of discharge given as punishment.',0,0,1);
I[45][3][4]=new Array('Honorable','Nope.  This is the best kind of discharge and not considered punishment.',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';
	}
	

	

	
	CompleteEmptyFeedback();

	SetUpQuestions();
	ClearTextBoxes();
	CreateStatusArray();
	

	
//Check search string for q parameter
	if (document.location.search.length > 0){
		if (ShuffleQs == false){
			var JumpTo = parseInt(document.location.search.substring(1,document.location.search.length))-1;
			if (JumpTo <= QsToShow){
				ChangeQ(JumpTo);
			}
		}
	}
}

function ShowHideQuestions(){
	FuncBtnOut(document.getElementById('ShowMethodButton'));
	document.getElementById('ShowMethodButton').style.display = 'none';
	if (ShowingAllQuestions == false){
		for (var i=0; i<QArray.length; i++){
				QArray[i].style.display = '';
			}
		document.getElementById('Questions').style.listStyleType = 'decimal';
		document.getElementById('OneByOneReadout').style.display = 'none';
		document.getElementById('ShowMethodButton').innerHTML = ShowOneByOneCaption;
		ShowingAllQuestions = true;
	}
	else{
		for (var i=0; i<QArray.length; i++){
				if (i != CurrQNum){
					QArray[i].style.display = 'none';
				}
			}
		document.getElementById('Questions').style.listStyleType = 'none';
		document.getElementById('OneByOneReadout').style.display = '';
		document.getElementById('ShowMethodButton').innerHTML = ShowAllQuestionsCaption;
		ShowingAllQuestions = false;	
	}
	document.getElementById('ShowMethodButton').style.display = 'inline';
}

function CreateStatusArray(){
	var QNum, ANum;
//For each item in the item array
	for (QNum=0; QNum<I.length; QNum++){
//Check if the question still exists (hasn't been nuked by showing a random selection)
		if (document.getElementById('Q_' + QNum) != null){
			State[QNum] = new Array();
			State[QNum][0] = -1; //Score for this q; -1 shows question not done yet
			State[QNum][1] = new Array(); //answers
			for (ANum = 0; ANum<I[QNum][3].length; ANum++){
				State[QNum][1][ANum] = 0; //answer not chosen yet; when chosen, will store its position in the series of choices
			}
			State[QNum][2] = 0; //tries at this q so far
			State[QNum][3] = 0; //incrementing percent-correct values of selected answers
			State[QNum][4] = 0; //penalties incurred for hints
			State[QNum][5] = ''; //Sequence of answers chosen by number
		}
		else{
			State[QNum] = null;
		}
	}
}



function CheckMCAnswer(QNum, ANum, Btn){
//if question doesn't exist, bail
	if (State[QNum].length < 1){return;}
	
//Get the feedback
	Feedback = I[QNum][3][ANum][1];
	
//Now show feedback and bail if question already complete
	if (State[QNum][0] > -1){
//Add an extra message explaining that the question
// is finished if defined by the user
		if (strQuestionFinished.length > 0){Feedback += '<br />' + strQuestionFinished;}
//Show the feedback
		ShowMessage(Feedback);
		return;
	}
	
//Hide the button while processing
	Btn.style.display = 'none';

//Increment the number of tries
	State[QNum][2]++;
	
//Add the percent-correct value of this answer
	State[QNum][3] += I[QNum][3][ANum][3];
	
//Store the try number in the answer part of the State array, for tracking purposes
	State[QNum][1][ANum] = State[QNum][2];
	State[QNum][5] += String.fromCharCode(65+ANum) + ',';
	
//Should this answer be accepted as correct?
	if (I[QNum][3][ANum][2] < 1){
//It's wrong

//Mark the answer
		Btn.innerHTML = IncorrectIndicator;
		
//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{
			State[QNum][0] = ((TotAns-(Tries-1))/TotAns)*(PercentCorrect/(100*Tries));
		}
		if (State[QNum][0] < 0){
			State[QNum][0] = 0;
		}
	}
}

function GetTotalMCAnswers(QNum){
	var Result = 0;
	for (var ANum=0; ANum<I[QNum][3].length; ANum++){
		if (I[QNum][3][ANum][4] == 1){ //This is an MC answer
			Result++;
		}
	}
	return Result;
}

function FinalAnswer(QNum){
	var UnchosenAnswers = 0;
	var FinalAnswer = -1;
	for (var ANum=0; ANum<I[QNum][3].length; ANum++){
		if (I[QNum][3][ANum][4] == 1){ //This is an MC answer
			if (State[QNum][1][ANum] < 1){ //This answer hasn't been chosen yet
				UnchosenAnswers++;
				FinalAnswer = ANum;
			}
		}
	}
	if (UnchosenAnswers == 1){
		return FinalAnswer;
	}
	else{
		return -1;
	}
}





function CalculateOverallScore(){
	var TotalWeighting = 0;
	var TotalScore = 0;
	
	for (var QNum=0; QNum<State.length; QNum++){
		if (State[QNum] != null){
			if (State[QNum][0] > -1){
				TotalWeighting += I[QNum][0];
				TotalScore += (I[QNum][0] * State[QNum][0]);
			}
		}
	}
	Score = Math.floor((TotalScore/TotalWeighting)*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);
	}
}










//-->

//]]>


