<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
	<head>
		<title>E-Ident Demo App</title>
		<link rel="SHORTCUT ICON" href="/images/nets_favicon.png"/>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
		<link rel="stylesheet" type="text/css" href="/css/global.css"/>
		
		<script th:inline="javascript">
			var eidentPath = [[${homeUrl}]];
			window.history.pushState({}, '', eidentPath);
			
			// This method handles the scenario when a user clicks on browser back button from this page
			// On clicking back button, demo app front page is loaded rather than letting the control 
			//    to go to E-Ident service without any required parameters
			function registerPopstate() {
				window.onpopstate = function(event) {
					if(eidentPath) {
						top.window.location.href = eidentPath;
					} else {
						top.window.location.href = "http://localhost:8080/eident";
					}
				};
			}
		</script>
	</head>
	<body onload="setTimeout(registerPopstate, 10);"> <!-- making a delayed call to handle Safari browser (as it fires popstate event during page load) -->
		<div class="wrapper" id="error-wrapper">
			<img src="/images/nets.svg" alt="logo" class="nets_logo" width="20" vspace="0" hspace="0" height="30">
			<h1 class="header">Error Page</h1>
		    <p class="paragraphs"><span>Application has encountered an error. Please contact Nets support team.</span></p>
	   		<br/>
	   	</div>
	</body>
</html>