// static size for SWF
var swfW = "1012";
var swfH = "657";

// scale SWF if in child frame
if (top != self) {
	// tried 100% here but it did not work
	swfW = "788";
	swfH = "541";
}

flashAttributes = {
	//all properties initially empty strings populated by interface.swf with fscommand for use by debugger
	courseTitle: "",
	moduleTitle: "",
	curTopic: "",
	curLoc: "",
	curSwf: "",
	fileName: "interface.swf",
	width: swfW,
	height: swfH,
	backColor: "#ffffff"
};

// Hook for Internet Explorer.
function ieHook() {		
	if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
		var strVB = '<script language=\"VBScript\"\>\n';
		strVB += 'On Error Resume Next\n';
		strVB += 'Sub swf_sco_FSCommand(ByVal command, ByVal args)\n';
		strVB += '	Call swf_sco_DoFSCommand(command, args)\n';
		strVB += 'End Sub\n';
		strVB += '</script\>\n';
		document.write(strVB);
	}
}

function closeLesson() {
	exitX();
	exitSCO();
}

//for ie, use onbeforeunload, otherwise use onunload
if (window.onbeforeunload) {
	onbeforeunload = closeLesson;
} else {
	onunload = closeLesson;
}

