/**
 * Alternar botões do menu
 */
function alternaImagem(qual, imagem, idioma)
{
    qual.src = 'locais/' + idioma + '/graficos/' + imagem;
}


/**
 * Desabilitar botão direito do mouse
 */
var dom = document.getElementById;
var ns  = document.layers;

function clickIe()
{
    if (document.all)
    {
        alert(message);
        return false;
    }
}
function clickNs(e)
{
    if (ns || (dom && !document.all))
    {
        if (e.which == 2 || e.which == 3)
        {
            alert(message);
            return false;
        }
    }
}
function protege(imagem)
{
    if (dom && !document.all)
    {
        document.captureEvents(Event.MOUSEDOWN);
        if (document.images)
        {
            imagem.onmousedown = clickNs;
        }
    }
    else
    {
        if (document.images)
        {
            document.onmouseup   = clickNs;
            imagem.oncontextmenu = clickIe;
        }
    }
}


// Drop down menu © Dynamic Drive (www.dynamicdrive.com)
// For full source code and 100's more DHTML scripts, visit http://www.dynamicdrive.com

var zindex = 10;

function sinaliza(qual)
{
    qual.style.backgroundColor = '#e7e6cb';
}

function dessinaliza(qual)
{
    qual.style.backgroundColor = '#f7f7e8';
}

function vazio(){}

function aciona(qual, desfoca)
{
    dropit(event, qual);
    event.cancelBubble = true;
    desfoca.blur();
    return false
}

function dropit(e, whichone)
{
    curmenuID = document.getElementById(whichone).id;

    if (window.themenu && themenu.id != curmenuID)
    {
        themenuStyle.visibility = 'hidden';
    }
    themenu = document.getElementById(whichone);
    themenuStyle = themenu.style;

    hiddenconst = 'hidden';

    if (themenuStyle.visibility == hiddenconst)
    {
        themenuStyle.visibility = 'visible';
        themenuStyle.zIndex = zindex++;
    }
    else
    {
        hidemenu();
    }
    return false;
}

function hidemenu()
{
    if (window.themenu)
    {
        themenuStyle.visibility = 'hidden';
    }
}

document.onclick = hidemenu;
