/*
//Cómo todo en Javascript: "No funciona, aunque pinta bien."
//Molaria que funcionara así...

var ajaxdestination; //= new Array(10);
var xmlhttp; //= new Array(10); 

function init()
{
	ajaxdestination=new Array(10);
	xmlhttp=new Array(10); 
}

function getdata(what,where) { // get data from source (what)
	getdata(what,where,9);
}

function getdata(what,where,ID) { // get data from source (what)
 try {
   xmlhttp[ID] = window.XMLHttpRequest?new XMLHttpRequest():
  		new ActiveXObject("Microsoft.XMLHTTP");
	
 }
 catch (e) {  }

 document.getElementById(where).innerHTML ="<center><img src='img/ajax-loader.gif'></center>";
// we are defining the destination DIV id, must be stored in global variable (ajaxdestination)
 ajaxdestination[ID]=where;
 xmlhttp[ID].onreadystatechange = triggered(ID); // when request finished, call the function to put result to destination DIV
 xmlhttp[ID].open("GET", what);
 xmlhttp[ID].send(null);
  return false;
}

function triggered(IDm) { // put data returned by requested URL to selected DIV
  if (xmlhttp[IDm].readyState == 4) if (xmlhttp[IDm].status == 200) 
    document.getElementById(ajaxdestination[IDm]).innerHTML =xmlhttp[IDm].responseText;
}
*/

// here we define global variable
var ajaxdestination="";
function getdata(what,where) { // get data from source (what)
 try {
   xmlhttp = window.XMLHttpRequest?new XMLHttpRequest():
  		new ActiveXObject("Microsoft.XMLHTTP");
 }
 catch (e) {  }

 document.getElementById(where).innerHTML ="<center><img src='img/ajax-loader.gif'></center>";
// we are defining the destination DIV id, must be stored in global variable (ajaxdestination)
 ajaxdestination=where;
 xmlhttp.onreadystatechange = triggered; // when request finished, call the function to put result to destination DIV
 xmlhttp.open("GET", what);
 xmlhttp.send(null);
  return false;
}

function triggered() { // put data returned by requested URL to selected DIV
  if (xmlhttp.readyState == 4) if (xmlhttp.status == 200) 
    document.getElementById(ajaxdestination).innerHTML =xmlhttp.responseText;
}

var ajaxdestination2="";
function getdata2(what,where) { // get data from source (what)
 try {
   xmlhttp2 = window.XMLHttpRequest?new XMLHttpRequest():
  		new ActiveXObject("Microsoft.XMLHTTP");
 }
 catch (e) {  }

 document.getElementById(where).innerHTML ="<center><img src='img/ajax-loader.gif'></center>";
// we are defining the destination DIV id, must be stored in global variable (ajaxdestination)
 ajaxdestination2=where;
 xmlhttp2.onreadystatechange = triggered2; // when request finished, call the function to put result to destination DIV
 xmlhttp2.open("GET", what);
 xmlhttp2.send(null);
  return false;
}

function triggered2() { // put data returned by requested URL to selected DIV
  if (xmlhttp2.readyState == 4) if (xmlhttp2.status == 200) 
    document.getElementById(ajaxdestination2).innerHTML =xmlhttp2.responseText;
}

var ajaxdestination3="";
function getdata3(what,where) { // get data from source (what)
 try {
   xmlhttp3 = window.XMLHttpRequest?new XMLHttpRequest():
  		new ActiveXObject("Microsoft.XMLHTTP");
 }
 catch (e) {  }

 document.getElementById(where).innerHTML ="<center><img src='img/ajax-loader.gif'></center>";
// we are defining the destination DIV id, must be stored in global variable (ajaxdestination)
 ajaxdestination3=where;
 xmlhttp3.onreadystatechange = triggered3; // when request finished, call the function to put result to destination DIV
 xmlhttp3.open("GET", what);
 xmlhttp3.send(null);
  return false;
}

function triggered3() { // put data returned by requested URL to selected DIV
  if (xmlhttp3.readyState == 4) if (xmlhttp3.status == 200) 
    document.getElementById(ajaxdestination3).innerHTML =xmlhttp3.responseText;
}

function Start3pxPlayer(u,n,w,h,l,t,c,f,x) 
{ 

window.document.getElementById('prodsPlayer').src='http://www.threepixels.org/player.php?'+u;

}

