Is My AJAX code outdated?

I put this four-dropdown chain together years ago. I have it installed on a number of websites and oddly it works well on 8 domains but won’t on three others. It generates the script generated error message “There was a problem while using XMLHTTP getCountry line 102:”
which is generated from line 102 of iframedex_remote.js." (see the page’s code below) which is in the function getCountry(continentId).

My guess is that something is wrong with the Inint_AJAX() function but really don’t know what it could be. It also seems odd it works on 8 domains but not on three. All the sites are hosted on the same shared server. All attempts to run the page were made from Firefox and Chromium (never tested on IE).

Thanks in advance.

<script type="text/javascript">
function changeHidden2(argselected){
var hiddeninput = "hiddeninput";	
parent.document.getElementById(hiddeninput.innerHTML = arguments[argselected];
}
</script>

<script type="text/javascript">
function getXMLHTTP() {
    var x = false;
    try {
        x = new XMLHttpRequest();
    }
    catch(e) {
        try {
            x = new ActiveXObject("Microsoft.XMLHTTP");
        }
        catch(ex) {
            try {
                req = new ActiveXObject("Msxml2.XMLHTTP");
            }
            catch(e1) {
                x = false;
            }
        }
    }
    return x;
}

function Inint_AJAX() {
   try { return new ActiveXObject("Msxml2.XMLHTTP");  } catch(e) {} //IE
   try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) {} //IE
   try { return new XMLHttpRequest();          } catch(e) {} //Native Javascript
   alert("XMLHttpRequest not supported");
   return null;
};


function getCity(stateId)
{
   var strURL="<?php echo $remote_widgits_domain_name."/".$folder_name;?>/ajax_to_curl.php?region_div=state&state="+stateId;
  var req = getXMLHTTP();
  if (req)
  {
    req.onreadystatechange = function()
    {
      if (req.readyState == 4) // only if "OK"
      {
        if (req.status == 200)
        {
          document.getElementById('citydiv').innerHTML=req.responseText;
        } else {
          alert("There was a problem while using XMLHTTP getCity:\
" + req.statusText);
        }
      }
    }
    req.open("GET", strURL, true);
    req.send(null);
  }
}


function getState(countryId)
{
  var strURL="<?php echo $remote_widgits_domain_name."/".$folder_name;?>/ajax_to_curl.php?region_div=country&country="+countryId;
   var req = getXMLHTTP();
   if (req)
   {
     req.onreadystatechange = function()
     {
      if (req.readyState == 4)
      {
	 // only if "OK"
	 if (req.status == 200)
         {
	    document.getElementById('statediv').innerHTML=req.responseText;
	 } else {
   	   alert("There was a problem while using XMLHTTP getState:\
" + req.statusText);
	 }
       }
      }
   req.open("GET", strURL, true);
   req.send(null);
   }
}



function getCountry(continentId)
{
  var strURL="<?php echo $remote_widgits_domain_name."/".$folder_name;?>/ajax_to_curl.php?region_div=continent&continent="+continentId;
   var req = getXMLHTTP();
   if (req)
   {
     req.onreadystatechange = function()
     {
      if (req.readyState == 4)
      {

	 // only if "OK"
	 if (req.status == 200)
         {
	    document.getElementById('countrydiv').innerHTML=req.responseText;
	 } else {
	   alert("There was a problem while using XMLHTTP getCountry line 102:\
" + req.statusText);
	 }
       }
      }
   req.open("GET", strURL, true);
   req.send(null);
   }
}
</script>
<script type="text/javascript">

function changeHiddenInput (objDropDown)
{
    var objHidden = document.getElementById("hiddenInput");
    objHidden.value = objDropDown.value;
}

</script>