<HTML>
<HEAD>
<TITLE>Detecting Browser </TITLE>
<SCRIPT Language="JavaScript">
<!-- Hide JavaScript 
 //_______________HANDLE NETSCAPE USERS___________________
      if (navigator.userAgent.indexOf("Netscape")){ 
        //............ Let's tackle Netscape Version 4.0............
                if (navigator.appVersion.substring(0, 1) == "4"){ 
                     if (navigator.appVersion.substring(2, 3) == "0"){ 
// for Netscape 4.0 
                                if (navigator.appVersion.substring(3, 4) == "b"){ 
// for Netscape 4.0 beta    
                                        document.bgColor="black";
                                location.href="index_for_Netscape4_0b.html"; 
// change to your file name
                                        }
                                else { // Non Beta
                                        document.bgColor="black";
                                location.href="index_for_Netscape4_0.html"; 
// change to your file name
                                        }
                         }
                        else if (navigator.appVersion.substring(2, 3) == "1"){ 
// for Netscape 4.1    
                                 document.bgColor="black"; 
                                 location.href="index_for_Netscape4_1.html";
                                }
                        else if (navigator.appVersion.substring(2, 3) == "2"){ 
// for Netscape 4.2
                                document.bgColor="black"; 
                                location.href="index_for_Netscape4_2.html";
                                }
                }
        //............ Let's tackle Netscape Version 3.0............
      else if (navigator.appVersion.substring(0, 1) == "3"){       
                                 //Same code from above goes here
               }
        //............ Let's tackle Netscape Version 2.0 or less............
           else {// for netscape 2 or less
                                //Same code from above goes here
               }
//_______________HANDLE MICROSOFT IE 
USERS___________________
      else if (navigator.appName == "MSIE"){// for MS Internet 
Explorer 
        //............ Let's tackle MS IE Version 4.0............
                if (navigator.appVersion.substring(0, 1) == "4"){ // for ver 
//Same code from above goes here
        }
        //............ Let's tackle MS IE Version 3.0............
                else if (navigator.appVersion.substring(0, 1) == "3"){ 
// for ver 3
                                //Same code from above goes here
        }
        //............ Let's tackle MS IE Version 2.0 or less............
                else{ // for ver 2 or less
                                //Same code from above goes here
        }
      }
// End Hiding -->
</SCRIPT>
</HEAD>
<body bgcolor=white text=black>
<h2>Detecting Both Netscape and MS IE</h2>
</BODY>
</HTML>