var xmlHttp

function showHint(str)
{
if (str.length==0)
  {
  document.getElementById("txtHint").innerHTML=""
  return
  }
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
  {
  alert ("Browser does not support HTTP Request")
  return
  }
var url="../../plugins/music_player/artists.php";
	//plugins/music_player/artistplayer.php"
//var url="../../plugins/music_player/livesearch.php"
//url=url+"?t=downloads&q="+str
//url=url+"&sid="+Math.random()
url=url+'?l='+str;
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}

function stateChanged()
{
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 {
 //document.getElementById("txtHint").innerHTML=xmlHttp.responseText.replace("/[\s\S]+(<br \/><h2 style=\"color:#fff\">[\S\s]+)<p class='clear'><\/p>[\s\t\n]+<\/div>[\s\t\n]+<p class='bottom_contentLeftFull'><\/p>[\s\S]+/g", "$1");
 var t = xmlHttp.responseText;
 var r = (t.indexOf('Artist Has No Albums') !== -1 || t.indexOf('There are no artists for this letter.') !== -1)  ? '"' + document.getElementById("txt1").value+'" :This Artist Has No Albums': t.substring(t.indexOf("<div class=\"listcontent_itemlist\">"), t.indexOf("</a></div></div>")+16) + "<p class='clear'></p>						</div>"; 
 
 document.getElementById("txtHint").innerHTML= r;
 
	 //t.substring(t.indexOf("<br /><h2 style=\"color:#fff\">"), t.indexOf("<p class='bottom_contentLeftFull'></p>"));
 }
}

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;
}

