<!--

function ColetaExecutaFluxosPreencherDadosSeExistirCpfOuCnpjRemetente(parent, sys, formID) {
  this.ruleName = 'Coleta - Executa Fluxos Preencher dados se existir cpf ou cnpj Remetente';
  this.functionName = 'ColetaExecutaFluxosPreencherDadosSeExistirCpfOuCnpjRemetente';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

ColetaExecutaFluxosPreencherDadosSeExistirCpfOuCnpjRemetente.prototype = new Rule;

/**
 * Esta função executa a regra "Coleta - Executa Fluxos Preencher dados se existir cpf ou cnpj Remetente"
 * @param param_cpf equivale à variável this.context['param_cpf']<br/>
 * @author master
 * @since 07/08/2009 12:24:39
 */
ColetaExecutaFluxosPreencherDadosSeExistirCpfOuCnpjRemetente.prototype.run = function() {
  document.ruleNameForException = 'Coleta - Executa Fluxos Preencher dados se existir cpf ou cnpj Remetente';
  this.context = new Array();

  // Parâmetros de Entrada
  this.context['param_cpf'] = arguments[0];

  // Variáveis
  this.context['log_verificarCpfCnpj'] = false;


  /**
   * Rastreamento - valideCPFCNPJ
   */
  this.context['log_verificarCpfCnpj'] = new RastreamentoValidecpfcnpj(this, this.getSystem(), this.getForm()).run(this.context['param_cpf'], '{58C3928F-0C85-480C-B5C1-71FA9D0ECE30}', 'col_ie_rg');

  /**
   * (Igual(@log_verificarCpfCnpj,true))?
   */
  if (parseBoolean(isEqual.call(this, this.context['log_verificarCpfCnpj'], true))) {
      
    /**
     * Coleta - Preencher dados se existir cpf ou cnpj Remetente
     */
    executeSyncJavaRule.call(this, this.getSystem(), this.getForm(), 'Coleta - Preencher dados se existir cpf ou cnpj Remetente', this.context['param_cpf']);

    /**
     * Fim
     */
    return null;

  } else {

    /**
     * Alertar Aguardando Ok(CNPJ ou CPF inválido. Verifique!)
     */
    ebfAlertMessage.call(this, 'CNPJ ou CPF inválido. Verifique!');

    /**
     * retornar o foco para o componente CPF_CNPJ
     */
    ebfFormSetFocus.call(this, 'col_cnpjcpf');

    /**
     * Fim
     */
    return null;

  }

}

function runColetaExecutaFluxosPreencherDadosSeExistirCpfOuCnpjRemetente(parent, sys, formID, params) {
  var rule = new ColetaExecutaFluxosPreencherDadosSeExistirCpfOuCnpjRemetente(parent, sys, formID);
  rule.run.apply(rule, params);
}

function Mkr5e0e8fa3Cef3480fBcadEd8bd114feb9(parent, sys, formID) {
  this.ruleName = '__MKR_{5E0E8FA3-CEF3-480F-BCAD-ED8BD114FEB9}';
  this.functionName = 'Mkr5e0e8fa3Cef3480fBcadEd8bd114feb9';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

Mkr5e0e8fa3Cef3480fBcadEd8bd114feb9.prototype = new Rule;

/**
 * Esta função executa a regra "__MKR_{5E0E8FA3-CEF3-480F-BCAD-ED8BD114FEB9}"
 * @author master
 * @since 08/07/2009 12:28:24
 */
Mkr5e0e8fa3Cef3480fBcadEd8bd114feb9.prototype.run = function() {
  document.ruleNameForException = '__MKR_{5E0E8FA3-CEF3-480F-BCAD-ED8BD114FEB9}';
  this.context = new Array();


  /**
   * Fim
   */
  return null;

}

function runMkr5e0e8fa3Cef3480fBcadEd8bd114feb9(parent, sys, formID, params) {
  var rule = new Mkr5e0e8fa3Cef3480fBcadEd8bd114feb9(parent, sys, formID);
  rule.run.apply(rule, params);
}

function ColetaExecutaFluxosPreencherDadosSeExistirCpfOuCnpjDestino(parent, sys, formID) {
  this.ruleName = 'Coleta - Executa Fluxos Preencher dados se existir cpf ou cnpj Destino';
  this.functionName = 'ColetaExecutaFluxosPreencherDadosSeExistirCpfOuCnpjDestino';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

ColetaExecutaFluxosPreencherDadosSeExistirCpfOuCnpjDestino.prototype = new Rule;

/**
 * Esta função executa a regra "Coleta - Executa Fluxos Preencher dados se existir cpf ou cnpj Destino"
 * @param param_cpf_cnpj equivale à variável this.context['param_cpf_cnpj']<br/>
 * @author master
 * @since 24/10/2009 11:55:10
 */
ColetaExecutaFluxosPreencherDadosSeExistirCpfOuCnpjDestino.prototype.run = function() {
  document.ruleNameForException = 'Coleta - Executa Fluxos Preencher dados se existir cpf ou cnpj Destino';
  this.context = new Array();

  // Parâmetros de Entrada
  this.context['param_cpf_cnpj'] = arguments[0];

  // Variáveis
  this.context['log_verificaCpfCnpj'] = false;


  /**
   * (É Nulo(@param_cpf_cnpj))?
   */
  if (parseBoolean(isNull.call(this, this.context['param_cpf_cnpj']))) {
          return null;

  } else {

    /**
     * Coleta - Preencher dados se existir cpf ou cnpj Destino
     */
    executeSyncJavaRule.call(this, this.getSystem(), this.getForm(), 'Coleta - Preencher dados se existir cpf ou cnpj Destino', this.context['param_cpf_cnpj']);

    /**
     * Fim
     */
    return null;

  }

}

function runColetaExecutaFluxosPreencherDadosSeExistirCpfOuCnpjDestino(parent, sys, formID, params) {
  var rule = new ColetaExecutaFluxosPreencherDadosSeExistirCpfOuCnpjDestino(parent, sys, formID);
  rule.run.apply(rule, params);
}

function MkrAbc51ee6D9274fee8992B6887d241ba9(parent, sys, formID) {
  this.ruleName = '__MKR_{ABC51EE6-D927-4FEE-8992-B6887D241BA9}';
  this.functionName = 'MkrAbc51ee6D9274fee8992B6887d241ba9';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

MkrAbc51ee6D9274fee8992B6887d241ba9.prototype = new Rule;

/**
 * Esta função executa a regra "__MKR_{ABC51EE6-D927-4FEE-8992-B6887D241BA9}"
 * @author master
 * @since 18/06/2009 14:40:01
 */
MkrAbc51ee6D9274fee8992B6887d241ba9.prototype.run = function() {
  document.ruleNameForException = '__MKR_{ABC51EE6-D927-4FEE-8992-B6887D241BA9}';
  this.context = new Array();


  /**
   * Alterar Valor do Componente(Cadastro,Nome do Responsável (MakerEdit2),Obter Valor do Componente(Cadastro,Empresa (EDTEMPRESA)))
   */
  ebfFormChangeComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerEdit2', ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'EDTEMPRESA'));

  /**
   * Alterar Valor do Componente(Cadastro,CPF (MakerEdit8),Obter Valor do Componente(Cadastro,CNPJ/CPF (EDTCGCCPF)))
   */
  ebfFormChangeComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerEdit8', ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'EDTCGCCPF'));

  /**
   * Alterar Valor do Componente(Cadastro,Identidade/RG (MakerEdit3),Obter Valor do Componente(Cadastro,Inscrição Estadual (EDTIEST1)))
   */
  ebfFormChangeComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerEdit3', ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'EDTIEST1'));

  /**
   * Fim
   */
  return null;

}

function runMkrAbc51ee6D9274fee8992B6887d241ba9(parent, sys, formID, params) {
  var rule = new MkrAbc51ee6D9274fee8992B6887d241ba9(parent, sys, formID);
  rule.run.apply(rule, params);
}

function Mkr732a3021Dfa848f797dc777b8b456142(parent, sys, formID) {
  this.ruleName = '__MKR_{732A3021-DFA8-48F7-97DC-777B8B456142}';
  this.functionName = 'Mkr732a3021Dfa848f797dc777b8b456142';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

Mkr732a3021Dfa848f797dc777b8b456142.prototype = new Rule;

/**
 * Esta função executa a regra "__MKR_{732A3021-DFA8-48F7-97DC-777B8B456142}"
 * @author master
 * @since 25/07/2009 10:13:52
 */
Mkr732a3021Dfa848f797dc777b8b456142.prototype.run = function() {
  document.ruleNameForException = '__MKR_{732A3021-DFA8-48F7-97DC-777B8B456142}';
  this.context = new Array();


  /**
   * Abrir Formulário numa Moldura(FormularioSkin, (MakerBevel2),Cadastro,true)
   */
  ebfFrameOpenForm.call(this, '{1CA9C3A7-4FAB-4421-9A9A-D98D4B3F6ADE}', 'MakerBevel2', '{8C67FC1B-A241-403E-912A-086087155DD5}', true);

  /**
   * Fim
   */
  return null;

}

function runMkr732a3021Dfa848f797dc777b8b456142(parent, sys, formID, params) {
  var rule = new Mkr732a3021Dfa848f797dc777b8b456142(parent, sys, formID);
  rule.run.apply(rule, params);
}

function ColetaCalcularCubagem(parent, sys, formID) {
  this.ruleName = 'Coleta - Calcular Cubagem';
  this.functionName = 'ColetaCalcularCubagem';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

ColetaCalcularCubagem.prototype = new Rule;

/**
 * Esta função executa a regra "Coleta - Calcular Cubagem"
 * @param param_metragem equivale à variável this.context['param_metragem']<br/>
 * @author master
 * @since 31/07/2009 19:23:58
 */
ColetaCalcularCubagem.prototype.run = function() {
  document.ruleNameForException = 'Coleta - Calcular Cubagem';
  this.context = new Array();

  // Parâmetros de Entrada
  this.context['param_metragem'] = arguments[0];

  // Variáveis
  this.context['total_cubagem'] = '';


  /**
   * Calcular cubagem
   */
  this.context['total_cubagem'] = oprMultiply.call(this, this.context['param_metragem'], parseFloat(300));

  /**
   * Alterar Valor do Componente(Coleta Online,cubagem (col_mer_pesoCubado),@total_cubagem)
   */
  ebfFormChangeComponentValue.call(this, '{58C3928F-0C85-480C-B5C1-71FA9D0ECE30}', 'col_mer_pesoCubado', this.context['total_cubagem']);

  /**
   * Fim
   */
  return null;

}

function runColetaCalcularCubagem(parent, sys, formID, params) {
  var rule = new ColetaCalcularCubagem(parent, sys, formID);
  rule.run.apply(rule, params);
}

function ColetaSetarBuscaPeloRemetente(parent, sys, formID) {
  this.ruleName = 'Coleta - Setar Busca Pelo Remetente';
  this.functionName = 'ColetaSetarBuscaPeloRemetente';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

ColetaSetarBuscaPeloRemetente.prototype = new Rule;

/**
 * Esta função executa a regra "Coleta - Setar Busca Pelo Remetente"
 * @author master
 * @since 14/08/2009 12:40:52
 */
ColetaSetarBuscaPeloRemetente.prototype.run = function() {
  document.ruleNameForException = 'Coleta - Setar Busca Pelo Remetente';
  this.context = new Array();


  /**
   * Rastreamento - Obter clientes referente ao e-mail
   */
  executeSyncJavaRule.call(this, this.getSystem(), this.getForm(), 'Rastreamento - Obter clientes referente ao e-mail');

  /**
   * Setar a Busca como: Sou Remetente
   */
  ebfFormChangeComponentValue.call(this, '{B6E8ED73-861C-4740-8ED5-48E511E5C39A}', 'flg_remetDest', 'R');

  /**
   * Setar a Busca como: Sou Remetente
   */
  ebfFormChangeComponentValue.call(this, '{B6E8ED73-861C-4740-8ED5-48E511E5C39A}', 'status', 'P');

  /**
   * Fim
   */
  return null;

}

function runColetaSetarBuscaPeloRemetente(parent, sys, formID, params) {
  var rule = new ColetaSetarBuscaPeloRemetente(parent, sys, formID);
  rule.run.apply(rule, params);
}

function RastreamentoValidecpfcnpj(parent, sys, formID) {
  this.ruleName = 'Rastreamento - valideCPFCNPJ';
  this.functionName = 'RastreamentoValidecpfcnpj';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

RastreamentoValidecpfcnpj.prototype = new Rule;

/**
 * Esta função executa a regra "Rastreamento - valideCPFCNPJ"
 * @param param_cpf_cnpj equivale à variável this.context['param_cpf_cnpj']<br/>
 * @param param_form equivale à variável this.context['param_form']<br/>
 * @param param_componente equivale à variável this.context['param_componente']<br/>
 * @author master
 * @since 16/10/2009 13:05:36
 */
RastreamentoValidecpfcnpj.prototype.run = function() {
  document.ruleNameForException = 'Rastreamento - valideCPFCNPJ';
  this.context = new Array();

  // Parâmetros de Entrada
  this.context['param_cpf_cnpj'] = arguments[0];

  this.context['param_form'] = arguments[1];

  this.context['param_componente'] = arguments[2];

  // Variáveis
  this.context['int_quantidade'] = 0;


  /**
   * cpf_cnpj é nulo?
   */
  if (parseBoolean(isNull.call(this, this.context['param_cpf_cnpj']))) {
          return null;

  } else {

    /**
     * Obtenho o tamanho do parametro
     */
    this.context['int_quantidade'] = ebfLength.call(this, this.context['param_cpf_cnpj']);

    /**
     * é cpf?
     */
    if (parseBoolean(isEqual.call(this, ebfTrim.call(this, this.context['int_quantidade']), parseInt(11)))) {
        
      /**
       * param form ou param componente é maior que 1?
       */
      if (parseBoolean((isGreater.call(this, ebfLength.call(this, this.context['param_form']), parseInt(3)) || isGreater.call(this, ebfLength.call(this, this.context['param_cpf_cnpj']), parseInt(3))))) {
          
        /**
         * setar o componente incrição estadual como ISENTO
         */
        ebfFormChangeComponentValue.call(this, this.context['param_form'], this.context['param_componente'], 'ISENTO');

        /**
         * retorna se cpf é valido ou não
         */

        /**
         * Fim
         */
        return ebfIsCpf.call(this, this.context['param_cpf_cnpj']);

      } else {

        /**
         * Fim
         */
        return ebfIsCpf.call(this, this.context['param_cpf_cnpj']);

      }

    } else {

      /**
       * é cnpj?
       */
      if (parseBoolean(isEqual.call(this, ebfTrim.call(this, this.context['int_quantidade']), parseInt(14)))) {
          
        /**
         * retorna se cnpj é valido ou não
         */

        /**
         * Fim
         */
        return ebfIsCnpj.call(this, this.context['param_cpf_cnpj']);

      } else {
        return null;

      }

    }

  }

}

function runRastreamentoValidecpfcnpj(parent, sys, formID, params) {
  var rule = new RastreamentoValidecpfcnpj(parent, sys, formID);
  rule.run.apply(rule, params);
}

function RastreamentoValidarEMail(parent, sys, formID) {
  this.ruleName = 'Rastreamento - Validar E-Mail';
  this.functionName = 'RastreamentoValidarEMail';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

RastreamentoValidarEMail.prototype = new Rule;

/**
 * Esta função executa a regra "Rastreamento - Validar E-Mail"
 * @param param_email equivale à variável this.context['param_email']<br/>
 * @param param_componente equivale à variável this.context['param_componente']<br/>
 * @author master
 * @since 15/10/2009 17:48:49
 */
RastreamentoValidarEMail.prototype.run = function() {
  document.ruleNameForException = 'Rastreamento - Validar E-Mail';
  this.context = new Array();

  // Parâmetros de Entrada
  this.context['param_email'] = arguments[0];

  this.context['param_componente'] = arguments[1];

  // Variáveis
  this.context['log_validarEmail'] = false;

  this.context['str_er'] = '';


  /**
   * log_validarEmail = Validar Texto Utilizando Expressão Regular(@param_email,^[\w-]+(\.[\w-]+)*@(([A-Za-z\d][A-Za-z\d-]{0,61}[A-Za-z\d]\.)+[A-Za-z]{2,6}|\[\d{1,3}(\.\d{1,3}){3}\])$)
   */
  this.context['log_validarEmail'] = ebfValidateTextER.call(this, this.context['param_email'], '^[\\w-]+(\\.[\\w-]+)*@(([A-Za-z\\d][A-Za-z\\d-]{0,61}[A-Za-z\\d]\\.)+[A-Za-z]{2,6}|\\[\\d{1,3}(\\.\\d{1,3}){3}\\])$');

  /**
   * (Igual(@log_validarEmail,true))?
   */
  if (parseBoolean(isEqual.call(this, this.context['log_validarEmail'], true))) {
      
    /**
     * Fim
     */
    return null;

  } else {

    /**
     * Alertar Aguardando Ok(E-mail inválido!)
     */
    ebfAlertMessage.call(this, 'E-mail inválido!');

    /**
     * Focar Componente(@param_componente)
     */
    ebfFormSetFocus.call(this, this.context['param_componente']);

    /**
     * Fim
     */
    return null;

  }

}

function runRastreamentoValidarEMail(parent, sys, formID, params) {
  var rule = new RastreamentoValidarEMail(parent, sys, formID);
  rule.run.apply(rule, params);
}

function ContaCorrentePrincipal1(parent, sys, formID) {
  this.ruleName = 'Conta Corrente - Principal 1';
  this.functionName = 'ContaCorrentePrincipal1';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

ContaCorrentePrincipal1.prototype = new Rule;

/**
 * Esta função executa a regra "Conta Corrente - Principal 1"
 * @param param_empresa equivale à variável this.context['param_empresa']<br/>
 * @param param_cnpj equivale à variável this.context['param_cnpj']<br/>
 * @param param_ie equivale à variável this.context['param_ie']<br/>
 * @param param_endereco equivale à variável this.context['param_endereco']<br/>
 * @param param_numero equivale à variável this.context['param_numero']<br/>
 * @param param_bairro equivale à variável this.context['param_bairro']<br/>
 * @param param_cep equivale à variável this.context['param_cep']<br/>
 * @param param_cidade equivale à variável this.context['param_cidade']<br/>
 * @param param_estado equivale à variável this.context['param_estado']<br/>
 * @param param_flgcontrato equivale à variável this.context['param_flgcontrato']<br/>
 * @param param_fone equivale à variável this.context['param_fone']<br/>
 * @param param_depto equivale à variável this.context['param_depto']<br/>
 * @param param_contato equivale à variável this.context['param_contato']<br/>
 * @param param_email equivale à variável this.context['param_email']<br/>
 * @param param_nomeResp equivale à variável this.context['param_nomeResp']<br/>
 * @param param_cpf equivale à variável this.context['param_cpf']<br/>
 * @param param_rg equivale à variável this.context['param_rg']<br/>
 * @param param_numeroapolice equivale à variável this.context['param_numeroapolice']<br/>
 * @param param_nomeseguradora equivale à variável this.context['param_nomeseguradora']<br/>
 * @param param_cdCliente equivale à variável this.context['param_cdCliente']<br/>
 * @author master
 * @since 26/10/2009 10:00:13
 */
ContaCorrentePrincipal1.prototype.run = function() {
  document.ruleNameForException = 'Conta Corrente - Principal 1';
  this.context = new Array();

  // Parâmetros de Entrada
  this.context['param_empresa'] = arguments[0];

  this.context['param_cnpj'] = arguments[1];

  this.context['param_ie'] = arguments[2];

  this.context['param_endereco'] = arguments[3];

  this.context['param_numero'] = arguments[4];

  this.context['param_bairro'] = arguments[5];

  this.context['param_cep'] = arguments[6];

  this.context['param_cidade'] = arguments[7];

  this.context['param_estado'] = arguments[8];

  this.context['param_flgcontrato'] = arguments[9];

  this.context['param_fone'] = arguments[10];

  this.context['param_depto'] = arguments[11];

  this.context['param_contato'] = arguments[12];

  this.context['param_email'] = arguments[13];

  this.context['param_nomeResp'] = arguments[14];

  this.context['param_cpf'] = arguments[15];

  this.context['param_rg'] = arguments[16];

  this.context['param_numeroapolice'] = arguments[17];

  this.context['param_nomeseguradora'] = arguments[18];

  this.context['param_cdCliente'] = arguments[19];

  // Variáveis
  this.context['camposPreenchidos'] = false;

  this.context['log_existemRegistros'] = false;


  /**
   * Conta Corrente -  Verifica se Grid Contato esta em Modo de Edição
   */
  new ContaCorrenteVerificaSeGridContatoEstaEmModoDeEdicao(this, this.getSystem(), this.getForm()).run();

  /**
   * Conta Corrente - Validar Campos em Branco
   */
  this.context['camposPreenchidos'] = new ContaCorrenteValidarCamposEmBranco(this, this.getSystem(), this.getForm()).run(this.context['param_empresa'], this.context['param_cnpj'], this.context['param_ie'], this.context['param_endereco'], this.context['param_numero'], this.context['param_bairro'], this.context['param_cep'], this.context['param_cidade'], this.context['param_estado'], this.context['param_flgcontrato'], this.context['param_fone'], this.context['param_depto'], this.context['param_contato'], this.context['param_email'], this.context['param_nomeResp'], this.context['param_cpf'], this.context['param_rg'], this.context['param_numeroapolice'], this.context['param_nomeseguradora'], this.context['param_flgcontrato']);

  /**
   * Verifica se os campos estão preenchidos
   */
  if (parseBoolean(isEqual.call(this, this.context['camposPreenchidos'], true))) {
      
    /**
     * Rastreamento - Pesquisa Cliente Excluido
     */
    this.context['log_existemRegistros'] = executeSyncJavaRule.call(this, this.getSystem(), this.getForm(), 'Rastreamento - Pesquisa Cliente Excluido', this.context['param_cnpj']);

    /**
     * (Igual(@log_existemRegistros,true))?
     */
    if (parseBoolean(isEqual.call(this, this.context['log_existemRegistros'], true))) {
        
      /**
       * Deletar - CpfCnpj Existente
       */
      executeSyncJavaRule.call(this, this.getSystem(), this.getForm(), 'Deletar - CpfCnpj Existente', this.context['param_cnpj']);

      /**
       * Incluir Dados Registro Corrente()
       */
      ebfNavIncludeSaveRecord.call(this);

      /**
       * Abrir o relatório
       */
      ebfOpenReportInline.call(this, 'Contrato do Cliente', ebfConcat.call(this, 'cdcliente=', ebfTrim.call(this, this.context['param_cdCliente'])), 'PDF', true, false);

      /**
       * Fim
       */
      return null;

    } else {

      /**
       * Incluir Dados Registro Corrente()
       */
      ebfNavIncludeSaveRecord.call(this);

      /**
       * Abrir o relatório
       */
      ebfOpenReportInline.call(this, 'Contrato do Cliente', ebfConcat.call(this, 'cdcliente=', ebfTrim.call(this, this.context['param_cdCliente'])), 'PDF', true, false);

      /**
       * Fim
       */
      return null;

    }

  } else {
    return null;

  }

}

function runContaCorrentePrincipal1(parent, sys, formID, params) {
  var rule = new ContaCorrentePrincipal1(parent, sys, formID);
  rule.run.apply(rule, params);
}

function ContaCorrenteValidarCamposEmBranco(parent, sys, formID) {
  this.ruleName = 'Conta Corrente - Validar Campos em Branco';
  this.functionName = 'ContaCorrenteValidarCamposEmBranco';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

ContaCorrenteValidarCamposEmBranco.prototype = new Rule;

/**
 * Esta função executa a regra "Conta Corrente - Validar Campos em Branco"
 * @param param_empresa equivale à variável this.context['param_empresa']<br/>
 * @param param_cnpj equivale à variável this.context['param_cnpj']<br/>
 * @param param_ie equivale à variável this.context['param_ie']<br/>
 * @param param_endereco equivale à variável this.context['param_endereco']<br/>
 * @param param_numero equivale à variável this.context['param_numero']<br/>
 * @param param_bairro equivale à variável this.context['param_bairro']<br/>
 * @param param_cep equivale à variável this.context['param_cep']<br/>
 * @param param_cidade equivale à variável this.context['param_cidade']<br/>
 * @param param_estado equivale à variável this.context['param_estado']<br/>
 * @param param_pais equivale à variável this.context['param_pais']<br/>
 * @param param_fone equivale à variável this.context['param_fone']<br/>
 * @param param_depto equivale à variável this.context['param_depto']<br/>
 * @param param_contato equivale à variável this.context['param_contato']<br/>
 * @param param_email equivale à variável this.context['param_email']<br/>
 * @param param_nomeResp equivale à variável this.context['param_nomeResp']<br/>
 * @param param_cpf equivale à variável this.context['param_cpf']<br/>
 * @param param_rg equivale à variável this.context['param_rg']<br/>
 * @param param_numeroapolice equivale à variável this.context['param_numeroapolice']<br/>
 * @param param_nomeseguradora equivale à variável this.context['param_nomeseguradora']<br/>
 * @param param_flgcontrato equivale à variável this.context['param_flgcontrato']<br/>
 * @author master
 * @since 24/10/2009 10:33:36
 */
ContaCorrenteValidarCamposEmBranco.prototype.run = function() {
  document.ruleNameForException = 'Conta Corrente - Validar Campos em Branco';
  this.context = new Array();

  // Parâmetros de Entrada
  this.context['param_empresa'] = arguments[0];

  this.context['param_cnpj'] = arguments[1];

  this.context['param_ie'] = arguments[2];

  this.context['param_endereco'] = arguments[3];

  this.context['param_numero'] = arguments[4];

  this.context['param_bairro'] = arguments[5];

  this.context['param_cep'] = arguments[6];

  this.context['param_cidade'] = arguments[7];

  this.context['param_estado'] = arguments[8];

  this.context['param_pais'] = arguments[9];

  this.context['param_fone'] = arguments[10];

  this.context['param_depto'] = arguments[11];

  this.context['param_contato'] = arguments[12];

  this.context['param_email'] = arguments[13];

  this.context['param_nomeResp'] = arguments[14];

  this.context['param_cpf'] = arguments[15];

  this.context['param_rg'] = arguments[16];

  this.context['param_numeroapolice'] = arguments[17];

  this.context['param_nomeseguradora'] = arguments[18];

  this.context['param_flgcontrato'] = arguments[19];

  // Variáveis
  this.context['nomeAba1'] = '';

  this.context['nomeAba2'] = '';

  this.context['nomeAba3'] = '';

  this.context['nomeAba1'] = 'Cadastro';
  this.context['nomeAba2'] = 'Contatos';
  this.context['nomeAba3'] = 'Contrato';

  /**
   * (É Nulo(Remover Espaços(@param_empresa)))?
   */
  if (parseBoolean(isNull.call(this, ebfTrim.call(this, this.context['param_empresa'])))) {
      
    /**
     * Alertar Aguardando Ok(O campo "Empresa" é obrigatório)
     */
    ebfAlertMessage.call(this, 'O campo \"Empresa\" é obrigatório');

    /**
     * Ativar Aba(@nomeAba1)
     */
    ebfFormOpenTab.call(this, this.context['nomeAba1']);

    /**
     * Focar Componente(Empresa (EDTEMPRESA))
     */
    ebfFormSetFocus.call(this, 'EDTEMPRESA');

    /**
     * Fim
     */
    return false;

  } else {

    /**
     * (É Nulo(Remover Espaços(@param_cnpj)))?
     */
    if (parseBoolean(isNull.call(this, ebfTrim.call(this, this.context['param_cnpj'])))) {
        
      /**
       * Alertar Aguardando Ok(O campo "Cnpj" é obrigatório)
       */
      ebfAlertMessage.call(this, 'O campo \"Cnpj\" é obrigatório');

      /**
       * Ativar Aba(@nomeAba1)
       */
      ebfFormOpenTab.call(this, this.context['nomeAba1']);

      /**
       * Focar Componente(CNPJ/CPF (EDTCNPJCPF))
       */
      ebfFormSetFocus.call(this, 'EDTCNPJCPF');

      /**
       * Fim
       */
      return false;

    } else {

      /**
       * (É Nulo(Remover Espaços(@param_ie)))?
       */
      if (parseBoolean(isNull.call(this, ebfTrim.call(this, this.context['param_ie'])))) {
          
        /**
         * Alertar Aguardando Ok(O campo "Inscrição Estadual" é obrigatório)
         */
        ebfAlertMessage.call(this, 'O campo \"Inscrição Estadual\" é obrigatório');

        /**
         * Ativar Aba(@nomeAba1)
         */
        ebfFormOpenTab.call(this, this.context['nomeAba1']);

        /**
         * Focar Componente(Inscrição Estadual (EDTIE))
         */
        ebfFormSetFocus.call(this, 'EDTIE');

        /**
         * Fim
         */
        return false;

      } else {

        /**
         * (É Nulo(Remover Espaços(@param_endereco)))?
         */
        if (parseBoolean(isNull.call(this, ebfTrim.call(this, this.context['param_endereco'])))) {
            
          /**
           * Alertar Aguardando Ok(O campo "Endereço" é obrigatório)
           */
          ebfAlertMessage.call(this, 'O campo \"Endereço\" é obrigatório');

          /**
           * Ativar Aba(@nomeAba1)
           */
          ebfFormOpenTab.call(this, this.context['nomeAba1']);

          /**
           * Focar Componente(Endereço (EDTENDERECO))
           */
          ebfFormSetFocus.call(this, 'EDTENDERECO');

          /**
           * Fim
           */
          return false;

        } else {

          /**
           * (É Nulo(Remover Espaços(@param_numero)))?
           */
          if (parseBoolean(isNull.call(this, ebfTrim.call(this, this.context['param_numero'])))) {
              
            /**
             * Alertar Aguardando Ok(O campo "Número" é obrigatório)
             */
            ebfAlertMessage.call(this, 'O campo \"Número\" é obrigatório');

            /**
             * Ativar Aba(@nomeAba1)
             */
            ebfFormOpenTab.call(this, this.context['nomeAba1']);

            /**
             * Focar Componente(Número (EDTNUMERO))
             */
            ebfFormSetFocus.call(this, 'EDTNUMERO');

            /**
             * Fim
             */
            return false;

          } else {

            /**
             * (É Nulo(Remover Espaços(@param_bairro)))?
             */
            if (parseBoolean(isNull.call(this, ebfTrim.call(this, this.context['param_bairro'])))) {
                
              /**
               * Alertar Aguardando Ok(O campo "Bairro" é obrigatório)
               */
              ebfAlertMessage.call(this, 'O campo \"Bairro\" é obrigatório');

              /**
               * Ativar Aba(@nomeAba1)
               */
              ebfFormOpenTab.call(this, this.context['nomeAba1']);

              /**
               * Focar Componente(Bairro (EDTBAIRRO))
               */
              ebfFormSetFocus.call(this, 'EDTBAIRRO');

              /**
               * Fim
               */
              return false;

            } else {

              /**
               * (É Nulo(Remover Espaços(@param_cep)))?
               */
              if (parseBoolean(isNull.call(this, ebfTrim.call(this, this.context['param_cep'])))) {
                  
                /**
                 * Alertar Aguardando Ok(O campo "Cep" é obrigatório)
                 */
                ebfAlertMessage.call(this, 'O campo \"Cep\" é obrigatório');

                /**
                 * Ativar Aba(@nomeAba1)
                 */
                ebfFormOpenTab.call(this, this.context['nomeAba1']);

                /**
                 * Focar Componente(CEP (EDTCEP))
                 */
                ebfFormSetFocus.call(this, 'EDTCEP');

                /**
                 * Fim
                 */
                return false;

              } else {

                /**
                 * (É Nulo(Remover Espaços(@param_cidade)))?
                 */
                if (parseBoolean(isNull.call(this, ebfTrim.call(this, this.context['param_cidade'])))) {
                    
                  /**
                   * Alertar Aguardando Ok(O campo "Cidade" é obrigatório)
                   */
                  ebfAlertMessage.call(this, 'O campo \"Cidade\" é obrigatório');

                  /**
                   * Ativar Aba(@nomeAba1)
                   */
                  ebfFormOpenTab.call(this, this.context['nomeAba1']);

                  /**
                   * Focar Componente(Cidades (EDTCIDADE))
                   */
                  ebfFormSetFocus.call(this, 'EDTCIDADE');

                  /**
                   * Fim
                   */
                  return false;

                } else {

                  /**
                   * (É Nulo(Remover Espaços(@param_estado)))?
                   */
                  if (parseBoolean(isNull.call(this, ebfTrim.call(this, this.context['param_estado'])))) {
                      
                    /**
                     * Alertar Aguardando Ok(O campo "Estado" é obrigatório)
                     */
                    ebfAlertMessage.call(this, 'O campo \"Estado\" é obrigatório');

                    /**
                     * Ativar Aba(@nomeAba1)
                     */
                    ebfFormOpenTab.call(this, this.context['nomeAba1']);

                    /**
                     * Focar Componente(Estado (EDTUF))
                     */
                    ebfFormSetFocus.call(this, 'EDTUF');

                    /**
                     * Fim
                     */
                    return false;

                  } else {

                    /**
                     * (É Nulo(Remover Espaços(@param_pais)))?
                     */
                    if (parseBoolean(isNull.call(this, ebfTrim.call(this, this.context['param_pais'])))) {
                        
                      /**
                       * Alertar Aguardando Ok(O campo "País" é obrigatório)
                       */
                      ebfAlertMessage.call(this, 'O campo \"País\" é obrigatório');

                      /**
                       * Ativar Aba(@nomeAba1)
                       */
                      ebfFormOpenTab.call(this, this.context['nomeAba1']);

                      /**
                       * Focar Componente(Pais (EDTPAIS))
                       */
                      ebfFormSetFocus.call(this, 'EDTPAIS');

                      /**
                       * Fim
                       */
                      return false;

                    } else {

                      /**
                       * (É Nulo(Remover Espaços(@param_fone)))?
                       */
                      if (parseBoolean(isNull.call(this, ebfTrim.call(this, this.context['param_fone'])))) {
                          
                        /**
                         * Alertar Aguardando Ok(O campo "Fone" é obrigatório)
                         */
                        ebfAlertMessage.call(this, 'O campo \"Fone\" é obrigatório');

                        /**
                         * Ativar Aba(@nomeAba1)
                         */
                        ebfFormOpenTab.call(this, this.context['nomeAba1']);

                        /**
                         * Focar Componente(Fone (EDTFONE))
                         */
                        ebfFormSetFocus.call(this, 'EDTFONE');

                        /**
                         * Fim
                         */
                        return false;

                      } else {

                        /**
                         * (É Nulo(Remover Espaços(@param_depto)))?
                         */
                        if (parseBoolean(isNull.call(this, ebfTrim.call(this, this.context['param_depto'])))) {
                            
                          /**
                           * Alertar Aguardando Ok(O campo "Departamento" é obrigatório)
                           */
                          ebfAlertMessage.call(this, 'O campo \"Departamento\" é obrigatório');

                          /**
                           * Ativar Aba(@nomeAba1)
                           */
                          ebfFormOpenTab.call(this, this.context['nomeAba1']);

                          /**
                           * Focar Componente(Departamento (EDTDEPARTAMENTO))
                           */
                          ebfFormSetFocus.call(this, 'EDTDEPARTAMENTO');

                          /**
                           * Fim
                           */
                          return false;

                        } else {

                          /**
                           * (É Nulo(Remover Espaços(@param_contato)))?
                           */
                          if (parseBoolean(isNull.call(this, ebfTrim.call(this, this.context['param_contato'])))) {
                              
                            /**
                             * Alertar Aguardando Ok(O campo "Contato" é obrigatório)
                             */
                            ebfAlertMessage.call(this, 'O campo \"Contato\" é obrigatório');

                            /**
                             * Ativar Aba(@nomeAba1)
                             */
                            ebfFormOpenTab.call(this, this.context['nomeAba1']);

                            /**
                             * Focar Componente(Contato (EDTCONTATO))
                             */
                            ebfFormSetFocus.call(this, 'EDTCONTATO');

                            /**
                             * Fim
                             */
                            return false;

                          } else {

                            /**
                             * (É Nulo(Remover Espaços(@param_email)))?
                             */
                            if (parseBoolean(isNull.call(this, ebfTrim.call(this, this.context['param_email'])))) {
                                
                              /**
                               * Alertar Aguardando Ok(O campo "E-mail" é obrigatório)
                               */
                              ebfAlertMessage.call(this, 'O campo \"E-mail\" é obrigatório');

                              /**
                               * Ativar Aba(@nomeAba1)
                               */
                              ebfFormOpenTab.call(this, this.context['nomeAba1']);

                              /**
                               * Focar Componente(E-mail (EDTEMAIL))
                               */
                              ebfFormSetFocus.call(this, 'EDTEMAIL');

                              /**
                               * Fim
                               */
                              return false;

                            } else {

                              /**
                               * (É Nulo(Remover Espaços(@param_nomeResp)))?
                               */
                              if (parseBoolean(isNull.call(this, ebfTrim.call(this, this.context['param_nomeResp'])))) {
                                  
                                /**
                                 * Alertar Aguardando Ok(O campo "Nome Responsável" é obrigatório)
                                 */
                                ebfAlertMessage.call(this, 'O campo \"Nome Responsável\" é obrigatório');

                                /**
                                 * Ativar Aba(@nomeAba2)
                                 */
                                ebfFormOpenTab.call(this, this.context['nomeAba2']);

                                /**
                                 * Focar Componente(Nome do Responsável (EDTNOMERESPONSAVEL))
                                 */
                                ebfFormSetFocus.call(this, 'EDTNOMERESPONSAVEL');

                                /**
                                 * Fim
                                 */
                                return false;

                              } else {

                                /**
                                 * (É Nulo(Remover Espaços(@param_cpf)))?
                                 */
                                if (parseBoolean(isNull.call(this, ebfTrim.call(this, this.context['param_cpf'])))) {
                                    
                                  /**
                                   * Alertar Aguardando Ok(O campo " CPF " é obrigatório)
                                   */
                                  ebfAlertMessage.call(this, 'O campo \" CPF \" é obrigatório');

                                  /**
                                   * Ativar Aba(@nomeAba2)
                                   */
                                  ebfFormOpenTab.call(this, this.context['nomeAba2']);

                                  /**
                                   * Focar Componente(CPF (EDTCPFRESPONSAVEL))
                                   */
                                  ebfFormSetFocus.call(this, 'EDTCPFRESPONSAVEL');

                                  /**
                                   * Fim
                                   */
                                  return false;

                                } else {

                                  /**
                                   * (É Nulo(Remover Espaços(@param_rg)))?
                                   */
                                  if (parseBoolean(isNull.call(this, ebfTrim.call(this, this.context['param_rg'])))) {
                                      
                                    /**
                                     * Alertar Aguardando Ok(O campo " RG " é obrigatório)
                                     */
                                    ebfAlertMessage.call(this, 'O campo \" RG \" é obrigatório');

                                    /**
                                     * Ativar Aba(@nomeAba2)
                                     */
                                    ebfFormOpenTab.call(this, this.context['nomeAba2']);

                                    /**
                                     * Focar Componente(Identidade/RG (EDTIDENTRESPONSAVEL))
                                     */
                                    ebfFormSetFocus.call(this, 'EDTIDENTRESPONSAVEL');

                                    /**
                                     * Fim
                                     */
                                    return false;

                                  } else {

                                    /**
                                     * (Igual(@param_flgcontrato,S))?
                                     */
                                    if (parseBoolean(isEqual.call(this, this.context['param_flgcontrato'], 'S'))) {
                                        
                                      /**
                                       * (É Nulo(Remover Espaços(@param_numeroapolice)))?
                                       */
                                      if (parseBoolean(isNull.call(this, ebfTrim.call(this, this.context['param_numeroapolice'])))) {
                                          
                                        /**
                                         * Alertar Aguardando Ok(O campo " Nº Apólice " é obrigatório)
                                         */
                                        ebfAlertMessage.call(this, 'O campo \" Nº Apólice \" é obrigatório');

                                        /**
                                         * Ativar Aba(@nomeAba3)
                                         */
                                        ebfFormOpenTab.call(this, this.context['nomeAba3']);

                                        /**
                                         * Focar Componente(Nº da Apolice (EDTAPOLICE))
                                         */
                                        ebfFormSetFocus.call(this, 'EDTAPOLICE');

                                        /**
                                         * Fim
                                         */
                                        return false;

                                      } else {

                                        /**
                                         * (É Nulo(Remover Espaços(@param_nomeseguradora)))?
                                         */
                                        if (parseBoolean(isNull.call(this, ebfTrim.call(this, this.context['param_nomeseguradora'])))) {
                                            
                                          /**
                                           * Alertar Aguardando Ok(O campo " Nome Seguradora " é obrigatório)
                                           */
                                          ebfAlertMessage.call(this, 'O campo \" Nome Seguradora \" é obrigatório');

                                          /**
                                           * Ativar Aba(@nomeAba3)
                                           */
                                          ebfFormOpenTab.call(this, this.context['nomeAba3']);

                                          /**
                                           * Focar Componente(Seguradora (MakerLabel32))
                                           */
                                          ebfFormSetFocus.call(this, 'MakerLabel32');

                                          /**
                                           * Fim
                                           */
                                          return false;

                                        } else {

                                          /**
                                           * Fim
                                           */
                                          return true;

                                        }

                                      }

                                    } else {

                                      /**
                                       * Fim
                                       */
                                      return true;

                                    }

                                  }

                                }

                              }

                            }

                          }

                        }

                      }

                    }

                  }

                }

              }

            }

          }

        }

      }

    }

  }

}

function runContaCorrenteValidarCamposEmBranco(parent, sys, formID, params) {
  var rule = new ContaCorrenteValidarCamposEmBranco(parent, sys, formID);
  rule.run.apply(rule, params);
}

function GradeColocarEmModeDeEdicao(parent, sys, formID) {
  this.ruleName = 'Grade -  Colocar em Mode de Edicao';
  this.functionName = 'GradeColocarEmModeDeEdicao';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

GradeColocarEmModeDeEdicao.prototype = new Rule;

/**
 * Esta função executa a regra "Grade -  Colocar em Mode de Edicao"
 * @author master
 * @since 07/08/2009 13:33:30
 */
GradeColocarEmModeDeEdicao.prototype.run = function() {
  document.ruleNameForException = 'Grade -  Colocar em Mode de Edicao';
  this.context = new Array();


  /**
   * Fim
   */
  return null;

}

function runGradeColocarEmModeDeEdicao(parent, sys, formID, params) {
  var rule = new GradeColocarEmModeDeEdicao(parent, sys, formID);
  rule.run.apply(rule, params);
}

function OcorrenciaSetarValorChaveComboNoComponente(parent, sys, formID) {
  this.ruleName = 'Ocorrencia - Setar Valor Chave Combo no Componente';
  this.functionName = 'OcorrenciaSetarValorChaveComboNoComponente';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

OcorrenciaSetarValorChaveComboNoComponente.prototype = new Rule;

/**
 * Esta função executa a regra "Ocorrencia - Setar Valor Chave Combo no Componente"
 * @param param_codOcorrenciaCombo equivale à variável this.context['param_codOcorrenciaCombo']<br/>
 * @param param_form equivale à variável this.context['param_form']<br/>
 * @param param_componente equivale à variável this.context['param_componente']<br/>
 * @author master
 * @since 30/07/2009 23:29:32
 */
OcorrenciaSetarValorChaveComboNoComponente.prototype.run = function() {
  document.ruleNameForException = 'Ocorrencia - Setar Valor Chave Combo no Componente';
  this.context = new Array();

  // Parâmetros de Entrada
  this.context['param_codOcorrenciaCombo'] = arguments[0];

  this.context['param_form'] = arguments[1];

  this.context['param_componente'] = arguments[2];


  /**
   * Setar o valor chave do combo no campo anterior
   */
  ebfFormChangeComponentValue.call(this, this.context['param_form'], this.context['param_componente'], this.context['param_codOcorrenciaCombo']);

  /**
   * Fim
   */
  return null;

}

function runOcorrenciaSetarValorChaveComboNoComponente(parent, sys, formID, params) {
  var rule = new OcorrenciaSetarValorChaveComboNoComponente(parent, sys, formID);
  rule.run.apply(rule, params);
}

function FormularioColocarEmModoDeInsercao(parent, sys, formID) {
  this.ruleName = 'Formulario - Colocar em modo de inserção';
  this.functionName = 'FormularioColocarEmModoDeInsercao';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

FormularioColocarEmModoDeInsercao.prototype = new Rule;

/**
 * Esta função executa a regra "Formulario - Colocar em modo de inserção"
 * @author master
 * @since 15/08/2009 12:39:02
 */
FormularioColocarEmModoDeInsercao.prototype.run = function() {
  document.ruleNameForException = 'Formulario - Colocar em modo de inserção';
  this.context = new Array();

  // Variáveis
  this.context['loginUsuario'] = '';


  /**
   * Modo de Inserção()
   */
  ebfFormInsertMode.call(this);

  /**
   * Fim
   */
  return null;

}

function runFormularioColocarEmModoDeInsercao(parent, sys, formID, params) {
  var rule = new FormularioColocarEmModoDeInsercao(parent, sys, formID);
  rule.run.apply(rule, params);
}

function Mkr56b18f35Fb454bb38c657d3d4bdd8caa(parent, sys, formID) {
  this.ruleName = '__MKR_{56B18F35-FB45-4BB3-8C65-7D3D4BDD8CAA}';
  this.functionName = 'Mkr56b18f35Fb454bb38c657d3d4bdd8caa';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

Mkr56b18f35Fb454bb38c657d3d4bdd8caa.prototype = new Rule;

/**
 * Esta função executa a regra "__MKR_{56B18F35-FB45-4BB3-8C65-7D3D4BDD8CAA}"
 * @param num_insc equivale à variável this.context['num_insc']<br/>
 * @param uf equivale à variável this.context['uf']<br/>
 * @author master
 * @since 16/07/2009 18:03:59
 */
Mkr56b18f35Fb454bb38c657d3d4bdd8caa.prototype.run = function() {
  document.ruleNameForException = '__MKR_{56B18F35-FB45-4BB3-8C65-7D3D4BDD8CAA}';
  this.context = new Array();

  // Parâmetros de Entrada
  this.context['num_insc'] = arguments[0];

  this.context['uf'] = arguments[1];

  // Variáveis
  this.context['variavel'] = '';


  /**
   * (É Nulo(@num_insc))?
   */
  if (parseBoolean(isNull.call(this, this.context['num_insc']))) {
      
    /**
     * Alterar Valor do Componente(Cadastro,Inscrição Estadual (EDTIEST2),ISENTO)
     */
    ebfFormChangeComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'EDTIEST2', 'ISENTO');

    /**
     * Alterar Valor do Componente(Cadastro,Nome do Responsável (MakerEdit2),Obter Valor do Componente(Cadastro,Empresa (EDTEMPRESA1)))
     */
    ebfFormChangeComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerEdit2', ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'EDTEMPRESA1'));

    /**
     * Alterar Valor do Componente(Cadastro,CPF (MakerEdit8),Obter Valor do Componente(Cadastro,CNPJ/CPF (EDTCGCCPF1)))
     */
    ebfFormChangeComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerEdit8', ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'EDTCGCCPF1'));

    /**
     * Alterar Valor do Componente(Cadastro,Identidade/RG (MakerEdit3),Obter Valor do Componente(Cadastro,Inscrição Estadual (EDTIEST2)))
     */
    ebfFormChangeComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerEdit3', ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'EDTIEST2'));

    /**
     * Fim
     */
    return null;

  } else {

    /**
     * Alterar Valor do Componente(Cadastro,Nome do Responsável (MakerEdit2),Obter Valor do Componente(Cadastro,Empresa (EDTEMPRESA1)))
     */
    ebfFormChangeComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerEdit2', ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'EDTEMPRESA1'));

    /**
     * Alterar Valor do Componente(Cadastro,CPF (MakerEdit8),Obter Valor do Componente(Cadastro,CNPJ/CPF (EDTCGCCPF1)))
     */
    ebfFormChangeComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerEdit8', ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'EDTCGCCPF1'));

    /**
     * Alterar Valor do Componente(Cadastro,Identidade/RG (MakerEdit3),Obter Valor do Componente(Cadastro,Inscrição Estadual (EDTIEST2)))
     */
    ebfFormChangeComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerEdit3', ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'EDTIEST2'));

    /**
     * Fim
     */
    return null;

  }

}

function runMkr56b18f35Fb454bb38c657d3d4bdd8caa(parent, sys, formID, params) {
  var rule = new Mkr56b18f35Fb454bb38c657d3d4bdd8caa(parent, sys, formID);
  rule.run.apply(rule, params);
}

function ColetaValidarAnoDaData(parent, sys, formID) {
  this.ruleName = 'Coleta - Validar ano da data';
  this.functionName = 'ColetaValidarAnoDaData';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

ColetaValidarAnoDaData.prototype = new Rule;

/**
 * Esta função executa a regra "Coleta - Validar ano da data"
 * @param param_data equivale à variável this.context['param_data']<br/>
 * @param param_componente equivale à variável this.context['param_componente']<br/>
 * @author master
 * @since 14/08/2009 13:14:12
 */
ColetaValidarAnoDaData.prototype.run = function() {
  document.ruleNameForException = 'Coleta - Validar ano da data';
  this.context = new Array();

  // Parâmetros de Entrada
  this.context['param_data'] = arguments[0];

  this.context['param_componente'] = arguments[1];

  // Variáveis
  this.context['str_ano'] = '';

  this.context['int_ano'] = '';


  /**
   * (É Nulo(@param_data))?
   */
  if (parseBoolean(isNull.call(this, this.context['param_data']))) {
          return null;

  } else {

    /**
     * int_ano = Ano(@param_data)
     */
    this.context['int_ano'] = ebfDateYear.call(this, this.context['param_data']);

    /**
     * (Menor(@int_ano,2000))?
     */
    if (parseBoolean(isMinor.call(this, this.context['int_ano'], parseInt(2000)))) {
        
      /**
       * Alertar Aguardando Ok(O ano deve ser composto por 4 caracteres Ex.: (01/01/2010))
       */
      ebfAlertMessage.call(this, 'O ano deve ser composto por 4 caracteres\nEx.: (01/01/2010)');

      /**
       * Focar Componente(@param_componente)
       */
      ebfFormSetFocus.call(this, this.context['param_componente']);

      /**
       * Fim
       */
      return null;

    } else {

      /**
       * Fim
       */
      return null;

    }

  }

}

function runColetaValidarAnoDaData(parent, sys, formID, params) {
  var rule = new ColetaValidarAnoDaData(parent, sys, formID);
  rule.run.apply(rule, params);
}

function FormularioExecutarGenericoCom3Parametros(parent, sys, formID) {
  this.ruleName = 'Formulario - Executar Generico com 3 parametros';
  this.functionName = 'FormularioExecutarGenericoCom3Parametros';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

FormularioExecutarGenericoCom3Parametros.prototype = new Rule;

/**
 * Esta função executa a regra "Formulario - Executar Generico com 3 parametros"
 * @param grid_0 equivale à variável this.context['grid_0']<br/>
 * @param grid_1 equivale à variável this.context['grid_1']<br/>
 * @param param_coluna1 equivale à variável this.context['param_coluna1']<br/>
 * @param param_filtro1 equivale à variável this.context['param_filtro1']<br/>
 * @param param_coluna2 equivale à variável this.context['param_coluna2']<br/>
 * @param param_filtro2 equivale à variável this.context['param_filtro2']<br/>
 * @param param_coluna3 equivale à variável this.context['param_coluna3']<br/>
 * @param param_formulario equivale à variável this.context['param_formulario']<br/>
 * @author master
 * @since 15/08/2009 13:54:16
 */
FormularioExecutarGenericoCom3Parametros.prototype.run = function() {
  document.ruleNameForException = 'Formulario - Executar Generico com 3 parametros';
  this.context = new Array();

  // Parâmetros de Entrada
  this.context['grid_0'] = arguments[0];

  this.context['grid_1'] = arguments[1];

  this.context['param_coluna1'] = arguments[2];

  this.context['param_filtro1'] = arguments[3];

  this.context['param_coluna2'] = arguments[4];

  this.context['param_filtro2'] = arguments[5];

  this.context['param_coluna3'] = arguments[6];

  this.context['param_formulario'] = arguments[7];

  // Variáveis
  this.context['filtro'] = '';

  this.context['controleNF'] = '';


  /**
   * um dos filtros é nulo?
   */
  if (parseBoolean((isNull.call(this, this.context['param_filtro1']) || isNull.call(this, this.context['param_filtro2'])))) {
          return null;

  } else {

    /**
     * 1. Obtenho a chave do Grid
     */
    this.context['controleNF'] = ebfGridGetValue.call(this, 'MakerGrid1', ebfGridGetSelectedRow.call(this, 'MakerGrid1'), 'Controle NF');

    /**
     * Formulario - Abrir Filtrado Generico com 3 parametros
     */
    executeSyncJavaRule.call(this, this.getSystem(), this.getForm(), 'Formulario - Abrir Filtrado Generico com 3 parametros', this.context['param_formulario'], this.context['param_coluna1'], this.context['param_filtro1'], this.context['param_coluna2'], this.context['param_filtro2'], this.context['param_coluna3'], this.context['controleNF']);

    /**
     * Fim
     */
    return null;

  }

}

function runFormularioExecutarGenericoCom3Parametros(parent, sys, formID, params) {
  var rule = new FormularioExecutarGenericoCom3Parametros(parent, sys, formID);
  rule.run.apply(rule, params);
}

function MkrE64658230eea457491d0Bc7b5a6d073e(parent, sys, formID) {
  this.ruleName = '__MKR_{E6465823-0EEA-4574-91D0-BC7B5A6D073E}';
  this.functionName = 'MkrE64658230eea457491d0Bc7b5a6d073e';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

MkrE64658230eea457491d0Bc7b5a6d073e.prototype = new Rule;

/**
 * Esta função executa a regra "__MKR_{E6465823-0EEA-4574-91D0-BC7B5A6D073E}"
 * @author master
 * @since 23/06/2009 09:00:31
 */
MkrE64658230eea457491d0Bc7b5a6d073e.prototype.run = function() {
  document.ruleNameForException = '__MKR_{E6465823-0EEA-4574-91D0-BC7B5A6D073E}';
  this.context = new Array();


  /**
   * variavel = Obter Valor do Componente(Cadastro,Aceito (MakerRadioGroup6))
   */
  this.context['variavel'] = ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerRadioGroup6');

  /**
   * (Igual(@variavel,S))?
   */
  if (parseBoolean(isEqual.call(this, this.context['variavel'], 'S'))) {
      
    /**
     * Definir Obrigatoriedade de Componente( (MakerLabel33),true)
     */
    ebfFormSetRequired.call(this, 'MakerLabel33', true);

    /**
     * Definir Obrigatoriedade de Componente( (MakerEdit7),true)
     */
    ebfFormSetRequired.call(this, 'MakerEdit7', true);

    /**
     * Fim
     */
    return null;

  } else {

    /**
     * Definir Obrigatoriedade de Componente( (MakerLabel33),false)
     */
    ebfFormSetRequired.call(this, 'MakerLabel33', false);

    /**
     * Definir Obrigatoriedade de Componente( (MakerEdit7),false)
     */
    ebfFormSetRequired.call(this, 'MakerEdit7', false);

    /**
     * Fim
     */
    return null;

  }

}

function runMkrE64658230eea457491d0Bc7b5a6d073e(parent, sys, formID, params) {
  var rule = new MkrE64658230eea457491d0Bc7b5a6d073e(parent, sys, formID);
  rule.run.apply(rule, params);
}

function ColetaMontaConsultaDeSouRemetenteSouDestinatario(parent, sys, formID) {
  this.ruleName = 'Coleta - Monta Consulta de Sou Remetente/Sou Destinatario';
  this.functionName = 'ColetaMontaConsultaDeSouRemetenteSouDestinatario';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

ColetaMontaConsultaDeSouRemetenteSouDestinatario.prototype = new Rule;

/**
 * Esta função executa a regra "Coleta - Monta Consulta de Sou Remetente/Sou Destinatario"
 * @param param_solicitante equivale à variável this.context['param_solicitante']<br/>
 * @author master
 * @since 15/08/2009 10:10:23
 */
ColetaMontaConsultaDeSouRemetenteSouDestinatario.prototype.run = function() {
  document.ruleNameForException = 'Coleta - Monta Consulta de Sou Remetente/Sou Destinatario';
  this.context = new Array();

  // Parâmetros de Entrada
  this.context['param_solicitante'] = arguments[0];

  // Variáveis
  this.context['queryStringColeta'] = '';


  /**
   * Sessão para Clientes é nulo?
   */
  if (parseBoolean(isNull.call(this, ebfGetSessionAttribute.call(this, 'secClientes_Email', true)))) {
      
    /**
     * Order by trcoleta.cdcoleta
     */
    ebfSetSessionAttribute.call(this, 'sessionBuscaColeta', ebfConcat.call(this, toString.call(this, ebfGetSessionAttribute.call(this, 'sessionBuscaColeta', false)), ' Order By trcoleta.cdcoleta'), false);

    /**
     * Montar filtro para os clientes que o usuário logado tem acesso?
     */
    ebfSetSessionAttribute.call(this, 'sessionBuscaColeta', ebfConcat.call(this, toString.call(this, ebfGetSessionAttribute.call(this, 'sessionBuscaColeta', false)), ebfConcat.call(this, ' and trcoleta.destinatario in ', toString.call(this, ebfGetSessionAttribute.call(this, 'secClientes_Email', true)))), false);

    /**
     * Mensagem de Erro
     */
    ActErrorMessage(toString.call(this, ebfGetSessionAttribute.call(this, 'secClientes_Email', true)));

    /**
     * Fim
     */
    return null;

  } else {

    /**
     * Sou Remetente?
     */
    if (parseBoolean(isEqual.call(this, this.context['param_solicitante'], 'R'))) {
        
      /**
       * Montar filtro para os clientes que o usuário logado tem acesso?
       */
      ebfSetSessionAttribute.call(this, 'sessionBuscaColeta', ebfConcat.call(this, toString.call(this, ebfGetSessionAttribute.call(this, 'sessionBuscaColeta', false)), ebfConcat.call(this, ' and trcoleta.remetente in ', toString.call(this, ebfGetSessionAttribute.call(this, 'secClientes_Email', true)))), false);

      /**
       * Order by trcoleta.cdcoleta
       */
      ebfSetSessionAttribute.call(this, 'sessionBuscaColeta', ebfConcat.call(this, toString.call(this, ebfGetSessionAttribute.call(this, 'sessionBuscaColeta', false)), ' Order By trcoleta.cdcoleta'), false);

      /**
       * Montar filtro para os clientes que o usuário logado tem acesso?
       */
      ebfSetSessionAttribute.call(this, 'sessionBuscaColeta', ebfConcat.call(this, toString.call(this, ebfGetSessionAttribute.call(this, 'sessionBuscaColeta', false)), ebfConcat.call(this, ' and trcoleta.destinatario in ', toString.call(this, ebfGetSessionAttribute.call(this, 'secClientes_Email', true)))), false);

      /**
       * Mensagem de Erro
       */
      ActErrorMessage(toString.call(this, ebfGetSessionAttribute.call(this, 'secClientes_Email', true)));

      /**
       * Fim
       */
      return null;

    } else {

      /**
       * Montar filtro para os clientes que o usuário logado tem acesso?
       */
      ebfSetSessionAttribute.call(this, 'sessionBuscaColeta', ebfConcat.call(this, toString.call(this, ebfGetSessionAttribute.call(this, 'sessionBuscaColeta', false)), ebfConcat.call(this, ' and trcoleta.destinatario in ', toString.call(this, ebfGetSessionAttribute.call(this, 'secClientes_Email', true)))), false);

      /**
       * Order by trcoleta.cdcoleta
       */
      ebfSetSessionAttribute.call(this, 'sessionBuscaColeta', ebfConcat.call(this, toString.call(this, ebfGetSessionAttribute.call(this, 'sessionBuscaColeta', false)), ' Order By trcoleta.cdcoleta'), false);

      /**
       * Montar filtro para os clientes que o usuário logado tem acesso?
       */
      ebfSetSessionAttribute.call(this, 'sessionBuscaColeta', ebfConcat.call(this, toString.call(this, ebfGetSessionAttribute.call(this, 'sessionBuscaColeta', false)), ebfConcat.call(this, ' and trcoleta.destinatario in ', toString.call(this, ebfGetSessionAttribute.call(this, 'secClientes_Email', true)))), false);

      /**
       * Mensagem de Erro
       */
      ActErrorMessage(toString.call(this, ebfGetSessionAttribute.call(this, 'secClientes_Email', true)));

      /**
       * Fim
       */
      return null;

    }

  }

}

function runColetaMontaConsultaDeSouRemetenteSouDestinatario(parent, sys, formID, params) {
  var rule = new ColetaMontaConsultaDeSouRemetenteSouDestinatario(parent, sys, formID);
  rule.run.apply(rule, params);
}


function Mkr793e5e610d4a424c8439Cca3306f9b53(parent, sys, formID) {
  this.ruleName = '__MKR_{793E5E61-0D4A-424C-8439-CCA3306F9B53}';
  this.functionName = 'Mkr793e5e610d4a424c8439Cca3306f9b53';
  this.sys = sys;
  this.formID = formID;
}

Mkr793e5e610d4a424c8439Cca3306f9b53.prototype = new Rule;

Mkr793e5e610d4a424c8439Cca3306f9b53.prototype.run = function() {
  document.ruleNameForException = '__MKR_{793E5E61-0D4A-424C-8439-CCA3306F9B53}';
  this.context = new Array();

  interactionError('<b>Regra:</b> __MKR_{793E5E61-0D4A-424C-8439-CCA3306F9B53}\n<b>Mensagem:</b> null');

  return null;
}


function VisualizarPrincipal(parent, sys, formID) {
  this.ruleName = 'Visualizar - Principal';
  this.functionName = 'VisualizarPrincipal';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

VisualizarPrincipal.prototype = new Rule;

/**
 * Esta função executa a regra "Visualizar - Principal"
 * @param param_opcaoVisualizacao equivale à variável this.context['param_opcaoVisualizacao']<br/>
 * @author master
 * @since 02/08/2009 01:35:09
 */
VisualizarPrincipal.prototype.run = function() {
  document.ruleNameForException = 'Visualizar - Principal';
  this.context = new Array();

  // Parâmetros de Entrada
  this.context['param_opcaoVisualizacao'] = arguments[0];

  // Variáveis
  this.context['chave3'] = '';

  this.context['chave2'] = '';

  this.context['chave1'] = '';

  this.context['coleta'] = '';

  this.context['conhecimento'] = '';

  this.context['notaFiscal'] = '';

  this.context['ocorrencia'] = '';

  this.context['chave4'] = 0;

  this.context['chave5'] = 0;


  /**
   * Visualizar é null ?
   */
  if (parseBoolean(isNull.call(this, this.context['param_opcaoVisualizacao']))) {
      
    /**
     * Aviso ao Usuário
     */
    ebfAlertMessage.call(this, 'Escolha uma opção de Busca.');

    /**
     * Selecionar a Opção de Coleta
     */
    ebfFormChangeComponentValue.call(this, '{61143686-FC85-450E-BF7E-51A00C3F9527}', 'MakerRadioGroup1', 'CO');

    /**
     * Fim
     */
    return null;

  } else {

    /**
     * Existe Linha Selecionada ?
     */
    if (parseBoolean(isGreaterOrEqual.call(this, ebfGridGetSelectedRow.call(this, 'TMAKERGRID1'), parseInt(0)))) {
        
      /**
       * Obtenho a chave da Coleta
       */
      this.context['chave1'] = toString.call(this, ebfGridGetValue.call(this, 'TMAKERGRID1', ebfGridGetSelectedRow.call(this, 'TMAKERGRID1'), 'Coleta'));

      /**
       * Obtenho a Chave da Empresa
       */
      this.context['chave2'] = toString.call(this, ebfGridGetValue.call(this, 'TMAKERGRID1', ebfGridGetSelectedRow.call(this, 'TMAKERGRID1'), 'Empresa'));

      /**
       * Obtenho a Chave da Filial
       */
      this.context['chave3'] = toString.call(this, ebfGridGetValue.call(this, 'TMAKERGRID1', ebfGridGetSelectedRow.call(this, 'TMAKERGRID1'), 'Filial'));

      /**
       * Obter a chave do Conhec
       */
      this.context['chave4'] = ebfGridGetValue.call(this, 'TMAKERGRID1', ebfGridGetSelectedRow.call(this, 'TMAKERGRID1'), 'Controle Conhec');

      /**
       * Obtenho a chave NF
       */
      this.context['chave5'] = ebfGridGetValue.call(this, 'TMAKERGRID1', ebfGridGetSelectedRow.call(this, 'TMAKERGRID1'), 'Controle NF');

      /**
       * é Coleta ?
       */
      if (parseBoolean(isEqual.call(this, this.context['param_opcaoVisualizacao'], 'CO'))) {
          
        /**
         * Chaves de busca da Coleta são nulas?
         */
        if (parseBoolean((isDiferent.call(this, this.context['chave1'], '&nbsp;') && isDiferent.call(this, this.context['chave2'], '&nbsp;') && isDiferent.call(this, this.context['chave3'], '&nbsp;')))) {
            
          /**
           * Monto o Filtro de Coleta
           */
          this.context['coleta'] = ebfConcat.call(this, 'ct.cdcoleta=', this.context['chave1'], ';ct.cdempresa=', this.context['chave2'], ';ct.cdfilemp=', this.context['chave3']);

          /**
           * Formulario - Abrir Filtrado Generico
           */
          executeSyncJavaRule.call(this, this.getSystem(), this.getForm(), 'Formulario - Abrir Filtrado Generico', this.context['coleta'], '{0824BB61-41AA-4B63-9031-39DCC1582379}');

          /**
           * Fim
           */
          return null;

        } else {

          /**
           * Nao Existe Coleta
           */
          ActWarningMessage('Não existe documento para opção selecionada.');

          /**
           * Fim
           */
          return null;

        }

      } else {

        /**
         * é Conhecimento ?
         */
        if (parseBoolean(isEqual.call(this, this.context['param_opcaoVisualizacao'], 'CTRC'))) {
            
          /**
           * Chaves de busca da Conhecimento são nulas ?
           */
          if (parseBoolean((isDiferent.call(this, this.context['chave4'], '&nbsp;') && isDiferent.call(this, this.context['chave2'], '&nbsp;') && isDiferent.call(this, this.context['chave3'], '&nbsp;')))) {
              
            /**
             * Monto Filtro de Conhecimento
             */
            this.context['conhecimento'] = ebfConcat.call(this, 'ctrc.noctrc=', this.context['chave4'], ';ctrc.cdempresa=', this.context['chave2'], ';ctrc.cdfilemp=', this.context['chave3']);

            /**
             * Formulario - Abrir Filtrado Generico
             */
            executeSyncJavaRule.call(this, this.getSystem(), this.getForm(), 'Formulario - Abrir Filtrado Generico', this.context['conhecimento'], '{4340F198-88DA-4B21-AA88-CC420E108B39}');

            /**
             * Fim
             */
            return null;

          } else {

            /**
             * Nao Existe Coleta
             */
            ActWarningMessage('Não existe documento para opção selecionada.');

            /**
             * Fim
             */
            return null;

          }

        } else {

          /**
           * é NF ?
           */
          if (parseBoolean(isEqual.call(this, this.context['param_opcaoVisualizacao'], 'NF'))) {
              
            /**
             * Chaves de busca da NF são nulas ?
             */
            if (parseBoolean((isDiferent.call(this, this.context['chave5'], '&nbsp;') && isDiferent.call(this, this.context['chave2'], '&nbsp;') && isDiferent.call(this, this.context['chave3'], '&nbsp;')))) {
                
              /**
               * Monto Filtro de Nota Fiscal
               */
              this.context['notaFiscal'] = ebfConcat.call(this, 'nf.nonf=', this.context['chave5'], ';nf.cdempresa=', this.context['chave2'], ';nf.cdfilemp=', this.context['chave3']);

              /**
               * Formulario - Abrir Filtrado Generico
               */
              executeSyncJavaRule.call(this, this.getSystem(), this.getForm(), 'Formulario - Abrir Filtrado Generico', this.context['notaFiscal'], '{5AE2D495-7572-4E5B-940C-5CC5851D2C6A}');

              /**
               * Fim
               */
              return null;

            } else {

              /**
               * Nao Existe Coleta
               */
              ActWarningMessage('Não existe documento para opção selecionada.');

              /**
               * Fim
               */
              return null;

            }

          } else {

            /**
             * é Ocorrencias ?
             */
            if (parseBoolean(isEqual.call(this, this.context['param_opcaoVisualizacao'], 'OCO'))) {
                
              /**
               * Chaves de Busca da Ocorrência são nulas?
               */
              if (parseBoolean((isDiferent.call(this, this.context['chave5'], '&nbsp;') && isDiferent.call(this, this.context['chave2'], '&nbsp;') && isDiferent.call(this, this.context['chave3'], '&nbsp;')))) {
                  
                /**
                 * Monto Filtro de Ocorrencia
                 */
                this.context['ocorrencia'] = ebfConcat.call(this, 'nf.nonf=', this.context['chave5'], ';nf.cdempresa=', this.context['chave2'], ';nf.cdfilemp=', this.context['chave3']);

                /**
                 * Formulario - Abrir Filtrado Generico
                 */
                executeSyncJavaRule.call(this, this.getSystem(), this.getForm(), 'Formulario - Abrir Filtrado Generico', this.context['ocorrencia'], '{F540CCB6-A86D-4550-9CC3-13C58523231D}');

                /**
                 * Fim
                 */
                return null;

              } else {

                /**
                 * Nao Existe Coleta
                 */
                ActWarningMessage('Não existe documento para opção selecionada.');

                /**
                 * Fim
                 */
                return null;

              }

            } else {
              return null;

            }

          }

        }

      }

    } else {

      /**
       * Mensagem de Erro
       */
      ActErrorMessage('Selecione 1 do(s) Registros na Grade');

      /**
       * Fim
       */
      return null;

    }

  }

}

function runVisualizarPrincipal(parent, sys, formID, params) {
  var rule = new VisualizarPrincipal(parent, sys, formID);
  rule.run.apply(rule, params);
}

function MkrA40aac7a91a5414fA7916550ecb346a5(parent, sys, formID) {
  this.ruleName = '__MKR_{A40AAC7A-91A5-414F-A791-6550ECB346A5}';
  this.functionName = 'MkrA40aac7a91a5414fA7916550ecb346a5';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

MkrA40aac7a91a5414fA7916550ecb346a5.prototype = new Rule;

/**
 * Esta função executa a regra "__MKR_{A40AAC7A-91A5-414F-A791-6550ECB346A5}"
 * @author master
 * @since 23/06/2009 14:52:51
 */
MkrA40aac7a91a5414fA7916550ecb346a5.prototype.run = function() {
  document.ruleNameForException = '__MKR_{A40AAC7A-91A5-414F-A791-6550ECB346A5}';
  this.context = new Array();

  // Variáveis
  this.context['Primeiro Aceito'] = '';

  this.context['Segundo Aceito'] = '';

  this.context['Terceiro Aceito'] = '';

  this.context['Quarto Acetiro'] = '';

  this.context['VF'] = false;


  /**
   * Primeiro Aceito = Obter Valor do Componente(Cadastro,Aceito (MakerRadioGroup1))
   */
  this.context['Primeiro Aceito'] = ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerRadioGroup1');

  /**
   * Segundo Aceito = Obter Valor do Componente(Cadastro,Aceito (MakerRadioGroup4))
   */
  this.context['Segundo Aceito'] = ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerRadioGroup4');

  /**
   * Terceiro Aceito = Obter Valor do Componente(Cadastro,Aceito (MakerRadioGroup5))
   */
  this.context['Terceiro Aceito'] = ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerRadioGroup5');

  /**
   * Quarto Acetiro = Obter Valor do Componente(Cadastro,Aceito (MakerRadioGroup7))
   */
  this.context['Quarto Acetiro'] = ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerRadioGroup7');

  /**
   * (E(Igual(@Primeiro Aceito,S),Igual(@Segundo Aceito,S),Igual(@Terceiro Aceito,S),Igual(@Quarto Acetiro,S)))?
   */
  if (parseBoolean((isEqual.call(this, this.context['Primeiro Aceito'], 'S') && isEqual.call(this, this.context['Segundo Aceito'], 'S') && isEqual.call(this, this.context['Terceiro Aceito'], 'S') && isEqual.call(this, this.context['Quarto Acetiro'], 'S')))) {
      
    /**
     * Habilitar Componente(Enviar (MakerButton2),true)
     */
    ebfFormSetEnabled.call(this, 'MakerButton2', true);

    /**
     * Habilitar Componente(Imprimir Contrato (MakerButton1),true)
     */
    ebfFormSetEnabled.call(this, 'MakerButton1', true);

    /**
     * Fim
     */
    return null;

  } else {

    /**
     * Habilitar Componente(Enviar (MakerButton2),false)
     */
    ebfFormSetEnabled.call(this, 'MakerButton2', false);

    /**
     * Habilitar Componente(Imprimir Contrato (MakerButton1),false)
     */
    ebfFormSetEnabled.call(this, 'MakerButton1', false);

    /**
     * Ativar Aba(Contrato)
     */
    ebfFormOpenTab.call(this, 'Contrato');

    /**
     * Fim
     */
    return null;

  }

}

function runMkrA40aac7a91a5414fA7916550ecb346a5(parent, sys, formID, params) {
  var rule = new MkrA40aac7a91a5414fA7916550ecb346a5(parent, sys, formID);
  rule.run.apply(rule, params);
}

function ColetaValidarCamposVazios(parent, sys, formID) {
  this.ruleName = 'Coleta - Validar Campos Vazios';
  this.functionName = 'ColetaValidarCamposVazios';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

ColetaValidarCamposVazios.prototype = new Rule;

/**
 * Esta função executa a regra "Coleta - Validar Campos Vazios"
 * @param p_cpf equivale à variável this.context['p_cpf']<br/>
 * @param p_ie equivale à variável this.context['p_ie']<br/>
 * @param p_nomeFantasia equivale à variável this.context['p_nomeFantasia']<br/>
 * @param p_endereco equivale à variável this.context['p_endereco']<br/>
 * @param p_numero equivale à variável this.context['p_numero']<br/>
 * @param p_bairro equivale à variável this.context['p_bairro']<br/>
 * @param p_cep equivale à variável this.context['p_cep']<br/>
 * @param p_cidade equivale à variável this.context['p_cidade']<br/>
 * @param p_uf equivale à variável this.context['p_uf']<br/>
 * @param p_resp equivale à variável this.context['p_resp']<br/>
 * @param p_dpto equivale à variável this.context['p_dpto']<br/>
 * @param p_fone equivale à variável this.context['p_fone']<br/>
 * @param p_email equivale à variável this.context['p_email']<br/>
 * @param p_produto equivale à variável this.context['p_produto']<br/>
 * @param p_embalagem equivale à variável this.context['p_embalagem']<br/>
 * @param p_qtde equivale à variável this.context['p_qtde']<br/>
 * @param p_peso equivale à variável this.context['p_peso']<br/>
 * @param p_metragem equivale à variável this.context['p_metragem']<br/>
 * @param p_pesocubado equivale à variável this.context['p_pesocubado']<br/>
 * @param p_retirar equivale à variável this.context['p_retirar']<br/>
 * @param p_hr_ini equivale à variável this.context['p_hr_ini']<br/>
 * @param p_hr_fim equivale à variável this.context['p_hr_fim']<br/>
 * @author master
 * @since 01/08/2009 13:02:42
 */
ColetaValidarCamposVazios.prototype.run = function() {
  document.ruleNameForException = 'Coleta - Validar Campos Vazios';
  this.context = new Array();

  // Parâmetros de Entrada
  this.context['p_cpf'] = arguments[0];

  this.context['p_ie'] = arguments[1];

  this.context['p_nomeFantasia'] = arguments[2];

  this.context['p_endereco'] = arguments[3];

  this.context['p_numero'] = arguments[4];

  this.context['p_bairro'] = arguments[5];

  this.context['p_cep'] = arguments[6];

  this.context['p_cidade'] = arguments[7];

  this.context['p_uf'] = arguments[8];

  this.context['p_resp'] = arguments[9];

  this.context['p_dpto'] = arguments[10];

  this.context['p_fone'] = arguments[11];

  this.context['p_email'] = arguments[12];

  this.context['p_produto'] = arguments[13];

  this.context['p_embalagem'] = arguments[14];

  this.context['p_qtde'] = arguments[15];

  this.context['p_peso'] = arguments[16];

  this.context['p_metragem'] = arguments[17];

  this.context['p_pesocubado'] = arguments[18];

  this.context['p_retirar'] = arguments[19];

  this.context['p_hr_ini'] = arguments[20];

  this.context['p_hr_fim'] = arguments[21];


  /**
   * (É Nulo(Remover Espaços(@p_cpf)))?
   */
  if (parseBoolean(isNull.call(this, ebfTrim.call(this, this.context['p_cpf'])))) {
      
    /**
     * Alertar Aguardando Ok(O campo "CPF/CNPJ" é obrigatório)
     */
    ebfAlertMessage.call(this, 'O campo \"CPF/CNPJ\" é obrigatório');

    /**
     * Focar Componente( (col_cnpjcpf))
     */
    ebfFormSetFocus.call(this, 'col_cnpjcpf');

    /**
     * Fim
     */
    return false;

  } else {

    /**
     * (É Nulo(Remover Espaços(@p_ie)))?
     */
    if (parseBoolean(isNull.call(this, ebfTrim.call(this, this.context['p_ie'])))) {
        
      /**
       * Alertar Aguardando Ok(O campo "Inscrição Estadual / RG" é obrigatório)
       */
      ebfAlertMessage.call(this, 'O campo \"Inscrição Estadual / RG\" é obrigatório');

      /**
       * Focar Componente( (col_ie_rg))
       */
      ebfFormSetFocus.call(this, 'col_ie_rg');

      /**
       * Fim
       */
      return false;

    } else {

      /**
       * (É Nulo(Remover Espaços(@p_nomeFantasia)))?
       */
      if (parseBoolean(isNull.call(this, ebfTrim.call(this, this.context['p_nomeFantasia'])))) {
          
        /**
         * Alertar Aguardando Ok(O campo "Nome Fantasia" é obrigatório)
         */
        ebfAlertMessage.call(this, 'O campo \"Nome Fantasia\" é obrigatório');

        /**
         * Focar Componente( (col_nomeFantasia))
         */
        ebfFormSetFocus.call(this, 'col_nomeFantasia');

        /**
         * Fim
         */
        return false;

      } else {

        /**
         * (É Nulo(Remover Espaços(@p_endereco)))?
         */
        if (parseBoolean(isNull.call(this, ebfTrim.call(this, this.context['p_endereco'])))) {
            
          /**
           * Alertar Aguardando Ok(O campo "Endereço" é obrigatório)
           */
          ebfAlertMessage.call(this, 'O campo \"Endereço\" é obrigatório');

          /**
           * Focar Componente( (col_endereco))
           */
          ebfFormSetFocus.call(this, 'col_endereco');

          /**
           * Fim
           */
          return false;

        } else {

          /**
           * (É Nulo(Remover Espaços(@p_numero)))?
           */
          if (parseBoolean(isNull.call(this, ebfTrim.call(this, this.context['p_numero'])))) {
              
            /**
             * Alertar Aguardando Ok(O campo " Nº " é obrigatório)
             */
            ebfAlertMessage.call(this, 'O campo \" Nº \" é obrigatório');

            /**
             * Focar Componente( (col_numero))
             */
            ebfFormSetFocus.call(this, 'col_numero');

            /**
             * Fim
             */
            return false;

          } else {

            /**
             * (É Nulo(Remover Espaços(@p_bairro)))?
             */
            if (parseBoolean(isNull.call(this, ebfTrim.call(this, this.context['p_bairro'])))) {
                
              /**
               * Alertar Aguardando Ok(O campo "Bairro" é obrigatório)
               */
              ebfAlertMessage.call(this, 'O campo \"Bairro\" é obrigatório');

              /**
               * Focar Componente( (col_bairro))
               */
              ebfFormSetFocus.call(this, 'col_bairro');

              /**
               * Fim
               */
              return false;

            } else {

              /**
               * (É Nulo(Remover Espaços(@p_cep)))?
               */
              if (parseBoolean(isNull.call(this, ebfTrim.call(this, this.context['p_cep'])))) {
                  
                /**
                 * Alertar Aguardando Ok(O campo "CEP" é obrigatório)
                 */
                ebfAlertMessage.call(this, 'O campo \"CEP\" é obrigatório');

                /**
                 * Focar Componente( (col_cep))
                 */
                ebfFormSetFocus.call(this, 'col_cep');

                /**
                 * Fim
                 */
                return false;

              } else {

                /**
                 * (É Nulo(Remover Espaços(@p_cidade)))?
                 */
                if (parseBoolean(isNull.call(this, ebfTrim.call(this, this.context['p_cidade'])))) {
                    
                  /**
                   * Alertar Aguardando Ok(O campo "Cidade" é obrigatório)
                   */
                  ebfAlertMessage.call(this, 'O campo \"Cidade\" é obrigatório');

                  /**
                   * Focar Componente( (col_cidade1))
                   */
                  ebfFormSetFocus.call(this, 'col_cidade1');

                  /**
                   * Fim
                   */
                  return false;

                } else {

                  /**
                   * (É Nulo(Remover Espaços(@p_uf)))?
                   */
                  if (parseBoolean(isNull.call(this, ebfTrim.call(this, this.context['p_uf'])))) {
                      
                    /**
                     * Alertar Aguardando Ok(O campo "UF" é obrigatório)
                     */
                    ebfAlertMessage.call(this, 'O campo \"UF\" é obrigatório');

                    /**
                     * Focar Componente( (col_uf))
                     */
                    ebfFormSetFocus.call(this, 'col_uf');

                    /**
                     * Fim
                     */
                    return false;

                  } else {

                    /**
                     * (É Nulo(Remover Espaços(@p_resp)))?
                     */
                    if (parseBoolean(isNull.call(this, ebfTrim.call(this, this.context['p_resp'])))) {
                        
                      /**
                       * Alertar Aguardando Ok(O campo "Responsável" é obrigatório)
                       */
                      ebfAlertMessage.call(this, 'O campo \"Responsável\" é obrigatório');

                      /**
                       * Focar Componente( (col_responsavel))
                       */
                      ebfFormSetFocus.call(this, 'col_responsavel');

                      /**
                       * Fim
                       */
                      return false;

                    } else {

                      /**
                       * (É Nulo(Remover Espaços(@p_dpto)))?
                       */
                      if (parseBoolean(isNull.call(this, ebfTrim.call(this, this.context['p_dpto'])))) {
                          
                        /**
                         * Alertar Aguardando Ok(O campo "Departamento" é obrigatório)
                         */
                        ebfAlertMessage.call(this, 'O campo \"Departamento\" é obrigatório');

                        /**
                         * Focar Componente( (col_depto))
                         */
                        ebfFormSetFocus.call(this, 'col_depto');

                        /**
                         * Fim
                         */
                        return false;

                      } else {

                        /**
                         * (É Nulo(Remover Espaços(@p_fone)))?
                         */
                        if (parseBoolean(isNull.call(this, ebfTrim.call(this, this.context['p_fone'])))) {
                            
                          /**
                           * Alertar Aguardando Ok(O campo "Telefone" é obrigatório)
                           */
                          ebfAlertMessage.call(this, 'O campo \"Telefone\" é obrigatório');

                          /**
                           * Focar Componente( (col_telefone))
                           */
                          ebfFormSetFocus.call(this, 'col_telefone');

                          /**
                           * Fim
                           */
                          return false;

                        } else {

                          /**
                           * (É Nulo(Remover Espaços(@p_email)))?
                           */
                          if (parseBoolean(isNull.call(this, ebfTrim.call(this, this.context['p_email'])))) {
                              
                            /**
                             * Alertar Aguardando Ok(O campo "E-mail" é obrigatório)
                             */
                            ebfAlertMessage.call(this, 'O campo \"E-mail\" é obrigatório');

                            /**
                             * Focar Componente( (col_email))
                             */
                            ebfFormSetFocus.call(this, 'col_email');

                            /**
                             * Fim
                             */
                            return false;

                          } else {

                            /**
                             * (É Nulo(Remover Espaços(@p_produto)))?
                             */
                            if (parseBoolean(isNull.call(this, ebfTrim.call(this, this.context['p_produto'])))) {
                                
                              /**
                               * Alertar Aguardando Ok(O campo "Produto" é obrigatório)
                               */
                              ebfAlertMessage.call(this, 'O campo \"Produto\" é obrigatório');

                              /**
                               * Focar Componente( (col_mer_produto))
                               */
                              ebfFormSetFocus.call(this, 'col_mer_produto');

                              /**
                               * Fim
                               */
                              return false;

                            } else {

                              /**
                               * (É Nulo(Remover Espaços(@p_embalagem)))?
                               */
                              if (parseBoolean(isNull.call(this, ebfTrim.call(this, this.context['p_embalagem'])))) {
                                  
                                /**
                                 * Alertar Aguardando Ok(O campo "Embalagem" é obrigatório)
                                 */
                                ebfAlertMessage.call(this, 'O campo \"Embalagem\" é obrigatório');

                                /**
                                 * Focar Componente( (col_mer_embalagem))
                                 */
                                ebfFormSetFocus.call(this, 'col_mer_embalagem');

                                /**
                                 * Fim
                                 */
                                return false;

                              } else {

                                /**
                                 * (É Nulo(Remover Espaços(@p_qtde)))?
                                 */
                                if (parseBoolean(isNull.call(this, ebfTrim.call(this, this.context['p_qtde'])))) {
                                    
                                  /**
                                   * Alertar Aguardando Ok(O campo "Quantidade" é obrigatório)
                                   */
                                  ebfAlertMessage.call(this, 'O campo \"Quantidade\" é obrigatório');

                                  /**
                                   * Focar Componente( (col_mer_qtd))
                                   */
                                  ebfFormSetFocus.call(this, 'col_mer_qtd');

                                  /**
                                   * Fim
                                   */
                                  return false;

                                } else {

                                  /**
                                   * (É Nulo(Remover Espaços(@p_peso)))?
                                   */
                                  if (parseBoolean(isNull.call(this, ebfTrim.call(this, this.context['p_peso'])))) {
                                      
                                    /**
                                     * Alertar Aguardando Ok(O campo "Peso" é obrigatório)
                                     */
                                    ebfAlertMessage.call(this, 'O campo \"Peso\" é obrigatório');

                                    /**
                                     * Focar Componente( (col_mer_peso))
                                     */
                                    ebfFormSetFocus.call(this, 'col_mer_peso');

                                    /**
                                     * Fim
                                     */
                                    return false;

                                  } else {

                                    /**
                                     * (É Nulo(Remover Espaços(@p_metragem)))?
                                     */
                                    if (parseBoolean(isNull.call(this, ebfTrim.call(this, this.context['p_metragem'])))) {
                                        
                                      /**
                                       * Alertar Aguardando Ok(O campo "Metragem" é obrigatório)
                                       */
                                      ebfAlertMessage.call(this, 'O campo \"Metragem\" é obrigatório');

                                      /**
                                       * Focar Componente( (col_mer_metragem))
                                       */
                                      ebfFormSetFocus.call(this, 'col_mer_metragem');

                                      /**
                                       * Fim
                                       */
                                      return false;

                                    } else {

                                      /**
                                       * (É Nulo(Remover Espaços(@p_pesocubado)))?
                                       */
                                      if (parseBoolean(isNull.call(this, ebfTrim.call(this, this.context['p_pesocubado'])))) {
                                          
                                        /**
                                         * Alertar Aguardando Ok(O campo "Peso Cubado" é obrigatório)
                                         */
                                        ebfAlertMessage.call(this, 'O campo \"Peso Cubado\" é obrigatório');

                                        /**
                                         * Focar Componente( (col_mer_pesoCubado))
                                         */
                                        ebfFormSetFocus.call(this, 'col_mer_pesoCubado');

                                        /**
                                         * Fim
                                         */
                                        return false;

                                      } else {

                                        /**
                                         * (É Nulo(Remover Espaços(@p_retirar)))?
                                         */
                                        if (parseBoolean(isNull.call(this, ebfTrim.call(this, this.context['p_retirar'])))) {
                                            
                                          /**
                                           * Alertar Aguardando Ok(O campo "Data de Retirada" é obrigatório)
                                           */
                                          ebfAlertMessage.call(this, 'O campo \"Data de Retirada\" é obrigatório');

                                          /**
                                           * Focar Componente( (colOnlineDtRetirar))
                                           */
                                          ebfFormSetFocus.call(this, 'colOnlineDtRetirar');

                                          /**
                                           * Fim
                                           */
                                          return false;

                                        } else {

                                          /**
                                           * (É Nulo(Remover Espaços(@p_hr_ini)))?
                                           */
                                          if (parseBoolean(isNull.call(this, ebfTrim.call(this, this.context['p_hr_ini'])))) {
                                              
                                            /**
                                             * Alertar Aguardando Ok(O campo "A partir das" é obrigatório)
                                             */
                                            ebfAlertMessage.call(this, 'O campo \"A partir das\" é obrigatório');

                                            /**
                                             * Focar Componente( (col_mer_hrinicio))
                                             */
                                            ebfFormSetFocus.call(this, 'col_mer_hrinicio');

                                            /**
                                             * Fim
                                             */
                                            return false;

                                          } else {

                                            /**
                                             * (É Nulo(Remover Espaços(@p_hr_fim)))?
                                             */
                                            if (parseBoolean(isNull.call(this, ebfTrim.call(this, this.context['p_hr_fim'])))) {
                                                
                                              /**
                                               * Alertar Aguardando Ok(O campo "Até às" é obrigatório)
                                               */
                                              ebfAlertMessage.call(this, 'O campo \"Até às\" é obrigatório');

                                              /**
                                               * Focar Componente( (col_mer_hrFim))
                                               */
                                              ebfFormSetFocus.call(this, 'col_mer_hrFim');

                                              /**
                                               * Fim
                                               */
                                              return false;

                                            } else {

                                              /**
                                               * Fim
                                               */
                                              return true;

                                            }

                                          }

                                        }

                                      }

                                    }

                                  }

                                }

                              }

                            }

                          }

                        }

                      }

                    }

                  }

                }

              }

            }

          }

        }

      }

    }

  }

}

function runColetaValidarCamposVazios(parent, sys, formID, params) {
  var rule = new ColetaValidarCamposVazios(parent, sys, formID);
  rule.run.apply(rule, params);
}

function ColetaPrincipal(parent, sys, formID) {
  this.ruleName = 'Coleta - Principal';
  this.functionName = 'ColetaPrincipal';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

ColetaPrincipal.prototype = new Rule;

/**
 * Esta função executa a regra "Coleta - Principal"
 * @param p_cpf equivale à variável this.context['p_cpf']<br/>
 * @param p_ie equivale à variável this.context['p_ie']<br/>
 * @param p_nomeFantasia equivale à variável this.context['p_nomeFantasia']<br/>
 * @param p_endereco equivale à variável this.context['p_endereco']<br/>
 * @param p_numero equivale à variável this.context['p_numero']<br/>
 * @param p_bairro equivale à variável this.context['p_bairro']<br/>
 * @param p_cep equivale à variável this.context['p_cep']<br/>
 * @param p_cidade equivale à variável this.context['p_cidade']<br/>
 * @param p_uf equivale à variável this.context['p_uf']<br/>
 * @param p_resp equivale à variável this.context['p_resp']<br/>
 * @param p_dpto equivale à variável this.context['p_dpto']<br/>
 * @param p_fone equivale à variável this.context['p_fone']<br/>
 * @param p_email equivale à variável this.context['p_email']<br/>
 * @param p_produto equivale à variável this.context['p_produto']<br/>
 * @param p_embalagem equivale à variável this.context['p_embalagem']<br/>
 * @param p_qtde equivale à variável this.context['p_qtde']<br/>
 * @param p_peso equivale à variável this.context['p_peso']<br/>
 * @param p_metragem equivale à variável this.context['p_metragem']<br/>
 * @param p_pesocubado equivale à variável this.context['p_pesocubado']<br/>
 * @param p_retirar equivale à variável this.context['p_retirar']<br/>
 * @param param_coleta equivale à variável this.context['param_coleta']<br/>
 * @param param_filemp equivale à variável this.context['param_filemp']<br/>
 * @param param_empresa equivale à variável this.context['param_empresa']<br/>
 * @param h1 equivale à variável this.context['h1']<br/>
 * @param h2 equivale à variável this.context['h2']<br/>
 * @author master
 * @since 26/10/2009 08:06:06
 */
ColetaPrincipal.prototype.run = function() {
  document.ruleNameForException = 'Coleta - Principal';
  this.context = new Array();

  // Parâmetros de Entrada
  this.context['p_cpf'] = arguments[0];

  this.context['p_ie'] = arguments[1];

  this.context['p_nomeFantasia'] = arguments[2];

  this.context['p_endereco'] = arguments[3];

  this.context['p_numero'] = arguments[4];

  this.context['p_bairro'] = arguments[5];

  this.context['p_cep'] = arguments[6];

  this.context['p_cidade'] = arguments[7];

  this.context['p_uf'] = arguments[8];

  this.context['p_resp'] = arguments[9];

  this.context['p_dpto'] = arguments[10];

  this.context['p_fone'] = arguments[11];

  this.context['p_email'] = arguments[12];

  this.context['p_produto'] = arguments[13];

  this.context['p_embalagem'] = arguments[14];

  this.context['p_qtde'] = arguments[15];

  this.context['p_peso'] = arguments[16];

  this.context['p_metragem'] = arguments[17];

  this.context['p_pesocubado'] = arguments[18];

  this.context['p_retirar'] = arguments[19];

  this.context['param_coleta'] = arguments[20];

  this.context['param_filemp'] = arguments[21];

  this.context['param_empresa'] = arguments[22];

  this.context['h1'] = arguments[23];

  this.context['h2'] = arguments[24];

  // Variáveis
  this.context['eValido'] = false;

  this.context['str_cdcoleta'] = '';

  this.context['str_cdempresa'] = '';

  this.context['str_cdfilial'] = '';


  /**
   * Coleta - Validar Campos Vazios
   */
  this.context['eValido'] = new ColetaValidarCamposVazios(this, this.getSystem(), this.getForm()).run(this.context['p_cpf'], this.context['p_ie'], this.context['p_nomeFantasia'], this.context['p_endereco'], this.context['p_numero'], this.context['p_bairro'], this.context['p_cep'], this.context['p_cidade'], this.context['p_uf'], this.context['p_resp'], this.context['p_dpto'], this.context['p_fone'], this.context['p_email'], this.context['p_produto'], this.context['p_embalagem'], this.context['p_qtde'], this.context['p_peso'], this.context['p_metragem'], this.context['p_pesocubado'], this.context['p_retirar'], this.context['h1'], this.context['h2']);

  /**
   * (Igual(@eValido,true))?
   */
  if (parseBoolean(isEqual.call(this, this.context['eValido'], true))) {
      
    /**
     * Coleta - Obter valores chaves e setar nos campos
     */
    executeSyncJavaRule.call(this, this.getSystem(), this.getForm(), 'Coleta - Obter valores chaves e setar nos campos');

    /**
     * Usuario - Obter Login do Usuario Logado
     */
    executeSyncJavaRule.call(this, this.getSystem(), this.getForm(), 'Usuario - Obter Login do Usuario Logado');

    /**
     * Incluir Dados Registro Corrente()
     */
    ebfNavIncludeSaveRecord.call(this);

    /**
     * Mensagem de Alerta
     */
    ActWarningMessage('Coleta solicitada com sucesso. Aguarde aprovação via e-mail!');

    /**
     * Fim
     */
    return null;

  } else {

    /**
     * Fim
     */
    return null;

  }

}

function runColetaPrincipal(parent, sys, formID, params) {
  var rule = new ColetaPrincipal(parent, sys, formID);
  rule.run.apply(rule, params);
}

function Mkr336a38b673ca400e9d1c619644d07f5f(parent, sys, formID) {
  this.ruleName = '__MKR_{336A38B6-73CA-400E-9D1C-619644D07F5F}';
  this.functionName = 'Mkr336a38b673ca400e9d1c619644d07f5f';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

Mkr336a38b673ca400e9d1c619644d07f5f.prototype = new Rule;

/**
 * Esta função executa a regra "__MKR_{336A38B6-73CA-400E-9D1C-619644D07F5F}"
 * @author master
 * @since 15/08/2009 11:54:53
 */
Mkr336a38b673ca400e9d1c619644d07f5f.prototype.run = function() {
  document.ruleNameForException = '__MKR_{336A38B6-73CA-400E-9D1C-619644D07F5F}';
  this.context = new Array();


  /**
   * Abrir Formulário numa Moldura(Coleta Online, (MakerBevel2),Cadastro - Coleta Online,true)
   */
  ebfFrameOpenForm.call(this, '{58689E00-BBAC-4773-8BE0-E0881FB7A9A7}', 'MakerBevel2', '{58C3928F-0C85-480C-B5C1-71FA9D0ECE30}', true);

  /**
   * Fim
   */
  return null;

}

function runMkr336a38b673ca400e9d1c619644d07f5f(parent, sys, formID, params) {
  var rule = new Mkr336a38b673ca400e9d1c619644d07f5f(parent, sys, formID);
  rule.run.apply(rule, params);
}

function Mkr4c16e86eD10e44228368Ad83b9108287(parent, sys, formID) {
  this.ruleName = '__MKR_{4C16E86E-D10E-4422-8368-AD83B9108287}';
  this.functionName = 'Mkr4c16e86eD10e44228368Ad83b9108287';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

Mkr4c16e86eD10e44228368Ad83b9108287.prototype = new Rule;

/**
 * Esta função executa a regra "__MKR_{4C16E86E-D10E-4422-8368-AD83B9108287}"
 * @author master
 * @since 03/08/2009 10:33:44
 */
Mkr4c16e86eD10e44228368Ad83b9108287.prototype.run = function() {
  document.ruleNameForException = '__MKR_{4C16E86E-D10E-4422-8368-AD83B9108287}';
  this.context = new Array();


  /**
   * Modo de Inserção()
   */
  ebfFormInsertMode.call(this);

  /**
   * Fim
   */
  return null;

}

function runMkr4c16e86eD10e44228368Ad83b9108287(parent, sys, formID, params) {
  var rule = new Mkr4c16e86eD10e44228368Ad83b9108287(parent, sys, formID);
  rule.run.apply(rule, params);
}


function Mkr51ef8b55F7c74353B8a861af82d8ff5f(parent, sys, formID) {
  this.ruleName = '__MKR_{51EF8B55-F7C7-4353-B8A8-61AF82D8FF5F}';
  this.functionName = 'Mkr51ef8b55F7c74353B8a861af82d8ff5f';
  this.sys = sys;
  this.formID = formID;
}

Mkr51ef8b55F7c74353B8a861af82d8ff5f.prototype = new Rule;

Mkr51ef8b55F7c74353B8a861af82d8ff5f.prototype.run = function() {
  document.ruleNameForException = '__MKR_{51EF8B55-F7C7-4353-B8A8-61AF82D8FF5F}';
  this.context = new Array();

  interactionError('<b>Regra:</b> __MKR_{51EF8B55-F7C7-4353-B8A8-61AF82D8FF5F}\n<b>Mensagem:</b> null');

  return null;
}


function MkrA13baa1aBade4f9883b9F5b74b7b29c3(parent, sys, formID) {
  this.ruleName = '__MKR_{A13BAA1A-BADE-4F98-83B9-F5B74B7B29C3}';
  this.functionName = 'MkrA13baa1aBade4f9883b9F5b74b7b29c3';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

MkrA13baa1aBade4f9883b9F5b74b7b29c3.prototype = new Rule;

/**
 * Esta função executa a regra "__MKR_{A13BAA1A-BADE-4F98-83B9-F5B74B7B29C3}"
 * @param param_ie equivale à variável this.context['param_ie']<br/>
 * @param param_empresa equivale à variável this.context['param_empresa']<br/>
 * @param param_cpf_cnpj equivale à variável this.context['param_cpf_cnpj']<br/>
 * @author master
 * @since 17/08/2009 13:09:46
 */
MkrA13baa1aBade4f9883b9F5b74b7b29c3.prototype.run = function() {
  document.ruleNameForException = '__MKR_{A13BAA1A-BADE-4F98-83B9-F5B74B7B29C3}';
  this.context = new Array();

  // Parâmetros de Entrada
  this.context['param_ie'] = arguments[0];

  this.context['param_empresa'] = arguments[1];

  this.context['param_cpf_cnpj'] = arguments[2];

  // Variáveis
  this.context['variavel'] = '';

  this.context['int_cnpjcpf'] = '';


  /**
   * inscrição estadual é nulo
   */
  if (parseBoolean(isNull.call(this, this.context['param_ie']))) {
      
    /**
     * setar o componente incrição estadual como ISENTO
     */
    ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTIE', 'ISENTO');

    /**
     * Setar o nome da empresa no componente Responsável
     */
    ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTNOMERESPONSAVEL', this.context['param_empresa']);

    /**
     * int_cnpjcpf = Tamanho(@param_cpf_cnpj)
     */
    this.context['int_cnpjcpf'] = ebfLength.call(this, this.context['param_cpf_cnpj']);

    /**
     * (Igual(@int_cnpjcpf,11))?
     */
    if (parseBoolean(isEqual.call(this, this.context['int_cnpjcpf'], '11'))) {
        
      /**
       * Setar o cnpj do cliente no componente cpf responsável
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTCPFRESPONSAVEL', this.context['param_cpf_cnpj']);

      /**
       * Setar o rg do cliente no componente identidade RG  da aba Contatos
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTIDENTRESPONSAVEL', ebfFormGetComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTIE'));

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBIE', this.context['param_ie']);

      /**
       * Setar o Nome do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBEU', this.context['param_empresa']);

      /**
       * Setar Cpf do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBCPFRESP', this.context['param_cpf_cnpj']);

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBRGRESP', this.context['param_ie']);

      /**
       * Fim
       */
      return null;

    } else {

      /**
       * Setar o rg do cliente no componente identidade RG  da aba Contatos
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTIDENTRESPONSAVEL', ebfFormGetComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTIE'));

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBIE', this.context['param_ie']);

      /**
       * Setar o Nome do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBEU', this.context['param_empresa']);

      /**
       * Setar Cpf do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBCPFRESP', this.context['param_cpf_cnpj']);

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBRGRESP', this.context['param_ie']);

      /**
       * Fim
       */
      return null;

    }

  } else {

    /**
     * Setar o nome da empresa no componente Responsável
     */
    ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTNOMERESPONSAVEL', this.context['param_empresa']);

    /**
     * int_cnpjcpf = Tamanho(@param_cpf_cnpj)
     */
    this.context['int_cnpjcpf'] = ebfLength.call(this, this.context['param_cpf_cnpj']);

    /**
     * (Igual(@int_cnpjcpf,11))?
     */
    if (parseBoolean(isEqual.call(this, this.context['int_cnpjcpf'], '11'))) {
        
      /**
       * Setar o cnpj do cliente no componente cpf responsável
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTCPFRESPONSAVEL', this.context['param_cpf_cnpj']);

      /**
       * Setar o rg do cliente no componente identidade RG  da aba Contatos
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTIDENTRESPONSAVEL', ebfFormGetComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTIE'));

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBIE', this.context['param_ie']);

      /**
       * Setar o Nome do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBEU', this.context['param_empresa']);

      /**
       * Setar Cpf do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBCPFRESP', this.context['param_cpf_cnpj']);

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBRGRESP', this.context['param_ie']);

      /**
       * Fim
       */
      return null;

    } else {

      /**
       * Setar o rg do cliente no componente identidade RG  da aba Contatos
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTIDENTRESPONSAVEL', ebfFormGetComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTIE'));

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBIE', this.context['param_ie']);

      /**
       * Setar o Nome do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBEU', this.context['param_empresa']);

      /**
       * Setar Cpf do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBCPFRESP', this.context['param_cpf_cnpj']);

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBRGRESP', this.context['param_ie']);

      /**
       * Fim
       */
      return null;

    }

  }

}

function runMkrA13baa1aBade4f9883b9F5b74b7b29c3(parent, sys, formID, params) {
  var rule = new MkrA13baa1aBade4f9883b9F5b74b7b29c3(parent, sys, formID);
  rule.run.apply(rule, params);
}

function Mkr4e2158290ab44bb9A079D8a038e7dcd5(parent, sys, formID) {
  this.ruleName = '__MKR_{4E215829-0AB4-4BB9-A079-D8A038E7DCD5}';
  this.functionName = 'Mkr4e2158290ab44bb9A079D8a038e7dcd5';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

Mkr4e2158290ab44bb9A079D8a038e7dcd5.prototype = new Rule;

/**
 * Esta função executa a regra "__MKR_{4E215829-0AB4-4BB9-A079-D8A038E7DCD5}"
 * @param param_aceite1 equivale à variável this.context['param_aceite1']<br/>
 * @param param_aceite2 equivale à variável this.context['param_aceite2']<br/>
 * @param param_aceite3 equivale à variável this.context['param_aceite3']<br/>
 * @param param_aceite4 equivale à variável this.context['param_aceite4']<br/>
 * @author master
 * @since 25/07/2009 14:05:21
 */
Mkr4e2158290ab44bb9A079D8a038e7dcd5.prototype.run = function() {
  document.ruleNameForException = '__MKR_{4E215829-0AB4-4BB9-A079-D8A038E7DCD5}';
  this.context = new Array();

  // Parâmetros de Entrada
  this.context['param_aceite1'] = arguments[0];

  this.context['param_aceite2'] = arguments[1];

  this.context['param_aceite3'] = arguments[2];

  this.context['param_aceite4'] = arguments[3];

  // Variáveis
  this.context['Primeiro Aceito'] = '';

  this.context['Segundo Aceito'] = '';

  this.context['Terceiro Aceito'] = '';

  this.context['Quarto Acetiro'] = '';

  this.context['VF'] = false;


  /**
   * aceites é igual a S
   */
  if (parseBoolean((isEqual.call(this, this.context['param_aceite1'], 'S') && isEqual.call(this, this.context['param_aceite2'], 'S') && isEqual.call(this, this.context['param_aceite3'], 'S') && isEqual.call(this, this.context['param_aceite4'], 'S')))) {
      
    /**
     * Habilitar Componente(Enviar (BTNENVIAR),true)
     */
    ebfFormSetEnabled.call(this, 'BTNENVIAR', true);

    /**
     * Fim
     */
    return null;

  } else {

    /**
     * Habilitar Componente(Enviar (BTNENVIAR),false)
     */
    ebfFormSetEnabled.call(this, 'BTNENVIAR', false);

    /**
     * Ativar Aba(Contrato)
     */
    ebfFormOpenTab.call(this, 'Contrato');

    /**
     * Fim
     */
    return null;

  }

}

function runMkr4e2158290ab44bb9A079D8a038e7dcd5(parent, sys, formID, params) {
  var rule = new Mkr4e2158290ab44bb9A079D8a038e7dcd5(parent, sys, formID);
  rule.run.apply(rule, params);
}

function MkrB04ac167741343e5Bdd22f7c892717e0(parent, sys, formID) {
  this.ruleName = '__MKR_{B04AC167-7413-43E5-BDD2-2F7C892717E0}';
  this.functionName = 'MkrB04ac167741343e5Bdd22f7c892717e0';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

MkrB04ac167741343e5Bdd22f7c892717e0.prototype = new Rule;

/**
 * Esta função executa a regra "__MKR_{B04AC167-7413-43E5-BDD2-2F7C892717E0}"
 * @author master
 * @since 18/06/2009 10:01:17
 */
MkrB04ac167741343e5Bdd22f7c892717e0.prototype.run = function() {
  document.ruleNameForException = '__MKR_{B04AC167-7413-43E5-BDD2-2F7C892717E0}';
  this.context = new Array();


  /**
   * Abrir Formulário numa Moldura(FormularioSkin, (MakerBevel2),Cadastro,true)
   */
  ebfFrameOpenForm.call(this, '{E430E7F2-A1DC-4156-A4F8-08ABF6141F4C}', 'MakerBevel2', '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', true);
  return null;

}

function runMkrB04ac167741343e5Bdd22f7c892717e0(parent, sys, formID, params) {
  var rule = new MkrB04ac167741343e5Bdd22f7c892717e0(parent, sys, formID);
  rule.run.apply(rule, params);
}

function MkrBc5458c48d06462aA9c06195bee0f5bd(parent, sys, formID) {
  this.ruleName = '__MKR_{BC5458C4-8D06-462A-A9C0-6195BEE0F5BD}';
  this.functionName = 'MkrBc5458c48d06462aA9c06195bee0f5bd';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

MkrBc5458c48d06462aA9c06195bee0f5bd.prototype = new Rule;

/**
 * Esta função executa a regra "__MKR_{BC5458C4-8D06-462A-A9C0-6195BEE0F5BD}"
 * @author master
 * @since 14/10/2009 17:38:58
 */
MkrBc5458c48d06462aA9c06195bee0f5bd.prototype.run = function() {
  document.ruleNameForException = '__MKR_{BC5458C4-8D06-462A-A9C0-6195BEE0F5BD}';
  this.context = new Array();

  ebfFormInsertMode.call(this);

  /**
   * Fim
   */
  return null;

}

function runMkrBc5458c48d06462aA9c06195bee0f5bd(parent, sys, formID, params) {
  var rule = new MkrBc5458c48d06462aA9c06195bee0f5bd(parent, sys, formID);
  rule.run.apply(rule, params);
}

function MkrDbc1bf81Ee6647b1Bac903f1a6d212ad(parent, sys, formID) {
  this.ruleName = '__MKR_{DBC1BF81-EE66-47B1-BAC9-03F1A6D212AD}';
  this.functionName = 'MkrDbc1bf81Ee6647b1Bac903f1a6d212ad';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

MkrDbc1bf81Ee6647b1Bac903f1a6d212ad.prototype = new Rule;

/**
 * Esta função executa a regra "__MKR_{DBC1BF81-EE66-47B1-BAC9-03F1A6D212AD}"
 * @author master
 * @since 24/06/2009 12:40:32
 */
MkrDbc1bf81Ee6647b1Bac903f1a6d212ad.prototype.run = function() {
  document.ruleNameForException = '__MKR_{DBC1BF81-EE66-47B1-BAC9-03F1A6D212AD}';
  this.context = new Array();

  // Variáveis
  this.context['E-MailValido'] = false;

  this.context['char_email'] = '';


  /**
   * char_email = Obter Valor do Componente(Cadastro,E-mail (EDTEMAIL6))
   */
  this.context['char_email'] = ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'EDTEMAIL6');

  /**
   * (É Nulo(@char_email))?
   */
  if (parseBoolean(isNull.call(this, this.context['char_email']))) {
          return null;

  } else {

    /**
     * E-MailValido = Existe Subsequência(@char_email,@)
     */
    this.context['E-MailValido'] = ebfSearchSubstring.call(this, this.context['char_email'], '@');

    /**
     * (Igual(@E-MailValido,false))?
     */
    if (parseBoolean(isEqual.call(this, this.context['E-MailValido'], false))) {
        
      /**
       * Alertar Aguardando Ok(Este E-Mail não é válido. Verifique!)
       */
      ebfAlertMessage.call(this, 'Este E-Mail não é válido. Verifique!');

      /**
       * Focar Componente(E-mail (EDTEMAIL6))
       */
      ebfFormSetFocus.call(this, 'EDTEMAIL6');

      /**
       * Fim
       */
      return null;

    } else {

      /**
       * Fim
       */
      return null;

    }

  }

}

function runMkrDbc1bf81Ee6647b1Bac903f1a6d212ad(parent, sys, formID, params) {
  var rule = new MkrDbc1bf81Ee6647b1Bac903f1a6d212ad(parent, sys, formID);
  rule.run.apply(rule, params);
}

function Mkr4361d8160d764516845cC12f6717239b(parent, sys, formID) {
  this.ruleName = '__MKR_{4361D816-0D76-4516-845C-C12F6717239B}';
  this.functionName = 'Mkr4361d8160d764516845cC12f6717239b';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

Mkr4361d8160d764516845cC12f6717239b.prototype = new Rule;

/**
 * Esta função executa a regra "__MKR_{4361D816-0D76-4516-845C-C12F6717239B}"
 * @author master
 * @since 14/10/2009 17:38:58
 */
Mkr4361d8160d764516845cC12f6717239b.prototype.run = function() {
  document.ruleNameForException = '__MKR_{4361D816-0D76-4516-845C-C12F6717239B}';
  this.context = new Array();

  ebfFormInsertMode.call(this);

  /**
   * Fim
   */
  return null;

}

function runMkr4361d8160d764516845cC12f6717239b(parent, sys, formID, params) {
  var rule = new Mkr4361d8160d764516845cC12f6717239b(parent, sys, formID);
  rule.run.apply(rule, params);
}

function Mkr3927b218Aa304c92967f7b3a998019c8(parent, sys, formID) {
  this.ruleName = '__MKR_{3927B218-AA30-4C92-967F-7B3A998019C8}';
  this.functionName = 'Mkr3927b218Aa304c92967f7b3a998019c8';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

Mkr3927b218Aa304c92967f7b3a998019c8.prototype = new Rule;

/**
 * Esta função executa a regra "__MKR_{3927B218-AA30-4C92-967F-7B3A998019C8}"
 * @author master
 * @since 23/06/2009 09:00:31
 */
Mkr3927b218Aa304c92967f7b3a998019c8.prototype.run = function() {
  document.ruleNameForException = '__MKR_{3927B218-AA30-4C92-967F-7B3A998019C8}';
  this.context = new Array();


  /**
   * variavel = Obter Valor do Componente(Cadastro,Aceito (MakerRadioGroup6))
   */
  this.context['variavel'] = ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerRadioGroup6');

  /**
   * (Igual(@variavel,S))?
   */
  if (parseBoolean(isEqual.call(this, this.context['variavel'], 'S'))) {
      
    /**
     * Definir Obrigatoriedade de Componente( (MakerLabel33),true)
     */
    ebfFormSetRequired.call(this, 'MakerLabel33', true);

    /**
     * Definir Obrigatoriedade de Componente( (MakerEdit7),true)
     */
    ebfFormSetRequired.call(this, 'MakerEdit7', true);

    /**
     * Fim
     */
    return null;

  } else {

    /**
     * Definir Obrigatoriedade de Componente( (MakerLabel33),false)
     */
    ebfFormSetRequired.call(this, 'MakerLabel33', false);

    /**
     * Definir Obrigatoriedade de Componente( (MakerEdit7),false)
     */
    ebfFormSetRequired.call(this, 'MakerEdit7', false);

    /**
     * Fim
     */
    return null;

  }

}

function runMkr3927b218Aa304c92967f7b3a998019c8(parent, sys, formID, params) {
  var rule = new Mkr3927b218Aa304c92967f7b3a998019c8(parent, sys, formID);
  rule.run.apply(rule, params);
}

function Mkr9c914734F12449c78b02Dcdb9462ee9c(parent, sys, formID) {
  this.ruleName = '__MKR_{9C914734-F124-49C7-8B02-DCDB9462EE9C}';
  this.functionName = 'Mkr9c914734F12449c78b02Dcdb9462ee9c';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

Mkr9c914734F12449c78b02Dcdb9462ee9c.prototype = new Rule;

/**
 * Esta função executa a regra "__MKR_{9C914734-F124-49C7-8B02-DCDB9462EE9C}"
 * @author master
 * @since 23/06/2009 14:52:51
 */
Mkr9c914734F12449c78b02Dcdb9462ee9c.prototype.run = function() {
  document.ruleNameForException = '__MKR_{9C914734-F124-49C7-8B02-DCDB9462EE9C}';
  this.context = new Array();

  // Variáveis
  this.context['Primeiro Aceito'] = '';

  this.context['Segundo Aceito'] = '';

  this.context['Terceiro Aceito'] = '';

  this.context['Quarto Acetiro'] = '';

  this.context['VF'] = false;


  /**
   * Primeiro Aceito = Obter Valor do Componente(Cadastro,Aceito (MakerRadioGroup1))
   */
  this.context['Primeiro Aceito'] = ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerRadioGroup1');

  /**
   * Segundo Aceito = Obter Valor do Componente(Cadastro,Aceito (MakerRadioGroup4))
   */
  this.context['Segundo Aceito'] = ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerRadioGroup4');

  /**
   * Terceiro Aceito = Obter Valor do Componente(Cadastro,Aceito (MakerRadioGroup5))
   */
  this.context['Terceiro Aceito'] = ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerRadioGroup5');

  /**
   * Quarto Acetiro = Obter Valor do Componente(Cadastro,Aceito (MakerRadioGroup7))
   */
  this.context['Quarto Acetiro'] = ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerRadioGroup7');

  /**
   * (E(Igual(@Primeiro Aceito,S),Igual(@Segundo Aceito,S),Igual(@Terceiro Aceito,S),Igual(@Quarto Acetiro,S)))?
   */
  if (parseBoolean((isEqual.call(this, this.context['Primeiro Aceito'], 'S') && isEqual.call(this, this.context['Segundo Aceito'], 'S') && isEqual.call(this, this.context['Terceiro Aceito'], 'S') && isEqual.call(this, this.context['Quarto Acetiro'], 'S')))) {
      
    /**
     * Habilitar Componente(Enviar (MakerButton2),true)
     */
    ebfFormSetEnabled.call(this, 'MakerButton2', true);

    /**
     * Habilitar Componente(Imprimir Contrato (MakerButton1),true)
     */
    ebfFormSetEnabled.call(this, 'MakerButton1', true);

    /**
     * Fim
     */
    return null;

  } else {

    /**
     * Habilitar Componente(Enviar (MakerButton2),false)
     */
    ebfFormSetEnabled.call(this, 'MakerButton2', false);

    /**
     * Habilitar Componente(Imprimir Contrato (MakerButton1),false)
     */
    ebfFormSetEnabled.call(this, 'MakerButton1', false);

    /**
     * Ativar Aba(Contrato)
     */
    ebfFormOpenTab.call(this, 'Contrato');

    /**
     * Fim
     */
    return null;

  }

}

function runMkr9c914734F12449c78b02Dcdb9462ee9c(parent, sys, formID, params) {
  var rule = new Mkr9c914734F12449c78b02Dcdb9462ee9c(parent, sys, formID);
  rule.run.apply(rule, params);
}

function CteEnvicteV9999(parent, sys, formID) {
  this.ruleName = 'CTe - enviCte_v99.99';
  this.functionName = 'CteEnvicteV9999';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

CteEnvicteV9999.prototype = new Rule;

/**
 * Esta função executa a regra "CTe - enviCte_v99.99"
 * @author master
 * @since 01/10/2009 16:54:50
 */
CteEnvicteV9999.prototype.run = function() {
  document.ruleNameForException = 'CTe - enviCte_v99.99';
  this.context = new Array();

  // Variáveis
  this.context['enviCte'] = '';


  /**
   * enviCte_v99.99.xsd
   */
  this.context['enviCte'] = '<Teste></Teste>';

  /**
   * CTe - Criar arquivo XML
   */
  executeSyncJavaRule.call(this, this.getSystem(), this.getForm(), 'CTe - Criar arquivo XML', this.context['enviCte'], 'C:\\Active\\enviCte_v99.99.xml');

  /**
   * Fim
   */
  return null;

}

function runCteEnvicteV9999(parent, sys, formID, params) {
  var rule = new CteEnvicteV9999(parent, sys, formID);
  rule.run.apply(rule, params);
}

function RastreamentoGravarContatoSeEstiverEmModoDeInsercao(parent, sys, formID) {
  this.ruleName = 'Rastreamento - Gravar contato se estiver em modo de inserção';
  this.functionName = 'RastreamentoGravarContatoSeEstiverEmModoDeInsercao';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

RastreamentoGravarContatoSeEstiverEmModoDeInsercao.prototype = new Rule;

/**
 * Esta função executa a regra "Rastreamento - Gravar contato se estiver em modo de inserção"
 * @author master
 * @since 18/08/2009 10:04:07
 */
RastreamentoGravarContatoSeEstiverEmModoDeInsercao.prototype.run = function() {
  document.ruleNameForException = 'Rastreamento - Gravar contato se estiver em modo de inserção';
  this.context = new Array();

  // Variáveis
  this.context['str_modo'] = '';


}

function runRastreamentoGravarContatoSeEstiverEmModoDeInsercao(parent, sys, formID, params) {
  var rule = new RastreamentoGravarContatoSeEstiverEmModoDeInsercao(parent, sys, formID);
  rule.run.apply(rule, params);
}

function Mkr6261a8128eaa48da98b7622354f15b18(parent, sys, formID) {
  this.ruleName = '__MKR_{6261A812-8EAA-48DA-98B7-622354F15B18}';
  this.functionName = 'Mkr6261a8128eaa48da98b7622354f15b18';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

Mkr6261a8128eaa48da98b7622354f15b18.prototype = new Rule;

/**
 * Esta função executa a regra "__MKR_{6261A812-8EAA-48DA-98B7-622354F15B18}"
 * @author master
 * @since 15/10/2009 17:42:41
 */
Mkr6261a8128eaa48da98b7622354f15b18.prototype.run = function() {
  document.ruleNameForException = '__MKR_{6261A812-8EAA-48DA-98B7-622354F15B18}';
  this.context = new Array();

  ebfNavIncludeSaveRecord.call(this);

  /**
   * Fim
   */
  return null;

}

function runMkr6261a8128eaa48da98b7622354f15b18(parent, sys, formID, params) {
  var rule = new Mkr6261a8128eaa48da98b7622354f15b18(parent, sys, formID);
  rule.run.apply(rule, params);
}

function Mkr85e1149970bc472e98c08df0c785bcca(parent, sys, formID) {
  this.ruleName = '__MKR_{85E11499-70BC-472E-98C0-8DF0C785BCCA}';
  this.functionName = 'Mkr85e1149970bc472e98c08df0c785bcca';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

Mkr85e1149970bc472e98c08df0c785bcca.prototype = new Rule;

/**
 * Esta função executa a regra "__MKR_{85E11499-70BC-472E-98C0-8DF0C785BCCA}"
 * @author master
 * @since 24/06/2009 12:40:32
 */
Mkr85e1149970bc472e98c08df0c785bcca.prototype.run = function() {
  document.ruleNameForException = '__MKR_{85E11499-70BC-472E-98C0-8DF0C785BCCA}';
  this.context = new Array();

  // Variáveis
  this.context['E-MailValido'] = false;

  this.context['char_email'] = '';


  /**
   * char_email = Obter Valor do Componente(Cadastro,E-mail (EDTEMAIL6))
   */
  this.context['char_email'] = ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'EDTEMAIL6');

  /**
   * (É Nulo(@char_email))?
   */
  if (parseBoolean(isNull.call(this, this.context['char_email']))) {
          return null;

  } else {

    /**
     * E-MailValido = Existe Subsequência(@char_email,@)
     */
    this.context['E-MailValido'] = ebfSearchSubstring.call(this, this.context['char_email'], '@');

    /**
     * (Igual(@E-MailValido,false))?
     */
    if (parseBoolean(isEqual.call(this, this.context['E-MailValido'], false))) {
        
      /**
       * Alertar Aguardando Ok(Este E-Mail não é válido. Verifique!)
       */
      ebfAlertMessage.call(this, 'Este E-Mail não é válido. Verifique!');

      /**
       * Focar Componente(E-mail (EDTEMAIL6))
       */
      ebfFormSetFocus.call(this, 'EDTEMAIL6');

      /**
       * Fim
       */
      return null;

    } else {

      /**
       * Fim
       */
      return null;

    }

  }

}

function runMkr85e1149970bc472e98c08df0c785bcca(parent, sys, formID, params) {
  var rule = new Mkr85e1149970bc472e98c08df0c785bcca(parent, sys, formID);
  rule.run.apply(rule, params);
}

function ContaCorrenteBuscaSeCpfCnpjJaExiste(parent, sys, formID) {
  this.ruleName = 'Conta Corrente - Busca se CPF/CNPJ ja existe';
  this.functionName = 'ContaCorrenteBuscaSeCpfCnpjJaExiste';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

ContaCorrenteBuscaSeCpfCnpjJaExiste.prototype = new Rule;

/**
 * Esta função executa a regra "Conta Corrente - Busca se CPF/CNPJ ja existe"
 * @param param_ie equivale à variável this.context['param_ie']<br/>
 * @param param_cpf_cnpj equivale à variável this.context['param_cpf_cnpj']<br/>
 * @param param_formulario equivale à variável this.context['param_formulario']<br/>
 * @param param_compIE equivale à variável this.context['param_compIE']<br/>
 * @param param_compCPF equivale à variável this.context['param_compCPF']<br/>
 * @author master
 * @since 16/10/2009 13:07:10
 */
ContaCorrenteBuscaSeCpfCnpjJaExiste.prototype.run = function() {
  document.ruleNameForException = 'Conta Corrente - Busca se CPF/CNPJ ja existe';
  this.context = new Array();

  // Parâmetros de Entrada
  this.context['param_ie'] = arguments[0];

  this.context['param_cpf_cnpj'] = arguments[1];

  this.context['param_formulario'] = arguments[2];

  this.context['param_compIE'] = arguments[3];

  this.context['param_compCPF'] = arguments[4];

  // Variáveis
  this.context['log_ExistemDados'] = false;

  this.context['log_cpfcnpj'] = false;


  /**
   * Rastreamento - valideCPFCNPJ
   */
  this.context['log_cpfcnpj'] = new RastreamentoValidecpfcnpj(this, this.getSystem(), this.getForm()).run(this.context['param_cpf_cnpj'], this.context['param_formulario'], this.context['param_compIE']);

  /**
   * cpf_cnpj é válido?
   */
  if (parseBoolean(isEqual.call(this, this.context['log_cpfcnpj'], true))) {
      
    /**
     * Rastreamento - Pesquisa Cliente
     */
    this.context['log_ExistemDados'] = executeSyncJavaRule.call(this, this.getSystem(), this.getForm(), 'Rastreamento - Pesquisa Cliente', this.context['param_cpf_cnpj']);

    /**
     * Existe cliente?
     */
    if (parseBoolean(isEqual.call(this, this.context['log_ExistemDados'], true))) {
        
      /**
       * Alertar Aguardando Ok(CPF ou CNPJ já existe, verifique!)
       */
      ebfAlertMessage.call(this, 'CPF ou CNPJ já existe, verifique!');

      /**
       * Focar Componente(CNPJ/CPF (EDTCNPJCPF))
       */
      ebfFormSetFocus.call(this, this.context['param_compCPF']);

      /**
       * Fim
       */
      return null;

    } else {

      /**
       * Setar o Cpf_Cnpj no campo oculto Código
       */
      ebfSQLSetFormField.call(this, 'cdcliente', this.context['param_cpf_cnpj']);

      /**
       * Fim
       */
      return null;

    }

  } else {

    /**
     * Alerta ao usuario  CNPJ ou CPF inválido. Verifique!
     */
    ebfAlertMessage.call(this, 'CNPJ ou CPF inválido. Verifique!');

    /**
     * retornar o foco para o componente CPF_CNPJ
     */
    ebfFormSetFocus.call(this, this.context['param_compCPF']);

    /**
     * Fim
     */
    return null;

  }

}

function runContaCorrenteBuscaSeCpfCnpjJaExiste(parent, sys, formID, params) {
  var rule = new ContaCorrenteBuscaSeCpfCnpjJaExiste(parent, sys, formID);
  rule.run.apply(rule, params);
}

function Mkr369912a2895f46c3A1f6B098f10d3d51(parent, sys, formID) {
  this.ruleName = '__MKR_{369912A2-895F-46C3-A1F6-B098F10D3D51}';
  this.functionName = 'Mkr369912a2895f46c3A1f6B098f10d3d51';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

Mkr369912a2895f46c3A1f6B098f10d3d51.prototype = new Rule;

/**
 * Esta função executa a regra "__MKR_{369912A2-895F-46C3-A1F6-B098F10D3D51}"
 * @author master
 * @since 23/06/2009 14:52:51
 */
Mkr369912a2895f46c3A1f6B098f10d3d51.prototype.run = function() {
  document.ruleNameForException = '__MKR_{369912A2-895F-46C3-A1F6-B098F10D3D51}';
  this.context = new Array();

  // Variáveis
  this.context['Primeiro Aceito'] = '';

  this.context['Segundo Aceito'] = '';

  this.context['Terceiro Aceito'] = '';

  this.context['Quarto Acetiro'] = '';

  this.context['VF'] = false;


  /**
   * Primeiro Aceito = Obter Valor do Componente(Cadastro,Aceito (MakerRadioGroup1))
   */
  this.context['Primeiro Aceito'] = ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerRadioGroup1');

  /**
   * Segundo Aceito = Obter Valor do Componente(Cadastro,Aceito (MakerRadioGroup4))
   */
  this.context['Segundo Aceito'] = ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerRadioGroup4');

  /**
   * Terceiro Aceito = Obter Valor do Componente(Cadastro,Aceito (MakerRadioGroup5))
   */
  this.context['Terceiro Aceito'] = ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerRadioGroup5');

  /**
   * Quarto Acetiro = Obter Valor do Componente(Cadastro,Aceito (MakerRadioGroup7))
   */
  this.context['Quarto Acetiro'] = ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerRadioGroup7');

  /**
   * (E(Igual(@Primeiro Aceito,S),Igual(@Segundo Aceito,S),Igual(@Terceiro Aceito,S),Igual(@Quarto Acetiro,S)))?
   */
  if (parseBoolean((isEqual.call(this, this.context['Primeiro Aceito'], 'S') && isEqual.call(this, this.context['Segundo Aceito'], 'S') && isEqual.call(this, this.context['Terceiro Aceito'], 'S') && isEqual.call(this, this.context['Quarto Acetiro'], 'S')))) {
      
    /**
     * Habilitar Componente(Enviar (MakerButton2),true)
     */
    ebfFormSetEnabled.call(this, 'MakerButton2', true);

    /**
     * Habilitar Componente(Imprimir Contrato (MakerButton1),true)
     */
    ebfFormSetEnabled.call(this, 'MakerButton1', true);

    /**
     * Fim
     */
    return null;

  } else {

    /**
     * Habilitar Componente(Enviar (MakerButton2),false)
     */
    ebfFormSetEnabled.call(this, 'MakerButton2', false);

    /**
     * Habilitar Componente(Imprimir Contrato (MakerButton1),false)
     */
    ebfFormSetEnabled.call(this, 'MakerButton1', false);

    /**
     * Ativar Aba(Contrato)
     */
    ebfFormOpenTab.call(this, 'Contrato');

    /**
     * Fim
     */
    return null;

  }

}

function runMkr369912a2895f46c3A1f6B098f10d3d51(parent, sys, formID, params) {
  var rule = new Mkr369912a2895f46c3A1f6B098f10d3d51(parent, sys, formID);
  rule.run.apply(rule, params);
}

function ContaCorrenteSetaIsentoEPreencheOsDadosDoContrato(parent, sys, formID) {
  this.ruleName = 'Conta Corrente - Seta ISENTO e preenche os dados do contrato';
  this.functionName = 'ContaCorrenteSetaIsentoEPreencheOsDadosDoContrato';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

ContaCorrenteSetaIsentoEPreencheOsDadosDoContrato.prototype = new Rule;

/**
 * Esta função executa a regra "Conta Corrente - Seta ISENTO e preenche os dados do contrato"
 * @param param_ie equivale à variável this.context['param_ie']<br/>
 * @param param_empresa equivale à variável this.context['param_empresa']<br/>
 * @param param_cpf_cnpj equivale à variável this.context['param_cpf_cnpj']<br/>
 * @param param_formulario equivale à variável this.context['param_formulario']<br/>
 * @param param_compIE equivale à variável this.context['param_compIE']<br/>
 * @param param_compCPF equivale à variável this.context['param_compCPF']<br/>
 * @param param_compEmpresa equivale à variável this.context['param_compEmpresa']<br/>
 * @param param_compResponsavel equivale à variável this.context['param_compResponsavel']<br/>
 * @param param_compCpfResponsavel equivale à variável this.context['param_compCpfResponsavel']<br/>
 * @param param_compRgResponsavel equivale à variável this.context['param_compRgResponsavel']<br/>
 * @param param_compIeContrato equivale à variável this.context['param_compIeContrato']<br/>
 * @param param_compEmpresaContrato equivale à variável this.context['param_compEmpresaContrato']<br/>
 * @param param_compCpfContrato equivale à variável this.context['param_compCpfContrato']<br/>
 * @param param_compRgContrato equivale à variável this.context['param_compRgContrato']<br/>
 * @author master
 * @since 16/10/2009 10:03:02
 */
ContaCorrenteSetaIsentoEPreencheOsDadosDoContrato.prototype.run = function() {
  document.ruleNameForException = 'Conta Corrente - Seta ISENTO e preenche os dados do contrato';
  this.context = new Array();

  // Parâmetros de Entrada
  this.context['param_ie'] = arguments[0];

  this.context['param_empresa'] = arguments[1];

  this.context['param_cpf_cnpj'] = arguments[2];

  this.context['param_formulario'] = arguments[3];

  this.context['param_compIE'] = arguments[4];

  this.context['param_compCPF'] = arguments[5];

  this.context['param_compEmpresa'] = arguments[6];

  this.context['param_compResponsavel'] = arguments[7];

  this.context['param_compCpfResponsavel'] = arguments[8];

  this.context['param_compRgResponsavel'] = arguments[9];

  this.context['param_compIeContrato'] = arguments[10];

  this.context['param_compEmpresaContrato'] = arguments[11];

  this.context['param_compCpfContrato'] = arguments[12];

  this.context['param_compRgContrato'] = arguments[13];

  // Variáveis
  this.context['int_cnpjcpf'] = '';


  /**
   * inscrição estadual é nulo
   */
  if (parseBoolean(isNull.call(this, this.context['param_ie']))) {
      
    /**
     * setar o componente incrição estadual como ISENTO
     */
    ebfFormChangeComponentValue.call(this, this.context['param_formulario'], this.context['param_compIE'], 'ISENTO');

    /**
     * Setar o nome da empresa no componente Responsável
     */
    ebfFormChangeComponentValue.call(this, this.context['param_formulario'], this.context['param_compResponsavel'], this.context['param_empresa']);

    /**
     * int_cnpjcpf = Tamanho(@param_cpf_cnpj)
     */
    this.context['int_cnpjcpf'] = ebfLength.call(this, this.context['param_cpf_cnpj']);

    /**
     * (Igual(@int_cnpjcpf,11))?
     */
    if (parseBoolean(isEqual.call(this, this.context['int_cnpjcpf'], '11'))) {
        
      /**
       * Setar o cnpj do cliente no componente cpf responsável
       */
      ebfFormChangeComponentValue.call(this, this.context['param_formulario'], this.context['param_compCpfResponsavel'], this.context['param_cpf_cnpj']);

      /**
       * Setar o rg do cliente no componente identidade RG  da aba Contatos
       */
      ebfFormChangeComponentValue.call(this, this.context['param_formulario'], this.context['param_compRgResponsavel'], ebfFormGetComponentValue.call(this, this.context['param_formulario'], this.context['param_compIE']));

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, this.context['param_formulario'], this.context['param_compIeContrato'], this.context['param_ie']);

      /**
       * Setar o Nome do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, this.context['param_formulario'], this.context['param_compEmpresaContrato'], this.context['param_empresa']);

      /**
       * Setar Cpf do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, this.context['param_formulario'], this.context['param_compCpfContrato'], this.context['param_cpf_cnpj']);

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, this.context['param_formulario'], this.context['param_compRgContrato'], this.context['param_ie']);

      /**
       * Fim
       */
      return null;

    } else {

      /**
       * Setar o rg do cliente no componente identidade RG  da aba Contatos
       */
      ebfFormChangeComponentValue.call(this, this.context['param_formulario'], this.context['param_compRgResponsavel'], ebfFormGetComponentValue.call(this, this.context['param_formulario'], this.context['param_compIE']));

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, this.context['param_formulario'], this.context['param_compIeContrato'], this.context['param_ie']);

      /**
       * Setar o Nome do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, this.context['param_formulario'], this.context['param_compEmpresaContrato'], this.context['param_empresa']);

      /**
       * Setar Cpf do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, this.context['param_formulario'], this.context['param_compCpfContrato'], this.context['param_cpf_cnpj']);

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, this.context['param_formulario'], this.context['param_compRgContrato'], this.context['param_ie']);

      /**
       * Fim
       */
      return null;

    }

  } else {

    /**
     * Setar o nome da empresa no componente Responsável
     */
    ebfFormChangeComponentValue.call(this, this.context['param_formulario'], this.context['param_compResponsavel'], this.context['param_empresa']);

    /**
     * int_cnpjcpf = Tamanho(@param_cpf_cnpj)
     */
    this.context['int_cnpjcpf'] = ebfLength.call(this, this.context['param_cpf_cnpj']);

    /**
     * (Igual(@int_cnpjcpf,11))?
     */
    if (parseBoolean(isEqual.call(this, this.context['int_cnpjcpf'], '11'))) {
        
      /**
       * Setar o cnpj do cliente no componente cpf responsável
       */
      ebfFormChangeComponentValue.call(this, this.context['param_formulario'], this.context['param_compCpfResponsavel'], this.context['param_cpf_cnpj']);

      /**
       * Setar o rg do cliente no componente identidade RG  da aba Contatos
       */
      ebfFormChangeComponentValue.call(this, this.context['param_formulario'], this.context['param_compRgResponsavel'], ebfFormGetComponentValue.call(this, this.context['param_formulario'], this.context['param_compIE']));

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, this.context['param_formulario'], this.context['param_compIeContrato'], this.context['param_ie']);

      /**
       * Setar o Nome do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, this.context['param_formulario'], this.context['param_compEmpresaContrato'], this.context['param_empresa']);

      /**
       * Setar Cpf do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, this.context['param_formulario'], this.context['param_compCpfContrato'], this.context['param_cpf_cnpj']);

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, this.context['param_formulario'], this.context['param_compRgContrato'], this.context['param_ie']);

      /**
       * Fim
       */
      return null;

    } else {

      /**
       * Setar o rg do cliente no componente identidade RG  da aba Contatos
       */
      ebfFormChangeComponentValue.call(this, this.context['param_formulario'], this.context['param_compRgResponsavel'], ebfFormGetComponentValue.call(this, this.context['param_formulario'], this.context['param_compIE']));

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, this.context['param_formulario'], this.context['param_compIeContrato'], this.context['param_ie']);

      /**
       * Setar o Nome do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, this.context['param_formulario'], this.context['param_compEmpresaContrato'], this.context['param_empresa']);

      /**
       * Setar Cpf do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, this.context['param_formulario'], this.context['param_compCpfContrato'], this.context['param_cpf_cnpj']);

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, this.context['param_formulario'], this.context['param_compRgContrato'], this.context['param_ie']);

      /**
       * Fim
       */
      return null;

    }

  }

}

function runContaCorrenteSetaIsentoEPreencheOsDadosDoContrato(parent, sys, formID, params) {
  var rule = new ContaCorrenteSetaIsentoEPreencheOsDadosDoContrato(parent, sys, formID);
  rule.run.apply(rule, params);
}

function ContaCorrenteValidaSeOsAceitesEstaoMarcados(parent, sys, formID) {
  this.ruleName = 'Conta Corrente -  Valida se os aceites estão marcados';
  this.functionName = 'ContaCorrenteValidaSeOsAceitesEstaoMarcados';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

ContaCorrenteValidaSeOsAceitesEstaoMarcados.prototype = new Rule;

/**
 * Esta função executa a regra "Conta Corrente -  Valida se os aceites estão marcados"
 * @param param_aceite1 equivale à variável this.context['param_aceite1']<br/>
 * @param param_aceite2 equivale à variável this.context['param_aceite2']<br/>
 * @param param_aceite3 equivale à variável this.context['param_aceite3']<br/>
 * @param param_aceite4 equivale à variável this.context['param_aceite4']<br/>
 * @author master
 * @since 15/10/2009 16:43:53
 */
ContaCorrenteValidaSeOsAceitesEstaoMarcados.prototype.run = function() {
  document.ruleNameForException = 'Conta Corrente -  Valida se os aceites estão marcados';
  this.context = new Array();

  // Parâmetros de Entrada
  this.context['param_aceite1'] = arguments[0];

  this.context['param_aceite2'] = arguments[1];

  this.context['param_aceite3'] = arguments[2];

  this.context['param_aceite4'] = arguments[3];

  // Variáveis
  this.context['Primeiro Aceito'] = '';

  this.context['Segundo Aceito'] = '';

  this.context['Terceiro Aceito'] = '';

  this.context['Querto Aceito'] = '';


  /**
   * aceites é igual a S
   */
  if (parseBoolean((isEqual.call(this, this.context['param_aceite1'], 'S') && isEqual.call(this, this.context['param_aceite2'], 'S') && isEqual.call(this, this.context['param_aceite3'], 'S') && isEqual.call(this, this.context['param_aceite4'], 'S')))) {
      
    /**
     * Habilitar Componente(Enviar (BTNENVIAR),true)
     */
    ebfFormSetEnabled.call(this, 'MakerButton1', true);

    /**
     * Fim
     */
    return null;

  } else {

    /**
     * Habilitar Componente(Enviar (BTNENVIAR),false)
     */
    ebfFormSetEnabled.call(this, 'MakerButton1', false);

    /**
     * Ativar Aba(Contrato)
     */
    ebfFormOpenTab.call(this, 'Contrato');

    /**
     * Fim
     */
    return null;

  }

}

function runContaCorrenteValidaSeOsAceitesEstaoMarcados(parent, sys, formID, params) {
  var rule = new ContaCorrenteValidaSeOsAceitesEstaoMarcados(parent, sys, formID);
  rule.run.apply(rule, params);
}

function MkrB89a7e9600db4663Abe14fa9c4366863(parent, sys, formID) {
  this.ruleName = '__MKR_{B89A7E96-00DB-4663-ABE1-4FA9C4366863}';
  this.functionName = 'MkrB89a7e9600db4663Abe14fa9c4366863';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

MkrB89a7e9600db4663Abe14fa9c4366863.prototype = new Rule;

/**
 * Esta função executa a regra "__MKR_{B89A7E96-00DB-4663-ABE1-4FA9C4366863}"
 * @param param_ie equivale à variável this.context['param_ie']<br/>
 * @param param_empresa equivale à variável this.context['param_empresa']<br/>
 * @param param_cpf_cnpj equivale à variável this.context['param_cpf_cnpj']<br/>
 * @author master
 * @since 17/08/2009 13:09:46
 */
MkrB89a7e9600db4663Abe14fa9c4366863.prototype.run = function() {
  document.ruleNameForException = '__MKR_{B89A7E96-00DB-4663-ABE1-4FA9C4366863}';
  this.context = new Array();

  // Parâmetros de Entrada
  this.context['param_ie'] = arguments[0];

  this.context['param_empresa'] = arguments[1];

  this.context['param_cpf_cnpj'] = arguments[2];

  // Variáveis
  this.context['variavel'] = '';

  this.context['int_cnpjcpf'] = '';


  /**
   * inscrição estadual é nulo
   */
  if (parseBoolean(isNull.call(this, this.context['param_ie']))) {
      
    /**
     * setar o componente incrição estadual como ISENTO
     */
    ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTIE', 'ISENTO');

    /**
     * Setar o nome da empresa no componente Responsável
     */
    ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTNOMERESPONSAVEL', this.context['param_empresa']);

    /**
     * int_cnpjcpf = Tamanho(@param_cpf_cnpj)
     */
    this.context['int_cnpjcpf'] = ebfLength.call(this, this.context['param_cpf_cnpj']);

    /**
     * (Igual(@int_cnpjcpf,11))?
     */
    if (parseBoolean(isEqual.call(this, this.context['int_cnpjcpf'], '11'))) {
        
      /**
       * Setar o cnpj do cliente no componente cpf responsável
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTCPFRESPONSAVEL', this.context['param_cpf_cnpj']);

      /**
       * Setar o rg do cliente no componente identidade RG  da aba Contatos
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTIDENTRESPONSAVEL', ebfFormGetComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTIE'));

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBIE', this.context['param_ie']);

      /**
       * Setar o Nome do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBEU', this.context['param_empresa']);

      /**
       * Setar Cpf do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBCPFRESP', this.context['param_cpf_cnpj']);

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBRGRESP', this.context['param_ie']);

      /**
       * Fim
       */
      return null;

    } else {

      /**
       * Setar o rg do cliente no componente identidade RG  da aba Contatos
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTIDENTRESPONSAVEL', ebfFormGetComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTIE'));

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBIE', this.context['param_ie']);

      /**
       * Setar o Nome do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBEU', this.context['param_empresa']);

      /**
       * Setar Cpf do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBCPFRESP', this.context['param_cpf_cnpj']);

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBRGRESP', this.context['param_ie']);

      /**
       * Fim
       */
      return null;

    }

  } else {

    /**
     * Setar o nome da empresa no componente Responsável
     */
    ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTNOMERESPONSAVEL', this.context['param_empresa']);

    /**
     * int_cnpjcpf = Tamanho(@param_cpf_cnpj)
     */
    this.context['int_cnpjcpf'] = ebfLength.call(this, this.context['param_cpf_cnpj']);

    /**
     * (Igual(@int_cnpjcpf,11))?
     */
    if (parseBoolean(isEqual.call(this, this.context['int_cnpjcpf'], '11'))) {
        
      /**
       * Setar o cnpj do cliente no componente cpf responsável
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTCPFRESPONSAVEL', this.context['param_cpf_cnpj']);

      /**
       * Setar o rg do cliente no componente identidade RG  da aba Contatos
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTIDENTRESPONSAVEL', ebfFormGetComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTIE'));

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBIE', this.context['param_ie']);

      /**
       * Setar o Nome do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBEU', this.context['param_empresa']);

      /**
       * Setar Cpf do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBCPFRESP', this.context['param_cpf_cnpj']);

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBRGRESP', this.context['param_ie']);

      /**
       * Fim
       */
      return null;

    } else {

      /**
       * Setar o rg do cliente no componente identidade RG  da aba Contatos
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTIDENTRESPONSAVEL', ebfFormGetComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTIE'));

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBIE', this.context['param_ie']);

      /**
       * Setar o Nome do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBEU', this.context['param_empresa']);

      /**
       * Setar Cpf do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBCPFRESP', this.context['param_cpf_cnpj']);

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBRGRESP', this.context['param_ie']);

      /**
       * Fim
       */
      return null;

    }

  }

}

function runMkrB89a7e9600db4663Abe14fa9c4366863(parent, sys, formID, params) {
  var rule = new MkrB89a7e9600db4663Abe14fa9c4366863(parent, sys, formID);
  rule.run.apply(rule, params);
}

function MkrF2b7610fAc924d03B09092ae1941d304(parent, sys, formID) {
  this.ruleName = '__MKR_{F2B7610F-AC92-4D03-B090-92AE1941D304}';
  this.functionName = 'MkrF2b7610fAc924d03B09092ae1941d304';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

MkrF2b7610fAc924d03B09092ae1941d304.prototype = new Rule;

/**
 * Esta função executa a regra "__MKR_{F2B7610F-AC92-4D03-B090-92AE1941D304}"
 * @param num_insc equivale à variável this.context['num_insc']<br/>
 * @param uf equivale à variável this.context['uf']<br/>
 * @author master
 * @since 16/07/2009 18:03:59
 */
MkrF2b7610fAc924d03B09092ae1941d304.prototype.run = function() {
  document.ruleNameForException = '__MKR_{F2B7610F-AC92-4D03-B090-92AE1941D304}';
  this.context = new Array();

  // Parâmetros de Entrada
  this.context['num_insc'] = arguments[0];

  this.context['uf'] = arguments[1];

  // Variáveis
  this.context['variavel'] = '';


  /**
   * (É Nulo(@num_insc))?
   */
  if (parseBoolean(isNull.call(this, this.context['num_insc']))) {
      
    /**
     * Alterar Valor do Componente(Cadastro,Inscrição Estadual (EDTIEST2),ISENTO)
     */
    ebfFormChangeComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'EDTIEST2', 'ISENTO');

    /**
     * Alterar Valor do Componente(Cadastro,Nome do Responsável (MakerEdit2),Obter Valor do Componente(Cadastro,Empresa (EDTEMPRESA1)))
     */
    ebfFormChangeComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerEdit2', ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'EDTEMPRESA1'));

    /**
     * Alterar Valor do Componente(Cadastro,CPF (MakerEdit8),Obter Valor do Componente(Cadastro,CNPJ/CPF (EDTCGCCPF1)))
     */
    ebfFormChangeComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerEdit8', ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'EDTCGCCPF1'));

    /**
     * Alterar Valor do Componente(Cadastro,Identidade/RG (MakerEdit3),Obter Valor do Componente(Cadastro,Inscrição Estadual (EDTIEST2)))
     */
    ebfFormChangeComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerEdit3', ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'EDTIEST2'));

    /**
     * Fim
     */
    return null;

  } else {

    /**
     * Alterar Valor do Componente(Cadastro,Nome do Responsável (MakerEdit2),Obter Valor do Componente(Cadastro,Empresa (EDTEMPRESA1)))
     */
    ebfFormChangeComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerEdit2', ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'EDTEMPRESA1'));

    /**
     * Alterar Valor do Componente(Cadastro,CPF (MakerEdit8),Obter Valor do Componente(Cadastro,CNPJ/CPF (EDTCGCCPF1)))
     */
    ebfFormChangeComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerEdit8', ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'EDTCGCCPF1'));

    /**
     * Alterar Valor do Componente(Cadastro,Identidade/RG (MakerEdit3),Obter Valor do Componente(Cadastro,Inscrição Estadual (EDTIEST2)))
     */
    ebfFormChangeComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerEdit3', ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'EDTIEST2'));

    /**
     * Fim
     */
    return null;

  }

}

function runMkrF2b7610fAc924d03B09092ae1941d304(parent, sys, formID, params) {
  var rule = new MkrF2b7610fAc924d03B09092ae1941d304(parent, sys, formID);
  rule.run.apply(rule, params);
}

function Mkr806f250988bc46a4B9af3de0b75513d0(parent, sys, formID) {
  this.ruleName = '__MKR_{806F2509-88BC-46A4-B9AF-3DE0B75513D0}';
  this.functionName = 'Mkr806f250988bc46a4B9af3de0b75513d0';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

Mkr806f250988bc46a4B9af3de0b75513d0.prototype = new Rule;

/**
 * Esta função executa a regra "__MKR_{806F2509-88BC-46A4-B9AF-3DE0B75513D0}"
 * @author master
 * @since 14/10/2009 17:38:58
 */
Mkr806f250988bc46a4B9af3de0b75513d0.prototype.run = function() {
  document.ruleNameForException = '__MKR_{806F2509-88BC-46A4-B9AF-3DE0B75513D0}';
  this.context = new Array();

  ebfFormInsertMode.call(this);

  /**
   * Fim
   */
  return null;

}

function runMkr806f250988bc46a4B9af3de0b75513d0(parent, sys, formID, params) {
  var rule = new Mkr806f250988bc46a4B9af3de0b75513d0(parent, sys, formID);
  rule.run.apply(rule, params);
}

function Mkr068ba8e9C0c74112B2de7bbd93d88fb6(parent, sys, formID) {
  this.ruleName = '__MKR_{068BA8E9-C0C7-4112-B2DE-7BBD93D88FB6}';
  this.functionName = 'Mkr068ba8e9C0c74112B2de7bbd93d88fb6';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

Mkr068ba8e9C0c74112B2de7bbd93d88fb6.prototype = new Rule;

/**
 * Esta função executa a regra "__MKR_{068BA8E9-C0C7-4112-B2DE-7BBD93D88FB6}"
 * @author master
 * @since 24/06/2009 12:40:32
 */
Mkr068ba8e9C0c74112B2de7bbd93d88fb6.prototype.run = function() {
  document.ruleNameForException = '__MKR_{068BA8E9-C0C7-4112-B2DE-7BBD93D88FB6}';
  this.context = new Array();

  // Variáveis
  this.context['E-MailValido'] = false;

  this.context['char_email'] = '';


  /**
   * char_email = Obter Valor do Componente(Cadastro,E-mail (EDTEMAIL6))
   */
  this.context['char_email'] = ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'EDTEMAIL6');

  /**
   * (É Nulo(@char_email))?
   */
  if (parseBoolean(isNull.call(this, this.context['char_email']))) {
          return null;

  } else {

    /**
     * E-MailValido = Existe Subsequência(@char_email,@)
     */
    this.context['E-MailValido'] = ebfSearchSubstring.call(this, this.context['char_email'], '@');

    /**
     * (Igual(@E-MailValido,false))?
     */
    if (parseBoolean(isEqual.call(this, this.context['E-MailValido'], false))) {
        
      /**
       * Alertar Aguardando Ok(Este E-Mail não é válido. Verifique!)
       */
      ebfAlertMessage.call(this, 'Este E-Mail não é válido. Verifique!');

      /**
       * Focar Componente(E-mail (EDTEMAIL6))
       */
      ebfFormSetFocus.call(this, 'EDTEMAIL6');

      /**
       * Fim
       */
      return null;

    } else {

      /**
       * Fim
       */
      return null;

    }

  }

}

function runMkr068ba8e9C0c74112B2de7bbd93d88fb6(parent, sys, formID, params) {
  var rule = new Mkr068ba8e9C0c74112B2de7bbd93d88fb6(parent, sys, formID);
  rule.run.apply(rule, params);
}

function MkrA29a9ec9987f48a598faDd668868efc2(parent, sys, formID) {
  this.ruleName = '__MKR_{A29A9EC9-987F-48A5-98FA-DD668868EFC2}';
  this.functionName = 'MkrA29a9ec9987f48a598faDd668868efc2';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

MkrA29a9ec9987f48a598faDd668868efc2.prototype = new Rule;

/**
 * Esta função executa a regra "__MKR_{A29A9EC9-987F-48A5-98FA-DD668868EFC2}"
 * @param param_ie equivale à variável this.context['param_ie']<br/>
 * @param param_empresa equivale à variável this.context['param_empresa']<br/>
 * @param param_cpf_cnpj equivale à variável this.context['param_cpf_cnpj']<br/>
 * @author master
 * @since 17/08/2009 13:09:46
 */
MkrA29a9ec9987f48a598faDd668868efc2.prototype.run = function() {
  document.ruleNameForException = '__MKR_{A29A9EC9-987F-48A5-98FA-DD668868EFC2}';
  this.context = new Array();

  // Parâmetros de Entrada
  this.context['param_ie'] = arguments[0];

  this.context['param_empresa'] = arguments[1];

  this.context['param_cpf_cnpj'] = arguments[2];

  // Variáveis
  this.context['variavel'] = '';

  this.context['int_cnpjcpf'] = '';


  /**
   * inscrição estadual é nulo
   */
  if (parseBoolean(isNull.call(this, this.context['param_ie']))) {
      
    /**
     * setar o componente incrição estadual como ISENTO
     */
    ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTIE', 'ISENTO');

    /**
     * Setar o nome da empresa no componente Responsável
     */
    ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTNOMERESPONSAVEL', this.context['param_empresa']);

    /**
     * int_cnpjcpf = Tamanho(@param_cpf_cnpj)
     */
    this.context['int_cnpjcpf'] = ebfLength.call(this, this.context['param_cpf_cnpj']);

    /**
     * (Igual(@int_cnpjcpf,11))?
     */
    if (parseBoolean(isEqual.call(this, this.context['int_cnpjcpf'], '11'))) {
        
      /**
       * Setar o cnpj do cliente no componente cpf responsável
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTCPFRESPONSAVEL', this.context['param_cpf_cnpj']);

      /**
       * Setar o rg do cliente no componente identidade RG  da aba Contatos
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTIDENTRESPONSAVEL', ebfFormGetComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTIE'));

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBIE', this.context['param_ie']);

      /**
       * Setar o Nome do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBEU', this.context['param_empresa']);

      /**
       * Setar Cpf do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBCPFRESP', this.context['param_cpf_cnpj']);

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBRGRESP', this.context['param_ie']);

      /**
       * Fim
       */
      return null;

    } else {

      /**
       * Setar o rg do cliente no componente identidade RG  da aba Contatos
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTIDENTRESPONSAVEL', ebfFormGetComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTIE'));

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBIE', this.context['param_ie']);

      /**
       * Setar o Nome do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBEU', this.context['param_empresa']);

      /**
       * Setar Cpf do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBCPFRESP', this.context['param_cpf_cnpj']);

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBRGRESP', this.context['param_ie']);

      /**
       * Fim
       */
      return null;

    }

  } else {

    /**
     * Setar o nome da empresa no componente Responsável
     */
    ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTNOMERESPONSAVEL', this.context['param_empresa']);

    /**
     * int_cnpjcpf = Tamanho(@param_cpf_cnpj)
     */
    this.context['int_cnpjcpf'] = ebfLength.call(this, this.context['param_cpf_cnpj']);

    /**
     * (Igual(@int_cnpjcpf,11))?
     */
    if (parseBoolean(isEqual.call(this, this.context['int_cnpjcpf'], '11'))) {
        
      /**
       * Setar o cnpj do cliente no componente cpf responsável
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTCPFRESPONSAVEL', this.context['param_cpf_cnpj']);

      /**
       * Setar o rg do cliente no componente identidade RG  da aba Contatos
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTIDENTRESPONSAVEL', ebfFormGetComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTIE'));

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBIE', this.context['param_ie']);

      /**
       * Setar o Nome do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBEU', this.context['param_empresa']);

      /**
       * Setar Cpf do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBCPFRESP', this.context['param_cpf_cnpj']);

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBRGRESP', this.context['param_ie']);

      /**
       * Fim
       */
      return null;

    } else {

      /**
       * Setar o rg do cliente no componente identidade RG  da aba Contatos
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTIDENTRESPONSAVEL', ebfFormGetComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTIE'));

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBIE', this.context['param_ie']);

      /**
       * Setar o Nome do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBEU', this.context['param_empresa']);

      /**
       * Setar Cpf do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBCPFRESP', this.context['param_cpf_cnpj']);

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBRGRESP', this.context['param_ie']);

      /**
       * Fim
       */
      return null;

    }

  }

}

function runMkrA29a9ec9987f48a598faDd668868efc2(parent, sys, formID, params) {
  var rule = new MkrA29a9ec9987f48a598faDd668868efc2(parent, sys, formID);
  rule.run.apply(rule, params);
}

function Mkr82ef63b3056e4679A45a1e9fb4a62630(parent, sys, formID) {
  this.ruleName = '__MKR_{82EF63B3-056E-4679-A45A-1E9FB4A62630}';
  this.functionName = 'Mkr82ef63b3056e4679A45a1e9fb4a62630';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

Mkr82ef63b3056e4679A45a1e9fb4a62630.prototype = new Rule;

/**
 * Esta função executa a regra "__MKR_{82EF63B3-056E-4679-A45A-1E9FB4A62630}"
 * @author master
 * @since 23/06/2009 09:00:31
 */
Mkr82ef63b3056e4679A45a1e9fb4a62630.prototype.run = function() {
  document.ruleNameForException = '__MKR_{82EF63B3-056E-4679-A45A-1E9FB4A62630}';
  this.context = new Array();


  /**
   * variavel = Obter Valor do Componente(Cadastro,Aceito (MakerRadioGroup6))
   */
  this.context['variavel'] = ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerRadioGroup6');

  /**
   * (Igual(@variavel,S))?
   */
  if (parseBoolean(isEqual.call(this, this.context['variavel'], 'S'))) {
      
    /**
     * Definir Obrigatoriedade de Componente( (MakerLabel33),true)
     */
    ebfFormSetRequired.call(this, 'MakerLabel33', true);

    /**
     * Definir Obrigatoriedade de Componente( (MakerEdit7),true)
     */
    ebfFormSetRequired.call(this, 'MakerEdit7', true);

    /**
     * Fim
     */
    return null;

  } else {

    /**
     * Definir Obrigatoriedade de Componente( (MakerLabel33),false)
     */
    ebfFormSetRequired.call(this, 'MakerLabel33', false);

    /**
     * Definir Obrigatoriedade de Componente( (MakerEdit7),false)
     */
    ebfFormSetRequired.call(this, 'MakerEdit7', false);

    /**
     * Fim
     */
    return null;

  }

}

function runMkr82ef63b3056e4679A45a1e9fb4a62630(parent, sys, formID, params) {
  var rule = new Mkr82ef63b3056e4679A45a1e9fb4a62630(parent, sys, formID);
  rule.run.apply(rule, params);
}

function Mkr6e91a5bc38a44ff08f6c709c22167ec6(parent, sys, formID) {
  this.ruleName = '__MKR_{6E91A5BC-38A4-4FF0-8F6C-709C22167EC6}';
  this.functionName = 'Mkr6e91a5bc38a44ff08f6c709c22167ec6';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

Mkr6e91a5bc38a44ff08f6c709c22167ec6.prototype = new Rule;

/**
 * Esta função executa a regra "__MKR_{6E91A5BC-38A4-4FF0-8F6C-709C22167EC6}"
 * @param param_aceite1 equivale à variável this.context['param_aceite1']<br/>
 * @param param_aceite2 equivale à variável this.context['param_aceite2']<br/>
 * @param param_aceite3 equivale à variável this.context['param_aceite3']<br/>
 * @param param_aceite4 equivale à variável this.context['param_aceite4']<br/>
 * @author master
 * @since 15/10/2009 16:43:58
 */
Mkr6e91a5bc38a44ff08f6c709c22167ec6.prototype.run = function() {
  document.ruleNameForException = '__MKR_{6E91A5BC-38A4-4FF0-8F6C-709C22167EC6}';
  this.context = new Array();

  // Parâmetros de Entrada
  this.context['param_aceite1'] = arguments[0];

  this.context['param_aceite2'] = arguments[1];

  this.context['param_aceite3'] = arguments[2];

  this.context['param_aceite4'] = arguments[3];

  // Variáveis
  this.context['Primeiro Aceito'] = '';

  this.context['Segundo Aceito'] = '';

  this.context['Terceiro Aceito'] = '';

  this.context['Quarto Acetiro'] = '';


  /**
   * aceites é igual a S
   */
  if (parseBoolean((isEqual.call(this, this.context['param_aceite1'], 'S') && isEqual.call(this, this.context['param_aceite2'], 'S') && isEqual.call(this, this.context['param_aceite3'], 'S') && isEqual.call(this, this.context['param_aceite4'], 'S')))) {
      
    /**
     * Habilitar Componente(Enviar (BTNENVIAR),true)
     */
    ebfFormSetEnabled.call(this, 'BTNENVIAR', true);

    /**
     * Fim
     */
    return null;

  } else {

    /**
     * Habilitar Componente(Enviar (BTNENVIAR),false)
     */
    ebfFormSetEnabled.call(this, 'BTNENVIAR', false);

    /**
     * Ativar Aba(Contrato)
     */
    ebfFormOpenTab.call(this, 'Contrato');

    /**
     * Fim
     */
    return null;

  }

}

function runMkr6e91a5bc38a44ff08f6c709c22167ec6(parent, sys, formID, params) {
  var rule = new Mkr6e91a5bc38a44ff08f6c709c22167ec6(parent, sys, formID);
  rule.run.apply(rule, params);
}

function Mkr089e0b0a5d0f40529f64B8c66606813b(parent, sys, formID) {
  this.ruleName = '__MKR_{089E0B0A-5D0F-4052-9F64-B8C66606813B}';
  this.functionName = 'Mkr089e0b0a5d0f40529f64B8c66606813b';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

Mkr089e0b0a5d0f40529f64B8c66606813b.prototype = new Rule;

/**
 * Esta função executa a regra "__MKR_{089E0B0A-5D0F-4052-9F64-B8C66606813B}"
 * @author master
 * @since 23/06/2009 14:52:51
 */
Mkr089e0b0a5d0f40529f64B8c66606813b.prototype.run = function() {
  document.ruleNameForException = '__MKR_{089E0B0A-5D0F-4052-9F64-B8C66606813B}';
  this.context = new Array();

  // Variáveis
  this.context['Primeiro Aceito'] = '';

  this.context['Segundo Aceito'] = '';

  this.context['Terceiro Aceito'] = '';

  this.context['Quarto Acetiro'] = '';

  this.context['VF'] = false;


  /**
   * Primeiro Aceito = Obter Valor do Componente(Cadastro,Aceito (MakerRadioGroup1))
   */
  this.context['Primeiro Aceito'] = ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerRadioGroup1');

  /**
   * Segundo Aceito = Obter Valor do Componente(Cadastro,Aceito (MakerRadioGroup4))
   */
  this.context['Segundo Aceito'] = ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerRadioGroup4');

  /**
   * Terceiro Aceito = Obter Valor do Componente(Cadastro,Aceito (MakerRadioGroup5))
   */
  this.context['Terceiro Aceito'] = ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerRadioGroup5');

  /**
   * Quarto Acetiro = Obter Valor do Componente(Cadastro,Aceito (MakerRadioGroup7))
   */
  this.context['Quarto Acetiro'] = ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerRadioGroup7');

  /**
   * (E(Igual(@Primeiro Aceito,S),Igual(@Segundo Aceito,S),Igual(@Terceiro Aceito,S),Igual(@Quarto Acetiro,S)))?
   */
  if (parseBoolean((isEqual.call(this, this.context['Primeiro Aceito'], 'S') && isEqual.call(this, this.context['Segundo Aceito'], 'S') && isEqual.call(this, this.context['Terceiro Aceito'], 'S') && isEqual.call(this, this.context['Quarto Acetiro'], 'S')))) {
      
    /**
     * Habilitar Componente(Enviar (MakerButton2),true)
     */
    ebfFormSetEnabled.call(this, 'MakerButton2', true);

    /**
     * Habilitar Componente(Imprimir Contrato (MakerButton1),true)
     */
    ebfFormSetEnabled.call(this, 'MakerButton1', true);

    /**
     * Fim
     */
    return null;

  } else {

    /**
     * Habilitar Componente(Enviar (MakerButton2),false)
     */
    ebfFormSetEnabled.call(this, 'MakerButton2', false);

    /**
     * Habilitar Componente(Imprimir Contrato (MakerButton1),false)
     */
    ebfFormSetEnabled.call(this, 'MakerButton1', false);

    /**
     * Ativar Aba(Contrato)
     */
    ebfFormOpenTab.call(this, 'Contrato');

    /**
     * Fim
     */
    return null;

  }

}

function runMkr089e0b0a5d0f40529f64B8c66606813b(parent, sys, formID, params) {
  var rule = new Mkr089e0b0a5d0f40529f64B8c66606813b(parent, sys, formID);
  rule.run.apply(rule, params);
}

function Mkr32e0145b9604422d8555A97f058949ce(parent, sys, formID) {
  this.ruleName = '__MKR_{32E0145B-9604-422D-8555-A97F058949CE}';
  this.functionName = 'Mkr32e0145b9604422d8555A97f058949ce';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

Mkr32e0145b9604422d8555A97f058949ce.prototype = new Rule;

/**
 * Esta função executa a regra "__MKR_{32E0145B-9604-422D-8555-A97F058949CE}"
 * @param num_insc equivale à variável this.context['num_insc']<br/>
 * @param uf equivale à variável this.context['uf']<br/>
 * @author master
 * @since 16/07/2009 18:03:59
 */
Mkr32e0145b9604422d8555A97f058949ce.prototype.run = function() {
  document.ruleNameForException = '__MKR_{32E0145B-9604-422D-8555-A97F058949CE}';
  this.context = new Array();

  // Parâmetros de Entrada
  this.context['num_insc'] = arguments[0];

  this.context['uf'] = arguments[1];

  // Variáveis
  this.context['variavel'] = '';


  /**
   * (É Nulo(@num_insc))?
   */
  if (parseBoolean(isNull.call(this, this.context['num_insc']))) {
      
    /**
     * Alterar Valor do Componente(Cadastro,Inscrição Estadual (EDTIEST2),ISENTO)
     */
    ebfFormChangeComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'EDTIEST2', 'ISENTO');

    /**
     * Alterar Valor do Componente(Cadastro,Nome do Responsável (MakerEdit2),Obter Valor do Componente(Cadastro,Empresa (EDTEMPRESA1)))
     */
    ebfFormChangeComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerEdit2', ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'EDTEMPRESA1'));

    /**
     * Alterar Valor do Componente(Cadastro,CPF (MakerEdit8),Obter Valor do Componente(Cadastro,CNPJ/CPF (EDTCGCCPF1)))
     */
    ebfFormChangeComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerEdit8', ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'EDTCGCCPF1'));

    /**
     * Alterar Valor do Componente(Cadastro,Identidade/RG (MakerEdit3),Obter Valor do Componente(Cadastro,Inscrição Estadual (EDTIEST2)))
     */
    ebfFormChangeComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerEdit3', ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'EDTIEST2'));

    /**
     * Fim
     */
    return null;

  } else {

    /**
     * Alterar Valor do Componente(Cadastro,Nome do Responsável (MakerEdit2),Obter Valor do Componente(Cadastro,Empresa (EDTEMPRESA1)))
     */
    ebfFormChangeComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerEdit2', ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'EDTEMPRESA1'));

    /**
     * Alterar Valor do Componente(Cadastro,CPF (MakerEdit8),Obter Valor do Componente(Cadastro,CNPJ/CPF (EDTCGCCPF1)))
     */
    ebfFormChangeComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerEdit8', ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'EDTCGCCPF1'));

    /**
     * Alterar Valor do Componente(Cadastro,Identidade/RG (MakerEdit3),Obter Valor do Componente(Cadastro,Inscrição Estadual (EDTIEST2)))
     */
    ebfFormChangeComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerEdit3', ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'EDTIEST2'));

    /**
     * Fim
     */
    return null;

  }

}

function runMkr32e0145b9604422d8555A97f058949ce(parent, sys, formID, params) {
  var rule = new Mkr32e0145b9604422d8555A97f058949ce(parent, sys, formID);
  rule.run.apply(rule, params);
}

function MkrA3cbf73eA04545edAdd721f94cfbe70a(parent, sys, formID) {
  this.ruleName = '__MKR_{A3CBF73E-A045-45ED-ADD7-21F94CFBE70A}';
  this.functionName = 'MkrA3cbf73eA04545edAdd721f94cfbe70a';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

MkrA3cbf73eA04545edAdd721f94cfbe70a.prototype = new Rule;

/**
 * Esta função executa a regra "__MKR_{A3CBF73E-A045-45ED-ADD7-21F94CFBE70A}"
 * @param param_ie equivale à variável this.context['param_ie']<br/>
 * @param param_empresa equivale à variável this.context['param_empresa']<br/>
 * @param param_cpf_cnpj equivale à variável this.context['param_cpf_cnpj']<br/>
 * @author master
 * @since 17/08/2009 13:09:46
 */
MkrA3cbf73eA04545edAdd721f94cfbe70a.prototype.run = function() {
  document.ruleNameForException = '__MKR_{A3CBF73E-A045-45ED-ADD7-21F94CFBE70A}';
  this.context = new Array();

  // Parâmetros de Entrada
  this.context['param_ie'] = arguments[0];

  this.context['param_empresa'] = arguments[1];

  this.context['param_cpf_cnpj'] = arguments[2];

  // Variáveis
  this.context['variavel'] = '';

  this.context['int_cnpjcpf'] = '';


  /**
   * inscrição estadual é nulo
   */
  if (parseBoolean(isNull.call(this, this.context['param_ie']))) {
      
    /**
     * setar o componente incrição estadual como ISENTO
     */
    ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTIE', 'ISENTO');

    /**
     * Setar o nome da empresa no componente Responsável
     */
    ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTNOMERESPONSAVEL', this.context['param_empresa']);

    /**
     * int_cnpjcpf = Tamanho(@param_cpf_cnpj)
     */
    this.context['int_cnpjcpf'] = ebfLength.call(this, this.context['param_cpf_cnpj']);

    /**
     * (Igual(@int_cnpjcpf,11))?
     */
    if (parseBoolean(isEqual.call(this, this.context['int_cnpjcpf'], '11'))) {
        
      /**
       * Setar o cnpj do cliente no componente cpf responsável
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTCPFRESPONSAVEL', this.context['param_cpf_cnpj']);

      /**
       * Setar o rg do cliente no componente identidade RG  da aba Contatos
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTIDENTRESPONSAVEL', ebfFormGetComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTIE'));

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBIE', this.context['param_ie']);

      /**
       * Setar o Nome do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBEU', this.context['param_empresa']);

      /**
       * Setar Cpf do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBCPFRESP', this.context['param_cpf_cnpj']);

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBRGRESP', this.context['param_ie']);

      /**
       * Fim
       */
      return null;

    } else {

      /**
       * Setar o rg do cliente no componente identidade RG  da aba Contatos
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTIDENTRESPONSAVEL', ebfFormGetComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTIE'));

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBIE', this.context['param_ie']);

      /**
       * Setar o Nome do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBEU', this.context['param_empresa']);

      /**
       * Setar Cpf do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBCPFRESP', this.context['param_cpf_cnpj']);

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBRGRESP', this.context['param_ie']);

      /**
       * Fim
       */
      return null;

    }

  } else {

    /**
     * Setar o nome da empresa no componente Responsável
     */
    ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTNOMERESPONSAVEL', this.context['param_empresa']);

    /**
     * int_cnpjcpf = Tamanho(@param_cpf_cnpj)
     */
    this.context['int_cnpjcpf'] = ebfLength.call(this, this.context['param_cpf_cnpj']);

    /**
     * (Igual(@int_cnpjcpf,11))?
     */
    if (parseBoolean(isEqual.call(this, this.context['int_cnpjcpf'], '11'))) {
        
      /**
       * Setar o cnpj do cliente no componente cpf responsável
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTCPFRESPONSAVEL', this.context['param_cpf_cnpj']);

      /**
       * Setar o rg do cliente no componente identidade RG  da aba Contatos
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTIDENTRESPONSAVEL', ebfFormGetComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTIE'));

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBIE', this.context['param_ie']);

      /**
       * Setar o Nome do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBEU', this.context['param_empresa']);

      /**
       * Setar Cpf do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBCPFRESP', this.context['param_cpf_cnpj']);

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBRGRESP', this.context['param_ie']);

      /**
       * Fim
       */
      return null;

    } else {

      /**
       * Setar o rg do cliente no componente identidade RG  da aba Contatos
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTIDENTRESPONSAVEL', ebfFormGetComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTIE'));

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBIE', this.context['param_ie']);

      /**
       * Setar o Nome do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBEU', this.context['param_empresa']);

      /**
       * Setar Cpf do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBCPFRESP', this.context['param_cpf_cnpj']);

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBRGRESP', this.context['param_ie']);

      /**
       * Fim
       */
      return null;

    }

  }

}

function runMkrA3cbf73eA04545edAdd721f94cfbe70a(parent, sys, formID, params) {
  var rule = new MkrA3cbf73eA04545edAdd721f94cfbe70a(parent, sys, formID);
  rule.run.apply(rule, params);
}

function MkrE2e6771803594acdBd65E2580d176f2a(parent, sys, formID) {
  this.ruleName = '__MKR_{E2E67718-0359-4ACD-BD65-E2580D176F2A}';
  this.functionName = 'MkrE2e6771803594acdBd65E2580d176f2a';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

MkrE2e6771803594acdBd65E2580d176f2a.prototype = new Rule;

/**
 * Esta função executa a regra "__MKR_{E2E67718-0359-4ACD-BD65-E2580D176F2A}"
 * @author master
 * @since 23/06/2009 09:00:31
 */
MkrE2e6771803594acdBd65E2580d176f2a.prototype.run = function() {
  document.ruleNameForException = '__MKR_{E2E67718-0359-4ACD-BD65-E2580D176F2A}';
  this.context = new Array();


  /**
   * variavel = Obter Valor do Componente(Cadastro,Aceito (MakerRadioGroup6))
   */
  this.context['variavel'] = ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerRadioGroup6');

  /**
   * (Igual(@variavel,S))?
   */
  if (parseBoolean(isEqual.call(this, this.context['variavel'], 'S'))) {
      
    /**
     * Definir Obrigatoriedade de Componente( (MakerLabel33),true)
     */
    ebfFormSetRequired.call(this, 'MakerLabel33', true);

    /**
     * Definir Obrigatoriedade de Componente( (MakerEdit7),true)
     */
    ebfFormSetRequired.call(this, 'MakerEdit7', true);

    /**
     * Fim
     */
    return null;

  } else {

    /**
     * Definir Obrigatoriedade de Componente( (MakerLabel33),false)
     */
    ebfFormSetRequired.call(this, 'MakerLabel33', false);

    /**
     * Definir Obrigatoriedade de Componente( (MakerEdit7),false)
     */
    ebfFormSetRequired.call(this, 'MakerEdit7', false);

    /**
     * Fim
     */
    return null;

  }

}

function runMkrE2e6771803594acdBd65E2580d176f2a(parent, sys, formID, params) {
  var rule = new MkrE2e6771803594acdBd65E2580d176f2a(parent, sys, formID);
  rule.run.apply(rule, params);
}

function MkrCb329e6787e54f6a82659492ccc85832(parent, sys, formID) {
  this.ruleName = '__MKR_{CB329E67-87E5-4F6A-8265-9492CCC85832}';
  this.functionName = 'MkrCb329e6787e54f6a82659492ccc85832';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

MkrCb329e6787e54f6a82659492ccc85832.prototype = new Rule;

/**
 * Esta função executa a regra "__MKR_{CB329E67-87E5-4F6A-8265-9492CCC85832}"
 * @param param_aceite1 equivale à variável this.context['param_aceite1']<br/>
 * @param param_aceite2 equivale à variável this.context['param_aceite2']<br/>
 * @param param_aceite3 equivale à variável this.context['param_aceite3']<br/>
 * @param param_aceite4 equivale à variável this.context['param_aceite4']<br/>
 * @author master
 * @since 25/07/2009 14:05:21
 */
MkrCb329e6787e54f6a82659492ccc85832.prototype.run = function() {
  document.ruleNameForException = '__MKR_{CB329E67-87E5-4F6A-8265-9492CCC85832}';
  this.context = new Array();

  // Parâmetros de Entrada
  this.context['param_aceite1'] = arguments[0];

  this.context['param_aceite2'] = arguments[1];

  this.context['param_aceite3'] = arguments[2];

  this.context['param_aceite4'] = arguments[3];

  // Variáveis
  this.context['Primeiro Aceito'] = '';

  this.context['Segundo Aceito'] = '';

  this.context['Terceiro Aceito'] = '';

  this.context['Quarto Acetiro'] = '';

  this.context['VF'] = false;


  /**
   * aceites é igual a S
   */
  if (parseBoolean((isEqual.call(this, this.context['param_aceite1'], 'S') && isEqual.call(this, this.context['param_aceite2'], 'S') && isEqual.call(this, this.context['param_aceite3'], 'S') && isEqual.call(this, this.context['param_aceite4'], 'S')))) {
      
    /**
     * Habilitar Componente(Enviar (BTNENVIAR),true)
     */
    ebfFormSetEnabled.call(this, 'BTNENVIAR', true);

    /**
     * Fim
     */
    return null;

  } else {

    /**
     * Habilitar Componente(Enviar (BTNENVIAR),false)
     */
    ebfFormSetEnabled.call(this, 'BTNENVIAR', false);

    /**
     * Ativar Aba(Contrato)
     */
    ebfFormOpenTab.call(this, 'Contrato');

    /**
     * Fim
     */
    return null;

  }

}

function runMkrCb329e6787e54f6a82659492ccc85832(parent, sys, formID, params) {
  var rule = new MkrCb329e6787e54f6a82659492ccc85832(parent, sys, formID);
  rule.run.apply(rule, params);
}

function Mkr9036473a71804892Ba4fAc026e009c1f(parent, sys, formID) {
  this.ruleName = '__MKR_{9036473A-7180-4892-BA4F-AC026E009C1F}';
  this.functionName = 'Mkr9036473a71804892Ba4fAc026e009c1f';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

Mkr9036473a71804892Ba4fAc026e009c1f.prototype = new Rule;

/**
 * Esta função executa a regra "__MKR_{9036473A-7180-4892-BA4F-AC026E009C1F}"
 * @param param_aceite1 equivale à variável this.context['param_aceite1']<br/>
 * @param param_aceite2 equivale à variável this.context['param_aceite2']<br/>
 * @param param_aceite3 equivale à variável this.context['param_aceite3']<br/>
 * @param param_aceite4 equivale à variável this.context['param_aceite4']<br/>
 * @author master
 * @since 25/07/2009 14:05:21
 */
Mkr9036473a71804892Ba4fAc026e009c1f.prototype.run = function() {
  document.ruleNameForException = '__MKR_{9036473A-7180-4892-BA4F-AC026E009C1F}';
  this.context = new Array();

  // Parâmetros de Entrada
  this.context['param_aceite1'] = arguments[0];

  this.context['param_aceite2'] = arguments[1];

  this.context['param_aceite3'] = arguments[2];

  this.context['param_aceite4'] = arguments[3];

  // Variáveis
  this.context['Primeiro Aceito'] = '';

  this.context['Segundo Aceito'] = '';

  this.context['Terceiro Aceito'] = '';

  this.context['Quarto Acetiro'] = '';

  this.context['VF'] = false;


  /**
   * aceites é igual a S
   */
  if (parseBoolean((isEqual.call(this, this.context['param_aceite1'], 'S') && isEqual.call(this, this.context['param_aceite2'], 'S') && isEqual.call(this, this.context['param_aceite3'], 'S') && isEqual.call(this, this.context['param_aceite4'], 'S')))) {
      
    /**
     * Habilitar Componente(Enviar (BTNENVIAR),true)
     */
    ebfFormSetEnabled.call(this, 'BTNENVIAR', true);

    /**
     * Fim
     */
    return null;

  } else {

    /**
     * Habilitar Componente(Enviar (BTNENVIAR),false)
     */
    ebfFormSetEnabled.call(this, 'BTNENVIAR', false);

    /**
     * Ativar Aba(Contrato)
     */
    ebfFormOpenTab.call(this, 'Contrato');

    /**
     * Fim
     */
    return null;

  }

}

function runMkr9036473a71804892Ba4fAc026e009c1f(parent, sys, formID, params) {
  var rule = new Mkr9036473a71804892Ba4fAc026e009c1f(parent, sys, formID);
  rule.run.apply(rule, params);
}

function Mkr6ec8fa8bA5a840269934084cfd6bf488(parent, sys, formID) {
  this.ruleName = '__MKR_{6EC8FA8B-A5A8-4026-9934-084CFD6BF488}';
  this.functionName = 'Mkr6ec8fa8bA5a840269934084cfd6bf488';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

Mkr6ec8fa8bA5a840269934084cfd6bf488.prototype = new Rule;

/**
 * Esta função executa a regra "__MKR_{6EC8FA8B-A5A8-4026-9934-084CFD6BF488}"
 * @author master
 * @since 08/07/2009 12:28:24
 */
Mkr6ec8fa8bA5a840269934084cfd6bf488.prototype.run = function() {
  document.ruleNameForException = '__MKR_{6EC8FA8B-A5A8-4026-9934-084CFD6BF488}';
  this.context = new Array();


  /**
   * Fim
   */
  return null;

}

function runMkr6ec8fa8bA5a840269934084cfd6bf488(parent, sys, formID, params) {
  var rule = new Mkr6ec8fa8bA5a840269934084cfd6bf488(parent, sys, formID);
  rule.run.apply(rule, params);
}

function Mkr297c442d08694e88A2b808f10f9613d2(parent, sys, formID) {
  this.ruleName = '__MKR_{297C442D-0869-4E88-A2B8-08F10F9613D2}';
  this.functionName = 'Mkr297c442d08694e88A2b808f10f9613d2';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

Mkr297c442d08694e88A2b808f10f9613d2.prototype = new Rule;

/**
 * Esta função executa a regra "__MKR_{297C442D-0869-4E88-A2B8-08F10F9613D2}"
 * @param param_flg equivale à variável this.context['param_flg']<br/>
 * @author master
 * @since 31/07/2009 00:59:27
 */
Mkr297c442d08694e88A2b808f10f9613d2.prototype.run = function() {
  document.ruleNameForException = '__MKR_{297C442D-0869-4E88-A2B8-08F10F9613D2}';
  this.context = new Array();

  // Parâmetros de Entrada
  this.context['param_flg'] = arguments[0];


  /**
   * é sim?
   */
  if (parseBoolean(isEqual.call(this, this.context['param_flg'], 'S'))) {
      
    /**
     * Definir Obrigatoriedade de Componente(Nº da Apolice (EDTAPOLICE),true)
     */
    ebfFormSetRequired.call(this, 'EDTAPOLICE', true);

    /**
     * Definir Obrigatoriedade de Componente(Nome da Seguradora (EDTSEGURADORA),true)
     */
    ebfFormSetRequired.call(this, 'EDTSEGURADORA', true);

    /**
     * Fim
     */
    return null;

  } else {

    /**
     * Definir Obrigatoriedade de Componente(Nº da Apolice (EDTAPOLICE),false)
     */
    ebfFormSetRequired.call(this, 'EDTAPOLICE', false);

    /**
     * Definir Obrigatoriedade de Componente(Nome da Seguradora (EDTSEGURADORA),false)
     */
    ebfFormSetRequired.call(this, 'EDTSEGURADORA', false);

    /**
     * Fim
     */
    return null;

  }

}

function runMkr297c442d08694e88A2b808f10f9613d2(parent, sys, formID, params) {
  var rule = new Mkr297c442d08694e88A2b808f10f9613d2(parent, sys, formID);
  rule.run.apply(rule, params);
}

function Mkr7a9e01174fba4635A2c130331111e36c(parent, sys, formID) {
  this.ruleName = '__MKR_{7A9E0117-4FBA-4635-A2C1-30331111E36C}';
  this.functionName = 'Mkr7a9e01174fba4635A2c130331111e36c';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

Mkr7a9e01174fba4635A2c130331111e36c.prototype = new Rule;

/**
 * Esta função executa a regra "__MKR_{7A9E0117-4FBA-4635-A2C1-30331111E36C}"
 * @author master
 * @since 18/07/2009 09:54:59
 */
Mkr7a9e01174fba4635A2c130331111e36c.prototype.run = function() {
  document.ruleNameForException = '__MKR_{7A9E0117-4FBA-4635-A2C1-30331111E36C}';
  this.context = new Array();

  // Variáveis
  this.context['E-MailValido'] = false;

  this.context['char_email'] = '';


  /**
   * char_email = Obter Valor do Componente(Cadastro,E-Mail (EDTEMAILCOBRAN))
   */
  this.context['char_email'] = ebfFormGetComponentValue.call(this, '{0C113079-AC05-4AE0-AA06-F8B46129E92A}', 'EDTEMAILCOBRAN');

  /**
   * (É Nulo(@char_email))?
   */
  if (parseBoolean(isNull.call(this, this.context['char_email']))) {
          return null;

  } else {

    /**
     * E-MailValido = Existe Subsequência(@char_email,@)
     */
    this.context['E-MailValido'] = ebfSearchSubstring.call(this, this.context['char_email'], '@');

    /**
     * (Igual(@E-MailValido,false))?
     */
    if (parseBoolean(isEqual.call(this, this.context['E-MailValido'], false))) {
        
      /**
       * Alertar Aguardando Ok(Este E-Mail não é válido. Verifique!)
       */
      ebfAlertMessage.call(this, 'Este E-Mail não é válido. Verifique!');

      /**
       * Focar Componente(E-Mail (EDTEMAILCOBRAN))
       */
      ebfFormSetFocus.call(this, 'EDTEMAILCOBRAN');

      /**
       * Fim
       */
      return null;

    } else {

      /**
       * Fim
       */
      return null;

    }

  }

}

function runMkr7a9e01174fba4635A2c130331111e36c(parent, sys, formID, params) {
  var rule = new Mkr7a9e01174fba4635A2c130331111e36c(parent, sys, formID);
  rule.run.apply(rule, params);
}

function MkrC6839bcc2c3e41e6B270B15a915cae7f(parent, sys, formID) {
  this.ruleName = '__MKR_{C6839BCC-2C3E-41E6-B270-B15A915CAE7F}';
  this.functionName = 'MkrC6839bcc2c3e41e6B270B15a915cae7f';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

MkrC6839bcc2c3e41e6B270B15a915cae7f.prototype = new Rule;

/**
 * Esta função executa a regra "__MKR_{C6839BCC-2C3E-41E6-B270-B15A915CAE7F}"
 * @param param_ie equivale à variável this.context['param_ie']<br/>
 * @param param_empresa equivale à variável this.context['param_empresa']<br/>
 * @param param_cpf_cnpj equivale à variável this.context['param_cpf_cnpj']<br/>
 * @author master
 * @since 17/08/2009 13:09:46
 */
MkrC6839bcc2c3e41e6B270B15a915cae7f.prototype.run = function() {
  document.ruleNameForException = '__MKR_{C6839BCC-2C3E-41E6-B270-B15A915CAE7F}';
  this.context = new Array();

  // Parâmetros de Entrada
  this.context['param_ie'] = arguments[0];

  this.context['param_empresa'] = arguments[1];

  this.context['param_cpf_cnpj'] = arguments[2];

  // Variáveis
  this.context['variavel'] = '';

  this.context['int_cnpjcpf'] = '';


  /**
   * inscrição estadual é nulo
   */
  if (parseBoolean(isNull.call(this, this.context['param_ie']))) {
      
    /**
     * setar o componente incrição estadual como ISENTO
     */
    ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTIE', 'ISENTO');

    /**
     * Setar o nome da empresa no componente Responsável
     */
    ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTNOMERESPONSAVEL', this.context['param_empresa']);

    /**
     * int_cnpjcpf = Tamanho(@param_cpf_cnpj)
     */
    this.context['int_cnpjcpf'] = ebfLength.call(this, this.context['param_cpf_cnpj']);

    /**
     * (Igual(@int_cnpjcpf,11))?
     */
    if (parseBoolean(isEqual.call(this, this.context['int_cnpjcpf'], '11'))) {
        
      /**
       * Setar o cnpj do cliente no componente cpf responsável
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTCPFRESPONSAVEL', this.context['param_cpf_cnpj']);

      /**
       * Setar o rg do cliente no componente identidade RG  da aba Contatos
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTIDENTRESPONSAVEL', ebfFormGetComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTIE'));

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBIE', this.context['param_ie']);

      /**
       * Setar o Nome do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBEU', this.context['param_empresa']);

      /**
       * Setar Cpf do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBCPFRESP', this.context['param_cpf_cnpj']);

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBRGRESP', this.context['param_ie']);

      /**
       * Fim
       */
      return null;

    } else {

      /**
       * Setar o rg do cliente no componente identidade RG  da aba Contatos
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTIDENTRESPONSAVEL', ebfFormGetComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTIE'));

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBIE', this.context['param_ie']);

      /**
       * Setar o Nome do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBEU', this.context['param_empresa']);

      /**
       * Setar Cpf do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBCPFRESP', this.context['param_cpf_cnpj']);

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBRGRESP', this.context['param_ie']);

      /**
       * Fim
       */
      return null;

    }

  } else {

    /**
     * Setar o nome da empresa no componente Responsável
     */
    ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTNOMERESPONSAVEL', this.context['param_empresa']);

    /**
     * int_cnpjcpf = Tamanho(@param_cpf_cnpj)
     */
    this.context['int_cnpjcpf'] = ebfLength.call(this, this.context['param_cpf_cnpj']);

    /**
     * (Igual(@int_cnpjcpf,11))?
     */
    if (parseBoolean(isEqual.call(this, this.context['int_cnpjcpf'], '11'))) {
        
      /**
       * Setar o cnpj do cliente no componente cpf responsável
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTCPFRESPONSAVEL', this.context['param_cpf_cnpj']);

      /**
       * Setar o rg do cliente no componente identidade RG  da aba Contatos
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTIDENTRESPONSAVEL', ebfFormGetComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTIE'));

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBIE', this.context['param_ie']);

      /**
       * Setar o Nome do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBEU', this.context['param_empresa']);

      /**
       * Setar Cpf do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBCPFRESP', this.context['param_cpf_cnpj']);

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBRGRESP', this.context['param_ie']);

      /**
       * Fim
       */
      return null;

    } else {

      /**
       * Setar o rg do cliente no componente identidade RG  da aba Contatos
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTIDENTRESPONSAVEL', ebfFormGetComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTIE'));

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBIE', this.context['param_ie']);

      /**
       * Setar o Nome do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBEU', this.context['param_empresa']);

      /**
       * Setar Cpf do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBCPFRESP', this.context['param_cpf_cnpj']);

      /**
       * Setar a IE do responsavel na Aba Contrato
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'LBRGRESP', this.context['param_ie']);

      /**
       * Fim
       */
      return null;

    }

  }

}

function runMkrC6839bcc2c3e41e6B270B15a915cae7f(parent, sys, formID, params) {
  var rule = new MkrC6839bcc2c3e41e6B270B15a915cae7f(parent, sys, formID);
  rule.run.apply(rule, params);
}

function MkrDc3ee4e9F29e41078b49Afa70e6fc42a(parent, sys, formID) {
  this.ruleName = '__MKR_{DC3EE4E9-F29E-4107-8B49-AFA70E6FC42A}';
  this.functionName = 'MkrDc3ee4e9F29e41078b49Afa70e6fc42a';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

MkrDc3ee4e9F29e41078b49Afa70e6fc42a.prototype = new Rule;

/**
 * Esta função executa a regra "__MKR_{DC3EE4E9-F29E-4107-8B49-AFA70E6FC42A}"
 * @author master
 * @since 23/06/2009 09:00:31
 */
MkrDc3ee4e9F29e41078b49Afa70e6fc42a.prototype.run = function() {
  document.ruleNameForException = '__MKR_{DC3EE4E9-F29E-4107-8B49-AFA70E6FC42A}';
  this.context = new Array();


  /**
   * variavel = Obter Valor do Componente(Cadastro,Aceito (MakerRadioGroup6))
   */
  this.context['variavel'] = ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerRadioGroup6');

  /**
   * (Igual(@variavel,S))?
   */
  if (parseBoolean(isEqual.call(this, this.context['variavel'], 'S'))) {
      
    /**
     * Definir Obrigatoriedade de Componente( (MakerLabel33),true)
     */
    ebfFormSetRequired.call(this, 'MakerLabel33', true);

    /**
     * Definir Obrigatoriedade de Componente( (MakerEdit7),true)
     */
    ebfFormSetRequired.call(this, 'MakerEdit7', true);

    /**
     * Fim
     */
    return null;

  } else {

    /**
     * Definir Obrigatoriedade de Componente( (MakerLabel33),false)
     */
    ebfFormSetRequired.call(this, 'MakerLabel33', false);

    /**
     * Definir Obrigatoriedade de Componente( (MakerEdit7),false)
     */
    ebfFormSetRequired.call(this, 'MakerEdit7', false);

    /**
     * Fim
     */
    return null;

  }

}

function runMkrDc3ee4e9F29e41078b49Afa70e6fc42a(parent, sys, formID, params) {
  var rule = new MkrDc3ee4e9F29e41078b49Afa70e6fc42a(parent, sys, formID);
  rule.run.apply(rule, params);
}

function MkrCdba103460964f1a9b50E6337279d370(parent, sys, formID) {
  this.ruleName = '__MKR_{CDBA1034-6096-4F1A-9B50-E6337279D370}';
  this.functionName = 'MkrCdba103460964f1a9b50E6337279d370';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

MkrCdba103460964f1a9b50E6337279d370.prototype = new Rule;

/**
 * Esta função executa a regra "__MKR_{CDBA1034-6096-4F1A-9B50-E6337279D370}"
 * @author master
 * @since 23/06/2009 14:52:51
 */
MkrCdba103460964f1a9b50E6337279d370.prototype.run = function() {
  document.ruleNameForException = '__MKR_{CDBA1034-6096-4F1A-9B50-E6337279D370}';
  this.context = new Array();

  // Variáveis
  this.context['Primeiro Aceito'] = '';

  this.context['Segundo Aceito'] = '';

  this.context['Terceiro Aceito'] = '';

  this.context['Quarto Acetiro'] = '';

  this.context['VF'] = false;


  /**
   * Primeiro Aceito = Obter Valor do Componente(Cadastro,Aceito (MakerRadioGroup1))
   */
  this.context['Primeiro Aceito'] = ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerRadioGroup1');

  /**
   * Segundo Aceito = Obter Valor do Componente(Cadastro,Aceito (MakerRadioGroup4))
   */
  this.context['Segundo Aceito'] = ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerRadioGroup4');

  /**
   * Terceiro Aceito = Obter Valor do Componente(Cadastro,Aceito (MakerRadioGroup5))
   */
  this.context['Terceiro Aceito'] = ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerRadioGroup5');

  /**
   * Quarto Acetiro = Obter Valor do Componente(Cadastro,Aceito (MakerRadioGroup7))
   */
  this.context['Quarto Acetiro'] = ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerRadioGroup7');

  /**
   * (E(Igual(@Primeiro Aceito,S),Igual(@Segundo Aceito,S),Igual(@Terceiro Aceito,S),Igual(@Quarto Acetiro,S)))?
   */
  if (parseBoolean((isEqual.call(this, this.context['Primeiro Aceito'], 'S') && isEqual.call(this, this.context['Segundo Aceito'], 'S') && isEqual.call(this, this.context['Terceiro Aceito'], 'S') && isEqual.call(this, this.context['Quarto Acetiro'], 'S')))) {
      
    /**
     * Habilitar Componente(Enviar (MakerButton2),true)
     */
    ebfFormSetEnabled.call(this, 'MakerButton2', true);

    /**
     * Habilitar Componente(Imprimir Contrato (MakerButton1),true)
     */
    ebfFormSetEnabled.call(this, 'MakerButton1', true);

    /**
     * Fim
     */
    return null;

  } else {

    /**
     * Habilitar Componente(Enviar (MakerButton2),false)
     */
    ebfFormSetEnabled.call(this, 'MakerButton2', false);

    /**
     * Habilitar Componente(Imprimir Contrato (MakerButton1),false)
     */
    ebfFormSetEnabled.call(this, 'MakerButton1', false);

    /**
     * Ativar Aba(Contrato)
     */
    ebfFormOpenTab.call(this, 'Contrato');

    /**
     * Fim
     */
    return null;

  }

}

function runMkrCdba103460964f1a9b50E6337279d370(parent, sys, formID, params) {
  var rule = new MkrCdba103460964f1a9b50E6337279d370(parent, sys, formID);
  rule.run.apply(rule, params);
}

function ContaCorrenteVerificaSeGridContatoEstaEmModoDeEdicao(parent, sys, formID) {
  this.ruleName = 'Conta Corrente -  Verifica se Grid Contato esta em Modo de Edição';
  this.functionName = 'ContaCorrenteVerificaSeGridContatoEstaEmModoDeEdicao';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

ContaCorrenteVerificaSeGridContatoEstaEmModoDeEdicao.prototype = new Rule;

/**
 * Esta função executa a regra "Conta Corrente -  Verifica se Grid Contato esta em Modo de Edição"
 * @author master
 * @since 19/10/2009 09:28:27
 */
ContaCorrenteVerificaSeGridContatoEstaEmModoDeEdicao.prototype.run = function() {
  document.ruleNameForException = 'Conta Corrente -  Verifica se Grid Contato esta em Modo de Edição';
  this.context = new Array();


  /**
   * Grava grid
   */
  ebfGridEditablePost.call(this, 'TMAKERGRID2');

  /**
   * Fim
   */
  return null;

}

function runContaCorrenteVerificaSeGridContatoEstaEmModoDeEdicao(parent, sys, formID, params) {
  var rule = new ContaCorrenteVerificaSeGridContatoEstaEmModoDeEdicao(parent, sys, formID);
  rule.run.apply(rule, params);
}


/**
 * Preenche os campos de cobrança se o cnpj de cobrança estiver em branco
 */
function RastreamentoPreencheOsCamposDeCobrancaMestre(parent, sys, formID) {
  this.ruleName = 'Rastreamento - Preenche os campos de cobrança (Mestre)';
  this.functionName = 'RastreamentoPreencheOsCamposDeCobrancaMestre';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

RastreamentoPreencheOsCamposDeCobrancaMestre.prototype = new Rule;

/**
 * Esta função executa a regra "Rastreamento - Preenche os campos de cobrança (Mestre)"
 * @param param_endereco equivale à variável this.context['param_endereco']<br/>
 * @param param_numero equivale à variável this.context['param_numero']<br/>
 * @param param_bairro equivale à variável this.context['param_bairro']<br/>
 * @param param_pais equivale à variável this.context['param_pais']<br/>
 * @param param_cep equivale à variável this.context['param_cep']<br/>
 * @param param_complemento equivale à variável this.context['param_complemento']<br/>
 * @param param_estado equivale à variável this.context['param_estado']<br/>
 * @param param_cidade equivale à variável this.context['param_cidade']<br/>
 * @param param_fax equivale à variável this.context['param_fax']<br/>
 * @param param_fone equivale à variável this.context['param_fone']<br/>
 * @param param_contato equivale à variável this.context['param_contato']<br/>
 * @param param_email equivale à variável this.context['param_email']<br/>
 * @param param_depto equivale à variável this.context['param_depto']<br/>
 * @param param_endCobranca equivale à variável this.context['param_endCobranca']<br/>
 * @author master
 * @since 16/10/2009 10:33:35
 */
RastreamentoPreencheOsCamposDeCobrancaMestre.prototype.run = function() {
  document.ruleNameForException = 'Rastreamento - Preenche os campos de cobrança (Mestre)';
  this.context = new Array();

  // Parâmetros de Entrada
  this.context['param_endereco'] = arguments[0];

  this.context['param_numero'] = arguments[1];

  this.context['param_bairro'] = arguments[2];

  this.context['param_pais'] = arguments[3];

  this.context['param_cep'] = arguments[4];

  this.context['param_complemento'] = arguments[5];

  this.context['param_estado'] = arguments[6];

  this.context['param_cidade'] = arguments[7];

  this.context['param_fax'] = arguments[8];

  this.context['param_fone'] = arguments[9];

  this.context['param_contato'] = arguments[10];

  this.context['param_email'] = arguments[11];

  this.context['param_depto'] = arguments[12];

  this.context['param_endCobranca'] = arguments[13];

  // Variáveis
  this.context['atribuirValor'] = '';

  this.context['Confirma'] = false;

  this.context['EndCob'] = '';


  /**
   * Endereço é null?
   */
  if (parseBoolean((isNull.call(this, this.context['param_endCobranca']) || isNull.call(this, ebfTrim.call(this, this.context['param_endCobranca']))))) {
      
    /**
     * aguarda confirmação do usuário
     */
    if (parseBoolean(ebfConfirm.call(this, 'Dados de cobrança é igual aos dados pessoais?'))) {
        
      /**
       * setar o valor do endereço
       */
      ebfFormChangeComponentValue.call(this, '{010FE60B-06EC-4139-AAFE-A58E07AF3248}', 'EDTENDCOBRAN', this.context['param_endereco']);

      /**
       * setar o valor do numero no cadastro
       */
      ebfFormChangeComponentValue.call(this, '{010FE60B-06EC-4139-AAFE-A58E07AF3248}', 'EDTNUMCOBRAN', this.context['param_numero']);

      /**
       * setar o valor do complemento no cadastro
       */
      ebfFormChangeComponentValue.call(this, '{010FE60B-06EC-4139-AAFE-A58E07AF3248}', 'EDTCOMPLCOBRAN', this.context['param_complemento']);

      /**
       * setar o valor do cep no cadastro
       */
      ebfFormChangeComponentValue.call(this, '{010FE60B-06EC-4139-AAFE-A58E07AF3248}', 'EDTCEPCOBRAN', this.context['param_cep']);

      /**
       * setar o valor do pais no cadastro
       */
      ebfFormChangeComponentValue.call(this, '{010FE60B-06EC-4139-AAFE-A58E07AF3248}', 'EDTPAISCOBRAN', this.context['param_pais']);

      /**
       * setar o valor do bairro cadastro
       */
      ebfFormChangeComponentValue.call(this, '{010FE60B-06EC-4139-AAFE-A58E07AF3248}', 'EDTBAIRROCOBRAN', this.context['param_bairro']);

      /**
       * setar o valor do estado cadastro
       */
      ebfFormChangeComponentValue.call(this, '{010FE60B-06EC-4139-AAFE-A58E07AF3248}', 'EDTUFCOBRAN', ebfTrim.call(this, this.context['param_estado']));

      /**
       * setar o valor do email no cadastro
       */
      ebfFormChangeComponentValue.call(this, '{010FE60B-06EC-4139-AAFE-A58E07AF3248}', 'EDTEMAILCOBRAN', this.context['param_email']);

      /**
       * setar o valor do fax no cadastro
       */
      ebfFormChangeComponentValue.call(this, '{010FE60B-06EC-4139-AAFE-A58E07AF3248}', 'EDTFAXCOBRAN', this.context['param_fax']);

      /**
       * setar o valor do fone no cadastro
       */
      ebfFormChangeComponentValue.call(this, '{010FE60B-06EC-4139-AAFE-A58E07AF3248}', 'EDTFONECOBRAN', this.context['param_fone']);

      /**
       * setar o valor do depto no cadastro
       */
      ebfFormChangeComponentValue.call(this, '{010FE60B-06EC-4139-AAFE-A58E07AF3248}', 'EDTDEPCOBRAN', this.context['param_depto']);

      /**
       * setar o valor da cidade no cadastro
       */
      ebfFormChangeComponentValue.call(this, '{010FE60B-06EC-4139-AAFE-A58E07AF3248}', 'EDTCIDCOBRAN', this.context['param_cidade']);

      /**
       * setar o valor do contato no cadastro
       */
      ebfFormChangeComponentValue.call(this, '{010FE60B-06EC-4139-AAFE-A58E07AF3248}', 'EDTCONTATOCOBRAN', this.context['param_contato']);

      /**
       * Atualizar combo - Cidade
       */
      ebfFormRefreshComponent.call(this, 'EDTCIDADE');

      /**
       * Atualizar combo - Estado
       */
      ebfFormRefreshComponent.call(this, 'EDTUFCOBRAN');

      /**
       * Focar componente de endereço cobrança
       */
      ebfFormSetFocus.call(this, 'EDTENDCOBRAN');

      /**
       * Fim
       */
      return null;

    } else {
      return null;

    }

  } else {
    return null;

  }

}

function runRastreamentoPreencheOsCamposDeCobrancaMestre(parent, sys, formID, params) {
  var rule = new RastreamentoPreencheOsCamposDeCobrancaMestre(parent, sys, formID);
  rule.run.apply(rule, params);
}

function Mkr60abd32f7ea4442c8240F0fdd1fec091(parent, sys, formID) {
  this.ruleName = '__MKR_{60ABD32F-7EA4-442C-8240-F0FDD1FEC091}';
  this.functionName = 'Mkr60abd32f7ea4442c8240F0fdd1fec091';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

Mkr60abd32f7ea4442c8240F0fdd1fec091.prototype = new Rule;

/**
 * Esta função executa a regra "__MKR_{60ABD32F-7EA4-442C-8240-F0FDD1FEC091}"
 * @author master
 * @since 14/10/2009 17:30:07
 */
Mkr60abd32f7ea4442c8240F0fdd1fec091.prototype.run = function() {
  document.ruleNameForException = '__MKR_{60ABD32F-7EA4-442C-8240-F0FDD1FEC091}';
  this.context = new Array();


  /**
   * Modo de Inserção()
   */
  ebfFormInsertMode.call(this);

  /**
   * Fim
   */
  return null;

}

function runMkr60abd32f7ea4442c8240F0fdd1fec091(parent, sys, formID, params) {
  var rule = new Mkr60abd32f7ea4442c8240F0fdd1fec091(parent, sys, formID);
  rule.run.apply(rule, params);
}

function Mkr180f7bef76804da99fca32cefacd19ed(parent, sys, formID) {
  this.ruleName = '__MKR_{180F7BEF-7680-4DA9-9FCA-32CEFACD19ED}';
  this.functionName = 'Mkr180f7bef76804da99fca32cefacd19ed';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

Mkr180f7bef76804da99fca32cefacd19ed.prototype = new Rule;

/**
 * Esta função executa a regra "__MKR_{180F7BEF-7680-4DA9-9FCA-32CEFACD19ED}"
 * @author master
 * @since 24/06/2009 12:40:32
 */
Mkr180f7bef76804da99fca32cefacd19ed.prototype.run = function() {
  document.ruleNameForException = '__MKR_{180F7BEF-7680-4DA9-9FCA-32CEFACD19ED}';
  this.context = new Array();

  // Variáveis
  this.context['E-MailValido'] = false;

  this.context['char_email'] = '';


  /**
   * char_email = Obter Valor do Componente(Cadastro,E-mail (EDTEMAIL6))
   */
  this.context['char_email'] = ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'EDTEMAIL6');

  /**
   * (É Nulo(@char_email))?
   */
  if (parseBoolean(isNull.call(this, this.context['char_email']))) {
          return null;

  } else {

    /**
     * E-MailValido = Existe Subsequência(@char_email,@)
     */
    this.context['E-MailValido'] = ebfSearchSubstring.call(this, this.context['char_email'], '@');

    /**
     * (Igual(@E-MailValido,false))?
     */
    if (parseBoolean(isEqual.call(this, this.context['E-MailValido'], false))) {
        
      /**
       * Alertar Aguardando Ok(Este E-Mail não é válido. Verifique!)
       */
      ebfAlertMessage.call(this, 'Este E-Mail não é válido. Verifique!');

      /**
       * Focar Componente(E-mail (EDTEMAIL6))
       */
      ebfFormSetFocus.call(this, 'EDTEMAIL6');

      /**
       * Fim
       */
      return null;

    } else {

      /**
       * Fim
       */
      return null;

    }

  }

}

function runMkr180f7bef76804da99fca32cefacd19ed(parent, sys, formID, params) {
  var rule = new Mkr180f7bef76804da99fca32cefacd19ed(parent, sys, formID);
  rule.run.apply(rule, params);
}

function MkrA5201906D83444d9Ba5d322083132b0e(parent, sys, formID) {
  this.ruleName = '__MKR_{A5201906-D834-44D9-BA5D-322083132B0E}';
  this.functionName = 'MkrA5201906D83444d9Ba5d322083132b0e';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

MkrA5201906D83444d9Ba5d322083132b0e.prototype = new Rule;

/**
 * Esta função executa a regra "__MKR_{A5201906-D834-44D9-BA5D-322083132B0E}"
 * @param num_insc equivale à variável this.context['num_insc']<br/>
 * @param uf equivale à variável this.context['uf']<br/>
 * @author master
 * @since 16/07/2009 18:03:59
 */
MkrA5201906D83444d9Ba5d322083132b0e.prototype.run = function() {
  document.ruleNameForException = '__MKR_{A5201906-D834-44D9-BA5D-322083132B0E}';
  this.context = new Array();

  // Parâmetros de Entrada
  this.context['num_insc'] = arguments[0];

  this.context['uf'] = arguments[1];

  // Variáveis
  this.context['variavel'] = '';


  /**
   * (É Nulo(@num_insc))?
   */
  if (parseBoolean(isNull.call(this, this.context['num_insc']))) {
      
    /**
     * Alterar Valor do Componente(Cadastro,Inscrição Estadual (EDTIEST2),ISENTO)
     */
    ebfFormChangeComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'EDTIEST2', 'ISENTO');

    /**
     * Alterar Valor do Componente(Cadastro,Nome do Responsável (MakerEdit2),Obter Valor do Componente(Cadastro,Empresa (EDTEMPRESA1)))
     */
    ebfFormChangeComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerEdit2', ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'EDTEMPRESA1'));

    /**
     * Alterar Valor do Componente(Cadastro,CPF (MakerEdit8),Obter Valor do Componente(Cadastro,CNPJ/CPF (EDTCGCCPF1)))
     */
    ebfFormChangeComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerEdit8', ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'EDTCGCCPF1'));

    /**
     * Alterar Valor do Componente(Cadastro,Identidade/RG (MakerEdit3),Obter Valor do Componente(Cadastro,Inscrição Estadual (EDTIEST2)))
     */
    ebfFormChangeComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerEdit3', ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'EDTIEST2'));

    /**
     * Fim
     */
    return null;

  } else {

    /**
     * Alterar Valor do Componente(Cadastro,Nome do Responsável (MakerEdit2),Obter Valor do Componente(Cadastro,Empresa (EDTEMPRESA1)))
     */
    ebfFormChangeComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerEdit2', ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'EDTEMPRESA1'));

    /**
     * Alterar Valor do Componente(Cadastro,CPF (MakerEdit8),Obter Valor do Componente(Cadastro,CNPJ/CPF (EDTCGCCPF1)))
     */
    ebfFormChangeComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerEdit8', ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'EDTCGCCPF1'));

    /**
     * Alterar Valor do Componente(Cadastro,Identidade/RG (MakerEdit3),Obter Valor do Componente(Cadastro,Inscrição Estadual (EDTIEST2)))
     */
    ebfFormChangeComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'MakerEdit3', ebfFormGetComponentValue.call(this, '{A0EBE059-7CCA-4715-9288-1AF6C10A3D78}', 'EDTIEST2'));

    /**
     * Fim
     */
    return null;

  }

}

function runMkrA5201906D83444d9Ba5d322083132b0e(parent, sys, formID, params) {
  var rule = new MkrA5201906D83444d9Ba5d322083132b0e(parent, sys, formID);
  rule.run.apply(rule, params);
}


/**
 * Preenche os campos de cobrança se o cnpj de cobrança estiver em branco
 */
function RastreamentoPreencheOsCamposDeCobranca(parent, sys, formID) {
  this.ruleName = 'Rastreamento - Preenche os campos de cobrança';
  this.functionName = 'RastreamentoPreencheOsCamposDeCobranca';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

RastreamentoPreencheOsCamposDeCobranca.prototype = new Rule;

/**
 * Esta função executa a regra "Rastreamento - Preenche os campos de cobrança"
 * @param param_endereco equivale à variável this.context['param_endereco']<br/>
 * @param param_numero equivale à variável this.context['param_numero']<br/>
 * @param param_bairro equivale à variável this.context['param_bairro']<br/>
 * @param param_pais equivale à variável this.context['param_pais']<br/>
 * @param param_cep equivale à variável this.context['param_cep']<br/>
 * @param param_complemento equivale à variável this.context['param_complemento']<br/>
 * @param param_estado equivale à variável this.context['param_estado']<br/>
 * @param param_cidade equivale à variável this.context['param_cidade']<br/>
 * @param param_fax equivale à variável this.context['param_fax']<br/>
 * @param param_fone equivale à variável this.context['param_fone']<br/>
 * @param param_contato equivale à variável this.context['param_contato']<br/>
 * @param param_email equivale à variável this.context['param_email']<br/>
 * @param param_depto equivale à variável this.context['param_depto']<br/>
 * @param param_endCobranca equivale à variável this.context['param_endCobranca']<br/>
 * @author master
 * @since 31/07/2009 00:37:31
 */
RastreamentoPreencheOsCamposDeCobranca.prototype.run = function() {
  document.ruleNameForException = 'Rastreamento - Preenche os campos de cobrança';
  this.context = new Array();

  // Parâmetros de Entrada
  this.context['param_endereco'] = arguments[0];

  this.context['param_numero'] = arguments[1];

  this.context['param_bairro'] = arguments[2];

  this.context['param_pais'] = arguments[3];

  this.context['param_cep'] = arguments[4];

  this.context['param_complemento'] = arguments[5];

  this.context['param_estado'] = arguments[6];

  this.context['param_cidade'] = arguments[7];

  this.context['param_fax'] = arguments[8];

  this.context['param_fone'] = arguments[9];

  this.context['param_contato'] = arguments[10];

  this.context['param_email'] = arguments[11];

  this.context['param_depto'] = arguments[12];

  this.context['param_endCobranca'] = arguments[13];

  // Variáveis
  this.context['atribuirValor'] = '';

  this.context['Confirma'] = false;

  this.context['EndCob'] = '';


  /**
   * Endereço é null?
   */
  if (parseBoolean((isNull.call(this, this.context['param_endCobranca']) || isNull.call(this, ebfTrim.call(this, this.context['param_endCobranca']))))) {
      
    /**
     * aguarda confirmação do usuário
     */
    if (parseBoolean(ebfConfirm.call(this, 'Dados de cobrança é igual aos dados pessoais?'))) {
        
      /**
       * Alterar Valor do Componente(Cadastro,Endereço (EDTENDCOBRAN),@param_endereco)
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTENDCOBRAN', this.context['param_endereco']);

      /**
       * setar o valor do numero no cadastro
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTNUMCOBRAN', this.context['param_numero']);

      /**
       * setar o valor do complemento no cadastro
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTCOMPLCOBRAN', this.context['param_complemento']);

      /**
       * setar o valor do cep no cadastro
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTCEPCOBRAN', this.context['param_cep']);

      /**
       * setar o valor do pais no cadastro
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTPAISCOBRAN', this.context['param_pais']);

      /**
       * setar o valor do bairro cadastro
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTBAIRROCOBRAN', this.context['param_bairro']);

      /**
       * setar o valor do estado cadastro
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTUFCOBRAN', ebfTrim.call(this, this.context['param_estado']));

      /**
       * setar o valor do email no cadastro
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTEMAILCOBRAN', this.context['param_email']);

      /**
       * setar o valor do fax no cadastro
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTFAXCOBRAN', this.context['param_fax']);

      /**
       * setar o valor do fone no cadastro
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTFONECOBRAN', this.context['param_fone']);

      /**
       * setar o valor do depto no cadastro
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTDEPCOBRAN', this.context['param_depto']);

      /**
       * setar o valor da cidade no cadastro
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTCIDCOBRAN', this.context['param_cidade']);

      /**
       * setar o valor do contato no cadastro
       */
      ebfFormChangeComponentValue.call(this, '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTCONTATOCOBRAN', this.context['param_contato']);

      /**
       * Atualizar combo - Cidade
       */
      ebfFormRefreshComponent.call(this, 'EDTCIDCOBRAN');

      /**
       * Atualizar combo - Estado
       */
      ebfFormRefreshComponent.call(this, 'EDTUFCOBRAN');

      /**
       * Focar componente de endereço cobrança
       */
      ebfFormSetFocus.call(this, 'EDTENDCOBRAN');

      /**
       * Fim
       */
      return null;

    } else {
      return null;

    }

  } else {
    return null;

  }

}

function runRastreamentoPreencheOsCamposDeCobranca(parent, sys, formID, params) {
  var rule = new RastreamentoPreencheOsCamposDeCobranca(parent, sys, formID);
  rule.run.apply(rule, params);
}


/**
 * Preenche o nome fantasia com a Razão Social
 */
function RastreamentoPreencheONomeFantasiaComARazaoSocial(parent, sys, formID) {
  this.ruleName = 'Rastreamento - Preenche o nome fantasia com a Razão Social';
  this.functionName = 'RastreamentoPreencheONomeFantasiaComARazaoSocial';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

RastreamentoPreencheONomeFantasiaComARazaoSocial.prototype = new Rule;

/**
 * Esta função executa a regra "Rastreamento - Preenche o nome fantasia com a Razão Social"
 * @param param_nomeFantasia equivale à variável this.context['param_nomeFantasia']<br/>
 * @param param_nomeEmpresa equivale à variável this.context['param_nomeEmpresa']<br/>
 * @param param_formulario equivale à variável this.context['param_formulario']<br/>
 * @param param_compFantasia equivale à variável this.context['param_compFantasia']<br/>
 * @author master
 * @since 16/10/2009 08:48:48
 */
RastreamentoPreencheONomeFantasiaComARazaoSocial.prototype.run = function() {
  document.ruleNameForException = 'Rastreamento - Preenche o nome fantasia com a Razão Social';
  this.context = new Array();

  // Parâmetros de Entrada
  this.context['param_nomeFantasia'] = arguments[0];

  this.context['param_nomeEmpresa'] = arguments[1];

  this.context['param_formulario'] = arguments[2];

  this.context['param_compFantasia'] = arguments[3];


  /**
   * nome fantasia é nulo?
   */
  if (parseBoolean(isNull.call(this, this.context['param_nomeFantasia']))) {
      
    /**
     * Setar o valor da empresa no componente fantasia
     */
    ebfFormChangeComponentValue.call(this, this.context['param_formulario'], this.context['param_compFantasia'], this.context['param_nomeEmpresa']);

    /**
     * Fim
     */
    return null;

  } else {
    return null;

  }

}

function runRastreamentoPreencheONomeFantasiaComARazaoSocial(parent, sys, formID, params) {
  var rule = new RastreamentoPreencheONomeFantasiaComARazaoSocial(parent, sys, formID);
  rule.run.apply(rule, params);
}


/**
 * Executa todos os fluxos do cadastro de clientes web que executa ao inserir um cliente
 */
function RastreamentoExecutaTodosOsFluxosDoCadastroDeClientesWeb(parent, sys, formID) {
  this.ruleName = 'Rastreamento - Executa todos os fluxos do cadastro de clientes web';
  this.functionName = 'RastreamentoExecutaTodosOsFluxosDoCadastroDeClientesWeb';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

RastreamentoExecutaTodosOsFluxosDoCadastroDeClientesWeb.prototype = new Rule;

/**
 * Esta função executa a regra "Rastreamento - Executa todos os fluxos do cadastro de clientes web"
 * @author master
 * @since 25/07/2009 10:04:51
 */
RastreamentoExecutaTodosOsFluxosDoCadastroDeClientesWeb.prototype.run = function() {
  document.ruleNameForException = 'Rastreamento - Executa todos os fluxos do cadastro de clientes web';
  this.context = new Array();


  /**
   * Preenche o código do Cliente
   */
  executeSyncJavaRule.call(this, this.getSystem(), this.getForm(), 'Preenche o código do Cliente', 'EDTCNPJCPF');

  /**
   * Preenche a Razão Social
   */
  executeSyncJavaRule.call(this, this.getSystem(), this.getForm(), 'Preenche a Razão Social');

  /**
   * Preenche os campos de cobrança
   */
  executeSyncJavaRule.call(this, this.getSystem(), this.getForm(), 'Preenche os campos de cobrança');

  /**
   * Fim
   */
  return null;

}

function runRastreamentoExecutaTodosOsFluxosDoCadastroDeClientesWeb(parent, sys, formID, params) {
  var rule = new RastreamentoExecutaTodosOsFluxosDoCadastroDeClientesWeb(parent, sys, formID);
  rule.run.apply(rule, params);
}


/**
 * Para cadastro simplificado
 */
function RastreamentoPreencheARazaoSocial(parent, sys, formID) {
  this.ruleName = 'Rastreamento - Preenche a Razão Social';
  this.functionName = 'RastreamentoPreencheARazaoSocial';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

RastreamentoPreencheARazaoSocial.prototype = new Rule;

/**
 * Esta função executa a regra "Rastreamento - Preenche a Razão Social"
 * @author master
 * @since 25/07/2009 10:05:26
 */
RastreamentoPreencheARazaoSocial.prototype.run = function() {
  document.ruleNameForException = 'Rastreamento - Preenche a Razão Social';
  this.context = new Array();

  // Variáveis
  this.context['valor'] = '';

  this.context['valorFantasia'] = '';


  /**
   * valor = Obter Valor do Componente(Cadastro,Empresa (EDTEMPRESA))
   */
  this.context['valor'] = ebfFormGetComponentValue.call(this, '{0C113079-AC05-4AE0-AA06-F8B46129E92A}', 'EDTEMPRESA');

  /**
   * (É Nulo(@valor))?
   */
  if (parseBoolean(isNull.call(this, this.context['valor']))) {
      
    /**
     * valorFantasia = Obter Valor da Lista Dinâmica(Cadastro,Nome Fantasia (EDTNOMEFANTASIA))
     */
    this.context['valorFantasia'] = ebfFormGetLookupName.call(this, '{0C113079-AC05-4AE0-AA06-F8B46129E92A}', 'EDTNOMEFANTASIA');

    /**
     * (É Nulo(@valorFantasia))?
     */
    if (parseBoolean(isNull.call(this, this.context['valorFantasia']))) {
        
      /**
       * Fim
       */
      return null;

    } else {

      /**
       * Alterar Valor do Componente(Cadastro,Empresa (EDTEMPRESA),@valorFantasia)
       */
      ebfFormChangeComponentValue.call(this, '{0C113079-AC05-4AE0-AA06-F8B46129E92A}', 'EDTEMPRESA', this.context['valorFantasia']);

      /**
       * Fim
       */
      return null;

    }

  } else {

    /**
     * valorFantasia = Obter Valor do Componente(Cadastro,Empresa (EDTEMPRESA))
     */
    this.context['valorFantasia'] = ebfFormGetComponentValue.call(this, '{0C113079-AC05-4AE0-AA06-F8B46129E92A}', 'EDTEMPRESA');

    /**
     * (É Nulo(@valorFantasia))?
     */
    if (parseBoolean(isNull.call(this, this.context['valorFantasia']))) {
              return null;

    } else {

      /**
       * Alterar Valor do Componente(Cadastro,Nome Fantasia (EDTNOMEFANTASIA),@valorFantasia)
       */
      ebfFormChangeComponentValue.call(this, '{0C113079-AC05-4AE0-AA06-F8B46129E92A}', 'EDTNOMEFANTASIA', this.context['valorFantasia']);

      /**
       * Fim
       */
      return null;

    }

  }

}

function runRastreamentoPreencheARazaoSocial(parent, sys, formID, params) {
  var rule = new RastreamentoPreencheARazaoSocial(parent, sys, formID);
  rule.run.apply(rule, params);
}


/**
 * Para cadastro simplificado
 */
function RastreamentoPreencheOCodigoDoCliente(parent, sys, formID) {
  this.ruleName = 'Rastreamento - Preenche o código do Cliente';
  this.functionName = 'RastreamentoPreencheOCodigoDoCliente';
  this.parent = parent;
  this.sys = sys;
  this.formID = formID;
  this.translations = new Map();
}

RastreamentoPreencheOCodigoDoCliente.prototype = new Rule;

/**
 * Esta função executa a regra "Rastreamento - Preenche o código do Cliente"
 * @param param_cpf_cnpj equivale à variável this.context['param_cpf_cnpj']<br/>
 * @author master
 * @since 16/10/2009 08:56:17
 */
RastreamentoPreencheOCodigoDoCliente.prototype.run = function() {
  document.ruleNameForException = 'Rastreamento - Preenche o código do Cliente';
  this.context = new Array();

  // Parâmetros de Entrada
  this.context['param_cpf_cnpj'] = arguments[0];

  // Variáveis
  this.context['log_ExistemDados'] = false;

  this.context['log_cpfcnpj'] = false;


  /**
   * Rastreamento - valideCPFCNPJ
   */
  this.context['log_cpfcnpj'] = new RastreamentoValidecpfcnpj(this, this.getSystem(), this.getForm()).run(this.context['param_cpf_cnpj'], '{8C67FC1B-A241-403E-912A-086087155DD5}', 'EDTIE');

  /**
   * cpf_cnpj é válido?
   */
  if (parseBoolean(isEqual.call(this, this.context['log_cpfcnpj'], true))) {
      
    /**
     * Rastreamento - Pesquisa Cliente
     */
    this.context['log_ExistemDados'] = executeSyncJavaRule.call(this, this.getSystem(), this.getForm(), 'Rastreamento - Pesquisa Cliente', this.context['param_cpf_cnpj']);

    /**
     * Existe cliente?
     */
    if (parseBoolean(isEqual.call(this, this.context['log_ExistemDados'], true))) {
        
      /**
       * Alertar Aguardando Ok(CPF ou CNPJ já existe, verifique!)
       */
      ebfAlertMessage.call(this, 'CPF ou CNPJ já existe, verifique!');

      /**
       * Focar Componente(CNPJ/CPF (EDTCNPJCPF))
       */
      ebfFormSetFocus.call(this, 'EDTCNPJCPF');

      /**
       * Fim
       */
      return null;

    } else {

      /**
       * Setar o Cpf_Cnpj no campo oculto Código
       */
      ebfSQLSetFormField.call(this, 'cdcliente', this.context['param_cpf_cnpj']);

      /**
       * Fim
       */
      return null;

    }

  } else {

    /**
     * Alerta ao usuario  CNPJ ou CPF inválido. Verifique!
     */
    ebfAlertMessage.call(this, 'CNPJ ou CPF inválido. Verifique!');

    /**
     * retornar o foco para o componente CPF_CNPJ
     */
    ebfFormSetFocus.call(this, 'EDTCNPJCPF');

    /**
     * Fim
     */
    return null;

  }

}

function runRastreamentoPreencheOCodigoDoCliente(parent, sys, formID, params) {
  var rule = new RastreamentoPreencheOCodigoDoCliente(parent, sys, formID);
  rule.run.apply(rule, params);
}
//-->