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