<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %><%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><fmt:message key="app.name"/></title>
<script src="AC_OETags.js" language="javascript"></script>
<style>
 html, body {
        height: 100%;
        margin: 0;
        padding: 0;
    }
    body {
        overflow:hidden;
    }
</style>
<script language="JavaScript" type="text/javascript">
<!--
// -----------------------------------------------------------------------------
// Globals
// Major version of Flash required
var requiredMajorVersion = 9;
// Minor version of Flash required
var requiredMinorVersion = 0;
// Minor version of Flash required
var requiredRevision = 28;
// -----------------------------------------------------------------------------
// -->
</script>

<!-- BEGIN call Flex function on browser close -->
<script language="JavaScript" type="text/javascript">
<!--
function shutdownHook()
{
	var fxControl = document.BigBoard || window.BigBoard;
	var warning = fxControl.getUnsavedDataWarning();
	if (warning != '')
		return warning;
	else
		return;
}

function invalidateSwf() {
    var AJAX;
    if (window.XMLHttpRequest) {
        AJAX=new XMLHttpRequest();
    } else {
        AJAX=new ActiveXObject("Microsoft.XMLHTTP");
    }
    if (AJAX) {
        AJAX.open("GET", '<c:url value="logout.html"/>?swfID=<c:out value="${swfID}"/>', false);
        AJAX.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
        AJAX.send(null);
    }
}

window.onbeforeunload = shutdownHook;
window.onunload = invalidateSwf;

-->
</script>
<!-- END call Flex function on browser close -->

</head>

<body scroll="no">
<script language="JavaScript" type="text/javascript">
<!--
// Version check for the Flash Player that has the ability to start Player Product Install (6.0r65)
var hasProductInstall = DetectFlashVer(6, 0, 65);

// Version check based upon the values defined in globals
var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);


// Check to see if a player with Flash Product Install is available and the version does not meet the requirements for playback
if ( hasProductInstall && !hasRequestedVersion ) {
	// MMdoctitle is the stored document.title value used by the installation process to close the window that started the process
	// This is necessary in order to close browser windows that are still utilizing the older version of the player after installation has completed
	// DO NOT MODIFY THE FOLLOWING FOUR LINES
	// Location visited after installation is complete if installation is required
	var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn";
	var MMredirectURL = window.location;
    document.title = document.title.slice(0, 47) + " - Flash Player Installation";
    var MMdoctitle = document.title;

	AC_FL_RunContent(
		"src", "playerProductInstall",
		"FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"",
		"width", "100%",
		"height", "100%",
		"align", "middle",
		"id", "<c:out value="${clientArtifactId}"/>",
		"quality", "high",
		"bgcolor", "#869ca7",
		"allowFullScreen", "true",
		"name", "<c:out value="${clientArtifactId}"/>",
		"allowScriptAccess","sameDomain",
		"type", "application/x-shockwave-flash",
		"pluginspage", "http://www.adobe.com/go/getflashplayer"
	);
} else if (hasRequestedVersion) {
	// if we've detected an acceptable version
	// embed the Flash Content SWF when all tests are passed

	// Cache Server Page namespace should be set here (don't forget the ampersand)
	//var edpVars = "cspNmsp=CPM&cspDemo=500^10vehu^vehu10&";
	//var edpVars = "cspServ=vhaislcfgm2.vha.med.va.gov/csp/CPM&cspToken=20012^662&";
	//var edpVars = "vljServ=10.5.17.153:7001&";
	//var edpVars = "vljServ=10.5.17.225:7001&";
	//var edpVars = "vljServ=localhost:7001&";
	//SEE LINE BELOW TO LAUNCH BIG BOARD FROM FLEX BUILDER AND PASSING IN A SITE ID
	//var edpVars = "vljServ=vhaislbll2.vha.med.va.gov:7141&siteId=442&";
	var edpVars = "swfID=<c:out value="${swfID}"/>&timeout=true&contextRoot=<c:out value="${pageContext.request.contextPath}"/>&board=<c:out value="${param.board}"/>&area=<c:out value="${param.area}"/>&helpContextRoot=<fmt:message key="help.contextRoot"/>";

	AC_FL_RunContent(
			"src", "<c:out value="${clientFinalName}"/>",
			"width", "100%",
			"height", "100%",
			"align", "middle",
			"id", "<c:out value="${clientArtifactId}"/>",
			"quality", "high",
			"bgcolor", "#869ca7",
			"allowFullScreen", "true",
			"name", "<c:out value="${clientArtifactId}"/>",
			"flashvars", edpVars,
			"allowScriptAccess","sameDomain",
			"type", "application/x-shockwave-flash",
			"pluginspage", "http://www.adobe.com/go/getflashplayer"
	);
  } else {  // flash is too old or we can't detect the plugin
    var alternateContent = 'Alternate HTML content should be placed here. '
  	+ 'This content requires the Adobe Flash Player. '
   	+ '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
    document.write(alternateContent);  // insert non-flash content
  }
// -->
</script>
<noscript>
  	<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="<c:out value="${clientArtifactId}"/>" width="100%" height="100%"
			codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
			<param name="movie" value="<c:out value="${clientFinalName}"/>.swf" />
			<param name="quality" value="high" />
			<param name="allowFullScreen" value="true" />
			<param name="bgcolor" value="#869ca7" />
			<param name="allowScriptAccess" value="sameDomain" />
			<embed src="<c:out value="${clientFinalName}"/>.swf" quality="high" allowFullScreen="true" bgcolor="#869ca7"
				width="100%" height="100%" name="<c:out value="${clientArtifactId}"/>" align="middle"
				play="true"
				loop="false"
				quality="high"
				allowScriptAccess="sameDomain"
				type="application/x-shockwave-flash"
				pluginspage="http://www.adobe.com/go/getflashplayer">
			</embed>
	</object>
</noscript>
</body>
</html>