// -----------------------------------------------------------
// Flash
// -----------------------------------------------------------
function initVUI(fileName,bgColour,myWMode,flashVersion,vuiD,vuiC,vuiX,vuiM,vuiV,vuiN,vuiFR) {
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+flashVersion+'" width="100%" height="100%" id="index" align="middle">');
	document.write('<param name="allowScriptAccess" value="always" />');
	document.write('<param name="movie" value="'+fileName+'" />');
	document.write('<param name="menu" value="false" />');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="wmode" value="'+myWMode+'" />');
	document.write('<param name="flashvars" value="vuiFR='+vuiFR+'&vuiD='+vuiD+'&vuiC='+vuiC+'&vuiX='+vuiX+'&vuiM='+vuiM+'&vuiV='+vuiV+'&vuiN='+vuiN+'" />');
	document.write('<param name="bgcolor" value="'+bgColour+'" />');
	document.write('<embed src="'+fileName+'" bgcolor="'+bgColour+'" wmode="'+myWMode+'" menu="false" quality="high" width="100%" height="100%" name="index" align="middle" flashvars ="vuiFR='+vuiFR+'&vuiD='+vuiD+'&vuiC='+vuiC+'&vuiX='+vuiX+'&vuiM='+vuiM+'&vuiV='+vuiV+'&vuiN='+vuiN+'" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
}

function showFlashNine(which){
	// TODO
	 document.getElementById('flash9Layer').innerHTML = '<'+'object id="flash9Page" name="flash9Page" width="100%" height="100%" type="text/html" data="'+which+'"><\/object>';

}

// -----------------------------------------------------------
// Div Stuff
// -----------------------------------------------------------
function getLocation() {
	return window.location.toString();
}
		
function updateExternalPage(which){
    document.getElementById('eHtmlLayer').innerHTML = '<'+'object id="externalPage" name="externalPage" width="100%" height="100%" type="text/html" data="'+which+'"><\/object>';
}

function updateFlash9Page(which){
    document.getElementById('flash9Layer').innerHTML = '<'+'object id="flash9Page" name="flash9Page" width="100%" height="100%" type="text/html" data="'+which+'"><\/object>';
}

function updateInternalPage(which){
    document.getElementById('iHtmlLayer').innerHTML = '<'+'object id="internalPage" name="internalPage" width="100%" height="100%" type="text/html" data="'+which+'"><\/object>';
}

function hideExternalHtml() {
 eHtmlLayer.style.left = '-1';
 eHtmlLayer.style.top = '-1';
 eHtmlLayer.style.width = '1';
 eHtmlLayer.style.height = '1';
}

function hideInternalHtml() {
 iHtmlLayer.style.left = '-1';
 iHtmlLayer.style.top = '-1';
 iHtmlLayer.style.width = '1';
 iHtmlLayer.style.height = '1';
}

function hideFlash9Content() {
 flash9Layer.style.left = '-1';
 flash9Layer.style.top = '-1';
 flash9Layer.style.width = '1';
 flash9Layer.style.height = '1';
}

function hideAllDivs(){
	hideExternalHtml();
	hideInternalHtml();
	hideFlash9Content();
}

function resizeRealignIDiv(divXPos,divYPos,divWidth,divHeight) {
 iHtmlLayer.style.left = divXPos;
 iHtmlLayer.style.top = divYPos;
 iHtmlLayer.style.width = divWidth;
 iHtmlLayer.style.height = divHeight;
}

function resizeRealignFlash9Div(divXPos,divYPos,divWidth,divHeight) {
 flash9Layer.style.left = divXPos;
 flash9Layer.style.top = divYPos;
 flash9Layer.style.width = divWidth;
 flash9Layer.style.height = divHeight;
}

function resizeRealignEDiv(divXPos,divYPos,divWidth,divHeight) {
 eHtmlLayer.style.left = divXPos;
 eHtmlLayer.style.top = divYPos;
 eHtmlLayer.style.width = divWidth;
 eHtmlLayer.style.height = divHeight;
}

function init() {
  iHtmlLayer = document.getElementById(iHtmlLayer);
  eHtmlLayer = document.getElementById(eHtmlLayer);
  flash9Layer = document.getElementById(flash9Layer);
}

//window.onload = init;