<: $CHILD_ALBUM_COLS = 4; :>//
<: $IMAGE_COLS = Get_Opt("columns"); :>//
<!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>
    <title> 
      Album: <: pAlbum_Name() :>
    </title>
    <: Meta() :>
  </head>
  <body bgcolor='black' text=#ffffff link=#ff00ff vlink=#ff00ff>
  <table width='95%'>
    <tr>
      <td align='left'>
        <h2> <: pJoin_Parent_Albums(":"); :> </h2>
      </td>
      <td align='right'>
        <h1><a href=<:=Back():>>Up</a></h1>
      </td>
    </tr>
  </table>
  <hr />

<: if (isHeader()) { _:>
        <:pHeader():>         
        <br>
<: } _:>

#c  # Are there more albums below this one?
<:  if (Child_Albums()) { _:>
  <table cellspacing='10' width='95%'>
    <tr>
      <td width='25%' valign='top'>
<font size='+2'><i>More albums:</i></font>
      </td>

#c    # Loop on all the albums
<:    while (Child_Albums()) { _:>
        <td width='25%' valign='top'>
          <font size='+1'>
            <: pChild_Album() :>
          </font>
        </td>

#c      # And start a new row every fourth one
<:      if (!((Child_Album_Cnt()+1) % $CHILD_ALBUM_COLS)) { _:>
          </tr><tr>
<:      } :>

#c    # End album loop
<:    Next_Child_Album() :>
<:    } :>
    </tr>
  </table>
<hr />

#c  # End if albums
<:  } :>

#c  # Are there any images?  (There might only be CHILD_ALBUMS!)
<:  if (Images()) { _:>
  <table cellspacing='10' width='95%'>
    <tr>

#c    # Loop on the images
<:    while(Images()) { _:>
        <td width='25%' valign='top'>
          <: pImage() :>
          <br />
          <font size='-2'>
            <: pImage_Caption() :>
          </font>
        </td>

<:      if (!(Image_Cnt() % Get_Opt('columns')) && Images_Left()) { _:>
          </tr><tr>
<:      } :>

#c    # End while images
<:    Next_Image() :>
<:    } :>
    </tr>
  </table>

#c  # End if images
<hr />
<:  } :>

<: if (isFooter()) { _:>
        <center>              
          <:pFooter():>         
        </center>
        <p><hr><p>
<: } _:>

    <font size='-1'>
      <: Credit() :> on <:=scalar localtime:>
    </font>
  </body>
</html>
