I'm creating an active user script using Javascript/PHP. My code works fine in Firefox, but when I try it in IE I'm running into problems. The script updates a list of which users are logged into the page every 20 seconds or so. In firefox, this is working fine. In IE, it updates once to create the list, but in subsequent updates it just continues showing the same list, even if a user signs out. Code is listed below.

Code:
 <script language="JavaScript">
   var user;
   var AJAX;

   function initAJAX() {
       user = document.getElementById('user').value;
       try {
      AJAX = new XMLHttpRequest();
       } catch(e) {
      try {
          AJAX = new ActiveXObject("Msxml2.XMLHTTP");
      } catch(e) {
          try {
         AJAX = new ActiveXObject("Microsoft.XMLHTTP");
          } catch(e) {
         alert("Your browser can't use AJAX!");
         return false;
          }
      }
       }
       setRefresh(20000);
   }
      

   function setRefresh(num) {
       setTimeout("UpdateActive()", num);
   }

   function UpdateActive() {
       var disp = document.getElementById('ShowUsers');
       AJAX.onreadystatechange = function() {
      if(AJAX.readyState == 4 || AJAX.readyState == "complete") {
          disp.innerHTML = AJAX.responseText;
      }
       }

       var ran= Math.floor(Math.random() * 1001);
       AJAX.open("GET", "getactive.php?user="+user+"&ie="+ran, true);
       AJAX.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8")
       AJAX.send(null);
       setRefresh(30000);
   }

      
    </script>
I'm assuming the PHP code works fine, since it does for firefox, but if you'd like to see it I'd be more than happy to post it.