
var OpcaoPaiAtivo = null;
var OpcaoFilhoAtivo = null;
/*
document.onmousedown=botaoDireito;
document.onselectstart=cancela;

function botaoDireito()
{ if (event.button==2)
	{alert("O botão direito do mouse está desabilitado."); }
}

function cancela()
{ return false; }

function destacaPai(item)
{ item.className = "menuOver"; }

function normalPai(item)
{ item.className = "menu"; }

function destacaFilho(item)
{ item.className = "submenuOver"; }

function normalFilho(item)
{ item.className = "submenu"; }

function armazenaOpcao(OpcaoPai, OpcaoFilho)
{	
	document.getElementById('OpcaoPai').value=OpcaoPai;
	document.getElementById('OpcaoFilho').value=OpcaoFilho;
	alert('Valor Filho: '+document.getElementById('OpcaoFilho').value);
}
*/

function selecionaPai(OpcaoPai, OpcaoFilho)
{ if (OpcaoFilho.style.display == 'none')
  { if (OpcaoFilhoAtivo != null) { OpcaoFilhoAtivo.style.display = 'none'; }
    OpcaoPai.className = "botao_menu_over";
    OpcaoFilho.style.display = '';
    OpcaoPaiAtivo = OpcaoPai;
    OpcaoFilhoAtivo = OpcaoFilho;
  } else {
	OpcaoPai.className = "botao_menu";
    OpcaoFilho.style.display = 'none';
    OpcaoFilhoAtivo = null;
    OpcaoPaiAtivo = null;
  }	
}

function seleciona() 
{ 
var id = document.getElementById('IdMenu');
if(id.value!=0) {
	var idPai = "OpcaoPai" + id.value;
	var idFilho = "OpcaoFilho" + id.value;
	OpcaoPai = document.getElementById(idPai);
	OpcaoFilho = document.getElementById(idFilho);
	selecionaPai(OpcaoPai,OpcaoFilho);
	}
}
/*
function Click(link) {
	var f = document.getElementById('frameConteudo');
	f.contentWindow.location.replace(link);	
	window.document.location.replace('#');
}
*/

function verificarLogin() {
	var l = document.getElementById('pL');
	var s = document.getElementById('pS');
	if(l.value=='') { alert('O campo login é obrigatório!');return false }
	else if (s.value=='') { alert('O campo senha é obrigatório!');return false }
	else { return true }
}		
function enviarNewsletter() {
	var n = document.getElementById('pN');
	var e = document.getElementById('pE');
	if(n.value=='') { alert('O campo nome é obrigatório!');return false }
	else if (e.value=='') { alert('O campo email é obrigatório!');return false }
	else { return true }
}

function contatoSubmit() {
	if(document.Form1.txtNome.value=='') {	alert('O campo nome é obrigatório!');return false }
	else if(document.Form1.txtEmpresa.value=='') { alert('O campo empresa é obrigatório!');return false }
	else if(document.Form1.txtCargo.value=='') { alert('O campo cargo é obrigatório!');return false }
	else if(document.Form1.txtEndereco.value=='') { alert('O campo endereço é obrigatório!');return false }
	else if(document.Form1.txtEmail.value=='') { alert('O campo e-mail é obrigatório!');return false }
	else if(document.Form1.txtTelefone.value=='') { alert('O campo telefone é obrigatório!');return false }
	else if(document.Form1.ddlPublicidade.value==0) { alert('O campo como soube é obrigatório!');return false }
	else if(document.Form1.ddlInteresse.value==0) { alert('O campo interesse é obrigatório!');return false }
	else { return true }
}
function exibirForm(){
	if(document.getElementById('ddlPublicidade').value == 5){ document.getElementById('txtPublicidade').style.display = 'inline'; }
	else { document.getElementById('txtPublicidade').style.display = 'none'; }
}
