var xmlHttp

function getVideo(str)
{ 
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url="FindVideo.asp";
if (str!="")
	{
	url=url+"?V="+str;
	}
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}

function stateChanged() 
{ 
if (xmlHttp.readyState==4)
{ 
//alert(xmlHttp.responseText);
document.getElementById("MyVideo").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;
}

var xmlHttp2

function getCategory(str)
{ 
xmlHttp2=GetXmlHttpObject();
if (xmlHttp2==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url="FindVideo.asp";
if (str!="")
	{
	url=url+"?C="+str;
	}
//alert(url)
xmlHttp2.onreadystatechange=stateChanged2;
xmlHttp2.open("GET",url,true);
xmlHttp2.send(null);
}

function stateChanged2() 
{ 

if (xmlHttp2.readyState==4)
{ 
//alert(xmlHttp2.responseText);
document.getElementById("Listcategories").innerHTML=xmlHttp2.responseText;

}
}

var xmlHttp3

function getFeatures(str)
{ 
xmlHttp3=GetXmlHttpObject();
if (xmlHttp3==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url="FindVideo.asp";
if (str!="")
	{
	url=url+"?F="+str;
	}
//alert(url)
xmlHttp3.onreadystatechange=stateChanged3;
xmlHttp3.open("GET",url,true);
xmlHttp3.send(null);
}

function stateChanged3() 
{ 

if (xmlHttp3.readyState==4)
{ 
//alert(xmlHttp2.responseText);
document.getElementById("featured").innerHTML=xmlHttp3.responseText;

}
}

