function setVideo2(video) {
	var vurl = 'http://www.youtube.com/v/';
    var params = { wmode: "transparent"};
   swfobject.embedSWF(vurl+video+'&autoplay=1&rel=0',"ytapiplayer", "470", "300", "7", null, null, params, null);
}
function setVideo() {
	var vurl = 'http://www.youtube.com/apiplayer?enablejsapi=1&playerapiid=ytplayer';
    var params = { allowScriptAccess: "always"};
    var atts = { id: "myytplayer" };
   swfobject.embedSWF(vurl,"ytapiplayer", "434", "280", "8", null, null, params, atts);
}

function setVideodm(idvideo) {
	var vurl = 'http://www.dailymotion.com/swf/';
    var params = { wmode: "transparent"};
    swfobject.embedSWF(vurl+idvideo,"swfvideo", "425", "355", "7", null, null, params, null);

}

function setVideomc(video) {
    var params = { wmode: "transparent"};
    swfobject.embedSWF(video,"swfvideo", "425", "355", "7", null, null, params, null);
}

function getId(nameid) {
	return document.getElementById(nameid);
}
function getData() {
	getId('loadData').style.visibility = "visible";
	dsYouTube.setURL(varurl+"?tag="+vartag+"&pag="+varpag);
	dsYouTube.loadData();
}
function setText(varId, varText) {
	getId(varId).innerText = varText;
	getId(varId).textContent = varText;
}
function download() {
	window.location = "download.php?v="+getId("codigo").value;
}
function pagVideo(pagStep) {
	if (varpag > 1 || pagStep > 0) {
		varpag = Number(varpag) + Number(pagStep);
		window.location = "index.php?q="+vartag+"&page="+varpag;
	}
}

function mousOverImage(name,id,nr){
if(name)imname = name;
imname.src = "http://img.youtube.com/vi/"+id+"/"+nr+".jpg";nr++;
if(nr > 3)nr = 1;
timer =  setTimeout("mousOverImage(false,'"+id+"',"+nr+");",1000);
}


      function  vervideo(video,titulo) {
              var window_width = 473;
              var window_height = 560;
              var newfeatures= 'scrollbars=no,resizable=no';
              var window_top = (screen.height-window_height)/2;
              var window_left = (screen.width-window_width)/2;
              newWindow=window.open('vervideo.php?video='+video+'&titulo='+titulo, 'Buscalox.com','width=' + window_width + ',height=' + window_height + ',top=' + window_top + ',left=' + window_left + ',features=' + newfeatures + '');
       }

function instalar(){

 if (window.external && ("AddSearchProvider" in window.external)) {
   window.external.AddSearchProvider("http://www.Buscalox.com/iconos/favicon.xml");
 } else if (window.sidebar && ("addSearchEngine" in window.sidebar)) {
   window.sidebar.addSearchEngine(
    "http://www.Buscalox.com/iconos/favicon.src",
    "http://www.Buscalox.com/iconos/favicon.ico",
    "Buscalox - Busca descargas directas",
    "" );
	}  else {
   alert("Lo sentimos, no se pudo instalar Buscalox en su navegador. Su navegador no soporta este plugin");
   }
 }
