var windowWidth, windowHeight;
var strTitle = "";
var blnHTMLFrame = false;
var theWindow;

var resizable = 1;
if (window.navigator.appName.indexOf("Netscape") != -1){
	resizable = 0;
} 

windowWidth = window.screen.availWidth - 10;
windowHeight = window.screen.availHeight - 40;		

var playmode;

var strHREF = document.location.href;
var nBegin = strHREF.indexOf("aicc_sid");
var nEnd;
var strAICCSID = "";
if (nBegin == -1) {
	nBegin = strHREF.indexOf("AICC_SID");
}
if (nBegin != -1) {
	nEnd = strHREF.indexOf("&", nBegin);
	if (nEnd == -1) nEnd = strHREF.length;
	strAICCSID = strHREF.substring(nBegin+9, nEnd);
}

var strAICCURL = "";
nBegin = strHREF.indexOf("aicc_url");
if (nBegin == -1) {
	nBegin = strHREF.indexOf("AICC_URL");
}
if (nBegin != -1) {
	nEnd = strHREF.indexOf("&", nBegin);
	if (nEnd == -1) nEnd = strHREF.length;
	strAICCURL = strHREF.substring(nBegin+9, nEnd);
}


function showPlayback(mode) 
{
	playmode = mode;
	var title;
	switch (mode) {
	case 1: 
		{	
		title = strTitle + " - auto playback";
		break;
		}
	case 2: 
		{	
		title = strTitle + " - standard tutorial";
		break;
		}
	case 3: 
		{
		title = strTitle + " - self test"; 
		break;
		}
	case 4:
		{
		title = strTitle + " - assessment";
		break;
		}		
	}
	theWindow = window.open("playback.htm", null, "width="+windowWidth+",height="+windowHeight+",resizable="+resizable+",scrollbars=0,status=0,toolbar=0,menubar=0,location=0,top=0,left=0");
	theWindow.focus();
	theWindow.document.title = title;
}

function disableAudio() {
	document.frmOption.playaudio.checked = false;
}
function disableHTML() {
	document.frmOption.htmlframe.checked = false;
}
strTitle = "Login";
blnHTMLFrame = false;
