#!/usr/bin/perl

$DIR = $ENV{'SCRIPT_FILENAME'}; $DIR =~ s/preview.cgi//;
$in=qx!cd $DIR; ls -A1 *.jpg *.gif *.png *.avi!;

@l=split(/\n/,$in);
$out="";
foreach $l1 (@l) {
  @l2 = split(/\./,$l1);
  $img = $l2[0];
  for ($i=1; $i<@l2-1; $i++) { $img = $img . ".$l2[$i]"}
  $img = "icon/" . $img . ".icon.jpg";
  $out = $out . "<a href=\"$l1\"><img src=\"$img\"></a>\n";
}

print <<EOF ;
Content-type: text/html

<html>
<head>
<title>The Long-Term Evolution of J2/1, J3/2 and J4/3 Resonant Asteroids During Planetary Migration and Beyond</title>
<meta http-equiv="Content-type" content="text/html; charset=iso-8859-2">
</head>
<body>

<a href="http://sirrah.troja.mff.cuni.cz/yarko-site/"><img src="http://sirrah.troja.mff.cuni.cz/yarko-site/images/yarko_site.gif" align="right" border="0"></a>
<h1>The Long-Term Evolution of J2/1, J3/2 and J4/3 Resonant Asteroids During Planetary Migration and Beyond</h1>

<p><hr>

<table>
<tr>
<td valign="top">
Presentation at the
<a href="http://adams.dm.unipi.it/~dps06/">38th Annual DPS Meeting 2006</a>,
October 8 - 13, Pasadena, CA, USA.
</td>
<td>
<ul>
<li><a href="./">list directory</a>
<li><a href="dps2006_broz.ps.gz">PS.GZ</a> [1.3&nbsp;MB]
<li><a href="dps2006_broz.pdf">PDF</a> [2.2&nbsp;MB]
</ul>
</td>
</tr>
</table>
<p>
$out

<p><hr></hr>
<address>
Miroslav Broz,
<a href="mailto:miroslav.broz\@email.cz">miroslav.broz\@email.cz</a>,
Oct 13th 2006
</address>
<hr></hr>

</body>
</html>

EOF

exit;


