<ja:if test="${keyboardNavigation}">
	<script src="${resPath}/keyboard-navigation.js" type="text/javascript"></script>
	<script type="text/javascript">
		<!--//--><![CDATA[//><!--
		KeyBoardNavigation.handleKeyCode = function(keyCode) {
			// Check which key that was pressed
			switch(keyCode) {
			<ja:if exists="indexPage">
				// Up arrow key
				case 63232:
				case 38:
					window.location="../${indexPage}";
					return false;
					break;
			</ja:if>
			<ja:if exists="nextPage">
				// Right arrow key
				case 63235: 
				case 39: 
					window.location="${nextPage}";
					return false;
					break;
			</ja:if>
			<ja:if exists="previousPage">
				// Left arrow key
				case 63234: 
				case 37:
					window.location="${previousPage}";
					return false;
					break;
			</ja:if>
			<ja:if exists="firstPage">
				// Home key
				case 63273:
				case 36:
					window.location="${firstPage}";
					return false;
					break;
			</ja:if>
			<ja:if exists="lastPage">
				// End key
				case 63275:
				case 35:
					window.location="${lastPage}";
					return false;
					break;
			</ja:if>
			}
			return true;	
		}
		//--><!]]>
	</script>
</ja:if>
