
function ShowICQWindow() {

   wintop = 40
   winleft = 100
   winheight = 540
   winwidth = 605

   icqwin = open("icqwin.html", "icqwindow",
                 "alwaysRaised=yes,resizable=no,width="+winwidth+",height="+winheight+"," +
                 "left=" + winleft + ",top=" + wintop)
   icqwin.focus()
}

if (document.referrer.length > 0) {

  appversion = navigator.appVersion;
  majorver = appversion.substring(0, 1);

  if (document.referrer.toLowerCase().indexOf("fischer") != -1) {
     if (getCookieValue("Craig") == NULL_VALUE) {
        var msg = "Greetings visitor from Craig's page.  I met Craig "
        msg = msg + "in a magical land full of aliens, grimpils, and enormous "
        msg = msg + "killer insects - a land we called ServiceMaster... "
	    msg = msg + "Now, I hope you enjoy your visit to another unusual place: "
        msg = msg + "The World of MWSTAFFO!  And make sure you click the secret "
        msg = msg + "link that's only for visitors from Craig's page."
        alert(msg)
        document.cookie = "Craig=IDoNotIntroduceTheLog"
     }
  }

  if (document.referrer.toLowerCase().indexOf("gve827") != -1) {
     if (getCookieValue("Doctor") == NULL_VALUE) {
        var msg = "Greetings visitor from John and Ginger's Homepage.  You know, in some "
        msg = msg + "circles John is known as The Doctor.  But you might think I'm the one "
        msg = msg + "who needs a doctor after you visit The World of MWSTAFFO.  "
	    msg = msg + "Please enjoy your stay here, but let me offer you a word of advice: "
        msg = msg + "don't drink the water!  And make sure you click the secret link that's "
        msg = msg + "only for visitors from John and Ginger's Homepage."
        alert(msg)
        document.cookie = "Doctor=InDaHouse"
     }
  }

  if (document.referrer.toLowerCase().indexOf("saycomp") != -1) {
     if (getCookieValue("Dave") == NULL_VALUE) {
        var msg = "Greetings visitor from Dave Village.  I am MWSTAFFO, the town phrenologist.  "
        msg = msg + "Can I examine the bumps on your head?  No?  Would you like to examine mine?  "
        msg = msg + "Well, I hope you enjoy your trip into The World of MWSTAFFO.  "
        msg = msg + "And make sure you click the secret link that\'s only for visitors "
        msg = msg + "from Dave Village."
        alert(msg)
        document.cookie = "Dave=OhYeah"
     }
  }

  if (document.referrer.toLowerCase().indexOf("archenland") != -1) {
     if (getCookieValue("Scott") == NULL_VALUE) {
        var msg = "Welcome visitor from Archenland.  You may have read about the world "
        msg = msg + "of Narnia, but I hope you enjoy visiting a world that\'s even stranger: The "
        msg = msg + "World of MWSTAFFO.  And make sure you click the secret link that\'s only for "
        msg = msg + "visitors from Archenland."
        alert(msg)
        document.cookie = "Scott=BeenThere"
     }
  }

  ricker = 0
  //if ((majorver >= 4) && (document.referrer.toLowerCase().indexOf("megsinet.com/mwstaffo") != -1)) {
  //  netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead")
  //  histlength = top.window.history.length
  //  if (histlength >= 3) {
  //    alert("histlength="+histlength+"  history.previous="+top.window.history.previous+"  history[2]="+top.window.history[2])
  //    if (top.window.history[2].toLowerCase().indexOf("rdwalt") != -1) ricker = 1
  //  }
  //}

  if ((ricker) || (document.referrer.toLowerCase().indexOf("rdwalt") != -1)) {
     if (getCookieValue("Rick") == NULL_VALUE) {
        var msg = "RICK ROCKS!!  Welcome visitor from Rick\'s page. My name is MWSTAFFO and I "
        msg = msg + "have actually met Rick in person.  He\'s really pretty cool in spite of "
        msg = msg + "what everyone says.  I hope you enjoy this glimpse into my world.  Don\'t forget "
        msg = msg + "to click the secret link that\'s only for visitors from Rick\'s page.  Beware "
        msg = msg + "of Dark Rick!"
        alert(msg)
        document.cookie = "Rick=Rocks"
     }
  }

  if ((document.referrer.toLowerCase().indexOf("paulygram") != -1) ||
      (document.referrer.toLowerCase().indexOf("yosemite/4815") != -1)) {
     if (getCookieValue("Paul") == NULL_VALUE) {
        var msg = "Greetings, visitor from PaulyGram. You know, at PaulyTravel, you can "
        msg = msg + "get airline tickets to a lot of unusual places.  But you can\'t get a "
        msg = msg + "flight to any place nearly as strange as The World of MWSTAFFO.  I "
        msg = msg + "hope you enjoy your stay here.  Remember, take only pictures and leave "
        msg = msg + "only footprints.  And make sure you check out the link that\'s "
        msg = msg + "only for visitors from PaulyGram."
        alert(msg)
        document.cookie = "Paul=Sure"
     }
   }
}
