//note, it is necessary that the width and height of the flash div be passed because IE (as of 6) had non-standard 
// means of getting computed style (style from linked stylesheet) with javascript
function loadContent(divID, divW, divH) {
	//resizeWin(screen.availWidth, screen.availHeight);
	window.moveTo(0,0);
	window.resizeTo(screen.availWidth, screen.availHeight);
	
	var myObj = document.getElementById(divID).style;

	//thanks quirksmode.org for positioning info
	var portW,portH;
	if (self.innerHeight) { // all except Explorer
		portW = self.innerWidth;
		portH = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) {	// Explorer 6 Strict Mode
		portW = document.documentElement.clientWidth;
		portH = document.documentElement.clientHeight;
	} else if (document.body) { // other Explorers
		portW = document.body.clientWidth;
		portH = document.body.clientHeight;
	}

	var dx = Math.round((portW/2)-(divW/2));
	var dy = Math.round((portH/2)-(divH/2));
	
	// reposition and show div
	myObj.left = dx  + "px";
	myObj.top = dy + "px";
	//myObj.visibility = "visible"; 
	
	//div has been positioned, check for lms and write the flash object
	if (loadSCO()) {
		for (var i in objLMS) addFlashVar(i, objSCO[i]);
	}
	addFlashVar("content_debug", content_debug);		
	var theDiv = document.getElementById(divID);
	theDiv.innerHTML = createSWFObject();
}

var vidWin = null;
function launchVideo(filename) {
	var loc = 'directories=0,location=0,menubar=0,status=0,titlebar=0,toolbar=0,scrollbars=0,width=432,height=392,resizable=0';
	if (vidWin && !vidWin.closed) vidWin.close();
	vidWin = window.open('../global/resources/video.htm?filename='+filename, 'theVidWin',loc);	
}

