#!/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>Yarkovsky-driven origin of the unstable population of asteroids in the 2:1 mean motion resonance with Jupiter</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>Yarkovsky-driven origin of the unstable population of asteroids in the 2:1 mean motion resonance with Jupiter</h1>

<p><hr>

<table>
<tr>
<td valign="top">
Images and animations from the presentation at
<a href="http://www.aob.bg.ac.yu/IAUCol197/">IAU Colloquium no. 197 - Dynamics of Populations of Planetary Systems</a>
August 31 - September 4, Belgrade, Serbia and Montenegro.
</td>
<td>
<ul>
<li><a href="./">list directory</a>
</ul>
</td>
</tr>
</table>
<p>
$out

<p><hr></hr>
<address>
Miroslav Broz,
<a href="mailto:miroslav.broz\@email.cz">miroslav.broz\@email.cz</a>,
Sep 6th 2004
</address>
<hr></hr>

</body>
</html>

EOF

exit;


