function n_home(w) {
var pgm = new Array("n_abfm_associese.asp","n_home_fm.asp","","","n_abfm_diretoria.asp")

if (w < 3) {
  document.getElementById("envio").action = pgm[w];
  document.getElementById("envio").submit();}
if (w == 3) {
windowqt = window.open("http://mail.abfm.org.br:2095", "Arquivo","toolbar=yes,location=no,status=yes,screenX=1,screenY=1,menubar=yes, resizable=yes,scrollbars=yes");
}

if (w == 4) {
windowqt = window.open("doctos/OrientacoesEmail2.pdf", "Arquivo","toolbar=yes,location=no,status=yes,screenX=1,screenY=1,menubar=yes, resizable=yes,scrollbars=yes");
}

}

function n_abfm(w) {
var pgm = new Array("n_abfm_missao.asp","n_abfm_atividades.asp","n_abfm_coorporativas.asp","n_abfm_historico.asp","n_abfm_diretoria.asp","n_abfm_ex_diretoria.asp","n_abfm_estatuto.asp","n_abfm_cad_inst.asp","n_abfm_anuidade.asp")
  document.getElementById("envio").action = pgm[w];
  document.getElementById("envio").submit();

}
function n_socios(w) {
var pgm = new Array("n_socios_aniversario.asp","n_socios_atas.asp","","","","n_socios_carteira.asp","n_socios_fale_esp.asp","n_socios_portarias.asp","n_socios_mercado.asp")
if (w == 2) {
windowqt = window.open("n_socios_cadastro.asp" , "Arquivo","toolbar=no,location=no,status=no,screenX=1,screenY=1,menubar=no,width=778, resizable=yes,scrollbars=yes");

return;	
	}
if (w == 3) {
windowqt = window.open("n_socios_busca.asp" , "Arquivo","toolbar=no,location=no,status=no,screenX=1,screenY=1,menubar=no,width=620,height=400, resizable=yes,scrollbars=yes");
windowqt.focus();
return;		}
if (w == 4) {
windowqt = window.open("n_socios_debitos.asp" , "Arquivo","toolbar=no,location=no,status=no,screenX=1,screenY=1,menubar=no,width=625, resizable=yes,scrollbars=yes");
windowqt.focus();
return;	
	}	

document.getElementById("envio").action = pgm[w];
document.getElementById("envio").submit();

}
function n_prova(w) {
var pgm = new Array("n_prova_titulo.asp","n_prova_regulamento.asp","n_prova_provageral.asp","n_prova_radioterapia.asp","n_prova_radiodiagnostico.asp","n_prova_medicina.asp","n_prova_faq.asp","n_prova_ficha_inscricao.asp")
  document.getElementById("envio").action = pgm[w];
  document.getElementById("envio").submit();

}
function n_especialista(w) {
var pgm = new Array("n_especialistas.asp")
  document.getElementById("envio").cpo.value = w
  document.getElementById("envio").action = pgm[0];
  document.getElementById("envio").submit();

}
function n_publicacoes(w) {
var pgm = new Array("n_publicacoes_tipo.asp","n_publicacoes_nucleo.asp")
  document.getElementById("envio").cpo.value = ""
  document.getElementById("envio").action = pgm[w];
  document.getElementById("envio").submit();

}
function n_links(w) {
  document.getElementById("envio").cpo.value = w
  document.getElementById("envio").action = "n_links.asp";
  document.getElementById("envio").submit();

}
function n_eventos(w) {
var pgm = new Array("n_eventos.asp","n_eventos_anteriores.asp")
  document.getElementById("envio").cpo.value = ""
  document.getElementById("envio").action = pgm[w];
  document.getElementById("envio").submit();

}
function n_contato(w) {
var pgm = new Array("n_contato.asp","n_contato_correio.asp")
  document.getElementById("envio").cpo.value = ""
  document.getElementById("envio").action = pgm[w];
  document.getElementById("envio").submit();

}
function n_publicacoes_abfmnews(w) {
  document.getElementById("envio").cpo.value = w;
  document.getElementById("envio").action = "n_publicacoes_tipo.asp";
  if (w == 13){ 
  document.getElementById("envio").action = "n_publicacoes_abfmnews.asp";  
  } 	
  document.getElementById("envio").submit();
}  
function n_publicacoes_abfmnews_detalhar(w) { 
windowqt = window.open("n_publicacoes_abfmnews_detalhar.asp?cpo="+w, "Arquivo","toolbar=no,location=no,status=no,screenX=1,screenY=1,menubar=no,width=778,height=500, resizable=yes,scrollbars=yes");
//windowqt.focus();
}
function n_publicacoes_abfmnews_noticias(w) { 
windowqt = window.open("abfm_news_not.asp?wnot="+w, "Arquivo","toolbar=no,location=no,status=no,screenX=1,screenY=1,menubar=no,width=500,height=300, resizable=yes,scrollbars=yes");
//windowqt.focus();
}


// utilizado para submeter paginas do abfmnews
function n_publicacoes_paginar(w,y){ 
  document.getElementById("envio").cpo.value = w;
   document.getElementById("envio").cpo1.value = y;
   document.getElementById("envio").action = "n_publicacoes.asp";
  document.getElementById("envio").submit();
}  

function n_publicacoes_paginar_tipo(w,y){ 
  document.getElementById("envio").cpo.value = w;
   document.getElementById("envio").cpo1.value = y;
   document.getElementById("envio").action = "n_publicacoes_tipo.asp";
  document.getElementById("envio").submit();
}  
function n_enquete(w) {
var pgm = new Array("n_enquete_anteriores.asp")
  document.getElementById("envio").action = pgm[w];
  document.getElementById("envio").submit();
	}

function estado(qtest)
{
var  wqtest = qtest;
if (wqtest == 1) 
	{document.getElementById("Fale_com5").checked = true;return;}

if (wqtest == 2) 
	{document.getElementById("Fale_com6").checked = true;return;}
if (wqtest == 3) 
	{document.getElementById("Fale_com7").checked = true;return;}
if (wqtest == 4) 
	{document.getElementById("Fale_com3").checked = true;return;}
}
function VerificaCampoEhVazio(myfield, NomeCampo) {
	
	if (myfield.length == 0) {
		alert("O campo " + NomeCampo + " é de preenchimento obrigatório. Favor preenchê-lo.");
		return true;	// é vazio
	}
	else
		return false;	// está preenchido
}
function ValidaCampos() {
if 	((document.getElementById("Fale_com1").checked == false) && (document.getElementById("Fale_com2").checked == false) && (document.getElementById("Fale_com3").checked == false) && (document.getElementById("Fale_com4").checked == false) 
     && (document.getElementById("Fale_com5").checked == false)  && (document.getElementById("Fale_com6").checked == false)      && (document.getElementById("Fale_com7").checked == false)          
     && (document.getElementById("Fale_com8").checked == false) && (document.getElementById("Fale_com9").checked == false))    
    {	alert("Informe com a pessoa que deseja enviar o e-mail");
		return false;
    }
else if	((document.getElementById("voce_deseja1").checked == false) && (document.getElementById("voce_deseja2").checked == false)
     && (document.getElementById("voce_deseja3").checked == false) && (document.getElementById("voce_deseja4").checked == false))    
    {	alert("Voce deseja, informe uma das opções");
		return false;
    }	 
else if	((document.getElementById("Associado1").checked == false) && (document.getElementById("Associado2").checked == false))	
    {	alert("Associado, informe uma das opções");
		return false;
    }	 
else if (VerificaCampoEhVazio(document.getElementById("Nome").value, 'Nome')) {
		document.getElementById("Nome").focus();
		return false;
	}
else if(VerificaCampoEhVazio(document.getElementById("email").value, 'Email')) {
		document.getElementById("email").focus();
		return false;}
else if(VerificaCampoEhVazio(document.getElementById("mensagem").value, 'Mensagem')) {
		document.getElementById("mensagem").focus();
		return false;}
else
		document.getElementById("contato1").action = "n_contato_resp.asp";
		document.getElementById("contato1").submit()

return;
}	

function valida_senha() {  
if (document.getElementById("login").login.value.length < 3) { 
	alert("Login deverá ter no mínimo 3 caracteres");return}
if (document.getElementById("login").senha.value.length < 3) { 
	alert("Senha deverá ter no mínimo 3 caracteres");return}
   document.getElementById("login").action = "n_login.asp";
  document.getElementById("login").submit();
return


}
function fale_esp() {  
if (document.getElementById("form1").assunto.value.length < 1) {alert("Selecione o assunto");return false;}
if (document.getElementById("form1").area.value.length < 1) {alert("Selecione a Área");return false;}
if (document.getElementById("form1").pergunta.value.length < 1) {alert("Pergunta informação obrigatória");return false;}
document.getElementById("form1").acao.value = '1';
document.getElementById("form1").action = 'n_socios_fale_esp_envia.asp';
document.getElementById("form1").submit();
}