var xmlHttp;

function showSearch(str)
{
if (str.length==0)
  { 
  document.getElementById('table').innerHTML='';
  document.getElementById('table').style.display='none';
  
  return;
  }
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url="search";
url=url+"/"+str;
url=url+"/"+"sid/"+Math.random();
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
} 

function stateChanged() 
{ 
if (xmlHttp.readyState==4 && xmlHttp.status == 200)
{ 
	//alert("a");
 //document.getElementById('table').setAttribute("style","position: absolute; left: 940px; top: 120px; height: 100px; width: 100px; padding: 1em;overflow: auto;z-index:100;background-color: #EBF4F9;display: block;");
 //document.getElementById('table1').setAttribute("style","display: block;");
 document.getElementById('table').style.display='block';
 document.getElementById('table').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;
}
