<!-- This script has been in the http://www.JavaScripts.com Javascript Public Library! -->
<!-- Note that though this material may have been in a public depository, certain author copyright restrictions may apply. -->
<html>
<body TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#888888" ALINK="#FF0000">
<head>
<title>
<h1>
IP and HOSTNAME checker, and custom greetings.<p>
</h1>
</title>
By <a href="http://www.javascripts.com/repository/mailto:cable@i1.net">Norman G. King</a><br>
</head>


<script language="JavaScript">
// Uses Java objects with JavaScript to get IP and Host and
// display a custom greeting.
function netscape(){
          return(navigator.appName.lastIndexOf('Netscape') != -1 );
          }



if (netscape()) {
         if (navigator.javaEnabled() == 1){
                                           javascript="cool";
                                           window.onerror=null; 
                                           myAddress=java.net.InetAddress.getLocalHost(); 
                                           myAddress2=java.net.InetAddress.getLocalHost(); 
                                           host=myAddress.getHostName(); 
                                           ip=myAddress2.getHostAddress();
                                           document.write("<BR>Your host name is "+host);
                                          document.write("<BR>Your IP address is "+ip+"<p>");
                                          if (host.lastIndexOf('intel.com') != -1) {
                                                                   document.write("Welcome Intel Employee, best CPU makers on the planet!<p>")
                                                                                                          }
                                          if (host.lastIndexOf('microsoft.com') != -1) {
                                                                   document.write("Welcome Microsoft Employee, makers of the fine Windows environment.<p>")
                                                                                                          }
                                          if (host.lastIndexOf('aol.com') != -1) {
                                                                   document.write("Ugh! Another AOL Loser!<p>")
                                                                                                          }
                                          if (host.lastIndexOf('prodigy.net') != -1) {
                                                                   document.write("Ugh! Another Prodigy Loser!<p>")
                                                                                                          }
                                          if (host.lastIndexOf('ibm.net') != -1) {
                                                                   document.write("Welcome IBM user.<p>")
                                                                                                          }
                                          if (host.lastIndexOf('apple.com') != -1) {
                                                                   document.write("Where did you come from? Apple employee? Get lost!<p>")
                                                                                                          }
                                          if (host.lastIndexOf('mac') != -1) {
                                                                   document.write("Why do you have Mac in your host name? Get lost!<p>")
                                                                                                          }
                                          if (host.lastIndexOf('att.com') != -1) {
                                                                   document.write("Welcome AT&T Employee, best long distance carrier.<p>")
                                                                                                          }
                                          if (host.lastIndexOf('nasa.gov') != -1) {
                                                                   document.write("Welcome NASA Employee<p>")
                                                                                                          }
                                          if (host.lastIndexOf('cert.org') != -1) {
                                                                   document.write("Welcome CERT Employee, catch any hackers recently? :)<p>")
                                                                                                          }
                                          if (host.lastIndexOf('compuserve.com') != -1) {
                                                                   document.write("ARGH! Another CompuServe loser!<p>")
                                                                                                          }
                                          if (host.lastIndexOf('cephalopod.cas.usf.edu') != -1) {
                                                                   document.write("Get lost, you Otter Face! Go play on the highway!<p>")
                                                                                                          }
                                          if (host.lastIndexOf('accentdesign.com') != -1) {
                                                                   document.write("Hey look, its the 'Queen Of Computers' with 20 years of Web Page experiance and Java programming! What a loser you are, its not even that old!<p>")
                                                                                                          }
                                          if (host.lastIndexOf('i1.net') != -1) {
                                                                   document.write("Welcome Internet First User.<p>")
                                                                                                          }
                                          if (host.lastIndexOf('netcom.com') != -1) {
                                                                   document.write("Welcome Netcom User.<p>")
                                                                                                          }

                                        }
                 }
         if (navigator.javaEnabled() != 1){
                                          document.write("You need Java enabled to see this.<br>")
                                          }
         if (!netscape()){
                         document.write("You need Netscape to see this.")
                         }                                                                                 

</script>

</html>
</body>

		
<!-- Tommy Raven (Min) says Moo. -->