var id_documento = ''; var style = 'styles/padrao/'; var cDtSistema = 'Data do Sistema'; var path_customizacao = ''; if (navigator.family == 'ie3' || navigator.family == 'ie4') var navIE = true; else var navIE = false; function heightTela() { $('div#conteudo').height(''); if ($('div#total').outerHeight(true) < $(window).height()) { var height = $(window).height() - $('div#total').outerHeight(true); height += $('div#conteudo').outerHeight(true) - 20; $('div#conteudo').height(height); } } function onLoad() { if ($.isFunction(self.onLoadPag)) onLoadPag(); if ($('div#total').length == 0) { var height = 420; var width = 420; } else { heightTela(); var height = $('div#conteudo').outerHeight(true); var width = $('div#conteudo').width() - 5; } if (tela_login == 'S') return; var prefixo = ''; var menu = ''; var obj = ''; var p = location.search p = p.substr(1, p.length); p = p.split('&'); for (var i = 0; i < p.length; i++) { x = p[i].split('='); switch (x[0]) { case 'prefixo': prefixo = x[1]; break; case 'menu': menu = x[1]; break; case 'obj': obj = x[1]; break; } } if (menu == '') menu = 'menu'; if (prefixo == '') prefixo = 'inc'; if (prefixo == 'cadastro' && menu == 'campo') { $('td#vl1_validade_desc').attr('class', 'Tit_Campo_Obr'); if (document.getElementById('tipo_dado') != null) { if (document.getElementById('sts_validade').value == '') { document.getElementById('sts_validade').value = 'N'; } cmbTido_Dado(document.getElementById('tipo_dado'), false); } } else if (menu == 'menu') { var mAcao = document.getElementById('mAcao'); var mRelatorio = document.getElementById('mRelatorio'); var mCadastro = document.getElementById('mCadastro'); var mConfig = document.getElementById('mConfig'); if (mAcao != null && mRelatorio != null) if (mAcao.offsetHeight > mRelatorio.offsetHeight) mRelatorio.style.height = mAcao.offsetHeight + 'px'; else mAcao.style.height = mRelatorio.offsetHeight + 'px'; if (mCadastro != null && mConfig != null) if (mCadastro.offsetHeight > mConfig.offsetHeight) mConfig.style.height = mCadastro.offsetHeight + 'px'; else mCadastro.style.height = mConfig.offsetHeight + 'px'; if (style != 'styles/oas/') { if(NiftyCheck()) { Rounded("div#bAcao","all","transparent","#D1D6E7","border #D1D6E7"); Rounded("div#bRelatorio","all","transparent","#D1D6E7","border #D1D6E7"); Rounded("div#bCadastro","all","transparent","#D1D6E7","border #D1D6E7"); Rounded("div#bConfig","all","transparent","#D1D6E7","border #D1D6E7"); } } heightTela(); } else if (prefixo == 'ver' && menu == 'pesquisa') { height -= 62; if (document.getElementById('BarraInf') != null) { height -= document.getElementById('BarraInf').offsetHeight + 5; } document.getElementById('Treeview').style.height = height + 'px'; document.getElementById('Ajuste').style.height = height + 'px'; document.getElementById('ifrmArq').style.height = (height - (navIE ? 0 : 0)) + 'px'; document.getElementById('Treeview').style.width = '300px'; document.getElementById('Ajuste').style.width = '5px'; document.getElementById('ifrmArq').style.width = width - 310 + 'px'; document.getElementById('dfrm').style.height = document.getElementById('ifrmArq').style.height; document.getElementById('dfrm').style.width = document.getElementById('ifrmArq').style.width; document.getElementById('dfrm').style.top = getPosicaoElemento("ifrmArq").top; document.getElementById('dfrm').style.left = getPosicaoElemento("ifrmArq").left; var BarraLink = 0; if (document.getElementById('BarraLink') != null) BarraLink = document.getElementById('BarraLink').offsetHeight; document.getElementById('codTreeview').style.height = height - BarraLink + 'px'; } else if (prefixo == 'ver' && menu == 'wf_monitor') { height -= 10; if (document.getElementById('BarraInf') != null) { height -= document.getElementById('BarraInf').offsetHeight + 5; } if (document.getElementById('ifrmWF') != null) { document.getElementById('ifrmWF').style.height = (height - (navIE ? 0 : 0)) + 'px'; document.getElementById('ifrmWF').style.width = width - 0 + 'px'; } } else if (prefixo == 'inc' && menu == 'pesquisa_txt') { if (document.getElementById('Treeview') != null) { height -= 110; if (document.getElementById('BarraInf') != null) height -= document.getElementById('BarraInf').offsetHeight + 5; document.getElementById('Treeview').style.height = height + 'px'; document.getElementById('Ajuste').style.height = height + 'px'; document.getElementById('ifrmArq').style.height = (height - (navIE ? 0 : 0)) + 'px'; document.getElementById('Treeview').style.width = '300px'; document.getElementById('Ajuste').style.width = '5px'; document.getElementById('ifrmArq').style.width = width - 310 + 'px'; document.getElementById('dfrm').style.height = document.getElementById('ifrmArq').style.height; document.getElementById('dfrm').style.width = document.getElementById('ifrmArq').style.width; document.getElementById('dfrm').style.top = getPosicaoElemento("ifrmArq").top; document.getElementById('dfrm').style.left = getPosicaoElemento("ifrmArq").left; var BarraLink = 0; if (document.getElementById('BarraLink') != null) BarraLink = document.getElementById('BarraLink').offsetHeight; document.getElementById('codTreeview').style.height = height - BarraLink + 'px'; } } else if (prefixo == 'inc' && menu == 'pesquisa') { height -= 35; $('div#conteudo').height(height); if (document.getElementById('BarraInf') != null) height -= document.getElementById('BarraInf').offsetHeight + 5; document.getElementById('Treeview').style.height = height + 'px'; document.getElementById('Ajuste').style.height = height + 'px'; document.getElementById('ifrmArq').style.height = (height - (navIE ? 0 : 0)) + 'px'; document.getElementById('Treeview').style.width = '300px'; document.getElementById('Ajuste').style.width = '5px'; document.getElementById('ifrmArq').style.width = width - 310 + 'px'; document.getElementById('dfrm').style.height = document.getElementById('ifrmArq').style.height; document.getElementById('dfrm').style.width = document.getElementById('ifrmArq').style.width; document.getElementById('dfrm').style.top = getPosicaoElemento("ifrmArq").top; document.getElementById('dfrm').style.left = getPosicaoElemento("ifrmArq").left; if (id_documento != '') openFolderInTree('L' + id_documento); } else if (prefixo == 'cadastro' && menu == 'usuario') { usua_id_perfil(); } else if (prefixo == 'cadastro' && menu == 'restricao_valor') { $('#sinal').change(function () { var col = '#' + $('#coluna').val() + '_'; if ($(this).val() == 'is null' || $(this).val() == 'is not null') { $(col + 'desc, ' + col + 'obj').css('display', 'none'); } else { $(col + 'desc, ' + col + 'obj').css('display', 'block'); } }); $('#sinal').change(); } else if (prefixo == 'cadastro' && menu == 'documento') { $("#mod_id_setor").cascade("#mod_id_cliente", {ajax: {url: 'ajax.php?tipo=setor_cliente'}}); $("#mod_id_documento").cascade("#mod_id_setor", {ajax: {url: 'ajax.php?tipo=documento_setor'}}); } else if (prefixo == 'inc' && menu == 'importacao') { height -= 150; if (document.getElementById('tabDados') != null) { document.getElementById('tabDados').style.height = height + 'px'; document.getElementById('tabDados').style.overflow = 'auto'; } } else if (prefixo == 'cadastro' && menu == 'multivalor') { if (obj == 'T') { $(":submit").click(function () { $("#btn").val(''); }); $(":submit").before("     "); $("#selecionar").click(function () { var id = $('table.Perfil input:radio:checked').val(); if (id == undefined) { alert('Favor selecionar uma linha abaixo!'); } else { obr_msg = false; $(":submit").click(); obr_msg = true; } return false; }); } } else if ((prefixo == 'det' && menu == 'registro') || (prefixo == 'det' && menu == 'oas_nota_fiscal') || (prefixo == 'inc' && menu == 'wf_iniciar_processo')) { var tela = document.documentElement; var ifrmMostra = document.getElementById('ifrmMostra'); if (ifrmMostra != undefined) { ifrmMostra.style.height = tela.clientHeight + 'px'; ifrmMostra.style.width = tela.clientWidth + 'px'; document.getElementById('ifrmRegsitro').style.height = (height - 60) + 'px'; } } else if (prefixo == 'cadastro' && menu == 'campo_padrao') { $("#dt_dia").click(function () { campo = $("#valor"); if ($(this).attr('checked')) { campo.attr("disabled", "true"); campo.addClass("campo_disabled"); campo.val(''); } else { campo.attr("disabled", ""); campo.removeClass("campo_disabled"); } }); if ($('#valor').val() == $('#dt_dia').val()) { campo = $("#valor"); campo.attr("disabled", "true"); campo.addClass("campo_disabled"); campo.val(''); $("#dt_dia").attr('checked', true); } } } function cmbTido_Dado(valor, muda) { var tamanho = document.getElementById('tamanho'); var tamanho_desc = document.getElementById('tamanho_desc'); var tamanho_obj = document.getElementById('tamanho_obj'); var linhas = document.getElementById('linhas'); var linhas_desc = document.getElementById('linhas_desc'); var linhas_obj = document.getElementById('linhas_obj'); var js_onkeyup = document.getElementById('js_onkeyup'); var js_onkeyup_desc = document.getElementById('js_onkeyup_desc'); var js_onkeyup_obj = document.getElementById('js_onkeyup_obj'); var js_onblur = document.getElementById('js_onblur'); var js_onblur_desc = document.getElementById('js_onblur_desc'); var js_onblur_obj = document.getElementById('js_onblur_obj'); var pesq_intervalo = document.getElementById('pesq_intervalo'); var pesq_intervalo_desc = document.getElementById('pesq_intervalo_desc'); var pesq_intervalo_obj = document.getElementById('pesq_intervalo_obj'); var grupo_reg = document.getElementById('grupo_reg'); var grupo_reg_desc = document.getElementById('grupo_reg_desc'); var grupo_reg_obj = document.getElementById('grupo_reg_obj'); var sts_validade = document.getElementById('sts_validade'); var sts_validade_desc = document.getElementById('sts_validade_desc'); var sts_validade_obj = document.getElementById('sts_validade_obj'); var sts_multivalor = document.getElementById('sts_multivalor'); var sts_multivalor_desc = document.getElementById('sts_multivalor_desc'); var sts_multivalor_obj = document.getElementById('sts_multivalor_obj'); var alt_multivalor = document.getElementById('alt_multivalor'); var alt_multivalor_desc = document.getElementById('alt_multivalor_desc'); var alt_multivalor_obj = document.getElementById('alt_multivalor_obj'); var tot_multivalor = document.getElementById('tot_multivalor'); var tot_multivalor_desc = document.getElementById('tot_multivalor_desc'); var tot_multivalor_obj = document.getElementById('tot_multivalor_obj'); var inc_multivalor = document.getElementById('inc_multivalor'); var inc_multivalor_desc = document.getElementById('inc_multivalor_desc'); var inc_multivalor_obj = document.getElementById('inc_multivalor_obj'); var id_campo_pai = document.getElementById('id_campo_pai'); var id_campo_pai_desc = document.getElementById('id_campo_pai_desc'); var id_campo_pai_obj = document.getElementById('id_campo_pai_obj'); var sts_gerencial = document.getElementById('sts_gerencial'); var sts_gerencial_desc = document.getElementById('sts_gerencial_desc'); var sts_gerencial_obj = document.getElementById('sts_gerencial_obj'); var tipo_usuario = document.getElementById('tipo_usuario'); var tipo_usuario_desc = document.getElementById('tipo_usuario_desc'); var tipo_usuario_obj = document.getElementById('tipo_usuario_obj'); tamanho_obj.style.visibility = "hidden"; linhas_obj.style.visibility = "hidden"; js_onkeyup_obj.style.visibility = "visible"; pesq_intervalo_obj.style.visibility = "hidden"; grupo_reg_obj.style.visibility = "visible"; sts_validade_obj.style.visibility = "hidden"; sts_multivalor_obj.style.visibility = "visible"; inc_multivalor_obj.style.visibility = "hidden"; id_campo_pai_obj.style.visibility = "hidden"; sts_gerencial_obj.style.visibility = "visible"; tipo_usuario_obj.style.visibility = "hidden"; if (muda) { pesq_intervalo.value = 'N'; sts_validade.value = 'N'; tipo_usuario.value = ''; inc_multivalor.value = 'N'; } switch (valor.value) { case 'Texto': tamanho_obj.style.visibility = "visible"; linhas.value = '1'; break; case 'Numero': case 'Decimal': pesq_intervalo_obj.style.visibility = "visible"; tamanho_obj.style.visibility = "visible"; linhas.value = '1'; break; case 'Data': case cDtSistema: tamanho.value = '10'; linhas.value = '1'; js_onkeyup_obj.style.visibility = "hidden"; pesq_intervalo_obj.style.visibility = "visible"; if (muda) pesq_intervalo.value = 'S'; sts_validade_obj.style.visibility = "visible"; if ($('#campo_interno').val() != 'N') { sts_gerencial.value = 'N'; sts_gerencial_obj.style.visibility = "hidden"; } break; case 'Escopo': tamanho_obj.style.visibility = "visible"; linhas.value = '1'; js_onkeyup_obj.style.visibility = "hidden"; sts_multivalor_obj.style.visibility = "hidden"; sts_multivalor.value = 'C'; break; case 'Escopo Usuário': tamanho.value = '50'; linhas.value = '1'; js_onkeyup_obj.style.visibility = "hidden"; sts_multivalor_obj.style.visibility = "hidden"; sts_multivalor.value = 'C'; tipo_usuario_obj.style.visibility = "visible"; break; case 'Memorando': tamanho_obj.style.visibility = "visible"; linhas_obj.style.visibility = "visible"; js_onkeyup_obj.style.visibility = "hidden"; grupo_reg.value = 'N'; grupo_reg_obj.style.visibility = "hidden"; break; } switch (sts_multivalor.value) { case 'N': tot_multivalor_obj.style.visibility = "hidden"; tot_multivalor.value = ''; alt_multivalor_obj.style.visibility = "hidden"; alt_multivalor.value = 'N'; break; case 'T': grupo_reg_obj.style.visibility = "hidden"; grupo_reg.value = 'N'; pesq_intervalo_obj.style.visibility = "hidden"; pesq_intervalo.value = 'N'; sts_validade_obj.style.visibility = "hidden"; sts_validade.value = 'N'; tot_multivalor_obj.style.visibility = "visible"; alt_multivalor_obj.style.visibility = "visible"; break; case 'C': js_onkeyup_obj.style.visibility = "hidden"; pesq_intervalo_obj.style.visibility = "hidden"; pesq_intervalo.value = 'N'; sts_validade_obj.style.visibility = "hidden"; sts_validade.value = 'N'; alt_multivalor_obj.style.visibility = "visible"; inc_multivalor_obj.style.visibility = "visible"; if (valor.value == 'Escopo') { tot_multivalor_obj.style.visibility = "hidden"; tot_multivalor.value = '1'; grupo_reg_obj.style.visibility = "visible"; } else if (valor.value == 'Escopo Usuário') { alt_multivalor_obj.style.visibility = "hidden"; alt_multivalor.value = 'N'; inc_multivalor_obj.style.visibility = "hidden"; inc_multivalor.value = 'N'; tot_multivalor_obj.style.visibility = "hidden"; tot_multivalor.value = '1'; grupo_reg_obj.style.visibility = "visible"; } else { tot_multivalor_obj.style.visibility = "visible"; grupo_reg_obj.style.visibility = "hidden"; grupo_reg.value = 'N'; } break; } if (sts_multivalor.value == 'C') { id_campo_pai_obj.style.visibility = "visible"; } else { id_campo_pai.value = ''; } if (js_onkeyup_obj.style.visibility == "hidden") { js_onkeyup.value = ''; js_onblur.value = ''; } if (sts_multivalor.value != 'N') { if (valor.value != 'Numero' && valor.value != 'Decimal' && valor.value != 'Data' && valor.value != cDtSistema) { if (tamanho.value > 255) { alert('O tamanho do não pode ser maior que 255!'); tamanho.value = 255; } } } tamanho_desc.style.visibility = tamanho_obj.style.visibility; linhas_desc.style.visibility = linhas_obj.style.visibility; js_onblur_obj.style.visibility = js_onkeyup_obj.style.visibility; js_onkeyup_desc.style.visibility = js_onkeyup_obj.style.visibility; js_onblur_desc.style.visibility = js_onkeyup_desc.style.visibility; pesq_intervalo_desc.style.visibility = pesq_intervalo_obj.style.visibility; grupo_reg_desc.style.visibility = grupo_reg_obj.style.visibility; sts_validade_desc.style.visibility = sts_validade_obj.style.visibility; cmbSTS_Validade(sts_validade, muda); sts_multivalor_desc.style.visibility = sts_multivalor_obj.style.visibility; tot_multivalor_desc.style.visibility = tot_multivalor_obj.style.visibility; alt_multivalor_desc.style.visibility = alt_multivalor_obj.style.visibility; inc_multivalor_desc.style.visibility = inc_multivalor_obj.style.visibility; id_campo_pai_desc.style.visibility = id_campo_pai_obj.style.visibility; sts_gerencial_desc.style.visibility = sts_gerencial_obj.style.visibility tipo_usuario_desc.style.visibility = tipo_usuario_obj.style.visibility } function cmbSTS_Validade(valor, muda) { var vl1_validade = document.getElementById('vl1_validade'); var vl1_validade_desc = document.getElementById('vl1_validade_desc'); var vl1_validade_obj = document.getElementById('vl1_validade_obj'); var vl2_validade = document.getElementById('vl2_validade'); var vl2_validade_desc = document.getElementById('vl2_validade_desc'); var vl2_validade_obj = document.getElementById('vl2_validade_obj'); var usuario = document.getElementById('usuario'); var campo_usuario = document.getElementById('campo_usuario'); var id_usuario_desc = document.getElementById('id_usuario_desc'); var id_usuario_obj = document.getElementById('id_usuario_obj'); if (muda) { vl1_validade.value = ''; vl2_validade.value = ''; for (i = 0; i < campo_usuario.length; i++) { campo_usuario.options[i].selected = true; } exclui(usuario, campo_usuario); } if (valor.style.visibility == "hidden") vl1_validade.style.visibility = "hidden"; else if (valor.value == 'N') vl1_validade.style.visibility = "hidden"; else vl1_validade.style.visibility = "visible"; vl1_validade_desc.style.visibility = vl1_validade.style.visibility; vl1_validade_obj.style.visibility = vl1_validade.style.visibility; vl2_validade.style.visibility = vl1_validade.style.visibility; vl2_validade_desc.style.visibility = vl1_validade.style.visibility; vl2_validade_obj.style.visibility = vl1_validade.style.visibility; id_usuario_desc.style.visibility = vl1_validade.style.visibility; id_usuario_obj.style.visibility = vl1_validade.style.visibility; } function perfil() { var OK = false; var id_difu = document.frm.id_difu; if (valida == 'S') { for (l = 1; (l <= lin.length - 1) && !OK; l++) { for (c = 1; c <= col.length - 1; c++) { if (val[l][c][1] == 'S') { OK = true; break; } } } } else { OK = true; } if (OK) { id_difu.value = ''; for (l = 1; l <= lin.length - 1; l++) { for (c = 1; c <= col.length - 1; c++) { if (val[l][c][1] == 'S') { id_difu.value += val[l][c][0] + ','; } } } id_difu.value = id_difu.value.substr(0, id_difu.value.length - 1); return true; } else { alert("Favor informar os Direitos do Perfil!"); return false; } } function campo(criado) { if (criado == 'S' && valida == 'N') { alert('Não pode excluir o registro deste campo, pois a tabela de índice já foi criada!'); return false; } if ($('#campo_interno').val() != 'N' && valida == 'N') { alert('Não pode excluir o registro deste campo, pois é um campo interno do documento!'); return false; } if (document.frm.sts_validade.value == 'S' && valida == 'S') { if (document.frm.vl1_validade.value == '') { var txt = $('td#vl1_validade_desc').text(); txt = txt.substr(0, txt.length - 1); alert('Favor preencher o campo: ' + txt); if (document.frm.vl1_validade.type != 'hidden') document.frm.vl1_validade.focus(); return false; } } //Verifica se o campo tem Registro Multivalorado associado a este Campo de Filtro var retorno = $.ajax({ url: "ajax.php?tipo=campo_filtro&id=" + $('#id').val() + "&id_campo_pai=" + $('#id_campo_pai').val(), async: false }).responseText; if (retorno > 0) { if (!confirm('Este campo tem Registro Multivalorado associado a este Campo de Filtro!\nSe continuar com a operação esta associação vai ser desfeita.\n\nDeseja continuar com a operação?')) { return false; } } if (criado != 'S' && $('#campo_interno').val() == 'N') { if ($('#sts_multivalor').val() != 'N') { switch ($('#tipo_dado').val()) { case 'Numero': var col = 'numero'; break; case 'Decimal': var col = 'decimal'; break; case 'Data': var col = 'data'; break; default: var col = 'texto'; break; } document.frm.campo_tabela.value = col; } else { document.frm.campo_tabela.value = troca_caracter(document.frm.nome_campo.value); } } return true; } function storage_caminho(obj) { AjaxUtil.exec('', 'GET', 'ajax.php?tipo=storage&path=' + obj.value, function(str) { str = url_decode(str); if (str == 'erro') { alert('Favor informar um Local Físico válido!'); obj.value = ''; obj.focus(); } else { var ifrm = document.getElementById('ifrm'); var doc = ifrm.contentDocument; if (doc == undefined || doc == null) doc = ifrm.contentWindow.document; doc.open(); doc.write(str); doc.close(); } } ); return false; } function usua_id_perfil() { var frm = document.getElementById('frm'); var ifrm = document.getElementById('ifrm'); if (frm == null) return false; var target = frm.target; var action = frm.action; frm.target = 'ifrm'; frm.action = 'ajax.php?tipo=usuario'; frm.submit(); frm.target = target; frm.action = action; return false; } function midia() { alert('Se continuar com a operação de exclusão da mídia o "LOG de Pesquisa" e\nos "Comentários" correspondentes aos arquivos desta mídia vão ser apagados!'); return true; } function usuario() { $('td#direito_obj :checkbox').each(function () { $(this).attr('checked', !$(this).attr('checked')); }); return true; } function usuario_cmbDoc() { $('div#contTab table').css('display', 'none'); $('div#contTab div').css('display', 'none'); $('table#tabPerfil' + $('select#cmbDoc').val()).css('display', 'block'); $('div#tabRestricao' + $('select#cmbDoc').val()).css('display', 'block'); $('div#tabRestricao' + $('select#cmbDoc').val() + ' table').css('display', 'block'); $('div#divRestricao' + $('select#cmbDoc').val()).css('display', 'block'); } function func_campo_padrao() { if (valida == 'S' && $('select#multivalor').html() != null) { if ($('select#multivalor option:selected').length == 0) { alert('Favor selecionar algum registro no campo: Valor'); return false; } if ($('select#multivalor').attr('tot') != '' && $('select#multivalor option:selected').length > $('select#multivalor').attr('tot')) { alert('Favor selecionar até ' + $('select#multivalor').attr('tot') + ' registro no campo Valor'); return false; } var mv = new Array(); $("select#multivalor option:selected").each(function () { mv[mv.length] = $(this).val(); }); $('input#valor').val(mv.join(",")); } return true; } function restricao_valor_dep() { if (valida == 'S' && $('select#multivalor').html() != null) { if ($('select#multivalor option:selected').length == 0) { alert('Favor selecionar algum registro no campo: Valor'); return false; } if ($('select#multivalor').attr('tot') != '' && $('select#multivalor option:selected').length > $('select#multivalor').attr('tot')) { alert('Favor selecionar até ' + $('select#multivalor').attr('tot') + ' registro no campo Valor'); return false; } var mv = new Array(); $("select#multivalor option:selected").each(function () { mv[mv.length] = $(this).val(); }); $('input#texto').val(mv.join(",")); } return true; } function restricao_valor_ant() { var sinal = $('#sinal').val(); if (sinal == 'is null' || sinal == 'is not null') { $('#' + $('#coluna').val()).val(sinal); } return true; } function restricao_valor_con() { var sinal = $('#sinal').val(); if (sinal == 'is null' || sinal == 'is not null') { $('#' + $('#coluna').val()).attr('name', 'texto'); $('#coluna').val('texto'); } return true; } function open_restricao_valor(cmb, id, id_documento, id_campo, id_usuario) { var url = "conteudo_popup.php?menu=restricao_valor&prefixo=cadastro"; url += "&id=" + id; url += "&id_documento=" + id_documento; url += "&id_campo=" + id_campo; url += "&id_usuario=" + id_usuario; if (cmb) { url += "&row=N"; parent.showPopWin(url, "Restrição por valor", 710, 250, parent.close_restricao_valor); } else { url += "&row=S"; showPopWin(url, "Restrição por valor", 710, 250, close_restricao_valor); } return false; } function close_restricao_valor(returnVal) { if (parent.ifrm == undefined) parent.conteudo.ifrm.location = 'ajax.php?tipo=restricao_valor&id_documento=' + returnVal[0] + '&id_usuario=' + returnVal[1]; else parent.ifrm.location = 'ajax.php?tipo=restricao_valor&id_documento=' + returnVal[0] + '&id_usuario=' + returnVal[1]; } function abre_ajuda(prefixo, menu) { var url = 'conteudo_ajuda.php?prefixo=' + prefixo + '&menu=' + menu; var L = (screen.width - 782) / 2; var T = (screen.height - 550) / 2; OpenWin(url, 'ajuda', 782, 550, T, L); return false; } function multivalor_ant() { if (valida == 'S') { if ($(":text").val() == '') { alert('Favor preencher o campo: Valor'); $(":text").focus(); return false; } } return true; } function multivalor_dep() { if (!obr_msg) { var id = $('table.Perfil input:radio:checked').val(); $(":text").val($("td#" + id).text()); } return true; } function wf_etapa_ant() { if ($('#tipo').val() != 'N' && valida == 'N') { alert('Não pode excluir esta etapa, pois ela é obrigatoria no processo!'); return false; } return true; } function abre_wf_monitor() { var url = 'conteudo_wf.php?prefixo=inc&menu=wf_monitor'; var L = 10; var T = 10; var W = screen.width - 40; var H = screen.height - 110; OpenWin(url, 'wf_monitor', W, H, T, L, 'yes'); return false; } function open_log_sis(des_pk) { var par = ''; par += '&logsis=s'; par += '&des_pk=' + des_pk; self.location = 'conteudo.php?menu=log_sis&prefixo=inc' + par; } function calendario_ant(AnoLimite) { if ($('#anofim').val() <= AnoLimite) { alert("O ano não pode ser inferior ou igual a " + AnoLimite + "!"); $('#anofim').value = ""; $('#anofim').focus(); return false; } if ($('#anofim').val() > AnoLimite + 5) { alert("O ano não pode ser superior a " + (AnoLimite + 5) + "!"); $('#anofim').value = ""; $('#anofim').focus(); return false; } return true; }