function realizarBusqueda(){
	busq=document.getElementById("buscar").value;
	str="buscar="+escape(busq);
	url="/php/search_youtube.php";
	xmlHttpPost(str,url);
}

function xmlHttpPost(str,Url) {
	var xmlHttpReq = false;
	var self = this;
	var strURL = Url;
	var xmlHttpReq = false;
	if (window.XMLHttpRequest) {
		self.xmlHttpReq = new XMLHttpRequest();
	}
	else if (window.ActiveXObject) {
		try { self.xmlHttpReq = new ActiveXObject("Msxml2.XMLHTTP");  }   
	  catch (err){
	    	try{ self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");}
	      catch (err2) {     }
	  }
	}
	self.xmlHttpReq.open('POST', strURL, true);
	self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	self.xmlHttpReq.onreadystatechange = function() {
		if (self.xmlHttpReq.readyState == 4) {
				updateContenido(self.xmlHttpReq.responseText);
		}
	}
	self.xmlHttpReq.send(str);
}

function updateContenido(str){
	document.getElementById("contenido").innerHTML=str;
}

function descargar(id){
	document.getElementById("v").value=id;
	document.frmDescarga.submit();
}
