#!/usr/bin/perl
$PHOTO_DIR="photo";

sub print_imgtag{
	my $filename=$_[0];
	my $htmlfile=$_[0];
	$htmlfile=~s/jpg/html/;
	print HTML<<"EOL";
        <a href="$PHOTO_DIR/$htmlfile" onFocus="this.blur()">
          <img src="$PHOTO_DIR/$filename" width="100" height="100" />
        </a>
EOL
}

open(HTML,">./kugephoto.html");
require "commonhtml.pl";

print HTML &commonhtml::print_head(".");
print HTML "   <div id=\"photowaku\">";


opendir(DIR, './photo');
while (defined($file = readdir(DIR))) {
	if($file =~/jpg$/){
		&print_imgtag("$file");
	}
}
closedir(DIR);

print HTML "    </div>";
print HTML &commonhtml::print_tail(".");
close(HTML);
