var xmlHttp

function checkLinks(which)
{
  if(which==1)
    frames['result'].location.href = "robot_links.php"
  else if(which==2)
    frames['result'].location.href = "robot_detail.php"
  else if(which==4)
    frames['result'].location.href = "robot_swap.php"
}

function showResult(from,random)
{
xmlHttp=GetXmlHttpObject()

if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 } 

var url="livesearch.php"
url=url+"?fulltext="+escape(document.getElementById("fulltext").value);
url=url+"&from="+from;
url=url+"&random="+random;
url=url+"&sid="+Math.random()
if (xmlHttp.overrideMimeType) 
   xmlHttp.overrideMimeType('text/xml; charset=windows-1250');
xmlHttp.onreadystatechange=stateChanged 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)

} 

function stateChanged() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
  document.getElementById("stred").innerHTML=xmlHttp.responseText;
 } 
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp=new XMLHttpRequest();
 }
catch (e)
 {
 // Internet Explorer
 try
  {
  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
}
