#!/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 thermal forces and torques changing the orbits and spins of small asteroids</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 thermal forces and torques changing the orbits and spins of small asteroids</h1>

<p><hr>

<table>
<tr>
<td valign="top">
Presentation at the
<a href="http://meetings.copernicus.org/egu2007/">European Geosciences Union, General Assembly 2007</a>,
April 15 - 20, Vienna, Austria
</td>
<td>
<ul>
<li><a href="./">list directory</a>
<li><a href="egu2007_broz.pdf">PDF</a> [3.7&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>,
Apr 20th 2007
</address>
<hr></hr>

</body>
</html>

EOF

exit;


