var xmlHttp
var xmlHttp1
var xmlHttp2

function showKatogori(str)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="getkatogori.php"
url=url+"?pulke="+str
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
showKanallar("hepsi",str)
}
function showKanallar(cat,ulke)
{ 
/*alert(cat+":"+ulke);*/
xmlHttp1=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="getkanallar.php"
url=url+"?pcat="+cat
url=url+"&pulke="+ulke
url=url+"&sid="+Math.random()
xmlHttp1.onreadystatechange=stateChanged1 
xmlHttp1.open("GET",url,true)
xmlHttp1.send(null)
}
function showtv(str)
{ 
xmlHttp2=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="showtv.php"
url=url+"?q="+str
url=url+"&sid="+Math.random()
xmlHttp2.onreadystatechange=stateChanged2 
xmlHttp2.open("GET",url,true)
xmlHttp2.send(null)
}

function stateChanged() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 document.getElementById("katagori").innerHTML=xmlHttp.responseText 
 } 
}
function stateChanged1() 
{ 
if (xmlHttp1.readyState==4 || xmlHttp1.readyState=="complete")
 { 
 document.getElementById("kanallar").innerHTML=xmlHttp1.responseText 
 } 
}
function stateChanged2() 
{ 
if (xmlHttp2.readyState==4 || xmlHttp2.readyState=="complete")
 { 
 document.getElementById("showtv").innerHTML=xmlHttp2.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;
}