#use wml::std::tags
#use wml::std::page
#use wml::std::case global=lower

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<page title="<get-var NAME>" background="/images/granit.jpg">      
<head>
<info style="comment" created="steffen@dett.de">

<!-- This template generates HTML Code to display one picture in a way
     that the browser should scale it automatically.
     This is difficult, because different browsers may handle this
     different... as always. 
     GPL may be applied         -- Steffen Dettmer <steffen@dett.de>
-->

</head>

<body>
<!-- `protect pass=7' means do not do htmlfix, because we want some `strange' 
     IMG attributes, because most browsers will scale the image in the 
     following table to fit width 
     (calculating the heigth to keep the aspect ratio) 
     ... but htmlfix would add the heigth value from the picture file!
-->
<protect pass=7>
  <!-- 100% table *width*, heigth will be calculated by the browser. -->
  <table width="100%">
    <tr>
      <!-- for WIDTH description see below at TD tag. -->
      <th valign="center" WIDTH="*">
        Auto-scaling Picture `<get-var NAME>' 
        (<a href="<get-var FILE>"><get-var FILE></a>)
      </th>
    <tr>
      <!-- Let the browser calculate the width to be equal for the left
           space - here its 100% because just one column. 
           Yes, this is a kind of trick. 
           In this cell, there is a picture scaled to fit 100% of this 
           cell (!). The browser should calculate the heigth keeping
           aspect ratio, this should work, because the table length
           is not limited.
      -->
      <td valign="center" WIDTH="*">
        <img 
          border="0"
          width="100%"
          src="<get-var FILE>" 
          alt="<get-var FILE>"
        />
      </td>
    </tr>
  </table>
</protect>
</body>



