var xmlhttp

function showSpec(str)
{
if (str.length==0)
  {
  document.getElementById("spec").innerHTML="";
  return;
  }
xmlhttp=GetXmlHttpObject();
if (xmlhttp==null)
  {
  alert ("Sorry, your browser will not allow this");
  return;
  }
var url=str;
url=url+"?q="+str;
url=url+"&sid="+Math.random();
xmlhttp.onreadystatechange=stateChanged;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}

function stateChanged()
{
if (xmlhttp.readyState==4)
  {
  if (document.getElementById("spec").innerHTML=="")
  {
  document.getElementById("spec").innerHTML=xmlhttp.responseText;
  document.getElementById("spec").style.border="1px solid #AC0000";
  }
  else
  {
	document.getElementById("spec").innerHTML="";
	document.getElementById("spec").style.border="0"
  }
  }
}

function GetXmlHttpObject()
{
if (window.XMLHttpRequest)
  {
  // code for IE7+, Firefox, Chrome, Opera, Safari
  return new XMLHttpRequest();
  }
if (window.ActiveXObject)
  {
  // code for IE6, IE5
  return new ActiveXObject("Microsoft.XMLHTTP");
  }
return null;
}