#!/usr/local/bin/perl

use CGI;

if( $ENV{'HTTP_USER_AGENT'} =~ /Mozilla\/3.0/ )
{
  $document = "/js11page.html";
}
else
{
  $document = "/nojspage.html";
}

# This subroutine comes from CGI
print $query->header( "text/html" );

# Think about how you would use this script for
# your entire site!!!
$htmldoc = $document;

if( open( HTML, "< $htmldoc" ) )
{
  while( <HTML> )
  {
    print;
  }
  close( HTML );
}
else
{
  # From Reuven M Lerner's March 1997 Linux Journal article
  &log_and_die( "Tried to open $htmldoc" );
}

exit 0;
