// JavaScript Document
var popUpWin=0;
var popUpWin2=0;
var popUpWin3=0;
var popUpWin4=0;
function popUpWindowPDF(URLStr, left, top, width, height)
{
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  popUpWin = open(URLStr, 'popUpWinPDF', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}

function popUpWindowMetadata(URLStr, left, top, width, height)
{
  if(popUpWin2)
  {
    if(!popUpWin2.closed) popUpWin2.close();
  }
  popUpWin2 = open(URLStr, 'popUpWinMtd', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}

function popUpWindowForm(URLStr, left, top, width, height)
{
  if(popUpWin3)
  {
    if(!popUpWin3.closed) popUpWin3.close();
  }
  popUpWin3 = open(URLStr, 'popUpWinForm', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}

function popUpWindowGraphic(URLStr, left, top, width, height)
{
  if(popUpWin4)
  {
    if(!popUpWin4.closed) popUpWin4.close();
  }
  popUpWin4 = open(URLStr, 'popUpWinForm', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}

function Descarga_datos(){
    //alert("Esta listo para descargar los datos ?");
    document.forms[0].action="http://gisweb.ciat.cgiar.org/Formularios/formulario.asp";
    var windown = window.open("descargaCD.htm", "windown", "width=717,height=650,scrollbars=1,status=0,toolbar=0,resize=0,location=0,left=100, top=100,screenX=10,screenY=10");
	window.opener.focus();
	window.close();
	windown.focus();
}