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 CambiaFoto( identificador, imagen )
{
    document.getElementById( identificador ).src = imagen;
}

function Inicia( ancho, alto, img, ver )
{
    if (ver==0)
    {
        w = document.getElementById ('noFlash');
        
        w.innerHTML = "<img src=\""+img+"\" alt=\"logotipo\" border=\"0\"><br /><br />" +
            "Para visualizar esta página deve ter instalado Flash Player 8. " +
            "<a href='http://www.adobe.com/products/flashplayer/' target='_blank' >Clique aqui</a> para instalá-lo." +
            "<br>Need Flash Player 8 to view this page. Please download it in " +
            "<a href=\"http://www.adobe.com/products/flashplayer/\" target=\"_blank\">" +
            "adobe.com</a>.";
    }
   
    minAncho = ancho;
    
    minAlto = alto;
    
    window.onresize=function(){Actualiza ();}
    
    Actualiza();
}


