// JavaScript Document
$ = function() {
  var elements = new Array();

  for (var i=0;i<arguments.length;i++) {
    var element = arguments[i];
    if (typeof element == 'string')
      element = document.getElementById(element);

    if (arguments.length == 1)
      return element;

    elements.push(element);
  }

  return elements;
}

var old_play = 1;

play_img = function (bot) {
	
	$('cntainer').src = img_play[bot];
	$('plb_'+bot).className = "mark";
	$('pltxt').innerHTML = txt_play[bot] ;
	$('plb_'+old_play).className = "";
	
	old_play = bot ;
	
}

ObrirImg = function (ancho,alto) {
	popup.resizeTo(ancho+10,alto+48); 
	popup.moveTo((screen.width-ancho)/2,(screen.height-alto)/2); 
}

play_popup = function () {
	var desc = 'resizable=no,scrollbars=no,left=0,top=0,width=100,height=100,';
	popup = window.open('','',desc);
	popup.document.write('<html><head><title></title></head>');
	popup.document.write('<body style="margin:0px;"> <img src="'+ img_playP[old_play] +'" ' );
	popup.document.write('onclick="window.close()" onLoad="opener.ObrirImg(this.width,this.height)">');
	popup.document.write(' </body></html>');
	popup.document.close(); 
	
	
}