<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
#c// ###################################################################
<:
  # Image arrays are: name, width, height
  sub img_src { print "<img src='$PATH/$_[0]' width='$_[1]' height='$_[2]' $_[3] alt='$_[4]' border='0'>" if ($_[1]); }

  # Path setting - this is the path to the images and css files
  $PATH = Theme_URL();

  # Icons/graphics
  @Bar_L =      ("Bar_L.png", 27, 20);
  @Bar_M =      ("Bar_M.png", "90%", 20);
  @Bar_R =      ("Bar_R.png", 27, 20);
  @More =       ("More.png", 42, 18);
  @Back =       ("Back.png", 32, 24);

  # Thumbnail border
  $X = Image_Page() ? Image_Width() : Option('x');
  $Y = Image_Page() ? Image_Height() : Option('y');
  #@ThBord_L =	("tho_left.png", 39, $Y-0-0); # width of left img
  #@ThBord_R =	("tho_right.png", 41, $Y-0-0); # height of top img + 2
  #@ThBord_R =	("Null.gif", 2, $Y-0-0); # width of the right img + 2
  @ThBord_T =	("tho_top.png", $X+10, 39); # width of left img + height of top img + 2 , height of top img
  #@ThBord_B =	("Null.gif", $X+39+1-0-0, 3); # width of left img + height of bottom img + 2 , height of top img + 2

  # comment this line to enable "up" navigation
  # sub Back { ""; }
  $backText= "Dossier parent";

  # text of the "up" button
  sub ChildAlbumText { "Sous albums : ";  };

:>// end of easy configuration section



<:
  # Shorthand for column info specified by -columns
  $Cols = Option('columns');
  $Col_Perc = int(100/$Cols)."%";
:>//
<html>

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15">
  <: Meta() :>
  <title><: pAlbum_Name() :></title>
  <link REL="stylesheet" TYPE="text/css" href="<: print $PATH; :>/common.css">
  <link REL="stylesheet" TYPE="text/css" href="<: print $PATH; :>/album.css">
  <link rel="up" href=<:= Back() :> >
</head>

<body>


<div id="head-table">
<div id="head-row">

    <div id="hierarchy-div-box">
        <div id="hierarchy-div">
            <: pJoin_Parent_Albums(" : "); :>
        </div>
    </div>

    <: 
      # Are there more albums below this one?
      if (Child_Albums()) { 
    :>
      <div id="child-div-box">
          <div id="child-div">
        <: 
          # Introduce what this div is about
          if (@More) { 
            img_src(@More);
          } else {
            print ChildAlbumText();
          }
          # content
          # Loop on all the albums
          while (Child_Albums()) { 
            pChild_Album();
            Next_Child_Album();
            if (Child_Albums_Left()) {
              print ", ";
            }
          }
        :>
          </div>
      </div>
    <: } :>
    <: 
      $back=Back();
      if ($back && $back ne "''") {
    :>
      <div id="up-div-box">
          <div id="up-div">
        <:
          $imgAttributes = "align='middle' title='" . $backText . "'";
          print "<a href=$back>";
          @Back ? img_src(@Back,$imgAttributes) : print $backText;
          print "</a>\n";
        :>
          </div>
      </div>
    <: } :>
</div>
</div>

  <div id="top-div"></div>

  <: if (isHeader()) { _:>
    <div id="head-div">
      <:pHeader():>
    </div>
  <: } _:>
  
  <div align="center">
    <nobr><:img_src(@Bar_L); img_src(@Bar_M); img_src(@Bar_R);:></nobr>
  </div>


#c//
#c// The images
<: if (Images()) { _:>//
  <table border="0" cellpadding="0" cellspacing="0" width="100%">
			<tr>
<: while (Images()) { _:>//
				<td align='center' valign='top' width='<:=$Col_Perc:>'>
<: if (@ThBord_LB) { _:>
#c// The thumbnail is a complicated table for handling all the corners...
					<table border='0' cellpadding='0' cellspacing='0'>
						<tr>
							<td colspan='3'><!-- @ThBord_TL --><:img_src(@ThBord_TL):><!-- @ThBord_T --><:img_src(@ThBord_T):><:img_src(@ThBord_TR):></td>
						</tr> <tr>
							<td><:img_src(@ThBord_LT):></td>
							<td rowspan='3'><a href=<:=Image_URL():>><img src=<:=Image_Thumb():> alt=<:=Image_Alt():> width='<:=Option('x'):>' height="<:=Option('y'):>" border="0"></a></td>
							<td><:img_src(@ThBord_RT):></td>
						</tr> <tr>
							<td><:img_src(@ThBord_L):></td>
							<td><:img_src(@ThBord_R):></td>
						</tr> <tr>
							<td><:img_src(@ThBord_LB):></td>
							<td><:img_src(@ThBord_RB):></td>
						</tr> <tr>
							<td colspan='3'><:img_src(@ThBord_BL):><:img_src(@ThBord_B):><:img_src(@ThBord_BR):></td>
						</tr>
					</table>
<: } else { _:>
					<nobr><:img_src(@ThBord_TL):><:img_src(@ThBord_T):><:img_src(@ThBord_TR):></nobr><br />
					<nobr><:img_src(@ThBord_L):><a href=<:=Image_URL():>><:pImage_Thumb_Src():></a><:img_src(@ThBord_R):></nobr><br />
					<nobr><:img_src(@ThBord_BL):><:img_src(@ThBord_B):><:img_src(@ThBord_BR):></nobr><br />
<: } _:>

					<a href=<:=Image_URL():>>
					<:=Image_Name():></a>
						<br>
						<span class="caption">
						<:pImage_Caption():>
						</span>
				</td>

<:     if (!(Image_Cnt() % $Cols) && Images_Left()) { _:>//
#c//
#c// Start a new row
			</tr>
			<tr>
				<td height="20" colspan="<:=$Cols:>"><:img_src("Null.gif",20,20):></td>
			</tr>
			<tr>
<:     } :>
#c//
#c// End image loop
<:
      Next_Image();
    }
:>//

			</tr>
  </table>

  <div align="center">
    <nobr><:img_src(@Bar_L); img_src(@Bar_M); img_src(@Bar_R);:></nobr>
  </div>

<:}:>//


  <: if (isFooter()) { _:>
    <div id="foot-div">
      <:pFooter():>
    </div>
    <div align="center">
        <nobr><:img_src(@Bar_L); img_src(@Bar_M); img_src(@Bar_R);:></nobr>
    </div>
  <: } _:>


  <!-- credit for the author -->		
  <div id="credit-div">
    Theme by <a href="http://membres.lycos.fr/thocar/">thocar</a>.
    <: Credit() :> on <:=scalar localtime:>
  </div>

</body>
</html>
