<%@ page session="false" contentType="text/html; charset=UTF-8"%>
<%@page
	import="org.springframework.web.context.support.WebApplicationContextUtils"%>
<%@page import="org.springframework.web.context.WebApplicationContext"%>
<%@page import="gov.va.med.fw.security.SecurityContext"%>
<%@page import="gov.va.med.fw.security.SecurityContextHelper"%>
<%@page import="gov.va.med.fw.security.UserPrincipal"%>
<%@page import="gov.va.med.fw.service.config.EnvironmentParamService"%>

<script language="javascript">
	function logoutConfirm() {
		var confirmMessage = "Changes that are not saved will be lost!  \n\n Do you want to logout?";
		return confirm(confirmMessage);
	}

	function autoLogout() {
		document.logoutform.submit();
	}

	function setFlexAppHeight(newHeight) {
		if (window.document.CCHT) {
			window.document.CCHT.height = newHeight;
			scrollToTop();
		}
	}

	function setFocus() {
		//Bring the window back to front
		window.focus();
	}
	function setFocusToCchtMovie() {
		if (window.document.CCHT) {
			window.document.CCHT.focus();
			scrollToTop();
		}
	}

	function scrollToTop() {
		window.scrollTo(0, 0);
	}

	function expandOrCollapseIt(elementName) {
		var whichEl = document.getElementById(elementName);
		if (whichEl != null) {
			whichEl.style.display = (whichEl.style.display == "inline") ? "none"
					: "inline";
		}
	}
</script>

<%
	SecurityContext securityContext = SecurityContextHelper.getSecurityContext();
	UserPrincipal user = (securityContext != null) ? securityContext.getUserPrincipal() : null;
	String loggedInUserName = (user != null && !user.isAnonymous()) ? user.getFullName() : "";
	if (loggedInUserName == null)
		loggedInUserName = "";
%>


<table border="0" cellpadding="0" cellspacing="0" width="100%"
	style="background-color: #000033;">
	<tr>
		<td align="left" nowrap>
			<table border="0" cellpadding="0" cellspacing="0" width="100%">
				<tr>
					<td align="left"><img src="/ccht/images/ihta_banner_left.jpg"
						alt="Department of Veterans Affairs Integrated Home Telehealth Application"
						style="border: 0px"></td>
					<td align="left" width="100%"><img
						src="/ccht/images/ihta_banner_middle.jpg" alt="" width="100%"
						height="106" style="border: 0px"></td>
					<td align="left" nowrap><img
						src="/ccht/images/ihta_banner_right.jpg" alt=""
						style="border: 0px"></td>
				</tr>
			</table>
		</td>
	</tr>

	<div class="sharepoint_header">
		<tr valign="middle">
			<td valign="middle" align="left" valign="middle" width="100%" nowrap>
				<table border="0" cellpadding="0" cellspacing="0" width="100%">
					<tr>
						<td valign="middle" align="left"
							style="font-size: 10pt; color: white; font-family: Arial;"><img
							src="/ccht/images/spacer.gif" alt="" height="0" width="40" />Welcome:&nbsp;<%=loggedInUserName%></td>
						<td valign="middle" align="center"
							style="text-align: center; font-size: 11pt; color: white; font-family: Arial; white-space: nowrap;">
							<%
								if (true) {
							%> Do NOT enter any Personally Identifiable
							Information (PII) into this system! <%
								}
							%>
						</td>
						<td valign="middle" align="right"><img
							src="/ccht/images/spacer.gif" alt="" height="0" width="85" /> <img
							src="/ccht/images/spacer.gif" alt="" height="0" width="10" /> <a
							href="${logout.manual.url}"
							style="font-size: 9pt; color: white; font-family: Arial;"
							onClick="return(logoutConfirm()); return false;">Log Out</a> <img
							src="/ccht/images/spacer.gif" alt="" height="0" width="10" /> <a
							href="/ccht/help.jsp" style="color: white" target="_blank"><img
								border="0" alt="Help (new window)"
								src="/ccht/images/helpicon.png"></a> <img
							src="/ccht/images/spacer.gif" alt="" height="0" width="20" /></td>
					</tr>
					</div>
				</table>
			</td>
		</tr>
</table>