var xmlHttp2
var returnString
function showCompany(str)
{
//alert (str);
xmlHttp2=GetXmlHttpObject()
if (xmlHttp2==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url="/files/scripts/getCompanyFromCode.asp";
url=url+"?q="+str;
url=url+"&sid="+Math.random();
xmlHttp2.onreadystatechange=stateChangedCompany;
xmlHttp2.open("GET",url,true);
xmlHttp2.send(null);
} 

function stateChangedCompany() 
{ 

if (xmlHttp2.readyState==4)
{ 
returnString = xmlHttp2.responseText

returnString = returnString.replace("&#230;","æ")
returnString = returnString.replace("&#248;","ø")
returnString = returnString.replace("&#229;","å")
returnString = returnString.replace("&#198;","Æ")
returnString = returnString.replace("&#216;","Ø")
returnString = returnString.replace("&#197;","Å")
returnString = returnString.replace("&#252;","ü")

document.getElementById("txtReceiver").value=returnString;
}
}

function GetXmlHttpObject()
{
var xmlHttp2=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp2=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp2=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp2=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp2;
}