function aparecer(obj) {
	document.getElementById(obj).style.display = '';
	document.getElementById(obj).style.visibility = 'visible';
}

function desaparecer(obj) {
	document.getElementById(obj).style.display = 'none';
	document.getElementById(obj).style.visibility = 'hidden';
}

function trocarImagem(id, caminho) {
	document.getElementById(id).src = caminho;
}

function ExibeFlash(src, larg, alt, wmode) {
	var strHtml = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="' + larg + '" height="' + alt + '">';
	strHtml += '<param name="movie" value="' + src + '" />';
	strHtml += '<param name="quality" value="high" />';
	strHtml += '<param name="menu" value="false" />';
	strHtml += '<param name="wmode" value="' + wmode + '">';
	if (wmode == "transparent") // firefoca
	{
		strHtml += '<embed src="' + src + '" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + larg + '" height="' + alt + '"></embed>';
	}
	strHtml += '</object>';

	document.write(strHtml);
}

function mostraMenu(menu) {
	document.getElementById(menu).style.display = 'block';
}

function escondeMenu(menu) {
	document.getElementById(menu).style.display = 'none';
}

function enviarEmail()
{
    var netlogin = $get('txtLogin');
    var netsenha = $get('txtSenha');
    var maillogin = $get('login_username');
    var mailsenha = $get('secretkey');
    var mailform = $get('frmWB');
    maillogin.value = netlogin.value;
    mailsenha.value = netsenha.value;
    mailform.submit();
}

function abrir() {
    var windowFeatures = "", nomeArquivo = "", nomeJanela = "", erro = null
    Argumentos = abrir.arguments; noArgumentos = Argumentos.length; nomeArquivo = Argumentos[0]
    for (i = 1; i < noArgumentos; i++) {
        valor = Argumentos[i].substring(2, Argumentos[i].length)
        switch (Argumentos[i].substring(0, 2)) {
            case "nj": nomeJanela = valor; break
            case "to": windowFeatures += "top=" + valor + ", "; break
            case "le": windowFeatures += "left=" + valor + ", "; break
            case "he": windowFeatures += "height=" + valor + ", "; break
            case "wi": windowFeatures += "width=" + valor + ", "; break
            case "lb": windowFeatures += "location=" + valor + ", "; break
            case "mb": windowFeatures += "menubar=" + valor + ", "; break
            case "sc": windowFeatures += "scrollbars=" + valor + ", "; break
            case "st": windowFeatures += "status=" + valor + ", "; break
            case "tb": windowFeatures += "toolbar=" + valor + ", "; break
            case "tt": windowFeatures += "titlebar=" + valor + ", "; break
            case "re": windowFeatures += "resizable=" + valor + ", "; break
            default: erro = '"Código de atributo não informado no ' + (i + 1) + ' º argumento (' + Argumentos[i] + ')"'
        }
    }
    windowFeatures = windowFeatures.substring(0, windowFeatures.lastIndexOf(","))
    if (erro) { alert(erro) } else { novaJanela = window.open(nomeArquivo, nomeJanela, windowFeatures) }
}
