#!/usr/bin/perl
use lib '.';
require "pagelib.pl";
header();
head();

$dir = "images/snowspeeder";
if(!opendir(DIR,$dir)) {
    print "Internal error locating images!<br>\n";
}
@files = readdir(DIR);
foreach(@files) { push @images,$1 if(/(snowspeeder\d+)\.jpg/); }
%used = ();

print qq`
<br><br>
<B><font size=+1>Minifig Scale Snowspeeder</font></B><br>
<br>
A little discouraged with attempting to design a snowspeeder that was both
to scale and also capble of squeezing in two minifigs, I gave up. Until I was
alerted to Bruce Lowell's
<a href=\"http://bruce.kus-numa.net/customs/snowspeeder.html\">snowspeeder design</a>.
My quest for a basic design that was accurate and capable of doing the
impossible was over \(thanks, Bruce\!\). I modified various portions of his design,
added tiles, and built one in both white and grey.
`;

show_images(@images);

foot();

sub show_images {
    my(@pics) = @_;
    my($i) = 0;
    print "<table width=100\%><tr>\n";
    foreach(@pics) {
	next if($used{$_});
	$used{$_} = 1;
	if(!($i++%4)) {
	    print "</tr>\n<tr>\n";
	}
	print "<td align=center><a href=\"$dir/$_.jpg\"><img src=\"$dir/$_\_th.jpg\" border=0></a></td>\n";
    }
    print "</tr></table>\n";
}
