#/usr/bin/perl


@files = <images/*>;
&file;

sub file
{
    foreach $file (@files)
    {
        $file =~ s/.+\/(.*)$/$1/g;   
        $file =~ /(.+)(\..*)$/g; 
#	print "$file : $1.html\n ";
	&makefile($1);
    }
}

sub makefile
{

 $newfile = shift;
 open (F, ">html/$newfile.html");

 print F "<html>\n";
 print F "<head>\n";
 print F "<title>Al Mashriq</title>\n";
 print F "<meta name=\"keywords\" contents=\"Beirut,map,maps\">\n";

 print F "</head>\n";
 print F "<body bgcolor=\"#ffffff\" background=\"/sys/ornament-back-small.gif\" text=\"#5C4033\" vlink=\"#855E42\" link=\"#000000\">\n";

 print F "<center>\n";

 print F "<table width = 528  border = 0 cellpadding = 5>\n";
 print F "<tr valign = top>\n";
 print F "<td align=left>\n";
 print F "<a href=\"../\"><img src =\"/sys/almashriq-levant.gif\" border = 0 alt=\"Al mashriq - The Levant\" ></a>\n";
 print F "</td>\n";
 print F "</tr>\n";

 print F "<tr valign = top>\n";
 print F "<td colspan=2>\n\n";


 print F "<img src=\"../images/$newfile.jpg\" \n";

 print F "</td>\n";
 print F "</tr>\n";

 print F "</table>\n";

 print F "<a href=\"/\"><img src =\"/sys/almashriq-bottom-line.gif\"alt =\"----------------\" border= 0></a><p>\n";
 print F "<a href=\"/base/mailpage.html\">al\@mashriq</a><br>\n";
 print F "<font size=-1><br>";
 print F "990524\n";
 print F "</center>\n\n";

 print F "</body>\n";
 print F "</html>\n";

 close F;

}

