var xmlHttp
function showResult(str){

var ss=document.getElementById('searchsel');

if (str.length == 0 || ss.value != "theme"){
 document.getElementById(elementID).
 innerHTML="";
 document.getElementById(elementID).
 style.display = "none";
 return
 }
 xmlHttp=GetXmlHttpObject()
 if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="/forum/search.live.php?fname="+fname+"&newthrd="+newthrd;
var post='q='+str;
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("POST",url,true);
xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded; charset=utf-8");
xmlHttp.send(post);
}

function hidelivesearch(){
 document.getElementById(elementID).
 innerHTML=xmlHttp.responseText;
 document.getElementById(elementID).
 style.display = "none";
}

function stateChanged()
{
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 {
 document.getElementById(elementID).
 innerHTML=xmlHttp.responseText;
 document.getElementById(elementID).
 style.display = "block";
 }
}
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;
}
