<!--
var blnIniciado = false;
var NS4 = (document.layers);
var IE4 = (document.all);
var isMac = (navigator.appVersion.indexOf("Mac") != -1);
var current;
var fmEl, toEl;
var bnrLft, bnrTop, bnrRit, bnrBot, bnrWid, bnrHit;


        
        
                                   
function PegaAnchor(strAnchor)
{
    var saida;
    
    if((document.all) && !(navigator.appVersion.indexOf("Mac") != -1))
        saida = eval("document.all." + strAnchor);
    else if(document.layers)
        saida = document.anchors[strAnchor];
    
    return saida;
}

function PegaPos(obj, strPos)
{
    var posicao;
    
    if((document.all) && !(navigator.appVersion.indexOf("Mac") != -1))
    {
        switch(strPos)
        {
            case "x":
                posicao = obj.offsetLeft;
                break;
            case "y":
                posicao = obj.offsetTop;
                break;
        }
        
        objParent = obj.offsetParent;
        while(objParent != null)
        {
            switch(strPos)
            {
                case "x":
                    posicao += objParent.offsetLeft;
                    break;
                case "y":
                    posicao += objParent.offsetTop;
                    break;
            }
            objParent = objParent.offsetParent;
        }
    }
    else if(document.layers)
    {
        posicao = eval("obj." + strPos);
    }
    return posicao;
}

function moveTo(lPos, tPos)
{
    this.style.pixelLeft = lPos;
    this.style.pixelTop = tPos;
}

function makeIE()
{
    var text = '<DIV ID="bnr" STYLE="position:absolute">';
    for(var i = arrNews.length - 1; i >= 0; i--)
    {
        text += '<DIV ID="msg' + i + '" STYLE="position:absolute"><\/DIV>';
    }
    text += '<\/DIV>';
    document.body.insertAdjacentHTML("BeforeEnd", text);
    with(bnr.style)
    {
        width = bnrWid;
        height = bnrHit;
        clip = "rect(0 " + bnrWid + " " + bnrHit + " 0)";
        backgroundColor = bannerColor;
    }
    bnr.moveTo = moveTo;
    bnr.moveTo(bnrLft, bnrTop);
    for(var i = 0; i < arrNews.length; i++)
    {
        with(eval("msg" + i + ".style"))
        {
            visibility = "hidden";
            width = bnrWid;
            backgroundColor = bannerColor;
        }
        eval("msg" + i + ".moveTo=moveTo");
        eval("msg" + i + ".moveTo(0, 0)");
    }
}

function makeNS()
{
    bnr = new Layer(bnrWid);
    with(bnr)
    {
        clip.right = bnrWid;
        clip.bottom = bnrHit;
        bgColor = bannerColor;
        moveTo(bnrLft, bnrTop);
        visibility = "show";
    }
    for(var i = 0; i < arrNews.length; i++)
    {
        eval("msg" + i + "=" + "new Layer(bnrWid, bnr)");
        with(eval("msg" + i))
        {
            moveTo(0, 0);
            bgColor = bannerColor;
        }
    }
}

function fillBnr()
{
    var theEl, newsCount = 0;
    for(i = 0; i < arrNews.length; i++)
    {
        theEl = eval("msg" + i);
        newsStr = "<A class='ver9bkbd' HREF='" + arrNews[newsCount][0] + "'>" + arrNews[newsCount][1] + "<\/A>";
        if(NS4)
        {
            with(theEl.document)
            {
                write(newsStr);
                close();
            }
        }
        else
        {
            theEl.innerHTML = newsStr;
        }
        newsCount++;
        if(newsCount == arrNews.length)
            newsCount = 0;
    }
}

function showMsg(n, show)
{
    var obj = eval("msg" + n + ((IE4) ? ".style" : ""));
    obj.visibility = (show) ? "visible" : "hidden";
}

function moveUp(toEl, toElTarge, fmEl)
{
    if(NS4)
    {
        fmEl.top -= increment;
        if(toEl.top - increment <= toElTarget)
        {
            toEl.top = toElTarget;
            clearInterval(intervalID);
            fmEl.visibility = "hidden";
            timeoutID = setTimeout("scrollBnr()", pause);
        }
        else
        {
            toEl.top -= increment;
        }
    }
    else
    {
        fmEl.pixelTop -= increment;
        if(toEl.pixelTop - increment <= toElTarget)
        {
            toEl.pixelTop = toElTarget;
            clearInterval(intervalID);
            fmEl.visibility = "hidden";
            timeoutID = setTimeout("scrollBnr()", pause);
        }
        else
        {
            toEl.pixelTop -= increment;
        }
    }
}

function scrollBnr()
{
    var fm = current;
    current = (fm == arrNews.length - 1) ? 0 : fm + 1;
    
    fmEl = eval("msg" + fm + ((IE4) ? ".style" : ""));
    toEl = eval("msg" + current + ((IE4) ? ".style" : ""));
    if(NS4)
    {
        toEl.top = fmEl.top + bnrHit;
        toElTarget = fmEl.top;
    }
    else
    {
        toEl.pixelTop = fmEl.pixelTop + bnrHit;
        toElTarget = fmEl.pixelTop;
    }
    showMsg(current, true);
    intervalID = setInterval("moveUp(toEl, toElTarget, fmEl)", interval);
}






function RetAnchor(strAnchor)
{
    var objSaida;
    
    if((document.all) && !(navigator.appVersion.indexOf("Mac") != -1))
        objSaida = eval("document.all." + strAnchor);
    else if(document.layers)
    {
        if(document.anchors[strAnchor])
            objSaida = document.anchors[strAnchor];
        else
        {
            for(i = 0; i < document.layers.length; i++)
                if(document.layers[i].document.anchors[strAnchor])
                    objSaida = document.layers[i].document.anchors[strAnchor];
        }
    }
    
    return objSaida;
}



function RetPos(obj, strPos)
{
    var posicao;
    
    if(obj)
    {
        if(IE4)
        {
            switch(strPos)
            {
                case "x":
                    posicao = obj.offsetLeft;
                    break;
                case "y":
                    posicao = obj.offsetTop;
                    break;
            }
            
            objParent = obj.offsetParent;
            while(objParent != null)
            {
                switch(strPos)
                {
                    case "x":
                        posicao += objParent.offsetLeft;
                        break;
                    case "y":
                        posicao += objParent.offsetTop;
                        break;
                }
                objParent = objParent.offsetParent;
            }
        }
        else if(NS4)
            posicao = eval("obj." + strPos);
    }
    return posicao;
}




function Inicializa()
{
    if((NS4 || (IE4 && !isMac)) && (arrNews.length > 1))
    {
        bnrLft = PegaPos(PegaAnchor("pontoi"), "x");
        bnrTop = PegaPos(PegaAnchor("pontoi"), "y");
        bnrRit = PegaPos(PegaAnchor("pontof"), "x");
        bnrBot = PegaPos(PegaAnchor("pontof"), "y");
        bnrWid = bnrRit - bnrLft + 1;
        bnrHit = bnrBot - bnrTop + 1;
        
        (NS4) ? makeNS() : makeIE();
        fillBnr();
        showMsg(0, true);
        current = 0;
        // window.onresize = redo();
        timeoutID = setTimeout("scrollBnr()", pause);
    }

}
// -->