var minAncho = 1000;
var minAlto = 495;

var winName = "titulo";
var win = null;

function abreN(theURL, ancho, alto)
{
    var h = (screen.width-ancho)/2;
    var v = (screen.height-alto)/2;
    var windowprops = "top=0,left=0,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes, resizable=no,width="+ancho+",height="+alto+",left="+h+", top="+v;
    if (win) {
        win.close();
    }
    win = window.open(theURL, winName, windowprops);
}

function Actualiza()
{
    w = document.getElementById ('flash');
    ancho = alto = 0;
    if (typeof (window.innerWidth) == 'number')
    {
        ancho = window.innerWidth;
        alto = window.innerHeight;
    } else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
        ancho = document.documentElement.clientWidth;
        alto = document.documentElement.clientHeight;
    } else if (document.body && (document.body.clientWidth || document.body.clientHeight)) {
        ancho = document.body.clientWidth;
        alto = document.body.clientHeight;
    }
    w.style.width = ancho < minAncho ? minAncho + "px" : "100%";
    w.style.height = alto < minAlto ? minAlto + "px" : "100%";
}

function DescargaFichero( accion, idA, idB, idC )
{
    document.Fichero.idA.value = idA;
    document.Fichero.idB.value = idB;
    document.Fichero.idC.value = idC;
    document.Fichero.action = accion;
    document.Fichero.submit();
}

function Inicia(ancho, alto, img, ver)
{
    if (ver==0) {
        w = document.getElementById ('noFlash');
        w.innerHTML = "<img src=\""+img+"\" alt=\"logotipo\" border=\"0\"><br /><br />" +
            "Need flash to view this page. Please download it in " +
            "<a href=\"http://www.macromedia.com/go/getflashplayer\" target=\"_blank\">" +
            "macromedia.com</a>.<br>Necesitas flash para ver esta p&aacute;gina. " +
            "Desc&aacute;rgalo desde <a href=\"http://www.macromedia.com/go/getflashplayer\" " +
            "target=\"_blank\">macromedia.com</a>.";
    }
   
    minAncho = ancho;
    minAlto = alto;
    window.onresize=function(){Actualiza ();}
    Actualiza();
}