Governo MS Transparência Denuncia Anônima
Governo de MS
PMMS
Governo de MS
  • Institucional
    • Conheça a PMMS
    • Comando
    • Estado-Maior-Geral
    • Endereços e Telefones
    • Agenda
    • Estrutura Organizacional
    • Missão, Visão e Valores
    • Carta de Serviços
  • Comunicação
    • Comunicação Social
    • Podcast Fala PMMS
    • Notícias
    • Revista Científica
    • Galeria de Mídia
    • Manuais
      • Identidade Visual
      • Manual de Cerimonial
      • Manual de Hipermídia da PMMS
    • Canções e Hinos
    • Leis e Regulamentos
      • Regulamento Geral da PMMS
      • Regulamento de Uniformes
    • Modelos de Documentos
    • Nota de Pesar
  • Público Interno
    • ms.gov.br
    • Portal do Servidor
      • Acessar
      • Redefinir senha
    • Webmail institucional
      • Acessar
      • Solicitar conta
    • Gestão Operacional (SIGO)
    • Informações de Segurança Pública (SINESP)
      • Acessar
      • Solicitar acesso
    • Sistemas da PMMS
      • Sistema Gesthor
      • Demais Sistemas
    • DRSP
      • Formulário de Declaração (Convocados/Designados)
      • DECLARAÇÃO MODELO
      • RECRUTAMENTO E SELEÇÃO
        • FORMULÁRIO DE RECURSO
        • FORMULÁRIO ESTÁGIO PROBATÓRIO
      • PROMOÇÕES
        • PLANILHA DE DADOS DRSP
      • INSTRUÇÃO DE PREENCHIMENTO
      • MEDALHAS
        • CERTIDÃO MED. TEMPO DE SERVIÇO
        • MEDALHA TIRADENTES
        • INSÍGNIA DO MÉRITO
        • MEDALHA DO MÉRITO
        • MEDALHA DO MÉRITO INTELECTUAL
        • PRÊMIO TC ANA NEIZE BALTHA
        • Formulário Ana Neize
      • CONCEITO
        • FICHA DE AVALIAÇÃO OFICIAL
        • FICHA DE CONCEITO SGT
        • Modelo Ficha de Informações Oficiais –
        • Modelo Ficha de Conceito de Sargentos –
    • DEIP
      • Sistema de Ensino
      • Formulários
        • Formulário de Inscrição de Professores (CFO, CFOS)
    • Identidade Funcional
    • Saúde do Policial
      • Sobre a Policlínica
      • Especialidades
      • Sobre a JISO
      • Agendamentos
      • Documentação Necessária
  • Governança
    • Diretrizes Estratégicas
    • Plano Estratégico
    • Mapa Estratégico
    • Cadeia de Valor
    • Carta de Serviços
    • Processos da PMMS
  • Cidadão
    • ms.gov.br
    • Carta de Serviços
    • Ouvidoria da PMMS
    • Boletim On-line de Trânsito
    • Disque Denúncia 181
    • Projetos Sociais
    • Telefones e Endereços
  • Carta de Serviços
‹ Voltar

1º BPM equipe da Força Tática prende 06 pessoas por associação criminosa, recupera objetos roubados e apreende drogas e munições

  • 07 nov 2016
  • Categorias:Geral
  • Compartilhar:

Campo Grande (MS) Neste sábado (05)  por voltas das 23h30  policiais militares  da Força Tática/1ºBPM prenderam um bando que agia efetuando vários roubos e tráfico de drogas na cidade.

A equipe efetuava patrulhamento na Av. Ludio Matins  Coelho quando deparou -se com duas vítimas de roubo a mão armada, após diligencias foram localizados os suspeitos, sendo que na residencia de um deles foram encontrados vários tabletes de maconha totalizando 2,130 kg distribuídos em 24 porções, num comodo da residencia foram localizados vários aparelhos celulares.

Diante dos fatos os envolvidos foram encaminhados a Delegacia de Policia para providencias cabíveis.

Assessoria de Comunicação Social 1º BPM

 

// <![CDATA[
var pjOuPc = 'pj';
var url_home = 'http://www.sigo.ms.gov.br:80/';
var dataDeRegistro = '06/11/2016';
var horaDeRegistro = '04:36:11';
var id_coord = "515";
var ambiente = "MS";
//Seta a cor de fundo dos elementos da janela que chamou ocorrencia_consulta, quando estes existirem
function imprimirLaudo(id_exame_distribuicao,matr_func_principal,id_exame) {
var exame;
if(ambiente == 'MA'){
if(id_exame == 2) {
exame = "ExameLaudoNecroscopico_MA";
} else if(id_exame == 5 || id_exame == 125){
exame = "ExameLaudoLesaoCorporal_MA";
} else if(id_exame == 22){
exame = "ExameLaudoEmbriaguez_MA";
} else {
exame = "ExameLaudoConclusao_MA";
}
}else{
if(id_exame == 2) {
exame = "ExameLaudoNecroscopico";
} else if(id_exame == 5 || id_exame == 125){
exame = "ExameLaudoLesaoCorporal";
} else if(id_exame == 22){
exame = "ExameLaudoEmbriaguez";
} else {
exame = "ExameLaudoConclusao";
}
}
var url = "http://www.sigo.ms.gov.br:80/pecas/visualizar.php?rpt="+exame+"&id_distribuicao="+id_exame_distribuicao+
"&matr_func="+$.trim(matr_func_principal)+
"&url=http://www.sigo.ms.gov.br:80/&rascunho=0"+
"&id_coord="+id_coord
;
window.open(url);
}
function FCKeditor_OnComplete( editorInstance ) {
// document.getElementById(editorInstance.Name).value = editorInstance.GetXHTML(false);
editorInstance.Events.AttachEvent( 'OnBlur' , FCKeditor_OnBlur ) ;
editorInstance.Events.AttachEvent( 'OnFocus', FCKeditor_OnFocus ) ;
editorInstance.ToolbarSet.Collapse();
}

function FCKeditor_OnBlur( editorInstance ) {
editorInstance.ToolbarSet.Collapse() ;
editorInstance.Height = 200 ;
}

function FCKeditor_OnFocus( editorInstance ) {
var oEditor = FCKeditorAPI.GetInstance(editorInstance.Name).Edit || window.parent ;
oEditor.Height = "1000px" ;
editorInstance.ToolbarSet.Expand() ;
}

function set_bg(onde,oque) {
var a=false;
if (window.parent.document) {
a=window.parent.document.getElementById(onde);
}
if (a) {
a.style.backgroundColor = oque;
}
}

function fechar() {
var j = window.opener;
if (j == null && window.parent.document) {
window.parent.document.body.style.overflow = 'auto';
if (window.parent.document.getElementById('frm_dados'))
window.parent.document.getElementById('frm_dados').src = 'about:blank';
if (window.parent.document.getElementById('div_dados'))
window.parent.document.getElementById('div_dados').style.visibility = 'hidden';
window.parent.document.body.scroll = 'yes';

if (window.parent.document && window.parent.document.getElementById('bo_0_4477728')) {
set_bg('bo_0_4477728','FFFFFF');
set_bg('bo_1_4477728','eff1f8');
set_bg('bo_2_4477728','eff1f8');
set_bg('bo_3_4477728','eff1f8');
set_bg('bo_4_4477728','eff1f8');
set_bg('bo_5_4477728','eff1f8');
set_bg('bo_6_4477728','eff1f8');
}
} else {
if(j.document.getElementById("btnPecascartorarias_'4477728'")){
j.document.body.style.overflow = 'auto';
j.document.body.scroll = 'yes';
}
window.close();
}
}

function abrirAlteraFato(variaveis) {
objid('div_janela').style.display ='block';
if (document.all) {
objid('div_janela').style.height = '150px';
} else {
objid('div_janela').style.minHeight = '150px';
}
objid('fundo').style.display ='block';
atualiza_camada_post('ocorrencia_consulta.altera.fato.php', variaveis, 'div_janela');
document.body.style.overflow='hidden';
}

function abrirAlteraData(variaveis) {
objid('div_janela').style.display ='block';
if (document.all) {
objid('div_janela').style.height = '150px';
} else {
objid('div_janela').style.minHeight = '150px';
}
objid('fundo').style.display ='block';
atualiza_camada_post('ocorrencia_consulta.altera.data.php', variaveis, 'div_janela');
document.body.style.overflow='hidden';
}

function abrirMovimentacao(variaveis) {
objid('div_janela').style.display='block';
objid('div_janela').focus();
objid('fundo').style.display='block';
document.body.style.overflow='hidden';
atualiza_camada_post('ocorrencia_consulta.movimentacao.php', variaveis, 'div_janela');
}

function abrirLaudo(campos, valores) {
var variaveis = '_=' + new Date();//no cache
for (i in campos)
variaveis = variaveis+'&'+campos[i]+'='+valores[i]

objid('fundo').style.display ='block';
objid('div_janela').style.display ='block';

atualiza_camada_post("imol/resumo_laudo.php", variaveis, 'div_janela');
document.body.style.overflow='hidden';
}

function validaProcedimento(obj, apf) {
if ($(obj).val() == 24 || ($(obj).val() == '23' && apf == 0)) {
$("#lblDespacho").show();
$("#txtDespacho").show();
}
else {
$("#lblDespacho").hide();
$("#txtDespacho").hide();
}
}
function validaProcedimento2(obj, apf) {
if ($('option:selected', obj).attr('despacho') == 1) {
$("#lblDespacho").show();
$("#txtDespacho").show();
} else {
$("#lblDespacho").hide().val('');
$("#txtDespacho").hide().val('');
}

if ($('option:selected', obj).attr('diligencia') == 1) {
$("#lblOitiva").show();
$("#txtOitiva").show();
} else {
$("#lblOitiva").hide().val('');
$("#txtOitiva").hide().val('');
}
}
function dicaInstauracaoPortaria(valor) {
for (var i =0; i < document.getElementById('tp_procedimento').length; i++)
if (document.getElementById('tp_procedimento').options[i].value == valor)
document.getElementById('tp_procedimento').selectedIndex = i;
}

function dicaInstauracaoProcedimento(valor) {
if (document.getElementById('rd_procedimento').type != 'hidden') {
for (var i =0; i < document.forms[0].rd_procedimento.length; i++)
if (document.forms[0].rd_procedimento[i].value == valor)
break;
if (i == document.forms[0].rd_procedimento.length) {
document.forms[0].rd_procedimento[0].checked = true;
document.getElementById('tp_procedimento').value = document.forms[0].rd_procedimento[0].value;
} else {
document.forms[0].rd_procedimento[i].checked = true;
document.getElementById('tp_procedimento').value = document.forms[0].rd_procedimento[i].value;
}
}
}
function pegaProcedimento(obj) {

if (obj.checked) {
document.getElementById("tp_procedimento").value = obj.value;
//document.getElementById('sequencial').value = obj.getAttribute('sequencial');
document.getElementById("seq_peca").value = obj.getAttribute("seq_peca");
}
}

function concluirInstauracaoPortaria(id_bo) {
var erro='',s='',o,d;

o=document.getElementById('tp_procedimento');
d=document.getElementById('tp_procedimento');
if (o.value == "" || d.value == "") {
erro=erro+'Informe o Tipo de Procedimento.\n';
if (s=='')s=o;
}

o=document.getElementById('nm_delegado');
d=document.getElementById('id_delegado');
if (o.value == "" || d.value == "") {
erro=erro+'Informe o Delegado.\n';
if (s=='')s=o;
}

o=document.getElementById('data');
d=document.getElementById('data');
if (o.value == "" || d.value == "") {
erro=erro+'Informe a Data.\n';
if (s=='')s=o;
}

if (erro!='') {
alert(erro);
s.focus();
} else {
var individualizacao = '0'

document.getElementById('pc_texto1').value = document.getElementById('pc_texto1').value.replace(/&/g, "%26");
document.getElementById('pc_texto2').value = document.getElementById('pc_texto2').value.replace(/&/g, "%26");

document.getElementById('salvarInstauracaoPortaria').disabled = true;
ajax = new Init_Ajax();
ajax.SetMethod = "POST";
ajax.objFieldName = Array("id_bo", 'tp_peca', 'tp_procedimento', 'id_delegado', 'pc_texto1', 'pc_texto2', 'data', 'nm_peca');
ajax.objValue = Array(id_bo, document.getElementById('tp_peca').value, document.getElementById('tp_procedimento').value, document.getElementById('id_delegado').value, document.getElementById('pc_texto1').value, document.getElementById('pc_texto2').value, document.getElementById('data').value, document.getElementById('nm_peca').value);

ajax.SetUri = "peca_ocorrencia.portaria.juntada.php";
ajax.msg = "

“;
ajax.msgobj = document.getElementById(‘carregando’);
ajax.Execute(“__concluirInstauracaoPortaria”);
delete ajax;
}
}

function __concluirInstauracaoPortaria(obj) {
var comeco, fim, resultado = obj.responseText;
comeco = resultado.indexOf(““);
if (comeco != fim) {
eval(resultado.substring(comeco+10,fim));
}
objid(“div_janela”).innerHTML = resultado;
}

function concluirInstauracaoProcedimento(id_bo) {
var erro=”,s=”,o,d;

if (erro!=”) {
alert(erro);
s.focus();
} else {
document.getElementById(‘salvarInstauracaoProcedimento’).disabled = true;
ajax = new Init_Ajax();
ajax.SetMethod = “POST”;
ajax.objFieldName = Array(“id_bo”, “tp_procedimento”, “livro”, ‘folha’, ‘ordem’, ‘nr_procedimento’, ‘ano’, ‘tp_escrivao’, ‘id_escrivao’, ‘id_delegado’);
ajax.objValue = Array(id_bo, document.getElementById(‘tp_procedimento’).value, document.getElementById(‘txtLivro’).value, document.getElementById(‘txtFolha’).value, document.getElementById(‘livro_ordem’).value, document.getElementById(‘txtProc’).value, document.getElementById(‘ddlAno’).value, document.getElementById(‘tp_escrivao’).value, document.getElementById(‘id_escrivao’).value, document.getElementById(‘id_delegado’).value);
ajax.SetUri = “peca_ocorrencia.procedimento.concluir.php”;
ajax.msg = ”

“;
ajax.msgobj = document.getElementById(‘carregando’);
ajax.Execute(“__concluirInstauracaoProcedimento”);
delete ajax;
}
}

function __concluirInstauracaoProcedimento(obj) {
var comeco, fim, resultado = obj.responseText;

comeco = resultado.indexOf(““);
if (comeco != fim) {
eval(resultado.substring(comeco+10,fim));
}
objid(“div_janela”).innerHTML = resultado;
}

function concluirAtualizacaoProcedimento(id_bo, tamanho) {
var i, rd_procedimento;
if (document.forms[0].rd_procedimento.length) {
for (i =0; i < document.forms[0].rd_procedimento.length; i++)
if (document.forms[0].rd_procedimento[i].checked) {
rd_procedimento = document.forms[0].rd_procedimento[i].value;
break;
}
} else

rd_procedimento = document.getElementById('rd_procedimento').value;
if(tamanho == 1){
var seq_peca = document.getElementById('rd_procedimento').getAttribute("seq_peca");
} else {
var seq_peca = document.getElementById('seq_peca').value;
}

document.getElementById('salvarInstauracaoProcedimento').disabled = true;

ajax = new Init_Ajax();
ajax.SetMethod = "POST";
ajax.objFieldName = Array("id_bo", "tp_peca", "seq_peca");
ajax.objValue = Array(id_bo, rd_procedimento, seq_peca);
ajax.SetUri = "peca_ocorrencia.procedimento.atualizar.concluir.php";
ajax.msg = "

“;
ajax.msgobj = document.getElementById(‘carregando’);
ajax.Execute(“__concluirAtualizacaoProcedimento”);
delete ajax;
}

function __concluirAtualizacaoProcedimento(obj) {
var comeco, fim, resultado = obj.responseText;

comeco = resultado.indexOf(““);
if (comeco != fim) {
eval(resultado.substring(comeco+10,fim));
}
objid(“div_janela”).innerHTML = resultado;
}

function abrirDilacao(variaveis) {
objid(‘div_janela’).style.display =’block’;
objid(‘fundo’).style.display =’block’;
objid(‘div_janela’).style.height =’250px’;
atualiza_camada_post(‘ocorrencia_consulta.dilacao.php’, variaveis, ‘div_janela’);
document.body.style.overflow=’hidden’;
}

function abrirMovimentacaoProcedimento(variaveis) {
objid(‘div_janela’).style.display =’block’;
objid(‘fundo’).style.display =’block’;
objid(‘div_janela’).style.height =’250px’;
atualiza_camada_post(‘ocorrencia_consulta.movimentacao_procedimento.php’, variaveis, ‘div_janela’);
document.body.style.overflow=’hidden’;
}

function abrirServico(variaveis) {
atualiza_camada_post(‘ocorrencia_consulta.movimentacao.ordemServico.php’, variaveis, ‘div_janela’);
}

function ordemServico(variaveis) {
objid(‘div_janela’).style.display =’block’;
objid(‘fundo’).style.display =’block’;
atualiza_camada_post(‘ocorrencia_consulta.ordemServico.php’, variaveis, ‘div_janela’);
document.body.style.overflow=’hidden’;
}

function concluirOrdemServico(campos, valores) {
var i = 1;
var q = campos.length;
var teste = true;
//var campos = new Array();
//var valores = new Array();
while (document.getElementById(“id_funcionario”+i.toString()) != undefined) {
campos[q] = “id_funcionario”+i.toString();
valores[q] = document.getElementById(“id_funcionario”+i.toString()).value;
i++;
q++;
}

for (i = 0; i< valores.length;i++) {
if (valores[i] == "") {
teste = false;
alert('É necessário o preenchimento de todos os campos');
break;
}
}

if (teste) {
ajax = new Init_Ajax();
ajax.SetMethod = "POST";
ajax.objFieldName = campos;
ajax.objValue = valores;
ajax.SetUri = "ocorrencia_consulta.ordemServico.concluir.php";
ajax.msg = "

“;
ajax.msgobj = document.getElementById(‘carregando’);
ajax.Execute(“__concluirOrdemServico”);
delete ajax;
}
}

function __concluirOrdemServico(obj) {
var comeco, fim, resultado = obj.responseText;

comeco = resultado.indexOf(““);
if (comeco != fim) {
eval(resultado.substring(comeco+10,fim));
}
objid(“carregando”).innerHTML = resultado;
}

function voltar(campos, valores) {
ajax = new Init_Ajax();
ajax.SetMethod = “POST”;
ajax.objFieldName = campos;
ajax.objValue = valores;
ajax.SetUri = “ocorrencia_consulta.movimentacao.php”;
ajax.msg = ”

“;
ajax.msgobj = document.getElementById(‘div_janela’);
ajax.ExecuteObj(“div_janela”);
delete ajax;
}

function editaDilacao(campos, valores) {

/* Validação de escrivão */
if (!$(“#id_cidadao”).val() && !$(“#id_cidadao2”).val()) {
alert(‘É necessário informar um escrivão ou escrivão ad-hoc.’);
return false;
}

/* Procura pela posição do campo escrivão e verifica se o mesmo tem valor,
* caso contrário, coloca o valor do escrivao adhoc no lugar */
var t = campos.length;
for (var i = 0; i < t; i++) {
if (campos[i] == 'id_escrivao')
break;
}
if (!valores[i]) {
//Procura o campo do escrivão adhoc
for (var j = 0; j < t; j++) {
if (campos[j] == 'id_escrivao2')
break;
}
valores[i] = valores[j];
}

ajax = new Init_Ajax();
ajax.SetMethod = "POST";
ajax.objFieldName = campos;
ajax.objValue = valores;
ajax.SetUri = "ocorrencia_consulta.dilacao.concluir.php";
ajax.msg = "

“;
ajax.msgobj = document.getElementById(‘carregandoDilacao’);
ajax.Execute(“__editaDilacao”);
delete ajax;
}

function __editaDilacao(obj) {
var comeco, fim, resultado = obj.responseText;

comeco = resultado.indexOf(““);
if (comeco != fim) {
eval(resultado.substring(comeco+10,fim));
}

objid(“carregandoDilacao”).innerHTML = resultado;
}

function buscaFuncionario3(id_txt, tp_consulta) {
var erro=”,s=”,o;
var txt = alltrim(objid(id_txt).value).toLowerCase();
o=objid(tp_consulta);
if (o.value==”) {
erro=erro+’Informe o Tipo de Busca!\n’;
if (s==”)s=o;
}

if (erro!=”) {
alert(erro);
s.focus();
} else {
r = “nm_cidadao,id_cidadao,cpf,id_rg,id_ssp”;
t = “FUNCIONARIO”;
switch(objid(tp_consulta).value) {
case “r”:
if (txt!=””) {
txt = “&rg=”+txt;
txt += “&func=1,2”;
objid(‘generico’).style.visibility=’visible’;
objid(‘popup’).src = ‘popup/generico.php?tipo=’+t+’&retorno=’+r+txt+’&execute=insereDelegado’;
objid(‘popup’).focus();
} else {
alert(“É necessário informar o número do RG.”);
objid(‘nm_cidadao’).focus();
}
break;

case “c”:
if (alltrim(txt)!=””) {
txt = “&cpf=”+txt;
txt += “&func=1,2”;
objid(‘generico’).style.visibility=’visible’;
objid(‘popup’).src = ‘popup/generico.php?tipo=’+t+’&retorno=’+r+txt+’&execute=insereDelegado’;
objid(‘popup’).focus();
} else {
alert(“É necessário informar o número do CPF.”);
objid(‘nm_cidadao’).focus();
}
break;

case “m”:
if (alltrim(txt)!=””) {
txt = “&id=”+txt;
txt += “&func=1,2”;
objid(‘generico’).style.visibility=’visible’;
objid(‘popup’).src = ‘popup/generico.php?tipo=’+t+’&retorno=’+r+txt+’&execute=insereDelegado’;
objid(‘popup’).focus();
} else {
alert(“É necessário informar o número da matrícula.”);
objid(‘nm_cidadao’).focus();
}
break;

case “n”:
if (txt.length>2) {
txt = “&txt=”+txt;
txt += “&func=1,2”;
objid(‘generico’).style.visibility=’visible’;
objid(‘popup’).src = ‘popup/generico.php?tipo=’+t+’&retorno=’+r+txt+’&execute=insereDelegado’;
objid(‘popup’).focus();
} else {
alert(“É necessário informar no minimo 3 caracteres para realizar a busca.”);
objid(‘nm_cidadao’).focus();
}
break;
case “”:
alert(‘Selecione o tipo da busca.’);
objid(tp_consulta).focus();
break;
}
}
}

function buscaEscrivao(idTxt, idTpConsulta, adHoc) {

if (event.keyCode == 13) {
var txt, tpConsulta, filtroBusca, r, t, erro;

t = ‘FUNCIONARIO’;

r = ‘nm_cidadao,id_cidadao,id_funcao=>ad_hoc’;

if (idTxt == ‘nm_cidadao2’) {
t = ‘NMINICIAL’;
r = ‘nm_cidadao=>nm_cidadao2,id_cidadao=>id_cidadao2,id_funcao=>ad_hoc’;
}

filtroBusca = ‘&func=3’;
if (adHoc) {
filtroBusca = ‘&tp_admin=1’;
}

txt = document.getElementById(idTxt);
txt = $.trim($(txt).val()).toLowerCase();

tpConsulta = document.getElementById(idTpConsulta);
switch ($(tpConsulta).val()) {
case ‘r’:
filtroBusca += ‘&rg=’+txt;
erro = ‘É necessário informar o número do RG.’;
break;
case ‘c’:
filtroBusca += ‘&cpf=’+txt;
erro = ‘É necessário informar o número do CPF.’
break;
case ‘m’:
filtroBusca += ‘&id=’+txt;
erro = ‘É necessário informar o número da matrícula.’
break;
case ‘n’:
filtroBusca += ‘&txt=’+txt;
erro = ‘É necessário informar no mínimo 3 caracteres para realizar a busca.’
break;
default:
alert(‘Informe o tipo de busca.’);
$(tpConsulta).focus();
return false;
}

if ($(tpConsulta).val() == ‘n’ && txt.length < 3 || $(tpConsulta).val() != 'n' && !txt.length) {
alert(erro);
return false;
}

window.open('popup/generico.php?tipo='+t+'&retorno='+r+filtroBusca+'&execute=listaEscrivao',"generico","top=0,left=0,width=600,Height=500,scrollbars=1");

} else {
if (idTxt == 'nm_cidadao') {
document.getElementById('id_cidadao').value = '';
} else if (idTxt == 'nm_cidadao2') {
document.getElementById('id_cidadao2').value = '';
}
}
}

function listaEscrivao(){
var nm_cidadao = objid("nm_cidadao").value;
var nm_cidadao2 = objid("nm_cidadao2").value;

if(nm_cidadao != ''){
//$('#divDilacao').hide();
$('#divEscrivao').hide();
$('#divEscrivaoAdHoc').hide();
$('#funcao').html('Escrivão');
$('#nmCidadao').html(nm_cidadao);
$('#infoNmEscrivao').show();
}
else if(nm_cidadao2 != ''){
//$('#divDilacao').hide();
$('#divEscrivao').hide();
$('#divEscrivaoAdHoc').hide();
$('#funcao').html('Escrivão Ad-hoc');
$('#nmCidadao').html(nm_cidadao2);
$('#infoNmEscrivao').show();
}
}

function excluirEscrivao(){
$('#funcao').html('');
$('#nmCidadao').html('');
$('#nm_cidadao').val('');
$('#nm_cidadao2').val('');
$('#id_cidadao').val('');
$('#id_cidadao2').val('');
$('#infoNmEscrivao').hide();
$('#divEscrivao').show();
$('#divEscrivaoAdHoc').show();
}

function limpaCampos() {
for (var i = 0; i < arguments.length; i++) {
document.getElementById(arguments[i]).value = '';
}
}

function insereDelegado() {
ajax = new Init_Ajax();
ajax.SetMethod = "POST";
ajax.objFieldName = Array("id_cidadao", "nm_cidadao", "cpf", "id_rg", "id_ssp", "acao");
ajax.objValue = Array(objid("id_cidadao").value, objid("nm_cidadao").value, objid("cpf").value,objid("id_rg").value, objid("id_ssp").value, "inserir");
ajax.SetUri = "peca_procedimento.dilacaoPrazo.delegado.php";
ajax.msg = "

“;
ajax.msgobj = document.getElementById(‘carregando’);
ajax.Execute(“__insereDelegado”);
delete ajax;
}

function __insereDelegado(obj) {
var comeco, fim, resultado = obj.responseText;

comeco = resultado.indexOf(““);
if (comeco != fim) {
eval(resultado.substring(comeco+10,fim));
}
objid(“delegado”).innerHTML = resultado;
}

function excluiDelegado() {
ajax = new Init_Ajax();
ajax.SetMethod = “POST”;
ajax.objFieldName = Array(“id_cidadao”, “nm_cidadao”, “cpf”, “id_rg”, “id_ssp”, “acao”);
ajax.objValue = Array(objid(“id_cidadao”).value, objid(“nm_cidadao”).value, objid(“cpf”).value,objid(“id_rg”).value, objid(“id_ssp”).value, “excluir”);
ajax.SetUri = “principal.dilacaoPrazo.delegado.php”;
ajax.msg = ”

“;
ajax.msgobj = document.getElementById(‘carregando’);
ajax.Execute(“__excluiDelegado”);
delete ajax;
}

function __excluiDelegado(obj) {
var comeco, fim, resultado = obj.responseText;

comeco = resultado.indexOf(““);
if (comeco != fim) {
eval(resultado.substring(comeco+10,fim));
}
objid(“delegado”).innerHTML = resultado;
}

function concluiDilacao(campos, valores) {
ajax = new Init_Ajax();
ajax.SetMethod = “POST”;
ajax.objFieldName = campos;
ajax.objValue = valores;
ajax.SetUri = “peca_procedimento.dilacaoPrazo.concluir.php”;
ajax.Execute(“__concluiDilacao”);
delete ajax;
}

function __concluiDilacao(obj) {
var comeco, fim, resultado = obj.responseText;

comeco = resultado.indexOf(““);
if (comeco != fim) {
eval(resultado.substring(comeco+10,fim));
}
}

function adicionarServico() {
var caixa = document.getElementById(‘servico’);
var numero;
if (caixa.innerText != “Adicone algum Serviço”)
numero = caixa.lastChild.firstChild.innerText.replace(“º”,””)
else {
caixa.innerText = “”;
numero = 0;
}
var no = “”;
numero ++;
no += ”

“;
no += ” “;
no += ” “;
no += ”

“;
no += ” “;
no += ” “;
no += “

“;
caixa.innerHTML += no;
}

function adicionarFuncionario() {
var caixa = document.getElementById(‘funcionario’);
var numero = caixa.lastChild.firstChild.atributo;
var no = “”;
numero ++;
no += ”

“;
no += ” “;
no += ”

“;
no += ” “;
no += ” “;
no += “

“;
caixa.innerHTML += no;
}

function replace(str,oQue,peloQue) {
return String(str).replace(new RegExp(oQue,”gi”),peloQue);
}

function excluirServico(numero) {
var caixa = document.getElementById(“servico”);
caixa.removeChild(caixa.childNodes[numero-1]);
for (var i = numero-1; i < caixa.childNodes.length; i++) {
var no = caixa.childNodes[i];
var antigo = (i+2).toString()+" ";
var novo = (i+1).toString()+" ";
no.setAttribute("id", replace(no.id, antigo, novo));
no.innerHTML = replace(no.innerHTML, antigo, novo);
antigo = (i+2).toString()+"'";
novo = (i+1).toString()+"'";
no.innerHTML = replace(no.innerHTML, antigo, novo);
}
if (caixa.innerHTML == "")
caixa.innerHTML = "

Adicone algum Serviço

“;
}

function excluirFuncionario(numero) {
var caixa = document.getElementById(“funcionario”);
alert(numero)
caixa.removeChild(caixa.childNodes[numero]);
for (var i = numero; i < caixa.childNodes.length; i++) {
var no = caixa.childNodes[i];
var antigo = (i+1).toString()+" ";
var novo = (i).toString()+" ";
no.setAttribute("id", replace(no.id, antigo, novo));
no.innerHTML = replace(no.innerHTML, antigo, novo);
antigo = (i+1).toString()+"'";
novo = (i).toString()+"'";
no.innerHTML = replace(no.innerHTML, antigo, novo);
}
}

function buscaDestino(id_txt, destino) {
var i, t, r;
var valor,tipo;

obj = document.getElementById(destino);

if (obj.type=='hidden') {
tipo = obj.id;
valor = obj.value;;
}
else {
for (i=0;iid_municipio,nm_coord=>nm_municipio&nt=515&tpa=” + valor + “&coord_inativas=0”;
}

if (txt != “”) {
window.open(“popup/generico.php?tipo=”+t+”&retorno=”+r+”&txt=”+txt,”generico”,”top=0,left=0,width=600,Height=500,scrollbars=1″);
}
else {
alert(“É necessário informar algum caracteres para realizar a busca.”);
objid(id_txt).focus();
}
}

function buscaDestinoRelacionamento(txt, destino) {
var i, t, r;
var valor,tipo;
var txt = alltrim(txt);

t = “COORD”;
r = “id_coord,nm_coord”;
txt = ‘&txt=’+txt;

if (destino == “pj”) {
r += “&tpa=13”
} else if (destino == “pc”) {
r += “&tpa=3,5”;
} else if (destino == ‘detran’) {
r += “&tpa=25″;
txt = ”;
} else if (destino == ‘pf’) {
r += “&tpa=14”;
}

if (txt != “” || destino == ‘detran’) {
window.open(‘popup/generico.php?tipo=’+t+’&retorno=’+r+txt+’&execute=limpaPopup’,”generico”,”top=0,left=0,width=600,Height=500,scrollbars=1″);
} else {
alert(“É necessário informar algum caracteres para realizar a busca.”);
objid(id_txt).focus();
}
}

function buscaServico(id_txt,n) {
var txt = alltrim(id_txt.value);
t = “SERVICO”;
r = “id_servico=>id_servico”+n+”,nm_servico=>nm_servico”+n;
if (txt != “”) {
objid(‘generico’).style.visibility=’visible’;
objid(‘popup’).src = ‘popup/generico.php?tipo=’+t+’&retorno=’+r+’&txt=’+txt+’&execute=limpaPopup’;
objid(‘popup’).focus();
} else {
alert(“É necessário informar algum caracteres para realizar a busca.”);
id_txt.focus();
}
}

function buscaEquipe(id_txt, n) {
var txt = alltrim(id_txt.value);
t = “FUNCIONARIO”;
r = “id_cidadao=>id_funcionario”+n+”,nm_cidadao=>nm_funcionario”+n;
if (txt != “”) {
objid(‘generico’).style.visibility=’visible’;
objid(‘popup’).src = ‘popup/generico.php?tipo=’+t+’&retorno=’+r+’&txt=’+txt+’&execute=limpaPopup’;
objid(‘popup’).focus();
} else {
alert(“É necessário informar algum caracteres para realizar a busca.”);
id_txt.focus();
}
}

function buscaFuncionario2(id_txt, t) {
var txt = alltrim(id_txt.value);
var r, tipo;
id_txt.value = “”;
tipo = “”;
if (txt != “”) {
if (t == ‘ea’) {
tipo = ‘NMCIDADAO’;
r = “id_cidadao=>id_escrivao,nm_cidadao=>nm_escrivao”;
} else if (t == ‘e’) {
tipo = ‘FUNCIONARIO’;
r = “id_cidadao=>id_escrivao,nm_cidadao=>nm_escrivao”;
txt += “&func=3”;
} else if (t == ‘d’) {
tipo = ‘FUNCIONARIO’;
r = “id_cidadao=>id_delegado,nm_cidadao=>nm_delegado”;
txt += “&func=1,2”;
}
/*objid(‘generico’).style.visibility=’visible’;
objid(‘popup’).src = ‘popup/generico.php?tipo=’+tipo+’&retorno=’+r+’&txt=’+txt+’&execute=limpaFuncionario2’;
objid(‘popup’).focus();*/
window.open(“popup/generico.php?tipo=”+tipo+”&retorno=”+r+’&txt=’+txt+”&execute=limpaFuncionario2″,”generico”,”top=0,left=0,width=600,Height=500,scrollbars=1″);
} else {
alert(“É necessário informar algum caracteres para realizar a busca.”);
id_txt.focus();
}
}

function limpaFuncionario2() {

limpaPopup();
}

function limpaPopup() {
objid(‘popup’).src = “about:blank”;
}

function inserePerito() {
ajax = new Init_Ajax();
ajax.SetMethod = “POST”;
ajax.objFieldName = Array(“id_cidadao”, “nm_cidadao”, “cpf”, “id_rg”, “id_ssp”, “acao”);
ajax.objValue = Array(objid(“id_cidadao”).value, objid(“nm_cidadao”).value, objid(“cpf”).value,objid(“id_rg”).value, objid(“id_ssp”).value, “inserir”);
ajax.SetUri = “ocorrencia_consulta.laudo.perito.php”;
ajax.msg = ”

“;
ajax.msgobj = document.getElementById(‘carregando’);
ajax.Execute(“__insereDelegado”);
delete ajax;
}

function __inserePerito(obj) {
var comeco, fim, resultado = obj.responseText;

comeco = resultado.indexOf(““);
if (comeco != fim) {
eval(resultado.substring(comeco+10,fim));
}
objid(“perito”).innerHTML = resultado;
}

function concluirLaudo(campos, valores) {

}

function __concluirLaudo(obj) {
var comeco, fim, resultado = obj.responseText;

comeco = resultado.indexOf(““);
if (comeco != fim) {
eval(resultado.substring(comeco+10,fim));
}
}

function concluirServico(campos, valores) {
var i = 1;
var q = campos.length;
var teste = true;

while (document.getElementById(“id_servico”+i.toString()) != undefined) {
campos[q] = “id_servico”+i.toString();
valores[q] = document.getElementById(“id_servico”+i.toString()).value;
i++;
q++;
}
campos[q] = “id_delegado”;
valores[q] = document.getElementById(“id_delegado”).value;
campos[++q] = “id_funcionario”;
valores[q] = document.getElementById(“id_funcionario”).value;
campos[++q] = “prazo”;
valores[q] = document.getElementById(“prazo”).value;

for (i = 0; i< valores.length;i++) {
if (valores[i] == "") {
teste = false;
alert('É necessário o preenchimento de todos os campos');
break;
}
}

if (teste) {
ajax = new Init_Ajax();
ajax.SetMethod = "POST";
ajax.objFieldName = campos;
ajax.objValue = valores;
ajax.SetUri = "peca_procedimento.passo1.concluir.php";
ajax.Execute("__concluirServico");
delete ajax;
}
}

function __concluirServico(obj) {
var comeco, fim, resultado = obj.responseText;

comeco = resultado.indexOf("“);
if (comeco != fim) {
eval(resultado.substring(comeco+10,fim));
}
objid(“carregando”).innerHTML = resultado;
}

function Executar(url, campos, valores) {
ajax = new Init_Ajax();
ajax.SetMethod = “POST”;
if (campos != null)
ajax.objFieldName = campos;
if (valores != null)
ajax.objValue = valores;
ajax.SetUri = url;
ajax.Execute(“__Alerta”);
delete ajax;
}

function __Alerta(obj) {
var comeco, fim, resultado = obj.responseText;

comeco = resultado.indexOf(““);
if (comeco != fim) {
eval(resultado.substring(comeco+10,fim));
}
objid(“div_janela”).innerHTML += resultado;
}

function buscaFuncao(hidden, text) {
var txt = document.getElementById(text).value;
var r, tipo;
tipo = “FUNCAO”;
if (txt != “”) {
r = “id_funcao=>”+hidden+”,nm_funcao=>”+text;
/*document.getElementById(‘generico’).style.visibility=’visible’;
document.getElementById(‘popup’).src = ‘popup/generico.php?tipo=’+tipo+’&retorno=’+r+’&txt=’+txt;
document.getElementById(‘popup’).focus();*/
window.open(“popup/generico.php?tipo=”+tipo+”&retorno=”+r+’&txt=’+txt,”generico”,”top=0,left=0,width=600,Height=500,scrollbars=1″);
} else {
alert(“É necessário informar algum caracteres para realizar a busca.”);
document.getElementById(text).focus();
}
}

function buscaProfissao(hidden, text) {
var txt = document.getElementById(text).value;
var r, tipo;
tipo = “PROFISSAO”;
if (txt != “”) {
r = “id_profissao=>”+hidden+”,nm_profissao=>”+text;
/*document.getElementById(‘generico’).style.visibility=’visible’;
document.getElementById(‘popup’).src = ‘popup/generico.php?tipo=’+tipo+’&retorno=’+r+’&txt=’+txt;
document.getElementById(‘popup’).focus();*/
window.open(“popup/generico.php?tipo=”+tipo+”&retorno=”+r+’&txt=’+txt,”generico”,”top=0,left=0,width=600,Height=500,scrollbars=1″);
} else {
alert(“É necessário informar algum caracteres para realizar a busca.”);
document.getElementById(text).focus();
}
}

function buscaQuem(hidden, text, sexo, funcao) {
var txt = document.getElementById(text).value;
var r, tipo;
tipo = “NMCIDADAO”;

var nenhum = ”;
if (hidden == ‘idCoabita’) {
nenhum = ‘&nenhum=insereCoabitante’;
} else if (hidden == ‘idFilho’) {
nenhum = ‘&nenhum=insereFilho’;
} else if (hidden == ‘idDesafeto’) {
nenhum = ‘&nenhum=insereDesafeto’;
}

if (txt != “”) {
r = “id_cidadao=>”+hidden+”,nm_cidadao=>”+text
if (sexo != “” && sexo != undefined) {
r+= “,tp_sexo=>”+sexo;
}
//document.getElementById(‘generico’).style.visibility=’visible’;
//objid(‘generico’).style.visibility=’visible’;
//objid(‘popup’).src = ‘popup/generico.php?tipo=’+tipo+’&retorno=’+r+’&txt=’+txt+nenhum+((funcao != “” && funcao != undefined)?’&execute=’+funcao:”);
//objid(‘popup’).focus();

window.open(“popup/generico.php?tipo=”+tipo+”&retorno=”+r+’&txt=’+txt+nenhum+((funcao != “” && funcao != undefined)?’&execute=’+funcao:”),”generico”,”top=0,left=0,width=600,Height=500,scrollbars=1″);
} else {
alert(“É necessário informar algum caracteres para realizar a busca.”);
document.getElementById(text).focus();
}
}

function insereCoabitante() {
if (confirm(‘Nenhum cidadão encontrado, deseja cadastrar?’)) {
//alert(‘nome = ‘+document.getElementById(‘txtCoabita’).value);
window.open(‘http://www.sigo.ms.gov.br:80/dadosPessoais.php?newUser=1’+(document.getElementById(‘txtCoabita’).value != ”?’&Nome=’+document.getElementById(‘txtCoabita’).value:”)+’&daOnde=coabita_pregressa&arquivo=peca_envolvido.passo5.php’,’dP’,’width=780,height=500,scrollbars’)
}
}

function insereFilho() {
if (confirm(‘Nenhum cidadão encontrado, deseja cadastrar?’)) {
//alert(‘nome = ‘+document.getElementById(‘txtCoabita’).value);
window.open(‘http://www.sigo.ms.gov.br:80/dadosPessoais.php?newUser=1’+(document.getElementById(‘txtFilho’).value != ”?’&Nome=’+document.getElementById(‘txtFilho’).value:”)+’&daOnde=filho_pregressa&arquivo=peca_envolvido.passo5.php’,’dP’,’width=780,height=500,scrollbars’)
}
}

function insereDesafeto() {
if (confirm(‘Nenhum cidadão encontrado, deseja cadastrar?’)) {
//alert(‘nome = ‘+document.getElementById(‘txtCoabita’).value);
window.open(‘http://www.sigo.ms.gov.br:80/dadosPessoais.php?newUser=1’+(document.getElementById(‘txtDesafeto’).value != ”?’&Nome=’+document.getElementById(‘txtDesafeto’).value:”)+’&daOnde=desafeto_pregressa&arquivo=peca_envolvido.passo5.php’,’dP’,’width=780,height=500,scrollbars’)
}
}

function insereVicio(data1, data2, vicio) {

var erro=”,s=”,o;
o=objid(vicio);
if (o.value==”) {
erro=erro+’Informe o Vício!\n’;
if (s==”)s=o;
}

o=objid(data1);
if (o.value==”) {
erro=erro+’Informe a data de início do Vício!\n’;
if (s==”)s=o;
}

if (erro!=”) {
alert(erro);
s.focus();
return false;
} else {
ajax = new Init_Ajax();
ajax.SetMethod = “POST”;
ajax.objFieldName = Array(“id_cidadao”, “id_vicio”, “dt_inicio”, “dt_curado”, “tipo”);
ajax.objValue = Array(objid(“id_envolvido”).value, objid(vicio).value, objid(data1).value , objid(data2).value, “inserir”);
ajax.SetUri = “peca_envolvido.passo5.vicio.php”;
ajax.msg = ‘‘;
ajax.msgobj = document.getElementById(‘vicios’);
ajax.ExecuteObj(“vicios”);
delete ajax;

}
}

function insereDoenca(obs, doenca) {
var erro=”,s=”,o;
o=objid(doenca);

if (o.value==”) {
erro=erro+’Informe a Doença!\n’;
if (s==”)s=o;
}

if (erro!=”) {
alert(erro);
s.focus();
return false;
} else {
ajax = new Init_Ajax();
ajax.SetMethod = “POST”;
ajax.objFieldName = Array(“id_cidadao”, “id_doenca”, “obs”, “tipo”);
ajax.objValue = Array(objid(“id_envolvido”).value, objid(doenca).value, objid(obs).value, “inserir”);
ajax.SetUri = “peca_envolvido.passo5.doenca.php”;
ajax.ExecuteObj(“doencas”);
delete ajax;

}
}

function addRelacionamentoCoabita(id, id_conhece, tipo) {
if (objid(tipo).value == ”) {
alert(‘É necessario o tipo de envolvimento.’);
} else {

var aux_replace, aux_replace_filhos;
aux_replace = $(‘#id_coabita_total’).val();
aux_replace_filhos = $(‘#id_filhos_total’).val();

if ( aux_replace.indexOf($(‘#idCoabita’).val()+’;’) >= 0) {
alert(‘Cidadão já inserido.’);
} else {
if ($(“#txtTpCoabita option:selected”).val() == ‘4’ || $(“#txtTpCoabita option:selected”).val() == ‘5’) {
//se era filho ou filha e trocou o relacionamento, dai do grid de filhos
$(‘#tpFilho_’+$(‘#idCoabita’).val()).remove();
$(‘#moraJunto_’+$(‘#idCoabita’).val()).remove();
$(‘#filho_’+$(‘#idCoabita’).val()).remove();

$(‘#id_filhos_total’).val(aux_replace_filhos.replace($(‘#idCoabita’).val()+’;’,”));

$(‘#idFilho’).val($(‘#idCoabita’).val());
if ($(“#txtTpCoabita option:selected”).val() == 4) {
$(‘#sexoFilho’).val(1);
} else {
$(‘#sexoFilho’).val(2);
}
$(‘#txtFilho’).val($(‘#txtCoabita’).val());

addRelacionamentoFilho($(‘#id_envolvido’).val(),$(‘#idCoabita’).val(),$(‘#sexoFilho’).val(),’coabitaFilho’);

} else {
$(‘#tpFilho_’+$(‘#idCoabita’).val()).remove();
$(‘#moraJunto_’+$(‘#idCoabita’).val()).remove();
$(‘#filho_’+$(‘#idCoabita’).val()).remove();

$(‘#id_filhos_total’).val(aux_replace_filhos.replace($(‘#idCoabita’).val()+’;’,”));

// se o coabitante for a vítima, então seleciona o relacionamento correto da vítima
$(‘#txtTp_’+$(‘#idCoabita’).val()+’ option’).each(function() {
if ($(this).val() == $(“#txtTpCoabita option:selected”).val()) {
$(this).attr(‘selected’,true);
}
});

// Coloca o coabitante no grid de coabitantes
$(‘#coabitante’).append(“”+
“”+
”

“+
”

“+
“”+
“

“+
““+$(“#txtTpCoabita option:selected”).text()+”: “+$(‘#txtCoabita’).val()+
“

“);

if (document.getElementById(‘sem_relacionamento_coabitante’)) {
document.getElementById(‘convivio_harmonioso’).style.display=’none’;
} else {
document.getElementById(‘convivio_harmonioso’).style.display=’block’;
}

// guarda o id do coabitante
$(‘#id_coabita_total’).val($(‘#id_coabita_total’).val()+$(‘#idCoabita’).val()+’;’);

}

$(“#sem_relacionamento_coabitante”).attr(‘disabled’,true);
//alert(“sozinhosss = “+$(“#sem_relacionamento_coabitante input[value=1]”).text());
//$(‘#rc’)

$(‘#txtTp_’+$(‘#idCoabita’).val()+’ option’).each(function() {
if ($(this).val() == $(“#txtTpCoabita option:selected”).val()) {
$(this).attr(‘selected’,true);
}
});

objid(‘tp_coabita’).innerHTML = ”;
objid(‘idCoabita’).value = ”;
objid(‘txtCoabita’).value = ”;

}
}
}

function __addRelacionamentoCoabita(obj) {
if (obj.responseText == ‘1’) {
alert(‘É necessario o tipo de envolvimento.’);
} else {
objid(‘coabitante’).innerHTML = obj.responseText;
if (document.getElementById(‘sem_relacionamento_coabitante’)) {
document.getElementById(‘convivio_harmonioso’).style.display=’none’;
} else {
document.getElementById(‘convivio_harmonioso’).style.display=’block’;
}
objid(‘tp_coabita’).innerHTML = ”;
objid(‘idCoabita’).value = ”;
objid(‘txtCoabita’).value = ”;
}
}

function addRelacionamento(id, id_conhece, sexo_conhece, tipo) {
ajax = new Init_Ajax();
ajax.SetMethod = “POST”;
ajax.objFieldName = Array(“id_cidadao”, “id_cid_conhece”, “tp_sexo”, “tp_relacionamento”, “tipo”);
ajax.objValue = Array(objid(id).value, objid(id_conhece).value, objid(sexo_conhece).value, objid(tipo).value, ‘relaciona’);
ajax.SetUri = “peca_envolvido.passo5.relaciona.php”;
ajax.Execute(“__addRelacionamento”);
}

function addRelacionamentoVitima(id, id_conhece, sexo_conhece, tipo) {
// Se a vítima for filho ou filha, vai pro grid de filhos
if ($(‘#’+tipo).val() == ‘4’ || $(‘#’+tipo).val() == ‘5’) {
$(‘#idFilho’).val($(‘#’+id_conhece).val());
$(‘#sexoFilho’).val($(‘#’+sexo_conhece).val());
$(‘#txtFilho’).val($(‘#nm_vitima_’+$(‘#’+id_conhece).val()).text());

auxReplace = $(‘#id_vitimas_total’).val();
$(‘#id_vitimas_total’).val(auxReplace.replace($(‘#’+id_conhece).val()+’;’,”));

addRelacionamentoFilho($(‘#’+id).val(),$(‘#’+id_conhece).val(),$(‘#’+sexo_conhece).val(),’vitimaFilho’);
} else {
if ($(‘#divCoab_’+$(‘#’+id_conhece).val()).html()) {

var aux_replace;

if ($(‘#’+tipo).val() != ”) {
// Limpa html no coabitante para para ser atualizado o relacionamento, se a vitima coabitar com o envolvido
$(‘#tpRelaciona_’+$(‘#’+id_conhece).val()).remove();
$(‘#moraJunto_’+$(‘#’+id_conhece).val()).remove();
$(‘#divCoab_’+$(‘#’+id_conhece).val()).remove();

// Coloca no html do coabitante o relacionamento de coabitante com a vitima.
$(‘#coabitante’).append(
“”+
“”+
”

“+
”

“+
“”+
“

“+
““+$(“#txtTp_”+$(‘#’+id_conhece).val()+” option:selected”).text()+”: “+$(‘#nm_vitima_’+$(‘#’+id_conhece).val()).text()+
“

”
);

auxReplace = $(‘#id_vitimas_total’).val();
$(‘#id_vitimas_total’).val(auxReplace.replace($(‘#’+id_conhece).val()+’;’,”));

} else {
remove_coabita_pregressa($(‘#’+id_conhece).val());
}
} else {
//se era filho ou filha e trocou o relacionamento, sai do grid de filhos
$(‘#tpFilho_’+$(‘#’+id_conhece).val()).remove();
$(‘#moraJunto_’+$(‘#’+id_conhece).val()).remove();
$(‘#filho_’+$(‘#’+id_conhece).val()).remove();

auxReplace = $(‘#id_filhos_total’).val();
$(‘#id_filhos_total’).val(auxReplace.replace($(‘#’+id_conhece).val()+’;’,”));

auxReplace = $(‘#id_vitimas_total’).val();
$(‘#id_vitimas_total’).val(auxReplace.replace($(‘#’+id_conhece).val()+’;’,”));

if (verifica_coabitantes() == 0) {
$(“#sem_relacionamento_coabitante”).attr(‘disabled’,false);
}

if ($(‘#’+tipo).val() != ”) {
$(‘#id_vitimas_total’).val($(‘#id_vitimas_total’).val()+$(‘#’+id_conhece).val()+’;’);
}
}
}
}

function addRelacionamentoFilho(id, id_conhece, sexo_conhece, tipo) {
var sexoFilho, tpRel, coabita_desc,coabita_valor;
if ($(‘#sexoFilho’).val() == ‘1’) {
sexoFilho = ‘FILHO’;
tpRel = 4;
} else {
sexoFilho = ‘FILHA’;
tpRel = 5;
}

coabita_desc = ‘Não Coabita’
coabita_valor = 0;
if (tipo == ‘coabitaFilho’) {
coabita_desc = ‘Coabita’;
coabita_valor = 1;
}

var aux_replace, aux_replace_filhos;
aux_replace = $(‘#id_coabita_total’).val();
aux_replace_filhos = $(‘#id_filhos_total’).val();

if (aux_replace_filhos.indexOf($(‘#idFilho’).val()) >= 0 ) {
alert(‘Cidadão já inserido.’);
} else {
$(‘#tpRelaciona_’+$(‘#idFilho’).val()).remove();
$(‘#moraJunto_’+$(‘#idFilho’).val()).remove();
$(‘#divCoab_’+$(‘#idFilho’).val()).remove();

$(‘#id_coabita_total’).val(aux_replace.replace($(‘#idFilho’).val()+’;’,”));

if (verifica_coabitantes() == 0) {
$(“#sem_relacionamento_coabitante”).attr(‘disabled’,false);
}

// se a chamada da função não vem da troca de relacionamento na vítima, e o filho é uma vítima, troca o select no grid de vítimas
if (tipo != ‘vitimaFilho’) {
if ($(‘#sexoFilho’).val() == ‘1’) {
$(‘#txtTp_’+$(‘#idFilho’).val()+’ option’).each(function() {
if ($(this).val() == ‘4’) {
$(this).attr(‘selected’,true);
}
});
} else {
$(‘#txtTp_’+$(‘#idFilho’).val()+’ option’).each(function() {
if ($(this).val() == ‘5’) {
$(this).attr(‘selected’,true);
}
});
}
}

// Monta o grid de filhos
$(‘#filhos’).append(
“”+
“”+
”

“+
”

“+
“”+
“

“+
““+sexoFilho+”: “+$(‘#txtFilho’).val()+
“

”
);

// guarda o id do filho
$(‘#id_filhos_total’).val($(‘#id_filhos_total’).val()+$(‘#idFilho’).val()+’;’);

objid(‘tp_filho’).innerHTML = ”;
objid(‘idFilho’).value = ”;
objid(‘txtFilho’).value = ”;

}

}

function __addRelacionamento(obj) {
objid(‘filhos’).innerHTML = obj.responseText;
objid(‘tp_filho’).innerHTML = ”;
objid(‘idFilho’).value = ”;
objid(‘txtFilho’).value = ”;
}

function addRelacionamentoDesafeto(id, id_conhece, tipo) {
ajax = new Init_Ajax();
ajax.SetMethod = “POST”;
ajax.objFieldName = Array(“id_cidadao”, “id_cid_conhece”, “tp_relacionamento”, ‘tipo’);
ajax.objValue = Array(objid(id).value, objid(id_conhece).value, objid(tipo).value, ‘desafeto’);
ajax.SetUri = “peca_envolvido.passo5.relaciona.php”;
ajax.Execute(“__addRelacionamentoDesafeto”);
}

function __addRelacionamentoDesafeto(obj) {
if (obj.responseText == ‘1’) {
alert(‘É necessario o tipo de envolvimento.’);
} else {
objid(‘grupo_desafeto’).innerHTML = obj.responseText;
objid(‘idDesafeto’).value = ”;
objid(‘txtDesafeto’).value = ”;
objid(‘tp_desafeto’).innerHTML = ”;
}
}

function coabitaRelaciona() {
if (objid(‘idCoabita’).value == objid(‘id_envolvido’).value) {
alert(“Não é possível o relacionamento do cidadão com ele mesmo”);
objid(‘txtCoabita’).value = ”;
objid(‘txtCoabita’).focus();
} else {
ajax = new Init_Ajax();
ajax.SetMethod = “POST”;
ajax.objFieldName = Array(‘tp_sexo’, ‘id_cidadao’, ‘id_cid_conhece’, ‘tipo’);
ajax.objValue = Array(objid(‘sexoCoabita’).value, objid(‘id_envolvido’).value, objid(‘idCoabita’).value, ‘coabita’);
ajax.SetUri = “peca_envolvido.passo5.relacionaOptions.php”;
ajax.ExecuteObj(‘tp_coabita’);
}
}

function desafetoRelaciona() {
if (objid(‘idDesafeto’).value == objid(‘id_envolvido’).value) {
alert(“Não é possível o relacionamento do cidadão com ele mesmo”);
objid(‘txtDesafeto’).value = ”;
objid(‘txtDesafeto’).focus();
} else {
ajax = new Init_Ajax();
ajax.SetMethod = “POST”;
ajax.objFieldName = Array(‘tp_sexo’, ‘id_cidadao’, ‘id_cid_conhece’, ‘tipo’);
ajax.objValue = Array(objid(‘sexoDesafeto’).value, objid(‘id_envolvido’).value, objid(‘idDesafeto’).value, ‘desafeto’);
ajax.SetUri = “peca_envolvido.passo5.relacionaOptions.php”;
ajax.ExecuteObj(‘tp_desafeto’);
}
}

function filhoRelaciona() {
if (objid(‘idFilho’).value == objid(‘id_envolvido’).value) {
alert(“Não é possível o relacionamento do cidadão com ele mesmo”);
objid(‘txtFilho’).value = ”;
objid(‘txtFilho’).focus();
} else {
ajax = new Init_Ajax();
ajax.SetMethod = “POST”;
ajax.objFieldName = Array(‘tp_sexo’, ‘id_cidadao’, ‘id_cid_conhece’, ‘tipo’);
ajax.objValue = Array(objid(‘sexoFilho’).value, objid(‘id_envolvido’).value, objid(‘idFilho’).value, ‘filho’);
ajax.SetUri = “peca_envolvido.passo5.relacionaOptions.php”;
ajax.ExecuteObj(‘tp_filho’);
}
}

function cidadaoCoabita(obj, id_cidadao, id_cid_conhece, mora_junto) {
//alert(‘obj = ‘+obj.id+’, id_cidadao = ‘+id_cidadao+’, id_cid_conhece = ‘+id_cid_conhece);

// se marcar pra coabitar, marca familia checkada, e bloqueia os outros checks, mudar o mora junto pra 1
if (obj.value != ‘Coabita’) {

$(‘#’+obj.id).val(‘Coabita’);
$(‘#moraJunto_’+id_cid_conhece).val(‘1′);

$(“#sem_relacionamento_coabitante input[name=’rc[]’][value=’1′]”).attr(‘checked’,false);
$(“#sem_relacionamento_coabitante input[name=’rc[]’][value=’2′]”).attr(‘checked’,false);
$(“#sem_relacionamento_coabitante input[name=’rc[]’][value=’3′]”).attr(‘checked’,false);
$(“#sem_relacionamento_coabitante input[name=’rc[]’][value=’4′]”).attr(‘checked’,true);

document.getElementById(‘coabitador’).style.display=’block’;
document.getElementById(‘convivio_harmonioso’).style.display=’block’;
pregressa_moraJunto();

$(“#sem_relacionamento_coabitante”).attr(‘disabled’,true);
} else {// se marcar pra não coabitar, verifica se tem outros coabitantes, senão marca sozinho.

$(‘#’+obj.id).val(‘Não Coabita’);
$(‘#moraJunto_’+id_cid_conhece).val(‘0′);

if (verifica_coabitantes() == 0) {
$(“#sem_relacionamento_coabitante input[name=’rc[]’][value=’4′]”).attr(‘checked’,false);
$(“#sem_relacionamento_coabitante input[name=’rc[]’][value=’2′]”).attr(‘checked’,false);
$(“#sem_relacionamento_coabitante input[name=’rc[]’][value=’3′]”).attr(‘checked’,false);
$(“#sem_relacionamento_coabitante input[name=’rc[]’][value=’1′]”).attr(‘checked’,true);

document.getElementById(‘coabitador’).style.display=’none’;
document.getElementById(‘convivio_harmonioso’).style.display=’none’;
pregressa_sozinho();

$(“#sem_relacionamento_coabitante”).attr(‘disabled’,false);
}
}
}

function __cidadaoCoabita(obj) {
objid(‘coabitante’).innerHTML = obj.responseText;
if (document.getElementById(‘sem_relacionamento_coabitante’)) {
document.getElementById(‘convivio_harmonioso’).style.display=’none’;
} else {
document.getElementById(‘convivio_harmonioso’).style.display=’block’;
}
objid(‘idCoabita’).value = ”;
objid(‘txtCoabita’).value = ”;
objid(‘tp_coabita’).innerHTML = ”;

var resultado = obj.responseText;
comeco = resultado.indexOf(““);
if (comeco != fim) {
cidadaoFilho(resultado.substring(comeco+11,fim));
}
}

function cidadaoFilho(id_cidadao) {
ajax = new Init_Ajax();
ajax.SetMethod = “POST”;
ajax.objFieldName = Array(“”, “id_cidadao”);
ajax.objValue = Array(“”, id_cidadao);
ajax.SetUri = “peca_envolvido.passo5.filhos.php”;
ajax.Execute(‘__cidadaoFilho’);
}

function __cidadaoFilho(obj) {
objid(‘filhos’).innerHTML = obj.responseText;
}

function cidadaoDesafeto(id_cidadao, id_cid_conhece) {
ajax = new Init_Ajax();
ajax.SetMethod = “POST”;
ajax.objFieldName = Array(“id_cid_conhece”, “id_cidadao”);
ajax.objValue = Array(id_cid_conhece, id_cidadao);
ajax.SetUri = “peca_envolvido.passo5.desafeto.php”;
ajax.Execute(‘__cidadaoDesafeto’);
}

function __cidadaoDesafeto(obj) {
var o = obj.responseText;
objid(‘grupo_desafeto’).innerHTML = o;
objid(‘idDesafeto’).value = ”;
objid(‘txtDesafeto’).value = ”;
objid(‘tp_desafeto’).innerHTML = ”;
}

function atualizarEscolaridade(id_cidadao, valor) {

if(valor == ”)
valor = null;

ajax = new Init_Ajax();
ajax.SetMethod = “POST”;
ajax.objFieldName = Array(“id_cidadao”, “id_escolaridade”);
ajax.objValue = Array(id_cidadao, valor);
ajax.SetUri = “peca_envolvido.passo5.escolaridade.php”;
ajax.ExecuteObj(”);
}

function eliminaZerosEsq(campo) {
var valor = campo.value;
var tamanho = valor.length;
var flag = 0;
for (indice = 1;indice0) {
flag = indice;
}
}
campo.value = valor.substr(flag-1,tamanho);
}

function pregressa_sozinho() {
$(‘[id^=divCoab_]’).css(‘display’,’none’);
document.getElementById(‘mora_sozinho’).value = ‘1’;
}

function pregressa_moraJunto() {
$(‘[id^=divCoab_]’).css(‘display’,’block’);
document.getElementById(‘mora_sozinho’).value = ‘0’;
}

function remove_filho_pregressa(id_filho) {

var auxReplace;

$(‘#tpFilho_’+id_filho).remove();
$(‘#moraJunto_’+id_filho).remove();
$(‘#filho_’+id_filho).remove();

auxReplace = $(‘#id_filhos_total’).val();
$(‘#id_filhos_total’).val(auxReplace.replace(id_filho+’;’,”));

$(‘#txtTp_’+id_filho+’ option’).each(function() {
if ($(this).val() == ”) {
$(this).attr(‘selected’,true);
}
});

if (verifica_coabitantes() == 0) {
$(“#sem_relacionamento_coabitante”).attr(‘disabled’,false);
}
}

function remove_coabita_pregressa(id_coabita) {

var auxReplace,auxReplace_ids;

$(‘#tpRelaciona_’+id_coabita).remove();
$(‘#moraJunto_’+id_coabita).remove();
$(‘#divCoab_’+id_coabita).remove();

auxReplace = $(‘#id_coabita_total’).val();

$(‘#id_coabita_total’).val(auxReplace.replace(id_coabita+’;’,”));

$(‘#txtTp_’+id_coabita+’ option’).each(function() {
if ($(this).val() == ”) {
$(this).attr(‘selected’,true);
}
});

if (verifica_coabitantes() == 0) {
$(“#sem_relacionamento_coabitante”).attr(‘disabled’,false);
}

}

function verifica_coabitantes() {
var $resposta = 1,arr;

if ($(‘#id_coabita_total’).val() == ”) {
arr = $(‘#id_filhos_total’).val().split(‘;’);
$resposta = 0;

jQuery.each(arr, function() {
if ( $(“#filhoCoab_”+this).val() == ‘Coabita’ ) {
$resposta = 1;
return $resposta;
}
});
}

return $resposta;
}

function confirmarAssinatura(id_bo,id_peca,id_peca_impressao,id_logado,escrivao,delegado) {
if (confirm(‘Deseja assinar essa peça?’)) {
window.open(‘peca_assinatura.php?id_bo=’+id_bo+’&id_peca=’+id_peca+’&id_peca_impressao=’+id_peca_impressao+
‘&id_logado=’+id_logado+’&situacao_assinatura=0’+
‘&vemDoBo=1&delegado=’+delegado+’&escrivao=’+escrivao+’&flag_assinatura=1’);
} else {
alert(‘Não assinada então’);
}
}

function excluirMovimentacao(id_procedimento_movimentacao) {
atualiza_camada_post(‘ocorrencia_consulta.movimentacao.excluir.php’, ‘id_procedimento_movimentacao=’+id_procedimento_movimentacao, ‘div_janela’);
}

function voltarMovimentacao(id_procedimento_movimentacao) {
atualiza_camada_post(‘ocorrencia_consulta.movimentacao.excluir.php’, ‘id_procedimento_movimentacao=’+id_procedimento_movimentacao+’&justificativaMovimentacao=’+$(“#justificativaMovimentacao”).val(), ‘div_janela’);
}

function confirmarExcluirMovimentacao(id_procedimento_movimentacao, passo) {
switch(passo) {
case 1:
if (!$(“#justificativaMovimentacao”).val()) {
alert(‘É necessário informar a justificativa para excluir a movimentação.’);
return false;
}
atualiza_camada_post(‘ocorrencia_consulta.movimentacao.excluir.php’, ‘id_procedimento_movimentacao=’+id_procedimento_movimentacao+’&justificativaMovimentacao=’+$(“#justificativaMovimentacao”).val()+’&confirmarExclusao=1’, ‘div_janela’);
break;
case 2:
if (confirm(“ESTA OPERAÇÃO É IRREVERSÍVEL!\nVocê tem certeza de que deseja excluir esta movimentação?”)) {
atualiza_camada_post(‘ocorrencia_consulta.movimentacao.excluir.php’, ‘id_procedimento_movimentacao=’+id_procedimento_movimentacao+’&justificativaMovimentacao=’+$(“#justificativaMovimentacao”).val()+’&confirmarExclusao=2’, ‘div_janela’);
}
break;
}
}

//Mantém a sessão ativa enquanto o formulário estiver aberto.
function checaSessao() {
$.ajax({
url: ‘http://www.sigo.ms.gov.br:80/checaSessao.php’,
global: true,
type: “POST”,
data: {matr_func:’2064871′},
dataType: “json”,
async:true,
success: function(ret) {
if (ret[‘ok’] != 1) {
alert(‘Atenção!\nSua sessão foi encerrada.’);
}
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
alert(‘Ocorreu um erro ao se comunicar com o servidor SIGO.\nVerifique suas condições de rede.’);
}
});
}
var intervalSessao = setInterval(checaSessao, (5*60*1000));

// ]]>

Últimas notícias

  • Polícia Militar, com o apoio da PRF, apreende mais de 5 toneladas de maconha na BR-158, em Paranaíba
  • Polícia Militar recupera moto furtada moto em Coxim
  • Polícia Militar em Três Lagoas realiza prisão de indivíduo por direção perigosa e dirigir sob efeito de álcool
  • Força Tática do 13º BPM apreende mais de meio quilo de substância análoga à cocaína em Paranaíba
  • Polícia Militar em Brasilândia apreende contrabando de cigarros no interior de veículos

cOMANDO GERAL DA POLÍCIA MILITAR MS
  • Fone: (67) 3318-4405
  • Avenida Desembargador Leão Neto do Carmo, 1203
  • Jardim Veraneiro
  • Campo Grande - MS
  • CEP 79037-100
  • CNPJ: 03.219.233/0001-78
OUTROS ORGÃOS
  • Governo do Estado
  • Sejusp
  • Polícia Civil
  • Corpo de Bombeiros Militar
  • Polícia Federal
  • Polícia Rodoviária Federal
MÍDIAS SOCIAIS
  • YouTube
  • Facebook
  • Instagram
LGPD
Fala Servidor
Acessibilidade
Comando Geral da Polícia Militar de Mato Grosso do Sul

Telefone: (67) 3318-4405
Avenida Desembargador Leão Neto do Carmo, 1203
Jardim Veraneio
Campo Grande | MS
CEP 79037-100

SETDIG | Secretaria-Executiva de Transformação Digital