function popUp(link, w, h) {
    window.open(link, '', 'width = ' + w + ', height = ' + h + ', left = ' + ((screen.width - w) / 2) + ', top = ' + ((screen.height - h) / 2) + ', resizable = 0, toolbar = 0, location = 0, directories = 0, status = 0, menubar = 0, scrollbars = 1');
}

function photo(photoLink, titulo) {
    newWindow = window.open('about:blank', '', 'scrollbars = 0, width = 1, height = 1, left = ' + ((screen.width - 160) / 2) + ', top=' + ((screen.height - 136) / 2));

    with (newWindow.document){
        writeln('<html>');
        writeln('<head>');
        writeln('<title>A carregar</title>');
        writeln('<script>');
        writeln('var MT = 0;');
        writeln('var ML = 0;');
        writeln('if (navigator.appName == "Opera") {');
        writeln('MT = 13;');
        writeln('} else if (navigator.appName == "Netscape") {');
        writeln('MT = 18;');
        writeln('ML = -4;');
        writeln('}');
        writeln('</script>');
        writeln('</head>');
        writeln('<body bottommargin="0" leftmargin="0" marginheight="0" marginwidth="0" rightmargin="0" topmargin="0" background="../gifs/load.gif" scroll="no" onload="window.resizeTo(document.images[0].width + 10 + ML, document.images[0].height + 36 + MT);">');
        writeln('<img name="Foto" id="Foto" src=' + photoLink + '>');
        writeln('<script>');
        writeln('window.moveTo((screen.width - document.images["Foto"].width) / 2, (screen.height - document.images["Foto"].height) / 2);');
        writeln('document.title="' + titulo + '";');
        writeln('document.body.background = "";');
        writeln('</script>');
        writeln('</body>');
        writeln('</html>');
        close();
    }
}

function tamanhoLetra(tagId, tam) {
    document.getElementById(tagId).style.fontSize = tam;
}