function Launch(URL,Name,Features) { //v2.0

switch(URL){
	case "Defense":
	var 	version 		= "dod"
			break;
	case "Federal":
	var 	version 		= "fed"
			break;
	case "Intelligence":
	var 	version 		= "int"
			break;
	default:
	var 	version 		= "dod"
			break;
	}
	var 	location 		= "common/build/web_";
	var		extension		= ".htm";
	var		cached			= false;
	var		name			= "_blank";
	var 	features		= "width=900,height=560";
	
	var 	page 			= 
			location 		+ 
			version			+
			extension		+ "?" +
			cached			+ "," +
			ReviewMode 		+ "," +
			LoggingMode 	+ "," +
			DebugMode 		+ "," +
			DebugBehavior;
			
      window.open(page,name,features);
}

function Relaunch(URL,Name,Features) { //v2.0

switch(URL){
	case "Defense":
	var 	version 		= "dod"
			break;
	case "Federal":
	var 	version 		= "fed"
			break;
	case "Intelligence":
	var 	version 		= "int"
			break;
		default:
	var 	version 		= "dod"
			break;
	}
	var 	location 		= "common/build/web_";
	var		extension		= ".htm";
	var		cached			= true;
	var		name			= "_blank";
	var 	features		= "width=900,height=560";
	
	var 	page 			= 
			location 		+ 
			version			+
			extension		+ "?" +
			cached			+ "," +
			ReviewMode 		+ "," +
			LoggingMode 	+ "," +
			DebugMode 		+ "," +
			DebugBehavior;
			
      window.open(page,name,features);
}

function Open(URL,Name,Features) { //v2.0
      window.open(URL,Name,Features);
}


var		ReviewMode 			= false;
var		LoggingMode 		= false; 
var		DebugMode 			= false; 
var		DebugBehavior		= false; 

function initializeForm(){
	
	if (userType == "Internal"){
		document.write('    <div><p>');
		document.write('	<input type="checkbox" id="checkReviewMode" checked="false" onclick="setReviewMode(this)">Reviewer Mode');
		document.write('	<input type="checkbox" id="checkLoggingMode" checked="false" onclick="setLoggingMode(this)">Logging Mode');
		document.write('	<input type="checkbox" id="checkDebugMode" checked="false" onclick="setDebugMode(this)">Debug Mode');
		document.write('	<input type="checkbox" id="checkDebugBehavior" checked="false" onclick= "setDebugBehavior(this)">Debug Behavior');
		document.write('	</p></div>');
	}else{
	}
		document.write('    <noscript> <div class="reqsNo"><img src="common/images/interface/reqs_no.gif" class="reqsImage" alt="Does not meet the criteria to run this courseware" />');
		document.write('    Your browser does not support JavaScript. JavaScript is required to view this course.');
		document.write('    </div></noscript>');
		document.write(' 	<div class="browserTest">');
		document.write('	</div>');
}

basicTestPage();


function setReviewMode(checkbox){ 
	ReviewMode 			= checkReviewMode.checked; 
	//alert(ReviewMode); 
}	
function setLoggingMode(checkbox){ 
	LoggingMode 		= checkLoggingMode.checked; 
	//alert(LoggingMode); 
}	
function setDebugMode(checkbox){ 
	DebugMode 			= checkDebugMode.checked; 
	//alert(DebugMode); 
}	
function setDebugBehavior(checkbox){ 
	DebugBehavior 		= checkDebugBehavior.checked; 
	//alert(DebugBehavior); 
}

function checkAll(checktoggle)
{
  var checkboxes = new Array(); 
  checkboxes = document.getElementsByTagName('input');
 
  for (var i=0; i<checkboxes.length; i++)  {
    if (checkboxes[i].type == 'checkbox')   {
      checkboxes[i].checked = checktoggle;
    }
  }
}

initializeForm();

checkAll();



