﻿    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();
    } 
    



    var cookie_date = new Date ( );  // current date & time
    cookie_date.setDate( cookie_date.getDate() + 10 );
    document.cookie = "height=" + screen.height + ";expires=" + cookie_date;


    var cookie_date = new Date();  // current date & time
    cookie_date.setDate(cookie_date.getDate() + 10);
    document.cookie = "height=" + screen.height + ";expires=" + cookie_date;


    scrollStep = 3

    timerLeft = ""
    timerRight = ""
    timerDown = ""
    timerUp = ""

    function toLeft(id) {
        document.getElementById(id).scrollLeft = 0
    }

    function scrollDivLeft(id) {
        clearTimeout(timerRight)
        document.getElementById(id).scrollLeft += scrollStep
        timerRight = setTimeout("scrollDivLeft('" + id + "')", 10)
    }

    function scrollDivRight(id) {
        clearTimeout(timerLeft)
        document.getElementById(id).scrollLeft -= scrollStep
        timerLeft = setTimeout("scrollDivRight('" + id + "')", 10)
    }

    function toRight(id) {
        document.getElementById(id).scrollLeft = document.getElementById(id).scrollWidth
    }

    function toDown(id) {
        document.getElementById(id).scrollTop = 0
    }

    function scrollDivDown(id) {
        clearTimeout(timerDown)
        document.getElementById(id).scrollTop += scrollStep
        timerDown = setTimeout("scrollDivDown('" + id + "')", 10)
    }

    function scrollDivUp(id) {
        clearTimeout(timerUp)
        document.getElementById(id).scrollTop -= scrollStep
        timerUp = setTimeout("scrollDivUp('" + id + "')", 10)
    }

    function toUp(id) {
        document.getElementById(id).scrollTop = 0
    }

    function stopMe() {
        clearTimeout(timerRight)
        clearTimeout(timerLeft)
        clearTimeout(timerUp)
        clearTimeout(timerDown)
    }

