<:
# Emboss Theme for Album (Time-stamp: "2003-02-18 18:48:28 ifi")
#
# Copyright (C) 2003 by Zoltán Ivánfi <ifi@mailbox.hu>
#
# Emboss Theme is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# Emboss Theme is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
:>//
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <meta http-equiv="content-type" content="text/html; charset=ISO-8859-2">
  <: Meta() :>//
  <title>Photo: <:= Image_Name() :></title>
  <style type="text/css">

    img {
      border-style: solid;
      border-width: 1px;
      border-color: black;
      margin: 5px;
    }

    td {
      border-style: solid;
      border-width: 1px;
      border-top-color: white;
      border-left-color: white;
      border-bottom-color: black;
      border-right-color: black;
    }

    A:link {
      color: #000099;
      text-decoration: none;
    }

    A:visited {
      color: #000066;
      text-decoration: none;
    }

    A:hover {
      text-decoration: underline;
    }

  </style>
</head>
<body background="<:= Theme_URL() :>/bg.jpg">
<table border="0" cellpadding="5" cellspacing="0" width="100%" height="100%">
<:
  sub calculateSize {
    $width = Option('x');
    $height = Option('y');
    if (!Option('crop')) {
      $aspect = Image_Width() / Image_Height();
      if ($width / $height < $aspect) {
        $height = int($width / $aspect + .5);
      } else {
        $width = int($height * $aspect + .5);
      }
    }
  }

  $tdWidth  = Option('x') + 50;
  $tdHeight = Option('y') + 30;

  # Thumbnail of Prev Image

  Set_Image_Prev();
  print("  <tr>\n");
  print("    <td align='center' width='" . $tdWidth . "' height='" . $tdHeight . "'>");
  print("<a href=" . Image_Page_URL() . " title='");
  pImage_Caption();
  if (Image_Height()) {
    calculateSize();
    print("'><img src=" . Image_Thumb() . " width='" . $width . "' height='" . $height . "'>");
  } else {
    print("'><img src='" . Theme_URL() . "/unknown.jpg' width='133' height='100'>");
  }
  print("</a>");
  print("</td>\n");

  # Name of Current Image

  Set_Image_This();
  print("    <td align='center'>");
  print("<big>" . Image_Name() . "</big>");
  print("<br><br>Album: ");
  pJoin_Parent_Albums(" / ");
  print("</td>\n");

  # Thumbnail of Next Image

  Set_Image_Next();
  print("    <td align='center' width='" . $tdWidth . "' height='" . $tdHeight . "'>");
  print("<a href=" . Image_Page_URL() . " title='");
  pImage_Caption();
  if (Image_Height()) {
    calculateSize();
    print("'><img src=" . Image_Thumb() . " width='" . $width . "' height='" . $height . "'>");
  } else {
    print("'><img src='" . Theme_URL() . "/unknown.jpg' width='133' height='100'>");
  }
  print("</a>");
  print("</td>\n");
  print("  </tr>\n");

  # Current Image

  Set_Image_This();
  print("  <tr>\n");
  print("    <td colspan='3' align='center'>");
  print("<a href=" . Image_URL() . ">");
  print("<img src=" . $picdata->{URL}{image_page}{image_src} . " width='" . Image_Width() . "' height='" . Image_Height() . "'><br>");
  pImage_Caption();
  print("</a>");
  print("</td>\n");
  print("  </tr>\n");

  # Name of Prev Image

  Set_Image_Prev();
  print("  <tr>\n");
  print("    <td align='center' width='" . $tdWidth . "'>");
  print("<a href=" . Image_Page_URL() . ">");
  print("&laquo; " . Image_Name());
  print("</a>");
  print("</td>\n");

  # Credit

  print("    <td align='center'>");
  Credit();
  print("    </td>\n");

  # Name of Next Image

  Set_Image_Next();
  print("    <td align='center' width='" . $tdWidth . "'>");
  print("<a href=" . Image_Page_URL() . ">");
  print(Image_Name() . " &raquo;");
  print("</a>");
  print("</td>\n");
  print("  </tr>\n");
:>//
</table>
</body>
</html>
