<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<style type="text/css">
div.navi
{
  text-align: center;
}

div.image,
div.thumbnails
{
  margin-top: 1em;
  margin-bottom: 1em;
  margin-left: auto;
  margin-right: auto;
}

div.image
{
  text-align: center;
}

div.thumbnails
{
  width: 90%;
}

div.image img
{
  border-style: none;
}

div.text pre
{
  margin: 1em;
  padding: 1em;
  border: 2px solid black;
}
</style>
<script type="text/javascript">
function handle_key(e)
{
  var key_code = e.which || e.keyCode;
  var handled = true;
  switch (key_code) {

<% unless text_mode? %>
<% unless first_image? -%>
<% MOVE_TO_FIRST_KEYS.each do |key| -%>
  case <%= key %>:
<% end -%>
    location = "<%= first_href %>";
    break;

<% MOVE_TO_PREVIOUS_KEYS.each do |key| -%>
  case <%= key %>:
<% end -%>
    location = "<%= previous_href %>";
    break;
<% end -%>

<% unless last_image? -%>
<% MOVE_TO_NEXT_KEYS.each do |key| -%>
  case <%= key %>:
<% end -%>
    location = "<%= next_href %>";
    break;

<% MOVE_TO_LAST_KEYS.each do |key| -%>
  case <%= key %>:
<% end -%>
    location = "<%= last_href %>";
    break;
<% end -%>

<% TOGGLE_INDEX_MODE_KEYS.each do |key| -%>
  case <%= key %>:
<% end -%>
    location = "<%= toggle_index_mode_href %>";
    break;
<% end %>

<% TOGGLE_TEXT_MODE_KEYS.each do |key| -%>
  case <%= key %>:
<% end -%>
    location = "<%= toggle_text_mode_href %>";
    break;

  default:
    handled = false;
    break;
  }

  return !handled;
}
</script>
<title><%=h title %></title>
</head>
<body onkeypress="handle_key(event);">
<%= toggle_mode_navi %>
<%= navi %>
<%= content %>
<%= navi %>
<%= toggle_mode_navi %>
<hr />
<div class="footer">
<p>
Generated by
<a href="<%= Kz::URI %>"><%=h _("Kazehakase")%></a> 
version <%= Kz::VERSION %>
</p>
</div>
</body>
</html>
