var xmlHttp
function showUser(str,type)
{xmlHttp=GetXmlHttpObject()
if(xmlHttp==null)
{alert("Browser does not support HTTP Request")
return}
var url="/details.php"
url=url+"?q="+str+"&type="+type
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=function()
{if(xmlHttp.readyState==4||xmlHttp.readyState=="complete")
{if(type==3)
{document.getElementById("details").innerHTML=xmlHttp.responseText}
else if(type==4||type==6)
{alert("Successfully Saved");}
else if(type==5){theSel=document.getElementById('settings');var selIndex=theSel.selectedIndex;if(selIndex!=-1){for(i=theSel.length-1;i>=0;i--)
{if(theSel.options[i].selected)
{theSel.options[i]=null;}}
if(theSel.length>0){theSel.selectedIndex=selIndex==0?0:selIndex-1;}}
alert("Deleted");}
else
{document.getElementById('txtHint').innerHTML=xmlHttp.responseText;}}}
xmlHttp.open("GET",url,true)
xmlHttp.send(null)}
function GetXmlHttpObject()
{var xmlHttp=null;try
{xmlHttp=new XMLHttpRequest();}
catch(e)
{try
{xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");}
catch(e)
{xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}}
return xmlHttp;}
