﻿    function adicionarFavoritos(){
    if (document.all)
        window.external.AddFavorite(location.href, document.title);
        else if (window.sidebar)
        window.sidebar.addPanel(document.title, location.href, "")
    }  
    function imprimePagina(){
       bV = parseInt(navigator.appVersion)
       if (bV >= 4) window.print()
    }

    function changeImage(theElement, theNewImage, theElementLink, link)
    {
        document.getElementById(theElement).src = theNewImage;
        document.getElementById(theElementLink).href = link;
    }
    
    function NewWindow(mypage,myname,w,h)
    {
        var winl = (screen.width-w)/2;
        var wint = (screen.height-h)/2;
        var settings ='height='+h+',';
        settings +='width='+w+',';
        settings +='top='+wint+',';
        settings +='left='+winl+',';
        settings +='scrollbars=yes,';
        settings +='toolbars=yes,';
        settings +='status=no,';
        settings +='directories=no,';
        settings +='resizable=no';
        picWin = window.open(mypage,myname,settings);
        picWin.focus();
    }

    function NewWindowFull(mypage, myname) {
        var winl = screen.width;
        var wint = screen.height;
        var settings = 'height=' + wint + ',';
        settings += 'width=' + winl + ',';
        settings += 'scrollbars=yes,';
        settings += 'toolbars=yes,';
        settings += 'status=no,';
        settings += 'directories=no,';
        settings += 'resizable=no';
        picWin = window.open(mypage, myname, settings);
        picWin.focus();
    }

    function PlayerWindow(mypage, myname, w, h) {
        var winl = (screen.width - w) / 2;
        var wint = (screen.height - h) / 2;
        var settings = 'height=' + h + ',';
        settings += 'width=' + w + ',';
        settings += 'top=' + wint + ',';
        settings += 'left=' + winl + ',';
        settings += 'scrollbars=false,';
        settings += 'toolbars=no,';
        settings += 'status=no,';
        settings += 'directories=no,';
        settings += 'resizable=no';
        picWin = window.open(mypage, myname, settings);
        picWin.focus();
    } 

    var cookie_date = new Date ( );  // current date & time
    cookie_date.setDate( cookie_date.getDate() + 10 );
    document.cookie = "height=" + screen.height + ";expires=" + cookie_date;

