By using PHP is much more simple.
Code a script and name it header.php
<?
echo "<link href=\"../gen.css\" rel=\"stylesheet\" type=\"text/css\">";
?>
Then in the beginning of the PHP script, just use
<HEAD><? include("header.php"); ?></HEAD>
and that's it. All your pages will share this piece of code.
Of course you can always seek/replace, but this way, when you want to change something, you only have to change one file.
fLIPIS