#!/usr/bin/perl

$DIR = $ARGV[0];
#my  ($txt) = "";

for ($i=1; $i<=40; $i++) {
  $txt = "";
  $j = $i;
  $j = "0" . $j if $j < 10;

  open (OUT, ">" . $DIR . "/html/Picture" . $j . ".shtml");
  if (! -f $DIR . "/txt/Picture" . $j . ".txt") {
    open (TXT, ">" . $DIR . "/txt/Picture" . $j . ".txt");
    close TXT;
  }

  print OUT "<html><head><title>" . $DIR . "/Picture" . $j . "</title></head>\n";
  print OUT "<body bgcolor=\"#6D6D6D\">\n";
  print OUT "<FONT SIZE=\"-1\"><CENTER><!--#include virtual=\"../txt/Picture" . $j . ".txt\" --></CENTER></FONT>\n";
#  print OUT "<FONT SIZE=\"-1\"><CENTER>" . $txt . "</CENTER></FONT><BR>\n";
  print OUT "<a target=\"_new\" href=\"../Picture" . $j . ".jpg\"><img src=\"../mediums/Picture" . $j . ".jpg\" HSPACE=\"4\" VSPACE=\"8\" BORDER=\"0\"></A>\n";
  print OUT "<BR><FONT SIZE=\"-2\"><CENTER>Click photo above to see it bigger</CENTER></FONT></body></html>\n";
  close OUT;
}
