var xmlHttp;

function CreateXMLhttpRequest()
{
	if (window.ActiveXObject)
	{
		xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
	}
	else if (window.XMLHttpRequest)
	{
		xmlHttp = new XMLHttpRequest();
	}
}

//aggiungi al canale
function StartRequest2(ajax_url)
{
	CreateXMLhttpRequest();
	xmlHttp.onreadystatechange= function() {
	  if(xmlHttp.readyState === 4) {
	  if(xmlHttp.status == 200)
		titolo_video=xmlHttp.responseText;
		oggetto = document.getElementById('id_canale_btn'); 
		oggetto.innerHTML = '<span class="added_canale_btn"></span>';
		oggetto2 = document.getElementById('id_lista_tuocanale'); 
		oggetto2.innerHTML = titolo_video;
	  }
	}
	xmlHttp.open("GET",ajax_url,true); 
	xmlHttp.send(null);
}

function StartRequest2NuHome(ajax_url)
{
	CreateXMLhttpRequest();
	xmlHttp.onreadystatechange= function() {
	  if(xmlHttp.readyState === 4) {
	  if(xmlHttp.status == 200)
		titolo_video=xmlHttp.responseText;
		oggetto = document.getElementById('id_canale_btn'); 
		oggetto.innerHTML = '<span class="added_canale_btn" style="top:370px;"></span>';
		oggetto2 = document.getElementById('id_lista_tuocanale'); 
		oggetto2.innerHTML = titolo_video;
	  }
	}
	xmlHttp.open("GET",ajax_url,true); 
	xmlHttp.send(null);
}
