function escalar(primera) 
{
    p = document.getElementById('photo');
    
    if(cabe() || (!primera && p.width < w))
    {
            p.width=w;
            //p.height=h;
            aviso("none");
    }
    else
    {
            p.width=ancho();
            //p.height = (h/w) * p.width;
            aviso("block");
    }
}

function inicializa_tam() 
{
    cabe() ? aviso("none") : escalar(true);
}

function cabe() 
{
    return w<ancho();
}

function ancho() 
{
    return (navigator.appName=="Netscape" ? window.innerWidth : document.body.offsetWidth)-200;
}

function aviso(s) 
{
    document.getElementById('warning').style.display=s;
}

function mostrar_enlaces()
{
    var l = document.getElementById('links');
    
    l.style.display = (l.style.display == 'block' ? 'none' : 'block');
}

