<: $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>
    <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-2' />
    <title> 
      Album: <: pAlbum_Name() :>
    </title>
    <: Meta() :>
    <style type='text/css'>
      <!--
	body { margin: 2px; }
	h1 { font-size: 110%; margin: 0px; }
	h2 { font-size: 105%; margin: 0px; }
	table { margin: 5px 0px 5px 0px; }
      -->
    </style>
  </head>
  <body bgcolor='white' text='black' link='#0000ff' vlink='#ff00ff' alink='#ff0000'>
  <center><table width='95%' cellpadding='0' cellspacing='5'>
    <tr>
      <td align='left'>
        <h2> <: pJoin_Parent_Albums(" : "); :> </h2>
      </td>
      <td align='right'>
        <h1><a href=<:=Back():>>nahoru</a></h1>
      </td>
    </tr>
  </table></center>
  <hr />

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

#c  # Are there more albums below this one?
<:  if (Child_Albums()) { _:>
  <center><table cellspacing='10' width='95%'>
    <tr>
      <td width='25%' valign='top'>
<font size='+2'><i>Další alba:</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></center>
<hr />

#c  # End if albums
<:  } :>

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

#c    # Loop on the images
<:    while(Images()) { _:>
        <td width='25%' valign='top' align='center'>
          <a href=<:=Image_URL():> title=<:=Image_Alt():>>
<:        if (Image_Is_Pic()) { _:>
            <: pImage_Thumb_Src() :><br />
<:        } :>
            <:= Image_Name() :></a>
#c        # <: 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></center>

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

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

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