var thisID = -1;
var maxWidth  = screen.availWidth - 10;
var maxHeight = screen.availHeight - 10;

var szURL = "";
var hasLMS = false;
var bHasAudio = true;
var bEnablePreloader = true;

function openPlayback(url) {
	// to detect the Simulation connected to LMS or not
	szURL = url;
	if(!hasLMS)
	{
		hasLMS = (doLMSInitialize() == "true"? true: false);
		if (hasLMS) {
			doLMSSetValue("cmi.core.lesson_status", "incomplete");
		}
	}

	parent.parent.hasLMS = hasLMS;
	setLocalCookie("RWD-hasLMS", hasLMS.toString(), 1);

	window.open("standby.htm",'Flash','width='+maxWidth+',height='+maxHeight+',top=0,left=0,status=no,resizable=yes');
}

function checkboxClick(element){
	bHasAudio = (element.checked ? true: false);	
}

function finishPlayback() {
	if (LMSIsInitialized())	{
		doLMSFinish();
	}
}