your code will find all versions of Netscape, including fully CSS-compatible ones. for people looking for this solution in the NS6+/Mozilla era, add if ($user_agent !~ /gecko/i) { right before the $result = 1 and match brackets as appropriate.
I really hate it when a website decides my Mozilla 1.1b is not capable of rendering basic CSS (some sites won't even let me in).