$browser = $ENV{HTTP_USER_AGENT};
$browser =~ s/Windows /Win/gi;
$browser =~ tr#[]/(;) #       #s;
@brw = split(/ /,$browser);

if ($#brw > 1) {
  $Bname = $brw[0];
  $Bvers = $brw[1];
  $Boper = "";
  for ($pos = 2; $pos < $#brw; $pos++){
    $inf = $brw[$pos];
    if ($inf eq "MSIE"){
      $Bname = $inf;
      if ($pos+1 < $#brw){
        $Bvers = $brw[$pos+1];
      }
    }
    if ((substr($inf,0,3) eq "Win")
     || (substr($inf,0,3) eq "Mac")
     || (substr($inf,0,3) eq "Web")
     || (substr($inf,0,3) eq "Sun")
     || (substr($inf,0,2) eq "HP")
     || (substr($inf,0,3) eq "AIX")
     || (substr($inf,0,3) eq "BSD")
     || (substr($inf,0,7) eq "FreeBSD")
     || (substr($inf,0,3) eq "OSF")
     || (substr($inf,0,4) eq "IRIX")
     || (substr($inf,0,5) eq "Linux")
     || (substr($inf,0,4) eq "OS/2")){
      $Boper = $inf;
    }
  }
}
$Bmaj = int($Bvers);
if ($Bname eq "MSIE"){
    print "Location: ../../trick05/aeroms-i.htm\n";
}else{
    print "Location: ../../trick06/aeroms-n.htm\n";
}
print "Content-type: text/html\n";
print "\n";
print "<HTML>\n";
print "<HEAD>\n";
print "<TITLE>AERO Message Service</TITLE>";
print "</HEAD>\n";
print "<BODY>\n";
print "</BODY>\n";
print "</HTML>\n";

