#!/usr/local/bin/perl

for($i = 1; $i <= 1000; $i++) {
  if($i < 10) {
    $s = "000" . $i;
  } elsif($i < 100) {
    $s = "00" . $i;
  } elsif($i < 1000) {
    $s = "0" . $i;
  } else {
    $s = $i;
  }

  open( OUTPUT, "> $s.htm" );
  print OUTPUT "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n";
  print OUTPUT "<html>\n";
  print OUTPUT "<head>\n";
  print OUTPUT "<title>TCAEP.co.uk: EquationZoom: Equation $s</title>\n";
  print OUTPUT "<link rel=\"stylesheet\" type=\"text/css\" href=\"../tcaep.css\" title=\"Style\" />\n";
  print OUTPUT "</head>";
  print OUTPUT "<body bgcolor=\"\#FFFFFF\" text=\"\#000000\">";
  print OUTPUT " <basefont face=\"Verdana, Arial, Helvetica, Homerton\">";
  
  print OUTPUT "  <table width=\"765\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">";
  print OUTPUT "   <tr>";
  print OUTPUT "    <td bgcolor=\"#FFFFCC\">";
  print OUTPUT "     <img src=\"../images/furniture/title.gif\" usemap=\"\#main\" alt=\"See bottom for text alternatives\" width=\"765\" height=\"60\" border=\"0\">";
  print OUTPUT "    </td>";
  print OUTPUT "   </tr>";
  print OUTPUT "   <tr>";
  print OUTPUT "    <td>";
  print OUTPUT "     <table cellpadding=\"5\" cellspacing=\"0\" border=\"0\">";
  print OUTPUT "      <tr>";
  print OUTPUT "       <td bgcolor=\"\#FFFFCC\" width=\"150\" valign=\"top\">";
  print OUTPUT "        <a href=\"javascript:window.history.back()\"><b>Previous Page...</b></a><br><img src=\"../images/furniture/menusep.gif\" width=\"145\" height=\"5\"><br>\n";
  print OUTPUT "        <a href=\"../eqh/$s.htm\">Image Format</a><br><img src=\"../images/furniture/menusep.gif\" width=\"145\" height=\"5\"><br>\n";
  print OUTPUT "        <a href=\"../eqx/$s.xml\">MathML Format</a><br><img src=\"../images/furniture/menusep.gif\" width=\"145\" height=\"5\"><br>\n";
  print OUTPUT "        <a href=\"../eqt/$s.htm\">TeX Format</a>\n";
  print OUTPUT "       </td>";
  print OUTPUT "       <td width=\"620\" valign=\"top\">";
  print OUTPUT "        <div class=\"title\"><span class=\"title1\">Equation</span><br /><span class=\"title2\">Large Image Format</span></div>";

  print OUTPUT "        <br>\&nbsp\;<br>\n";#\&nbsp\;<br>";
  
  print OUTPUT "        <center>";
  print OUTPUT "        <img src=\"../eql/$s.gif\">";
  print OUTPUT "        <br>";
  print OUTPUT "        </center>";
        
  print OUTPUT "     <br>";
  print OUTPUT "     <center>";
  print OUTPUT "     <font size=\"-1\">";
  print OUTPUT "      [ <a href=\"../index.htm\">H O M E</a> ]";
  print OUTPUT "      [ <a href=\"../science/index.htm\">S C I E N C E</a> ]";
  print OUTPUT "      [ <a href=\"../maths/index.htm\">M A T H S</a> ]";
  print OUTPUT "      [ <a href=\"../astro/index.htm\">A S T R O N O M Y</a> ]";
  #print OUTPUT "      [ <a href=\"../search/index.htm\">S E A R C H</a> ]";
  print OUTPUT "     </font>\n";
  print OUTPUT "     <br>\n";
  print OUTPUT "     <font size=\"-2\">\n";
  print OUTPUT "     <a href=\"../download/index.htm\">Download</a> |\n";
  print OUTPUT "     <a href=\"../bookshop/index.htm\">Shop</a> |\n";
  print OUTPUT "     <a href=\"../talk/index.htm\">Contact</a> |\n";
  print OUTPUT "     <a href=\"../about/index.htm\">About</a>\n";
  print OUTPUT "     </font>\n";
  
  print OUTPUT "     <br>\&nbsp\;<br>";
  
  print OUTPUT "     </center>";
  
  print OUTPUT "       </td>";
  print OUTPUT "      </tr>";
  print OUTPUT "     </table>";
  print OUTPUT "     <img src=\"../images/furniture/bottom.gif\" usemap=\"#bottom\" alt=\"The Bottom Line\" width=\"765\" height=\"24\" border=\"0\">";
  print OUTPUT "    </td>";
  print OUTPUT "   </tr>";
  print OUTPUT "  </table>";
  
  print OUTPUT " <map name=\"main\">\n";
  print OUTPUT "  <area shape=\"rect\" coords=\"0,0,322,60\" href=\"../index.htm\" alt=\"Home\">\n";
  print OUTPUT "  <area shape=\"rect\" coords=\"323,0,430,35\" href=\"../science/index.htm\" alt=\"Science\">\n";
  print OUTPUT "  <area shape=\"rect\" coords=\"431,0,522,35\" href=\"../maths/index.htm\" alt=\"Maths\">\n";
  print OUTPUT "  <area shape=\"rect\" coords=\"523,0,670,35\" href=\"../astro/index.htm\" alt=\"Astronomy\">\n";
  print OUTPUT "  <area shape=\"rect\" coords=\"395,36,493,60\" href=\"../download/index.htm\" alt=\"Download\">\n";
  print OUTPUT "  <area shape=\"rect\" coords=\"562,36,621,60\" href=\"../bookshop/index.htm\" alt=\"Bookshop\">\n";
  print OUTPUT "  <area shape=\"rect\" coords=\"622,36,702,60\" href=\"../talk/index.htm\" alt=\"Contact\">\n";
  print OUTPUT "  <area shape=\"rect\" coords=\"703,36,764,60\" href=\"../about/index.htm\" alt=\"About\">\n";
  print OUTPUT " </map><map name=\"bottom\">\n";
  print OUTPUT "  <area shape=\"rect\" coords=\"0,0,89,14\" href=\"#top\" alt=\"Top of Page\">\n";
  print OUTPUT "  <area shape=\"rect\" coords=\"581,0,764,14\" href=\"../copyrite/index.htm\">\n";
  print OUTPUT " </body>\n";
  
  print OUTPUT "</body>";
  
  print OUTPUT "</html>";
  
  close OUTPUT;
}