// NOTICIAS.CFM

function chamaCarregaConteudo(hidInicio){
	if (eNulo($('txtPalavra'))) var txtPalavra=0; else txtPalavra=$('txtPalavra').value;
	if (eNulo($('txtDtIni'))) var txtDtIni=0; else txtDtIni=$('txtDtIni').value;
	if (eNulo($('txtDtFim'))) var txtDtFim=0; else txtDtFim=$('txtDtFim').value;
	$('hidInicio').value=hidInicio;
	carregaConteudo('spnResultadoBusca',txtPalavra+','+txtDtIni+','+txtDtFim+','+hidInicio,'ajaxPortal.cfm');
}

// PROPOSICOES.CFM

function chamaAjax(inicio){
	varAno=0;
	varInicio=1;
	
	if(inicio && varAno == 0)varInicio=inicio;
	if($('hidAno'))
	{varAno=$F('hidAno');
	}
	if (eNulo($('txtPalavra'))) var txtPalavra=0; else txtPalavra=$('txtPalavra').value;
	if (eNulo($('txtDtIni'))) var txtDtIni=0; else txtDtIni=$('txtDtIni').value;
	if (eNulo($('txtDtFim'))) var txtDtFim=0; else txtDtFim=$('txtDtFim').value;
	if (eNulo($('txtNumero'))) var txtNumero=0; else txtNumero=$('txtNumero').value;
	if (eNulo($('cboTipo'))) var cboTipo=0; else cboTipo=$('cboTipo').value;
	var cboDeputado=$('cboDeputado').value;
	
	carregaConteudo('spnProposicao',varAno+'$$'+cboDeputado+'$$'+txtPalavra+'$$'+txtDtIni+'$$'+txtDtFim+'$$'+txtNumero+'$$'+cboTipo+'$$'+varInicio,'ajaxPortal.cfm');/**/
}



// TRAMITACAO.CFM
function chamaAjaxTramitacao(){
	if (eNulo($('txtDtIni'))) var txtDtIni=0; else txtDtIni=$('txtDtIni').value;
	if (eNulo($('txtDtFim'))) var txtDtFim=0; else txtDtFim=$('txtDtFim').value;
	if (eNulo($('cboTipo'))) var cboTipo=0; else cboTipo=$('cboTipo').value;
	if (eNulo($('cboStatus'))) var cboStatus=0; else cboStatus=$('cboStatus').value;
	var cboComissao=$('cboComissao').value;
	carregaConteudo('spnTramitacao','0$$'+cboComissao+'$$'+txtDtIni+'$$'+txtDtFim+'$$'+cboTipo+'$$'+$F('cboAno')+'$$'+cboStatus,'ajaxPortal.cfm');
}
// SESSÕES PLENARÁRIAS
function chamaAjaxSessaoPlenaria(hidInicio){
	if (eNulo($('txtNumero'))) var txtNumero=0; else txtNumero=$('txtNumero').value;
	if (eNulo($('cboAno'))) var cboAno=0; else cboAno=$('cboAno').value;
	if (eNulo($('txtDtIni'))) var txtDtIni=0; else txtDtIni=$('txtDtIni').value;
	if (eNulo($('txtDtFim'))) var txtDtFim=0; else txtDtFim=$('txtDtFim').value;
	if (eNulo($('cboTipoSessao'))) var cboTipoSessao=0; else cboTipoSessao=$('cboTipoSessao').value;
	$('hidInicio').value=hidInicio;
	carregaConteudo('spnSessoesPlenaria',txtNumero+'$$'+cboAno+'$$'+cboTipoSessao+'$$'+txtDtIni+'$$'+txtDtFim+'$$'+$('hidInicio').value,'ajaxPortal.cfm');
}

// SESSÕES FREQUENCIA
function chamaAjaxSessaoFrequencia(hidInicio){
	if (eNulo($('txtNumero'))) var txtNumero=0; else txtNumero=$('txtNumero').value;
	if (eNulo($('cboAno'))) var cboAno=0; else cboAno=$('cboAno').value;
	if (eNulo($('txtDtIni'))) var txtDtIni=0; else txtDtIni=$('txtDtIni').value;
	if (eNulo($('txtDtFim'))) var txtDtFim=0; else txtDtFim=$('txtDtFim').value;
	if (eNulo($('cboTipoSessao'))) var cboTipoSessao=0; else cboTipoSessao=$('cboTipoSessao').value;
	//if (eNulo($('cboDeputado'))) var cboDeputado=0; else cboDeputado=$('cbodeputado').value;
	cboDeputado=0;
	$('hidInicio').value=hidInicio;
	carregaConteudo('spnSessoesFrequencia',txtNumero+'$$'+cboAno+'$$'+cboTipoSessao+'$$'+txtDtIni+'$$'+txtDtFim+'$$'+cboDeputado+'$$'+$('hidInicio').value,'ajaxPortal.cfm');
}




// TRANSPARENCIAVERBA.CFM

function chamaAjaxVerba(){
	if (eNulo($('cboDeputado'))) var cboDeputado=0; else cboDeputado=$('cboDeputado').value;
	if (eNulo($('cboCategoria'))) var cboCategoria=0; else cboCategoria=$('cboCategoria').value;
	if (eNulo($('cboMes'))) var cboMes=0; else cboMes=$('cboMes').value;
	if (eNulo($('cboAno'))) var cboAno=0; else cboAno=$('cboAno').value;
	
	carregaConteudo('spnVerba',cboDeputado+','+cboCategoria+','+cboMes+','+cboAno,'ajaxPortal.cfm');
	
}

// DISCURSO.CFM

function chamaAjaxDiscurso(hidInicio){
	var rdoTipo=0;
	for (i=0;i<document.all.rdoTipo.length;i++){
		if(document.all.rdoTipo[i].checked){
			rdoTipo=document.all.rdoTipo[i].value;
			}
		}
	
	if (eNulo($('txtDtIni'))) var txtDtIni=0; else txtDtIni=$('txtDtIni').value;
	if (eNulo($('txtDtFim'))) var txtDtFim=0; else txtDtFim=$('txtDtFim').value;
	$('hidInicio').value=hidInicio;
	carregaConteudo('spnDiscursos',rdoTipo+'$$'+txtDtIni+'$$'+txtDtFim+'$$'+hidInicio,'ajaxPortal.cfm');
}

//SESSOES.CFM

function chamaAjaxSessoes(hidInicio){

	if (eNulo($('txtDtIni'))) var txtDtIni=0; else txtDtIni=$('txtDtIni').value;
	if (eNulo($('txtDtFim'))) var txtDtFim=0; else txtDtFim=$('txtDtFim').value;
	if (eNulo($('cboTipo'))) var tipo=0; else tipo=$('cboTipo').value;
	$('hidInicio').value=hidInicio;
	carregaConteudo('spnSessoes',tipo+'$$'+txtDtIni+'$$'+txtDtFim+'$$'+hidInicio,'ajaxPortal.cfm');
}

// LICITACOES.CFM

function chamaAjaxLicita(hidInicio){
	if (eNulo($('txtPalavra'))) var txtPalavra=0; else txtPalavra=$('txtPalavra').value;
	if (eNulo($('txtDtIni'))) var txtDtIni=0; else txtDtIni=$('txtDtIni').value;
	if (eNulo($('txtDtFim'))) var txtDtFim=0; else txtDtFim=$('txtDtFim').value;
	$('hidInicio').value=hidInicio;
	carregaConteudo('spnResultadoBuscaLicitacao',txtPalavra+'$$'+txtDtIni+'$$'+txtDtFim+'$$'+hidInicio,'ajaxPortal.cfm');
}

function chamaAjaxInforme(hidInicio){
	if (eNulo($('txtPalavra'))) var txtPalavra=0; else txtPalavra=$('txtPalavra').value;
	if (eNulo($('txtDtIni'))) var txtDtIni=0; else txtDtIni=$('txtDtIni').value;	
	if (eNulo($('txtDtFim'))) var txtDtFim=0; else txtDtFim=$('txtDtFim').value;
	if (eNulo($('cboComissao'))) var cboComissao=0; else cboComissao=$('cboComissao').value;
	$('hidInicio').value=hidInicio;
	carregaConteudo('spnInforme',cboComissao+'$$'+txtPalavra+'$$'+txtDtIni+'$$'+txtDtFim+'$$'+hidInicio,'ajaxPortal.cfm');
}

// ATOSDORH.CFM

function chamaAjaxAtos(hidInicio){
	if (eNulo($('txtPalavra'))) var txtPalavra=0; else txtPalavra=$('txtPalavra').value;
	if (eNulo($('txtDtIni'))) var txtDtIni=0; else txtDtIni=$('txtDtIni').value;
	if (eNulo($('txtDtFim'))) var txtDtFim=0; else txtDtFim=$('txtDtFim').value;
	$('hidInicio').value=hidInicio;
	carregaConteudo('spnResultadoBuscaAto',txtPalavra+'$$'+txtDtIni+'$$'+txtDtFim+'$$'+hidInicio,'ajaxPortal.cfm');
}


// PARECER
function chamaAjaxParecer(hidInicio){
	if (eNulo($('txtNumero'))) var txtNumero=0; else txtNumero=$('txtNumero').value;
	if (eNulo($('cboComissao'))) var cboComissao=0; else cboComissao=$('cboComissao').value;
	if (eNulo($('txtPalavra'))) var txtPalavra=0; else txtPalavra=$('txtPalavra').value;
	if (eNulo($('txtDtIni'))) var txtDtIni=0; else txtDtIni=$('txtDtIni').value;
	if (eNulo($('txtDtFim'))) var txtDtFim=0; else txtDtFim=$('txtDtFim').value;
	$('hidInicio').value=hidInicio;
	
	carregaConteudo('spnParecer','0$$'+cboComissao+'$$'+txtNumero+'$$'+txtPalavra+'$$'+txtDtIni+'$$'+txtDtFim+'$$'+hidInicio,'ajaxPortal.cfm');
}

// ORDEMDODIA.CFM

function chamaAjaxOrdemDoDia(hidInicio){
	if (eNulo($('txtNumero'))) var txtNumero=0; else txtNumero=$('txtNumero').value;
	if (eNulo($('txtPalavra'))) var txtPalavra=0; else txtPalavra=$('txtPalavra').value;
	if (eNulo($('txtDtIni'))) var txtDtIni=0; else txtDtIni=$('txtDtIni').value;
	if (eNulo($('txtDtFim'))) var txtDtFim=0; else txtDtFim=$('txtDtFim').value;
	$('hidInicio').value=hidInicio;
	carregaConteudo('spnResultadoBuscaOrdemDoDia','0$$'+txtNumero+'$$'+txtPalavra+'$$'+txtDtIni+'$$'+txtDtFim+'$$'+hidInicio,'ajaxPortal.cfm');
}

// PAUTA.CFM

function chamaAjaxPauta(hidInicio){
	if (eNulo($('txtNumero'))) var txtNumero=0; else txtNumero=$('txtNumero').value;
	if (eNulo($('txtPalavra'))) var txtPalavra=0; else txtPalavra=$('txtPalavra').value;
	if (eNulo($('txtDtIni'))) var txtDtIni=0; else txtDtIni=$('txtDtIni').value;
	if (eNulo($('txtDtFim'))) var txtDtFim=0; else txtDtFim=$('txtDtFim').value;
	$('hidInicio').value=hidInicio;
	carregaConteudo('spnResultadoBuscaPauta','0$$'+txtNumero+'$$'+txtPalavra+'$$'+txtDtIni+'$$'+txtDtFim+'$$'+hidInicio,'ajaxPortal.cfm');
}


function validaForm_FALECOMDEPUTADO(){
	var retorno=true;
	
	
	retorno=obrigatorio(['txtNome','txtEmail','txtTexto'],['NOME','E-MAIL','TEXTO']);
	if($F('hidDeputadoRadio')==0){
		alert('Escolha um Deputado para enviar seu e-mail.');
		retorno=false;
	}
	
      
	  
      

	
	
	return retorno;
	}
	

