<?php
//
   include_once('line_form_session.php');
   @session_start() ;
   $_SESSION['scriptcase']['line_form']['glo_nm_perfil']          = "conn_mysql";
   $_SESSION['scriptcase']['line_form']['glo_nm_path_prod']       = "";
   $_SESSION['scriptcase']['line_form']['glo_nm_path_imagens']    = "";
   $_SESSION['scriptcase']['line_form']['glo_nm_path_imag_temp']  = "";
   $_SESSION['scriptcase']['line_form']['glo_nm_path_doc']        = "";
//
class line_form_ini
{
   var $nm_cod_apl;
   var $nm_nome_apl;
   var $nm_seguranca;
   var $nm_grupo;
   var $nm_grupo_versao;
   var $nm_autor;
   var $nm_versao_sc;
   var $nm_tp_lic_sc;
   var $nm_dt_criacao;
   var $nm_hr_criacao;
   var $nm_autor_alt;
   var $nm_dt_ult_alt;
   var $nm_hr_ult_alt;
   var $nm_timestamp;
   var $cor_bg_table;
   var $border_grid;
   var $cor_bg_grid;
   var $cor_cab_grid;
   var $cor_borda;
   var $cor_txt_cab_grid;
   var $cab_fonte_tipo;
   var $cab_fonte_tamanho;
   var $rod_fonte_tipo;
   var $rod_fonte_tamanho;
   var $cor_rod_grid;
   var $cor_txt_rod_grid;
   var $cor_barra_nav;
   var $cor_titulo;
   var $cor_txt_titulo;
   var $titulo_fonte_tipo;
   var $titulo_fonte_tamanho;
   var $cor_grid_impar;
   var $cor_grid_par;
   var $cor_txt_grid;
   var $texto_fonte_tipo;
   var $texto_fonte_tamanho;
   var $cor_lin_grupo;
   var $cor_txt_grupo;
   var $grupo_fonte_tipo;
   var $grupo_fonte_tamanho;
   var $cor_lin_sub_tot;
   var $cor_txt_sub_tot;
   var $sub_tot_fonte_tipo;
   var $sub_tot_fonte_tamanho;
   var $cor_lin_tot;
   var $cor_txt_tot;
   var $tot_fonte_tipo;
   var $tot_fonte_tamanho;
   var $cor_link_cab;
   var $cor_link_dados;
   var $img_fun_pag;
   var $img_fun_cab;
   var $img_fun_rod;
   var $img_fun_tit;
   var $img_fun_gru;
   var $img_fun_tot;
   var $img_fun_sub;
   var $img_fun_imp;
   var $img_fun_par;
   var $root;
   var $server;
   var $sc_protocolo;
   var $path_prod;
   var $path_link;
   var $path_aplicacao;
   var $path_embutida;
   var $path_botoes;
   var $path_img_global;
   var $path_img_modelo;
   var $path_icones;
   var $path_imagens;
   var $path_imag_cab;
   var $path_imag_temp;
   var $path_libs;
   var $path_doc;
   var $str_lang;
   var $str_schema_all;
   var $str_conf_reg;
   var $path_cep;
   var $path_secure;
   var $path_js;
   var $path_adodb;
   var $path_grafico;
   var $path_atual;
   var $Gd_missing;
   var $sc_site_ssl;
   var $link_line_stylepix_form_edit;
   var $link_line_cmatch_edit_grid_edit;
   var $link_greige_grstyle_ro2_form_edit;
   var $link_line_fingreige_grid_cons;
   var $link_line_fingreig_form_edit;
   var $link_line_sample_grid_cons;
   var $link_line_sampit_grid_cons;
   var $nm_cont_lin;
   var $nm_limite_lin;
   var $nm_limite_lin_prt;
   var $nm_falta_var;
   var $nm_falta_var_db;
   var $nm_tpbanco;
   var $nm_servidor;
   var $nm_usuario;
   var $nm_senha;
   var $nm_database_encoding;
   var $nm_con_db2 = array();
   var $nm_con_persistente;
   var $nm_con_use_schema;
   var $nm_tabela;
   var $nm_col_dinamica   = array();
   var $nm_order_dinamico = array();
   var $nm_hidden_blocos  = array();
   var $sc_tem_trans_banco;
   var $nm_bases_all;
   var $nm_bases_access;
   var $nm_bases_db2;
   var $nm_bases_ibase;
   var $nm_bases_informix;
   var $nm_bases_mssql;
   var $nm_bases_mysql;
   var $nm_bases_postgres;
   var $nm_bases_oracle;
   var $nm_bases_sqlite;
   var $nm_bases_sybase;
   var $nm_bases_vfp;
   var $nm_bases_odbc;
   var $sc_page;
//
   function init()
   {
       global
             $nm_url_saida, $nm_apl_dependente, $script_case_init;

      @ini_set('magic_quotes_runtime', 0);
      $this->sc_page = $script_case_init;
      $_SESSION['scriptcase']['sc_num_page'] = $script_case_init;
      $_SESSION['scriptcase']['sc_ctl_ajax'] = 'part';
      $_SESSION['scriptcase']['sc_cnt_sql']  = 0;
      $this->sc_charset['UTF-8'] = 'utf-8';
      $this->sc_charset['ISO-8859-1'] = 'iso-8859-1';
      $this->sc_charset['SJIS'] = 'shift-jis';
      $this->sc_charset['ISO-8859-14'] = 'iso-8859-14';
      $this->sc_charset['ISO-8859-7'] = 'iso-8859-7';
      $this->sc_charset['ISO-8859-10'] = 'iso-8859-10';
      $this->sc_charset['ISO-8859-3'] = 'iso-8859-3';
      $this->sc_charset['ISO-8859-15'] = 'iso-8859-15';
      $this->sc_charset['WINDOWS-1252'] = 'windows-1252';
      $this->sc_charset['ISO-8859-13'] = 'iso-8859-13';
      $this->sc_charset['ISO-8859-4'] = 'iso-8859-4';
      $this->sc_charset['ISO-8859-2'] = 'iso-8859-2';
      $this->sc_charset['ISO-8859-5'] = 'iso-8859-5';
      $this->sc_charset['KOI8-R'] = 'koi8-r';
      $this->sc_charset['WINDOWS-1251'] = 'windows-1251';
      $this->sc_charset['BIG-5'] = 'big5';
      $this->sc_charset['EUC-CN'] = 'EUC-CN';
      $this->sc_charset['EUC-JP'] = 'euc-jp';
      $this->sc_charset['ISO-2022-JP'] = 'iso-2022-jp';
      $this->sc_charset['EUC-KR'] = 'euc-kr';
      $this->sc_charset['ISO-2022-KR'] = 'iso-2022-kr';
      $this->sc_charset['ISO-8859-9'] = 'iso-8859-9';
      $this->sc_charset['ISO-8859-6'] = 'iso-8859-6';
      $this->sc_charset['ISO-8859-8'] = 'iso-8859-8';
      $this->sc_charset['ISO-8859-8-I'] = 'iso-8859-8-i';
      $_SESSION['scriptcase']['trial_version'] = 'N';
      $_SESSION['sc_session'][$this->sc_page]['line_form']['decimal_db'] = "."; 

      $this->nm_cod_apl      = "line_form"; 
      $this->nm_nome_apl     = ""; 
      $this->nm_seguranca    = ""; 
      $this->nm_grupo        = "Veratex"; 
      $this->nm_grupo_versao = "1"; 
      $this->nm_autor        = "admin"; 
      $this->nm_versao_sc    = "v7"; 
      $this->nm_tp_lic_sc    = "ep_bronze"; 
      $this->nm_dt_criacao   = "20140107"; 
      $this->nm_hr_criacao   = "163835"; 
      $this->nm_autor_alt    = "admin"; 
      $this->nm_dt_ult_alt   = "20150410"; 
      $this->nm_hr_ult_alt   = "230833"; 
      list($NM_usec, $NM_sec) = explode(" ", microtime()); 
      $this->nm_timestamp    = (float) $NM_sec; 
      $this->nm_app_version  = "1.0.0"; 
// 
      $this->border_grid           = ""; 
      $this->cor_bg_grid           = ""; 
      $this->cor_bg_table          = ""; 
      $this->cor_borda             = ""; 
      $this->cor_cab_grid          = ""; 
      $this->cor_txt_pag           = ""; 
      $this->cor_link_pag          = ""; 
      $this->pag_fonte_tipo        = ""; 
      $this->pag_fonte_tamanho     = ""; 
      $this->cor_txt_cab_grid      = ""; 
      $this->cab_fonte_tipo        = ""; 
      $this->cab_fonte_tamanho     = ""; 
      $this->rod_fonte_tipo        = ""; 
      $this->rod_fonte_tamanho     = ""; 
      $this->cor_rod_grid          = ""; 
      $this->cor_txt_rod_grid      = ""; 
      $this->cor_barra_nav         = ""; 
      $this->cor_titulo            = ""; 
      $this->cor_txt_titulo        = ""; 
      $this->titulo_fonte_tipo     = ""; 
      $this->titulo_fonte_tamanho  = ""; 
      $this->cor_grid_impar        = ""; 
      $this->cor_grid_par          = ""; 
      $this->cor_txt_grid          = ""; 
      $this->texto_fonte_tipo      = ""; 
      $this->texto_fonte_tamanho   = ""; 
      $this->cor_lin_grupo         = ""; 
      $this->cor_txt_grupo         = ""; 
      $this->grupo_fonte_tipo      = ""; 
      $this->grupo_fonte_tamanho   = ""; 
      $this->cor_lin_sub_tot       = ""; 
      $this->cor_txt_sub_tot       = ""; 
      $this->sub_tot_fonte_tipo    = ""; 
      $this->sub_tot_fonte_tamanho = ""; 
      $this->cor_lin_tot           = ""; 
      $this->cor_txt_tot           = ""; 
      $this->tot_fonte_tipo        = ""; 
      $this->tot_fonte_tamanho     = ""; 
      $this->cor_link_cab          = ""; 
      $this->cor_link_dados        = ""; 
      $this->img_fun_pag           = ""; 
      $this->img_fun_cab           = ""; 
      $this->img_fun_rod           = ""; 
      $this->img_fun_tit           = ""; 
      $this->img_fun_gru           = ""; 
      $this->img_fun_tot           = ""; 
      $this->img_fun_sub           = ""; 
      $this->img_fun_imp           = ""; 
      $this->img_fun_par           = ""; 
// 
      $NM_dir_atual = getcwd();
      if (empty($NM_dir_atual))
      {
          $str_path_sys          = (isset($_SERVER['SCRIPT_FILENAME'])) ? $_SERVER['SCRIPT_FILENAME'] : $_SERVER['ORIG_PATH_TRANSLATED'];
          $str_path_sys          = str_replace("\\", '/', $str_path_sys);
          $str_path_sys          = str_replace('//', '/', $str_path_sys);
      }
      else
      {
          $sc_nm_arquivo         = explode("/", $_SERVER['PHP_SELF']);
          $str_path_sys          = str_replace("\\", "/", str_replace("\\\\", "\\", getcwd())) . "/" . $sc_nm_arquivo[count($sc_nm_arquivo)-1];
      }
      //check publication with the prod
      $str_path_apl_url = $_SERVER['PHP_SELF'];
      $str_path_apl_url = str_replace("\\", '/', $str_path_apl_url);
      $str_path_apl_url = str_replace('//', '/', $str_path_apl_url);
      $str_path_apl_url = substr($str_path_apl_url, 0, strrpos($str_path_apl_url, "/"));
      $str_path_apl_url = substr($str_path_apl_url, 0, strrpos($str_path_apl_url, "/")+1);
      $str_path_apl_dir = substr($str_path_sys, 0, strrpos($str_path_sys, "/"));
      $str_path_apl_dir = substr($str_path_apl_dir, 0, strrpos($str_path_apl_dir, "/")+1);
      //check prod
      if(empty($_SESSION['scriptcase']['line_form']['glo_nm_path_prod']))
      {
              /*check prod*/$_SESSION['scriptcase']['line_form']['glo_nm_path_prod'] = $str_path_apl_url . "_lib/prod";
      }
      //check img
      if(empty($_SESSION['scriptcase']['line_form']['glo_nm_path_imagens']))
      {
              /*check img*/$_SESSION['scriptcase']['line_form']['glo_nm_path_imagens'] = $str_path_apl_url . "_lib/file/img";
      }
      //check tmp
      if(empty($_SESSION['scriptcase']['line_form']['glo_nm_path_imag_temp']))
      {
              /*check tmp*/$_SESSION['scriptcase']['line_form']['glo_nm_path_imag_temp'] = $str_path_apl_url . "_lib/tmp";
      }
      //check doc
      if(empty($_SESSION['scriptcase']['line_form']['glo_nm_path_doc']))
      {
              /*check doc*/$_SESSION['scriptcase']['line_form']['glo_nm_path_doc'] = $str_path_apl_dir . "_lib/file/doc";
      }
      //end check publication with the prod
// 
      $this->sc_site_ssl     = (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') ? true : false;
      $this->sc_protocolo    = ($this->sc_site_ssl) ? 'https://' : 'http://';
      $this->sc_protocolo    = "";
      $this->path_prod       = $_SESSION['scriptcase']['line_form']['glo_nm_path_prod'];
      $this->path_imagens    = $_SESSION['scriptcase']['line_form']['glo_nm_path_imagens'];
      $this->path_imag_temp  = $_SESSION['scriptcase']['line_form']['glo_nm_path_imag_temp'];
      $this->path_doc        = $_SESSION['scriptcase']['line_form']['glo_nm_path_doc'];
      if (!isset($_SESSION['scriptcase']['str_lang']) || empty($_SESSION['scriptcase']['str_lang']))
      {
          $_SESSION['scriptcase']['str_lang'] = "en_us";
      }
      if (!isset($_SESSION['scriptcase']['str_conf_reg']) || empty($_SESSION['scriptcase']['str_conf_reg']))
      {
          $_SESSION['scriptcase']['str_conf_reg'] = "en_us";
      }
      $this->str_lang        = $_SESSION['scriptcase']['str_lang'];
      $this->str_conf_reg    = $_SESSION['scriptcase']['str_conf_reg'];
      $this->str_schema_all  = (isset($_SESSION['scriptcase']['str_schema_all']) && !empty($_SESSION['scriptcase']['str_schema_all'])) ? $_SESSION['scriptcase']['str_schema_all'] : "Scriptcase7_BlueSky/Scriptcase7_BlueSky";
      $this->server          = (isset($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $_SERVER['HTTP_HOST'];
      if (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] != 80 && !$this->sc_site_ssl )
      {
          $this->server         .= ":" . $_SERVER['SERVER_PORT'];
      }
      $this->server_pdf      = $this->server;
      $this->server          = "";
      $str_path_web          = $_SERVER['PHP_SELF'];
      $str_path_web          = str_replace("\\", '/', $str_path_web);
      $str_path_web          = str_replace('//', '/', $str_path_web);
      $this->root            = substr($str_path_sys, 0, -1 * strlen($str_path_web));
      $this->path_aplicacao  = substr($str_path_sys, 0, strrpos($str_path_sys, '/'));
      $this->path_aplicacao  = substr($this->path_aplicacao, 0, strrpos($this->path_aplicacao, '/')) . '/line_form';
      $this->path_embutida   = substr($this->path_aplicacao, 0, strrpos($this->path_aplicacao, '/') + 1);
      $this->path_aplicacao .= '/';
      $this->path_link       = substr($str_path_web, 0, strrpos($str_path_web, '/'));
      $this->path_link       = substr($this->path_link, 0, strrpos($this->path_link, '/')) . '/';
      $this->path_help       = $this->path_link . "_lib/webhelp/";
      $this->path_lang       = "../_lib/lang/";
      $this->path_lang_js    = "../_lib/js/";
      $this->path_botoes     = $this->path_link . "_lib/img";
      $this->path_img_global = $this->path_link . "_lib/img";
      $this->path_img_modelo = $this->path_link . "_lib/img";
      $this->path_icones     = $this->path_link . "_lib/img";
      $this->path_imag_cab   = $this->path_link . "_lib/img";
      $this->path_btn        = $this->root . $this->path_link . "_lib/buttons/";
      $this->path_css        = $this->root . $this->path_link . "_lib/css/";
      $this->path_lib_php    = $this->root . $this->path_link . "_lib/lib/php/";
      $this->url_lib_js      = $this->path_link . "_lib/lib/js/";
      $this->url_lib         = $this->path_link . '/_lib/';
      $this->url_third       = $this->path_prod . '/third/';
      $this->path_cep        = $this->path_prod . "/cep";
      $this->path_cor        = $this->path_prod . "/cor";
      $this->path_js         = $this->path_prod . "/lib/js";
      $this->path_libs       = $this->root . $this->path_prod . "/lib/php";
      $this->path_third      = $this->root . $this->path_prod . "/third";
      $this->path_secure     = $this->root . $this->path_prod . "/secure";
      $this->path_adodb      = $this->root . $this->path_prod . "/third/adodb";

      global $inicial_line_form;
      if (isset($_SESSION['scriptcase']['user_logout']))
      {
          foreach ($_SESSION['scriptcase']['user_logout'] as $ind => $parms)
          {
              if (isset($_SESSION[$parms['V']]) && $_SESSION[$parms['V']] == $parms['U'])
              {
                  $nm_apl_dest = $parms['R'];
                  $dir = explode("/", $nm_apl_dest);
                  if (count($dir) == 1)
                  {
                      $nm_apl_dest = str_replace(".php", "", $nm_apl_dest);
                      $nm_apl_dest = $this->path_link . SC_dir_app_name($nm_apl_dest) . "/";
                  }
                  unset($_SESSION['scriptcase']['user_logout'][$ind]);
                  if (isset($inicial_line_form->contr_line_form->NM_ajax_flag) && $inicial_line_form->contr_line_form->NM_ajax_flag)
                  {
                      $inicial_line_form->contr_->NM_ajax_info['redir']['action']  = $nm_apl_dest;
                      $inicial_line_form->contr_line_form->NM_ajax_info['redir']['target']  = $parms['T'];
                      $inicial_line_form->contr_line_form->NM_ajax_info['redir']['metodo']  = "post";
                      $inicial_line_form->contr_line_form->NM_ajax_info['redir']['script_case_init']  = $this->sc_page;
                      $inicial_line_form->contr_line_form->NM_ajax_info['redir']['script_case_session']  = session_id();
                      line_form_pack_ajax_response();
                      exit;
                  }
?>
                  <html>
                  <body>
                  <form name="FRedirect" method="POST" action="<?php echo $nm_apl_dest; ?>" target="<?php echo $parms['T']; ?>">
                  </form>
                  <script>
                   document.FRedirect.submit();
                  </script>
                  </body>
                  </html>
<?php
                  exit;
              }
          }
      }
      $str_path = substr($this->path_prod, 0, strrpos($this->path_prod, '/') + 1); 
      if (!is_file($this->root . $str_path . 'devel/class/xmlparser/nmXmlparserIniSys.class.php'))
      {
          unset($_SESSION['scriptcase']['nm_sc_retorno']);
          unset($_SESSION['scriptcase']['line_form']['glo_nm_conexao']);
      }
      include($this->path_lang . $this->str_lang . ".lang.php");
      include($this->path_lang . "config_region.php");
      include($this->path_lang . "lang_config_region.php");
      asort($this->Nm_lang_conf_region);
      $aLangLabel = array();
      foreach ($this->Nm_lang_conf_region as $sLocale => $sLabel) {
          $iPos = strpos($sLabel, '(');
          if (false !== $iPos) {
              $sLabel                = trim(substr($sLabel, 0, $iPos));
              $aLangLabel[$sLabel][] = $sLocale;
          }
      }
      foreach ($aLangLabel as $sLabel => $aLangList) {
          if (1 == sizeof($aLangList) && isset($this->Nm_lang_conf_region[$aLangList[0]])) {
              $this->Nm_lang_conf_region[$aLangList[0]] = $sLabel;
          }
      }

      if (isset($this->Nm_lang['lang_errm_dbcn_conn']))
      {
          $_SESSION['scriptcase']['db_conn_error'] = $this->Nm_lang['lang_errm_dbcn_conn'];
      }
      if (!function_exists("mb_convert_encoding"))
      {
          echo "<div><font size=6>" . $this->Nm_lang['lang_othr_prod_xtmb'] . "</font></div>";exit;
      } 
      $_SESSION['scriptcase']['charset'] = (isset($this->Nm_lang['Nm_charset']) && !empty($this->Nm_lang['Nm_charset'])) ? $this->Nm_lang['Nm_charset'] : "ISO-8859-1";
      $_SESSION['scriptcase']['charset_html']  = (isset($this->sc_charset[$_SESSION['scriptcase']['charset']])) ? $this->sc_charset[$_SESSION['scriptcase']['charset']] : $_SESSION['scriptcase']['charset'];
      foreach ($this->Nm_conf_reg[$this->str_conf_reg] as $ind => $dados)
      {
          if ($_SESSION['scriptcase']['charset'] != "UTF-8" && NM_is_utf8($dados))
          {
              $this->Nm_conf_reg[$this->str_conf_reg][$ind] = mb_convert_encoding($dados, $_SESSION['scriptcase']['charset'], "UTF-8");
          }
      }
      foreach ($this->Nm_lang as $ind => $dados)
      {
          if ($_SESSION['scriptcase']['charset'] != "UTF-8" && NM_is_utf8($ind))
          {
              $ind = mb_convert_encoding($ind, $_SESSION['scriptcase']['charset'], "UTF-8");
              $this->Nm_lang[$ind] = $dados;
          }
          if ($_SESSION['scriptcase']['charset'] != "UTF-8" && NM_is_utf8($dados))
          {
              $this->Nm_lang[$ind] = mb_convert_encoding($dados, $_SESSION['scriptcase']['charset'], "UTF-8");
          }
      }
      $PHP_ver = str_replace(".", "", phpversion()); 
      if (substr($PHP_ver, 0, 3) < 434)
      {
          echo "<div><font size=6>" . $this->Nm_lang['lang_othr_prod_phpv'] . "</font></div>";exit;
      }
      if (file_exists($this->path_libs . "/ver.dat"))
      {
          $SC_ver = file($this->path_libs . "/ver.dat"); 
          $SC_ver = str_replace(".", "", $SC_ver[0]); 
          if (substr($SC_ver, 0, 5) < 40015)
          {
              echo "<div><font size=6>" . $this->Nm_lang['lang_othr_prod_incp'] . "</font></div>";exit;
          } 
      } 
      if (-1 != version_compare(phpversion(), '5.0.0'))
      {
         $this->path_grafico    = $this->root . $this->path_prod . "/third/jpgraph5/src";
      }
      else
      {
          $this->path_grafico    = $this->root . $this->path_prod . "/third/jpgraph4/src";
      }
      $_SESSION['sc_session'][$this->sc_page]['line_form']['path_doc'] = $this->path_doc; 
      $_SESSION['scriptcase']['nm_path_prod'] = $this->root . $this->path_prod . "/"; 
      $_SESSION['scriptcase']['nm_root_cep']  = $this->root; 
      $_SESSION['scriptcase']['nm_path_cep']  = $this->path_cep; 
      if (empty($this->path_imag_cab))
      {
          $this->path_imag_cab = $this->path_img_global;
      }
      if (!is_dir($this->root . $this->path_prod))
      {
          echo "<style type=\"text/css\">";
          echo ".scButton_default { font-family: Arial, sans-serif; font-size: 11px; color: #444444; font-weight: bold; border-style: none; border-width: 1px; padding: 3px 14px; background-image: url(" . $this->path_img_modelo . "/V7buttonskyblue.jpg); }";
          echo ".scButton_disabled { font-family: Arial, sans-serif; font-size: 11px; color: #333; font-weight: bold; background-color: #FFFFFF; border-style: solid; border-width: 1px; padding: 3px 14px;  }";
          echo ".scButton_onmousedown { font-family: Arial, sans-serif; font-size: 11px; color: #666666; font-weight: bold; background-color: #D5E1E8; border-style: none; border-width: 1px; padding: 3px 14px;  }";
          echo ".scButton_onmouseover { font-family: Arial, sans-serif; font-size: 11px; color: #555555; font-weight: bold; background-color: #E7EEF4; border-style: none; border-width: 1px; padding: 3px 14px;  }";
          echo ".scLink_default { text-decoration: underline; font-size: 12px; color: #0000AA;  }";
          echo ".scLink_default:visited { text-decoration: underline; font-size: 12px; color: #0000AA;  }";
          echo ".scLink_default:active { text-decoration: underline; font-size: 12px; color: #0000AA;  }";
          echo ".scLink_default:hover { text-decoration: none; font-size: 12px; color: #0000AA;  }";
          echo "</style>";
          echo "<table width=\"80%\" border=\"1\" height=\"117\">";
          echo "<tr>";
          echo "   <td bgcolor=\"\">";
          echo "       <b><font size=\"4\">" . $this->Nm_lang['lang_errm_cmlb_nfnd'] . "</font>";
          echo "  " . $this->root . $this->path_prod;
          echo "   </b></td>";
          echo " </tr>";
          echo "</table>";
          if (!$_SESSION['sc_session'][$script_case_init]['line_form']['iframe_menu'] && (!isset($_SESSION['sc_session'][$script_case_init]['line_form']['sc_outra_jan']) || $_SESSION['sc_session'][$script_case_init]['line_form']['sc_outra_jan'] != 'line_form')) 
          { 
              if (isset($_SESSION['scriptcase']['nm_sc_retorno']) && !empty($_SESSION['scriptcase']['nm_sc_retorno'])) 
              { 
?>
                  <input type="button" id="sai" onClick="window.location='<?php echo $_SESSION['scriptcase']['nm_sc_retorno'] ?>'; return false" class="scButton_default" value="<?php echo $this->Nm_lang['lang_btns_back'] ?>" title="<?php echo $this->Nm_lang['lang_btns_back_hint'] ?>" style="<?php echo $sCondStyle; ?>vertical-align: middle;display: ''">

<?php
              } 
              else 
              { 
?>
                  <input type="button" id="sai" onClick="window.location='<?php echo $nm_url_saida ?>'; return false" class="scButton_default" value="<?php echo $this->Nm_lang['lang_btns_exit'] ?>" title="<?php echo $this->Nm_lang['lang_btns_exit_hint'] ?>" style="<?php echo $sCondStyle; ?>vertical-align: middle;display: ''">

<?php
              } 
          } 
          exit ;
      }

      $this->path_atual  = getcwd();
      $opsys = strtolower(php_uname());

      $this->link_line_stylepix_form_edit = $this->sc_protocolo . $this->server . $this->path_link . "" . SC_dir_app_name('line_stylepix_form') . "/" ; 
      $this->link_line_cmatch_edit_grid_edit = $this->sc_protocolo . $this->server . $this->path_link . "" . SC_dir_app_name('line_cmatch_edit_grid') . "/" ; 
      $this->link_greige_grstyle_ro2_form_edit = $this->sc_protocolo . $this->server . $this->path_link . "" . SC_dir_app_name('greige_grstyle_ro2_form') . "/" ; 
      $this->link_line_fingreige_grid_cons = $this->sc_protocolo . $this->server . $this->path_link . "" . SC_dir_app_name('line_fingreige_grid') . "/" ; 
      $this->link_line_fingreig_form_edit = $this->sc_protocolo . $this->server . $this->path_link . "" . SC_dir_app_name('line_fingreig_form') . "/" ; 
      $this->link_line_sample_grid_cons = $this->sc_protocolo . $this->server . $this->path_link . "" . SC_dir_app_name('line_sample_grid') . "/" ; 
      $this->link_line_sampit_grid_cons = $this->sc_protocolo . $this->server . $this->path_link . "" . SC_dir_app_name('line_sampit_grid') . "/" ; 
      $this->nm_cont_lin       = 0;
      $this->nm_limite_lin     = 0;
      $this->nm_limite_lin_prt = 0;
// 
      include_once($this->path_adodb . "/adodb.inc.php"); 
      $this->sc_Include($this->path_libs . "/nm_sec_prod.php", "F", "nm_reg_prod") ; 
      $this->sc_Include($this->path_libs . "/nm_ini_perfil.php", "F", "perfil_lib") ; 
      $this->sc_Include($this->path_lib_php . "/nm_data.class.php", "C", "nm_data") ; 
      $this->sc_Include($this->path_lib_php . "/nm_edit.php", "F", "nmgp_Form_Num_Val") ; 
      $this->sc_Include($this->path_lib_php . "/nm_conv_dados.php", "F", "nm_conv_limpa_dado") ; 
      $this->nm_data = new nm_data("en_us");
      global $inicial_line_form, $NM_run_iframe;
      if ((isset($inicial_line_form->contr_line_form->NM_ajax_flag) && $inicial_line_form->contr_line_form->NM_ajax_flag) || (isset($_SESSION['sc_session'][$this->sc_page]['line_form']['embutida_call']) && $_SESSION['sc_session'][$this->sc_page]['line_form']['embutida_call']) || $NM_run_iframe == 1)
      {
           $_SESSION['scriptcase']['sc_ctl_ajax'] = 'part';
      }
      perfil_lib($this->path_libs);
      if (!isset($_SESSION['sc_session'][$this->sc_page]['SC_Check_Perfil']))
      {
          if(function_exists("nm_check_perfil_exists")) nm_check_perfil_exists($this->path_libs, $this->path_prod);
          $_SESSION['sc_session'][$this->sc_page]['SC_Check_Perfil'] = true;
      }
      if (function_exists("nm_check_pdf_server")) $this->server_pdf = nm_check_pdf_server($this->path_libs, $this->server_pdf);
      if (!isset($_SESSION['scriptcase']['sc_num_img']) || empty($_SESSION['scriptcase']['sc_num_img']))
      { 
          $_SESSION['scriptcase']['sc_num_img'] = 1; 
      } 
      $this->regionalDefault();
      $this->sc_tem_trans_banco = false;
      $this->nm_bases_access     = array("access", "ado_access");
      $this->nm_bases_db2        = array("db2", "db2_odbc", "odbc_db2", "odbc_db2v6");
      $this->nm_bases_ibase      = array("ibase", "firebird", "borland_ibase");
      $this->nm_bases_informix   = array("informix", "informix72", "pdo_informix");
      $this->nm_bases_mssql      = array("mssql", "ado_mssql", "odbc_mssql", "mssqlnative", "pdo_sqlsrv");
      $this->nm_bases_mysql      = array("mysql", "mysqlt", "maxsql", "pdo_mysql");
      $this->nm_bases_postgres   = array("postgres", "postgres64", "postgres7", "pdo_pgsql");
      $this->nm_bases_oracle     = array("oci8", "oci805", "oci8po", "odbc_oracle", "oracle");
      $this->nm_bases_sqlite     = array("sqlite", "pdosqlite");
      $this->nm_bases_sybase     = array("sybase");
      $this->nm_bases_vfp        = array("vfp");
      $this->nm_bases_odbc       = array("odbc");
      $this->nm_bases_all        = array_merge($this->nm_bases_access, $this->nm_bases_db2, $this->nm_bases_ibase, $this->nm_bases_informix, $this->nm_bases_mssql, $this->nm_bases_mysql, $this->nm_bases_postgres, $this->nm_bases_oracle, $this->nm_bases_sqlite, $this->nm_bases_sybase, $this->nm_bases_vfp, $this->nm_bases_odbc);
      $_SESSION['scriptcase']['nm_bases_security']  = "enc_nm_enc_v1HQXOH9X7HABYV5FGDMrYVIFCH5FqHMB/HQXOH9FaDSrYHQJwDEBODkFeH5FYVoFGHQJKDQBqHArYHQXGDMvsZSNiH5FqHIF7HQNmVIJsHAN7HuFUHgvCHArCDWFqDoJsHQFYDQFaD1vOV5BODMrwVcB/DuFGVENUHQJmVINUHArYHQJeHgvCHArsH5F/HIrqHQXsZSBiHIvsVWBOHgNKDkBODuFqDoFGDcBqVIJwD1rwHQF7HgBYVkJ3H5X/ZuFaHQFYZSBiZ1BYHuX7DMrwV9BUDWJeHIJeHQJmVINUHANOHuJsHgvCHArCDWr/HIFGHQJeDuFaDSrwHQNUDMrwVcB/DWB3VoX7DcNmZSBqZ1rYHuJwDMrYZSXeDuFYVoXGDcJeZ9rqD1BeHuFGDMvsVIB/Dur/HIJsHQJmZSBOHABYHuBqHgvCHArsDWB3ZuFaHQJKDuBqD1NKVWXGDMrwV9BUDWFYHMXGHQNwZ1FGZ1NOHuJsHgvCHArsH5FGZuBqHQXOZSBiHIBeHQF7HgNKDkBODuFqDoFGDcBqVIJwD1rwD5JeDMBYZSJqV5FaDoBODcJeDQFGD1veD5BOHgrYDkBsH5B7VEBiHQFYH9BOHArKD5XGDEBOZSXeDuFaDoJeDcJeDQX7Z1zGV5BiDMNOVIBOHEFYDoJeDcJUZ1FaD1NaD5FaHgvsVkXeDWFqZuFaHQNmDQX7HArYD5B/HgrKV9FiV5X7VErqHQNwVIJsHAzGD5FaDEvsZSJGDuFaZuBqD9NwH9X7Z1rwV5JwHuBYVcFiV5X7VoFGDcBqH9FaHAN7V5JeDErKHEBUH5F/DoF7DcJeDQFGD1BeD5JwDMrwZSJ3H5FqDoJeD9JmZ1B/D1NaD5rqDErKZSXeH5FYDoFUD9JKDQJsZ1rwV5BqHuBYVcXKV5X7VoBqD9XOH9B/HIrwD5NUDErKHEBUH5F/DoB/D9NwDQBqHANOHuFaHuNOZSrCH5FqDoXGHQJmZ1rqHAN7ZMBODEvsZSJ3DWFGDoBOD9JKDQJsHAvOV5JeDMzGVIBODWFYHIXGHQJmZ1F7Z1vmD5rqDEBOHArCDWBmDoB/D9XsDQJsDSBYD5NUHgrKVcB/V5X7DorqD9BsH9FaHAN7V5X7HgvCVkJGDWF/VoJeD9NwDQFaHAveD5NUHgNKDkBOV5FYHMBiHQJmZ1F7Z1vmD5rqDEBOHArCDWF/HIBqD9NmH9FGHAvCVWJsDMNOVcB/DWFYDorqD9BiZ1BOD1rKZMJeHgveHErCH5FYHMXGDcXGDQFaHAveD5NUHgNKDkBOV5FYHMBiDcJUZ1FaHArKD5BiDMBYVkJGDWr/DoB/D9XsH9FGDSN7D5JwDMvmVcFKV5BmVoBqD9BsZkFGHAvsD5XGHgveHErsDWFGZuB/HQBiDQBqD1NKV5XGDMvOVcFeDWXCDoJsDcBwH9B/Z1rYHQJwHgBOHENiDWF/DoJeD9XsDQFaHIBeHuB/DMvsVcrsDWFaDoBiDcNmZ1F7DSNOHQJwDEBODkFeH5FYVoFGHQJKDQFaD1BeD5rqHgvsVcFCDWFYDoNUDcJUZkFUHArKHuX7DEBeHEXeV5FqDoB/D9XsH9BiHAveD5NUHgNKDkBOV5FYHMBiHQNwVIJwZ1vmD5Bq";
      $this->prep_conect();
      $this->conectDB();
      if (!in_array(strtolower($this->nm_tpbanco), $this->nm_bases_all))
      {
          echo "<tr>";
          echo "   <td bgcolor=\"\">";
          echo "       <b><font size=\"4\">" . $this->Nm_lang['lang_errm_dbcn_nspt'] . "</font>";
          echo "  " . $perfil_trab;
          echo "   </b></td>";
          echo " </tr>";
          echo "</table>";
          if (!$_SESSION['sc_session'][$script_case_init]['line_form']['iframe_menu'] && (!isset($_SESSION['sc_session'][$script_case_init]['line_form']['sc_outra_jan']) || $_SESSION['sc_session'][$script_case_init]['line_form']['sc_outra_jan'] != 'line_form')) 
          { 
              if (isset($_SESSION['scriptcase']['nm_sc_retorno']) && !empty($_SESSION['scriptcase']['nm_sc_retorno'])) 
              { 
                  echo "<a href='" . $_SESSION['scriptcase']['nm_sc_retorno'] . "' target='_self'><img border='0' src='" . $this->path_botoes . "/nm_Scriptcase7_BlueSky_bvoltar.gif' title='" . $this->Nm_lang['lang_btns_rtrn_scrp_hint'] . "' align=absmiddle></a> \n" ; 
              } 
              else 
              { 
                  echo "<a href='$nm_url_saida' target='_self'><img border='0' src='" . $this->path_botoes . "/nm_Scriptcase7_BlueSky_bsair.gif' title='" . $this->Nm_lang['lang_btns_exit_appl_hint'] . "' align=absmiddle></a> \n" ; 
              } 
          } 
          exit ;
      } 
   }
   function prep_conect()
   {
      $con_devel             =  (isset($_SESSION['scriptcase']['line_form']['glo_nm_conexao'])) ? $_SESSION['scriptcase']['line_form']['glo_nm_conexao'] : ""; 
      $perfil_trab           = ""; 
      $this->nm_falta_var    = ""; 
      $this->nm_falta_var_db = ""; 
      $nm_crit_perfil        = false;
      if (isset($_SESSION['scriptcase']['sc_connection']) && !empty($_SESSION['scriptcase']['sc_connection']))
      {
          foreach ($_SESSION['scriptcase']['sc_connection'] as $NM_con_orig => $NM_con_dest)
          {
              if (isset($_SESSION['scriptcase']['line_form']['glo_nm_conexao']) && $_SESSION['scriptcase']['line_form']['glo_nm_conexao'] == $NM_con_orig)
              {
/*NM*/            $_SESSION['scriptcase']['line_form']['glo_nm_conexao'] = $NM_con_dest;
              }
              if (isset($_SESSION['scriptcase']['line_form']['glo_nm_perfil']) && $_SESSION['scriptcase']['line_form']['glo_nm_perfil'] == $NM_con_orig)
              {
/*NM*/            $_SESSION['scriptcase']['line_form']['glo_nm_perfil'] = $NM_con_dest;
              }
              if (isset($_SESSION['scriptcase']['line_form']['glo_con_' . $NM_con_orig]))
              {
                  $_SESSION['scriptcase']['line_form']['glo_con_' . $NM_con_orig] = $NM_con_dest;
              }
          }
      }
      if (isset($_SESSION['scriptcase']['line_form']['glo_nm_conexao']) && !empty($_SESSION['scriptcase']['line_form']['glo_nm_conexao']))
      {
          db_conect_devel($con_devel, $this->root . $this->path_prod, 'Veratex', 2); 
          if (empty($_SESSION['scriptcase']['glo_tpbanco']) && empty($_SESSION['scriptcase']['glo_banco']))
          {
              $nm_crit_perfil = true;
          }
      }
      if (isset($_SESSION['scriptcase']['line_form']['glo_nm_perfil']) && !empty($_SESSION['scriptcase']['line_form']['glo_nm_perfil']))
      {
          $perfil_trab = $_SESSION['scriptcase']['line_form']['glo_nm_perfil'];
      }
      elseif (isset($_SESSION['scriptcase']['glo_perfil']) && !empty($_SESSION['scriptcase']['glo_perfil']))
      {
          $perfil_trab = $_SESSION['scriptcase']['glo_perfil'];
      }
      if (!empty($perfil_trab))
      {
          $_SESSION['scriptcase']['glo_senha_protect'] = "";
          carrega_perfil($perfil_trab, $this->path_libs, "S");
          if (empty($_SESSION['scriptcase']['glo_senha_protect']))
          {
              $nm_crit_perfil = true;
          }
      }
      else
      {
          $perfil_trab = $con_devel;
      }
      if (!$_SESSION['sc_session'][$this->sc_page]['line_form']['embutida_form'] || !$_SESSION['sc_session'][$this->sc_page]['line_form']['embutida_proc']) 
      {
      }
// 
      if (isset($_SESSION['scriptcase']['glo_decimal_db']) && !empty($_SESSION['scriptcase']['glo_decimal_db']))
      {
         $_SESSION['sc_session'][$this->sc_page]['line_form']['decimal_db'] = $_SESSION['scriptcase']['glo_decimal_db']; 
      }
      if (!isset($_SESSION['scriptcase']['glo_tpbanco']))
      {
          if (!$nm_crit_perfil)
          {
              $this->nm_falta_var_db .= "glo_tpbanco; ";
          }
      }
      else
      {
          $this->nm_tpbanco = $_SESSION['scriptcase']['glo_tpbanco']; 
      }
      if (!isset($_SESSION['scriptcase']['glo_servidor']))
      {
          if (!$nm_crit_perfil)
          {
              $this->nm_falta_var_db .= "glo_servidor; ";
          }
      }
      else
      {
          $this->nm_servidor = $_SESSION['scriptcase']['glo_servidor']; 
      }
      if (!isset($_SESSION['scriptcase']['glo_banco']))
      {
          if (!$nm_crit_perfil)
          {
              $this->nm_falta_var_db .= "glo_banco; ";
          }
      }
      else
      {
          $this->nm_banco = $_SESSION['scriptcase']['glo_banco']; 
      }
      if (!isset($_SESSION['scriptcase']['glo_usuario']))
      {
          if (!$nm_crit_perfil)
          {
              $this->nm_falta_var_db .= "glo_usuario; ";
          }
      }
      else
      {
          $this->nm_usuario = $_SESSION['scriptcase']['glo_usuario']; 
      }
      if (!isset($_SESSION['scriptcase']['glo_senha']))
      {
          if (!$nm_crit_perfil)
          {
              $this->nm_falta_var_db .= "glo_senha; ";
          }
      }
      else
      {
          $this->nm_senha = $_SESSION['scriptcase']['glo_senha']; 
      }
      if (isset($_SESSION['scriptcase']['glo_db2_autocommit']))
      {
          $this->nm_con_db2['db2_autocommit'] = $_SESSION['scriptcase']['glo_db2_autocommit']; 
      }
      if (isset($_SESSION['scriptcase']['glo_database_encoding']))
      {
          $this->nm_database_encoding = $_SESSION['scriptcase']['glo_database_encoding']; 
      }
      if (isset($_SESSION['scriptcase']['glo_db2_i5_lib']))
      {
          $this->nm_con_db2['db2_i5_lib'] = $_SESSION['scriptcase']['glo_db2_i5_lib']; 
      }
      if (isset($_SESSION['scriptcase']['glo_db2_i5_naming']))
      {
          $this->nm_con_db2['db2_i5_naming'] = $_SESSION['scriptcase']['glo_db2_i5_naming']; 
      }
      if (isset($_SESSION['scriptcase']['glo_db2_i5_commit']))
      {
          $this->nm_con_db2['db2_i5_commit'] = $_SESSION['scriptcase']['glo_db2_i5_commit']; 
      }
      if (isset($_SESSION['scriptcase']['glo_db2_i5_query_optimize']))
      {
          $this->nm_con_db2['db2_i5_query_optimize'] = $_SESSION['scriptcase']['glo_db2_i5_query_optimize']; 
      }
      if (isset($_SESSION['scriptcase']['glo_use_persistent']))
      {
          $this->nm_con_persistente = $_SESSION['scriptcase']['glo_use_persistent']; 
      }
      if (isset($_SESSION['scriptcase']['glo_use_schema']))
      {
          $this->nm_con_use_schema = $_SESSION['scriptcase']['glo_use_schema']; 
      }
      if (empty($this->nm_tabela))
      {
          $this->nm_tabela = "line"; 
      }
// 
      if (!empty($this->nm_falta_var) || !empty($this->nm_falta_var_db) || $nm_crit_perfil)
      {
          echo "<style type=\"text/css\">";
          echo ".scButton_default { font-family: Arial, sans-serif; font-size: 11px; color: #444444; font-weight: bold; border-style: none; border-width: 1px; padding: 3px 14px; background-image: url(" . $this->path_img_modelo . "/V7buttonskyblue.jpg); }";
          echo ".scButton_disabled { font-family: Arial, sans-serif; font-size: 11px; color: #333; font-weight: bold; background-color: #FFFFFF; border-style: solid; border-width: 1px; padding: 3px 14px;  }";
          echo ".scButton_onmousedown { font-family: Arial, sans-serif; font-size: 11px; color: #666666; font-weight: bold; background-color: #D5E1E8; border-style: none; border-width: 1px; padding: 3px 14px;  }";
          echo ".scButton_onmouseover { font-family: Arial, sans-serif; font-size: 11px; color: #555555; font-weight: bold; background-color: #E7EEF4; border-style: none; border-width: 1px; padding: 3px 14px;  }";
          echo ".scLink_default { text-decoration: underline; font-size: 12px; color: #0000AA;  }";
          echo ".scLink_default:visited { text-decoration: underline; font-size: 12px; color: #0000AA;  }";
          echo ".scLink_default:active { text-decoration: underline; font-size: 12px; color: #0000AA;  }";
          echo ".scLink_default:hover { text-decoration: none; font-size: 12px; color: #0000AA;  }";
          echo "</style>";
          echo "<table width=\"80%\" border=\"1\" height=\"117\">";
          if (empty($this->nm_falta_var_db))
          {
              if (!empty($this->nm_falta_var))
              {
                  echo "<tr>";
                  echo "   <td bgcolor=\"\">";
                  echo "       <b><font size=\"4\">" . $this->Nm_lang['lang_errm_glob'] . "</font>";
                  echo "  " . $this->nm_falta_var;
                  echo "   </b></td>";
                  echo " </tr>";
              }
              if ($nm_crit_perfil)
              {
                  echo "<tr>";
                  echo "   <td bgcolor=\"\">";
                  echo "       <b><font size=\"4\">" . $this->Nm_lang['lang_errm_dbcn_nfnd'] . "</font>";
                  echo "  " . $perfil_trab;
                  echo "   </b></td>";
                  echo " </tr>";
              }
          }
          else
          {
              echo "<tr>";
              echo "   <td bgcolor=\"\">";
              echo "       <b><font size=\"4\">" . $this->Nm_lang['lang_errm_dbcn_data'] . "</font></b>";
              echo "   </td>";
              echo " </tr>";
          }
          echo "</table>";
          if (!$_SESSION['sc_session'][$this->sc_page]['line_form']['iframe_menu'] && (!isset($_SESSION['sc_session'][$this->sc_page]['line_form']['sc_outra_jan']) || $_SESSION['sc_session'][$this->sc_page]['line_form']['sc_outra_jan'] != 'line_form')) 
          { 
              if (isset($_SESSION['scriptcase']['nm_sc_retorno']) && !empty($_SESSION['scriptcase']['nm_sc_retorno'])) 
              { 
?>
                  <input type="button" id="sai" onClick="window.location='<?php echo $_SESSION['scriptcase']['nm_sc_retorno'] ?>'; return false" class="scButton_default" value="<?php echo $this->Nm_lang['lang_btns_back'] ?>" title="<?php echo $this->Nm_lang['lang_btns_back_hint'] ?>" style="<?php echo $sCondStyle; ?>vertical-align: middle;display: ''">

<?php
              } 
              else 
              { 
?>
                  <input type="button" id="sai" onClick="window.location='<?php echo $nm_url_saida ?>'; return false" class="scButton_default" value="<?php echo $this->Nm_lang['lang_btns_exit'] ?>" title="<?php echo $this->Nm_lang['lang_btns_exit_hint'] ?>" style="<?php echo $sCondStyle; ?>vertical-align: middle;display: ''">

<?php
              } 
          } 
          exit ;
      }
      if (isset($_SESSION['scriptcase']['glo_db_master_usr']) && !empty($_SESSION['scriptcase']['glo_db_master_usr']))
      {
          $this->nm_usuario = $_SESSION['scriptcase']['glo_db_master_usr']; 
      }
      if (isset($_SESSION['scriptcase']['glo_db_master_pass']) && !empty($_SESSION['scriptcase']['glo_db_master_pass']))
      {
          $this->nm_senha = $_SESSION['scriptcase']['glo_db_master_pass']; 
      }
      if (isset($_SESSION['scriptcase']['glo_db_master_cript']) && !empty($_SESSION['scriptcase']['glo_db_master_cript']))
      {
          $_SESSION['scriptcase']['glo_senha_protect'] = $_SESSION['scriptcase']['glo_db_master_cript']; 
      }
  } 
// 
  function conectDB()
  {
      $glo_senha_protect = (isset($_SESSION['scriptcase']['glo_senha_protect'])) ? $_SESSION['scriptcase']['glo_senha_protect'] : "S";
      if (isset($_SESSION['scriptcase']['nm_sc_retorno']) && !empty($_SESSION['scriptcase']['nm_sc_retorno']) && isset($_SESSION['scriptcase']['line_form']['glo_nm_conexao']) && !empty($_SESSION['scriptcase']['line_form']['glo_nm_conexao']))
      { 
          $this->Db = db_conect_devel($_SESSION['scriptcase']['line_form']['glo_nm_conexao'], $this->root . $this->path_prod, 'Veratex'); 
      } 
      else 
      { 
         $this->Db = db_conect($this->nm_tpbanco, $this->nm_servidor, $this->nm_usuario, $this->nm_senha, $this->nm_banco, $glo_senha_protect, "S", $this->nm_con_persistente, $this->nm_con_db2, $this->nm_database_encoding); 
      } 
      if (in_array(strtolower($this->nm_tpbanco), $this->nm_bases_ibase))
      {
          if (function_exists('ibase_timefmt'))
          {
              ibase_timefmt('%Y-%m-%d %H:%M:%S');
          } 
      } 
      if (in_array(strtolower($this->nm_tpbanco), $this->nm_bases_sybase))
      {
          $this->Db->fetchMode = ADODB_FETCH_BOTH;
          $this->Db->Execute("set dateformat ymd");
      } 
      if (in_array(strtolower($this->nm_tpbanco), $this->nm_bases_mssql))
      {
          $this->Db->Execute("set dateformat ymd");
      } 
      if (in_array(strtolower($this->nm_tpbanco), $this->nm_bases_oracle))
      {
          $this->Db->Execute("alter session set nls_date_format = 'yyyy-mm-dd hh24:mi:ss'");
          $this->Db->Execute("alter session set nls_numeric_characters = '.,'");
          $_SESSION['sc_session'][$this->sc_page]['line_form']['decimal_db'] = "."; 
      } 
  }
// 

   function regionalDefault($sConfReg = '')
   {
      if ('' == $sConfReg)
      {
         $sConfReg = $this->str_conf_reg;
      }

      $_SESSION['scriptcase']['reg_conf']['date_format']           = (isset($this->Nm_conf_reg[$sConfReg]['data_format']))              ?  $this->Nm_conf_reg[$sConfReg]['data_format']                  : "mmddyyyy";
      $_SESSION['scriptcase']['reg_conf']['date_sep']              = (isset($this->Nm_conf_reg[$sConfReg]['data_sep']))                 ?  $this->Nm_conf_reg[$sConfReg]['data_sep']                     : "/";
      $_SESSION['scriptcase']['reg_conf']['date_week_ini']         = (isset($this->Nm_conf_reg[$sConfReg]['prim_dia_sema']))            ?  $this->Nm_conf_reg[$sConfReg]['prim_dia_sema']                : "SU";
      $_SESSION['scriptcase']['reg_conf']['time_format']           = (isset($this->Nm_conf_reg[$sConfReg]['hora_format']))              ?  $this->Nm_conf_reg[$sConfReg]['hora_format']                  : "hhiiss";
      $_SESSION['scriptcase']['reg_conf']['time_sep']              = (isset($this->Nm_conf_reg[$sConfReg]['hora_sep']))                 ?  $this->Nm_conf_reg[$sConfReg]['hora_sep']                     : ":";
      $_SESSION['scriptcase']['reg_conf']['time_pos_ampm']         = (isset($this->Nm_conf_reg[$sConfReg]['hora_pos_ampm']))            ?  $this->Nm_conf_reg[$sConfReg]['hora_pos_ampm']                : "right_without_space";
      $_SESSION['scriptcase']['reg_conf']['time_simb_am']          = (isset($this->Nm_conf_reg[$sConfReg]['hora_simbolo_am']))          ?  $this->Nm_conf_reg[$sConfReg]['hora_simbolo_am']              : "am";
      $_SESSION['scriptcase']['reg_conf']['time_simb_pm']          = (isset($this->Nm_conf_reg[$sConfReg]['hora_simbolo_pm']))          ?  $this->Nm_conf_reg[$sConfReg]['hora_simbolo_pm']              : "pm";
      $_SESSION['scriptcase']['reg_conf']['simb_neg']              = (isset($this->Nm_conf_reg[$sConfReg]['num_sinal_neg']))            ?  $this->Nm_conf_reg[$sConfReg]['num_sinal_neg']                : "-";
      $_SESSION['scriptcase']['reg_conf']['grup_num']              = (isset($this->Nm_conf_reg[$sConfReg]['num_sep_agr']))              ?  $this->Nm_conf_reg[$sConfReg]['num_sep_agr']                  : ",";
      $_SESSION['scriptcase']['reg_conf']['dec_num']               = (isset($this->Nm_conf_reg[$sConfReg]['num_sep_dec']))              ?  $this->Nm_conf_reg[$sConfReg]['num_sep_dec']                  : ".";
      $_SESSION['scriptcase']['reg_conf']['neg_num']               = (isset($this->Nm_conf_reg[$sConfReg]['num_format_num_neg']))       ?  $this->Nm_conf_reg[$sConfReg]['num_format_num_neg']           : 2;
      $_SESSION['scriptcase']['reg_conf']['monet_simb']            = (isset($this->Nm_conf_reg[$sConfReg]['unid_mont_simbolo']))        ?  $this->Nm_conf_reg[$sConfReg]['unid_mont_simbolo']            : "$";
      $_SESSION['scriptcase']['reg_conf']['monet_f_pos']           = (isset($this->Nm_conf_reg[$sConfReg]['unid_mont_format_num_pos'])) ?  $this->Nm_conf_reg[$sConfReg]['unid_mont_format_num_pos']     : 3;
      $_SESSION['scriptcase']['reg_conf']['monet_f_neg']           = (isset($this->Nm_conf_reg[$sConfReg]['unid_mont_format_num_neg'])) ?  $this->Nm_conf_reg[$sConfReg]['unid_mont_format_num_neg']     : 13;
      $_SESSION['scriptcase']['reg_conf']['grup_val']              = (isset($this->Nm_conf_reg[$sConfReg]['unid_mont_sep_agr']))        ?  $this->Nm_conf_reg[$sConfReg]['unid_mont_sep_agr']            : ",";
      $_SESSION['scriptcase']['reg_conf']['dec_val']               = (isset($this->Nm_conf_reg[$sConfReg]['unid_mont_sep_dec']))        ?  $this->Nm_conf_reg[$sConfReg]['unid_mont_sep_dec']            : ".";
      $_SESSION['scriptcase']['reg_conf']['num_group_digit']       = (isset($this->Nm_conf_reg[$sConfReg]['num_group_digit']))          ?  $this->Nm_conf_reg[$sConfReg]['num_group_digit']              : "1";
      $_SESSION['scriptcase']['reg_conf']['unid_mont_group_digit'] = (isset($this->Nm_conf_reg[$sConfReg]['unid_mont_group_digit']))    ?  $this->Nm_conf_reg[$sConfReg]['unid_mont_group_digit']        : "1";
      $_SESSION['scriptcase']['reg_conf']['html_dir']              = (isset($this->Nm_conf_reg[$sConfReg]['ger_ltr_rtl']))              ?  " DIR='" . $this->Nm_conf_reg[$sConfReg]['ger_ltr_rtl'] . "'" : "";
      if ('' == $_SESSION['scriptcase']['reg_conf']['num_group_digit'])
      {
          $_SESSION['scriptcase']['reg_conf']['num_group_digit'] = '1';
      }
      if ('' == $_SESSION['scriptcase']['reg_conf']['unid_mont_group_digit'])
      {
          $_SESSION['scriptcase']['reg_conf']['unid_mont_group_digit'] = '1';
      }
   }
   function sc_Include($path, $tp, $name)
   {
       if (($tp == "F" && !function_exists($name)) || ($tp == "C" && !class_exists($name)))
       {
           include_once($path);
       }
   } // sc_Include
   function sc_Sql_Protect($var, $tp, $conex="")
   {
       if (empty($conex) || $conex == "conn_mysql")
       {
           $TP_banco = $_SESSION['scriptcase']['glo_tpbanco'];
       }
       else
       {
           eval ("\$TP_banco = \$this->nm_con_" . $conex . "['tpbanco'];");
       }
       if ($tp == "date")
       {
           if (in_array(strtolower($TP_banco), $this->nm_bases_access))
           {
               return "#" . $var . "#";
           }
           else
           {
               return "'" . $var . "'";
           }
       }
       else
       {
           return $var;
       }
   } // sc_Sql_Protect
}
//===============================================================================
class line_form_edit
{
    var $contr_line_form;
    function inicializa()
    {
        global $nm_opc_lookup, $nm_opc_php, $script_case_init;
        require_once("line_form_apl.php");
        $this->contr_line_form = new line_form_apl();
    }
}
if (!function_exists("NM_is_utf8"))
{
    include_once("line_form_nmutf8.php");
}
ob_start();
//
//----------------  
//
    $_SESSION['scriptcase']['line_form']['contr_erro'] = 'off';
    if (!function_exists("NM_is_utf8"))
    {
        include_once("line_form_nmutf8.php");
    }
    if (!function_exists("SC_dir_app_ini"))
    {
        include_once("../_lib/lib/php/nm_ctrl_app_name.php");
    }
    SC_dir_app_ini('Veratex');
    $sc_conv_var = array();
    if (!empty($_FILES))
    {
        foreach ($_FILES as $nmgp_campo => $nmgp_valores)
        {
             if (isset($sc_conv_var[$nmgp_campo]))
             {
                 $nmgp_campo = $sc_conv_var[$nmgp_campo];
             }
             elseif (isset($sc_conv_var[strtolower($nmgp_campo)]))
             {
                 $nmgp_campo = $sc_conv_var[strtolower($nmgp_campo)];
             }
             $tmp_scfile_name     = $nmgp_campo . "_scfile_name";
             $tmp_scfile_type     = $nmgp_campo . "_scfile_type";
             $$nmgp_campo = is_array($nmgp_valores['tmp_name']) ? $nmgp_valores['tmp_name'][0] : $nmgp_valores['tmp_name'];
             $$tmp_scfile_type   = is_array($nmgp_valores['type'])     ? $nmgp_valores['type'][0]     : $nmgp_valores['type'];
             $$tmp_scfile_name   = is_array($nmgp_valores['name'])     ? $nmgp_valores['name'][0]     : $nmgp_valores['name'];
        }
    }
    if (!empty($_POST))
    {
        foreach ($_POST as $nmgp_var => $nmgp_val)
        {
             if (isset($sc_conv_var[$nmgp_var]))
             {
                 $nmgp_var = $sc_conv_var[$nmgp_var];
             }
             elseif (isset($sc_conv_var[strtolower($nmgp_var)]))
             {
                 $nmgp_var = $sc_conv_var[strtolower($nmgp_var)];
             }
             nm_limpa_str_line_form($nmgp_val);
             $$nmgp_var = $nmgp_val;
        }
    }
    if (!empty($_GET))
    {
        foreach ($_GET as $nmgp_var => $nmgp_val)
        {
             if (isset($sc_conv_var[$nmgp_var]))
             {
                 $nmgp_var = $sc_conv_var[$nmgp_var];
             }
             elseif (isset($sc_conv_var[strtolower($nmgp_var)]))
             {
                 $nmgp_var = $sc_conv_var[strtolower($nmgp_var)];
             }
             nm_limpa_str_line_form($nmgp_val);
             $$nmgp_var = $nmgp_val;
        }
    }
    if (isset($SC_where_pdf) && !empty($SC_where_pdf))
    {
        $_SESSION['sc_session'][$script_case_init]['line_form']['where_filter'] = $SC_where_pdf;
    }

    if (isset($_POST['rs']) && !is_array($_POST['rs']) && 'ajax_' == substr($_POST['rs'], 0, 5) && isset($_POST['rsargs']) && !empty($_POST['rsargs']))
    {
        if ('ajax_line_form_validate_image' == $_POST['rs'])
        {
            $image = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_style' == $_POST['rs'])
        {
            $style = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_name' == $_POST['rs'])
        {
            $name = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_width' == $_POST['rs'])
        {
            $width = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_comment' == $_POST['rs'])
        {
            $comment = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_fiber' == $_POST['rs'])
        {
            $fiber = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_desc' == $_POST['rs'])
        {
            $desc = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_line' == $_POST['rs'])
        {
            $line = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_dept' == $_POST['rs'])
        {
            $dept = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_odesc' == $_POST['rs'])
        {
            $odesc = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_hand' == $_POST['rs'])
        {
            $hand = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_date' == $_POST['rs'])
        {
            $date = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_mindye' == $_POST['rs'])
        {
            $mindye = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_minord' == $_POST['rs'])
        {
            $minord = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_yarn1' == $_POST['rs'])
        {
            $yarn1 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_per1' == $_POST['rs'])
        {
            $per1 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_yarn2' == $_POST['rs'])
        {
            $yarn2 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_per2' == $_POST['rs'])
        {
            $per2 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_yarn3' == $_POST['rs'])
        {
            $yarn3 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_per3' == $_POST['rs'])
        {
            $per3 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_yarn4' == $_POST['rs'])
        {
            $yarn4 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_per4' == $_POST['rs'])
        {
            $per4 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_del1' == $_POST['rs'])
        {
            $del1 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_del2' == $_POST['rs'])
        {
            $del2 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_del3' == $_POST['rs'])
        {
            $del3 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_end1' == $_POST['rs'])
        {
            $end1 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_end2' == $_POST['rs'])
        {
            $end2 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_end3' == $_POST['rs'])
        {
            $end3 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_end4' == $_POST['rs'])
        {
            $end4 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_end5' == $_POST['rs'])
        {
            $end5 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_price' == $_POST['rs'])
        {
            $price = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_med' == $_POST['rs'])
        {
            $med = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_dark' == $_POST['rs'])
        {
            $dark = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_nprice' == $_POST['rs'])
        {
            $nprice = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_npdate' == $_POST['rs'])
        {
            $npdate = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_memo' == $_POST['rs'])
        {
            $memo = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_smemo' == $_POST['rs'])
        {
            $smemo = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_yds' == $_POST['rs'])
        {
            $yds = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_lbs' == $_POST['rs'])
        {
            $lbs = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_dye' == $_POST['rs'])
        {
            $dye = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_gc' == $_POST['rs'])
        {
            $gc = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_fc' == $_POST['rs'])
        {
            $fc = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_spec' == $_POST['rs'])
        {
            $spec = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_gshort' == $_POST['rs'])
        {
            $gshort = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_ytdd' == $_POST['rs'])
        {
            $ytdd = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_ytdy' == $_POST['rs'])
        {
            $ytdy = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_mtdd' == $_POST['rs'])
        {
            $mtdd = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_mtdy' == $_POST['rs'])
        {
            $mtdy = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_histy' == $_POST['rs'])
        {
            $histy = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_histd' == $_POST['rs'])
        {
            $histd = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_update' == $_POST['rs'])
        {
            $update = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_avprice' == $_POST['rs'])
        {
            $avprice = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_lastyry' == $_POST['rs'])
        {
            $lastyry = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_lastyrd' == $_POST['rs'])
        {
            $lastyrd = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_dyeleft' == $_POST['rs'])
        {
            $dyeleft = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_ozsquare' == $_POST['rs'])
        {
            $ozsquare = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_ozlin' == $_POST['rs'])
        {
            $ozlin = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_sqlb' == $_POST['rs'])
        {
            $sqlb = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_cpi' == $_POST['rs'])
        {
            $cpi = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_wpi' == $_POST['rs'])
        {
            $wpi = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_finwt' == $_POST['rs'])
        {
            $finwt = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_meterkilo' == $_POST['rs'])
        {
            $meterkilo = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_meter2kilo' == $_POST['rs'])
        {
            $meter2kilo = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_grammeter' == $_POST['rs'])
        {
            $grammeter = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_grammeter2' == $_POST['rs'])
        {
            $grammeter2 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_stdputup' == $_POST['rs'])
        {
            $stdputup = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_stdtube' == $_POST['rs'])
        {
            $stdtube = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_date1' == $_POST['rs'])
        {
            $date1 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_date2' == $_POST['rs'])
        {
            $date2 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_date3' == $_POST['rs'])
        {
            $date3 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_date4' == $_POST['rs'])
        {
            $date4 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_date5' == $_POST['rs'])
        {
            $date5 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_date6' == $_POST['rs'])
        {
            $date6 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_name1' == $_POST['rs'])
        {
            $name1 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_name2' == $_POST['rs'])
        {
            $name2 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_name3' == $_POST['rs'])
        {
            $name3 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_name4' == $_POST['rs'])
        {
            $name4 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_name5' == $_POST['rs'])
        {
            $name5 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_name6' == $_POST['rs'])
        {
            $name6 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_method1' == $_POST['rs'])
        {
            $method1 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_method2' == $_POST['rs'])
        {
            $method2 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_method3' == $_POST['rs'])
        {
            $method3 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_method4' == $_POST['rs'])
        {
            $method4 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_method5' == $_POST['rs'])
        {
            $method5 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_method6' == $_POST['rs'])
        {
            $method6 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_test1' == $_POST['rs'])
        {
            $test1 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_test2' == $_POST['rs'])
        {
            $test2 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_test3' == $_POST['rs'])
        {
            $test3 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_test4' == $_POST['rs'])
        {
            $test4 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_lot1' == $_POST['rs'])
        {
            $lot1 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_lot2' == $_POST['rs'])
        {
            $lot2 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_lot3' == $_POST['rs'])
        {
            $lot3 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_lot4' == $_POST['rs'])
        {
            $lot4 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_lot5' == $_POST['rs'])
        {
            $lot5 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_lot6' == $_POST['rs'])
        {
            $lot6 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_result1' == $_POST['rs'])
        {
            $result1 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_result2' == $_POST['rs'])
        {
            $result2 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_result3' == $_POST['rs'])
        {
            $result3 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_result4' == $_POST['rs'])
        {
            $result4 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_result5' == $_POST['rs'])
        {
            $result5 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_result6' == $_POST['rs'])
        {
            $result6 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_sname1' == $_POST['rs'])
        {
            $sname1 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_sname2' == $_POST['rs'])
        {
            $sname2 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_sname3' == $_POST['rs'])
        {
            $sname3 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_smethod1' == $_POST['rs'])
        {
            $smethod1 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_smethod2' == $_POST['rs'])
        {
            $smethod2 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_smethod3' == $_POST['rs'])
        {
            $smethod3 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_sstd1' == $_POST['rs'])
        {
            $sstd1 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_sstd2' == $_POST['rs'])
        {
            $sstd2 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_sstd3' == $_POST['rs'])
        {
            $sstd3 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_stol1' == $_POST['rs'])
        {
            $stol1 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_stol2' == $_POST['rs'])
        {
            $stol2 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_stol3' == $_POST['rs'])
        {
            $stol3 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_conv2' == $_POST['rs'])
        {
            $conv2 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_conv3' == $_POST['rs'])
        {
            $conv3 = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_conv' == $_POST['rs'])
        {
            $conv = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_stdcost' == $_POST['rs'])
        {
            $stdcost = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_stdgp' == $_POST['rs'])
        {
            $stdgp = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_sprice' == $_POST['rs'])
        {
            $sprice = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_avcost' == $_POST['rs'])
        {
            $avcost = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_stdcosting' == $_POST['rs'])
        {
            $stdcosting = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_machine' == $_POST['rs'])
        {
            $machine = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_cgs' == $_POST['rs'])
        {
            $cgs = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_gs' == $_POST['rs'])
        {
            $gs = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_k' == $_POST['rs'])
        {
            $k = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_grstyle' == $_POST['rs'])
        {
            $grstyle = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_lbbo' == $_POST['rs'])
        {
            $lbbo = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_bo' == $_POST['rs'])
        {
            $bo = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_validate_samples' == $_POST['rs'])
        {
            $samples = NM_utf8_urldecode($_POST['rsargs'][0]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][1]);
        }
        if ('ajax_line_form_event_conv_onchange' == $_POST['rs'])
        {
            $style = NM_utf8_urldecode($_POST['rsargs'][0]);
            $stdcost = NM_utf8_urldecode($_POST['rsargs'][1]);
            $conv = NM_utf8_urldecode($_POST['rsargs'][2]);
            $sprice = NM_utf8_urldecode($_POST['rsargs'][3]);
            $stdgp = NM_utf8_urldecode($_POST['rsargs'][4]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][5]);
        }
        if ('ajax_line_form_event_stdgp_onchange' == $_POST['rs'])
        {
            $style = NM_utf8_urldecode($_POST['rsargs'][0]);
            $stdcost = NM_utf8_urldecode($_POST['rsargs'][1]);
            $conv = NM_utf8_urldecode($_POST['rsargs'][2]);
            $sprice = NM_utf8_urldecode($_POST['rsargs'][3]);
            $stdgp = NM_utf8_urldecode($_POST['rsargs'][4]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][5]);
        }
        if ('ajax_line_form_submit_form' == $_POST['rs'])
        {
            $image = NM_utf8_urldecode($_POST['rsargs'][0]);
            $style = NM_utf8_urldecode($_POST['rsargs'][1]);
            $name = NM_utf8_urldecode($_POST['rsargs'][2]);
            $width = NM_utf8_urldecode($_POST['rsargs'][3]);
            $comment = NM_utf8_urldecode($_POST['rsargs'][4]);
            $fiber = NM_utf8_urldecode($_POST['rsargs'][5]);
            $desc = NM_utf8_urldecode($_POST['rsargs'][6]);
            $line = NM_utf8_urldecode($_POST['rsargs'][7]);
            $dept = NM_utf8_urldecode($_POST['rsargs'][8]);
            $odesc = NM_utf8_urldecode($_POST['rsargs'][9]);
            $hand = NM_utf8_urldecode($_POST['rsargs'][10]);
            $date = NM_utf8_urldecode($_POST['rsargs'][11]);
            $mindye = NM_utf8_urldecode($_POST['rsargs'][12]);
            $minord = NM_utf8_urldecode($_POST['rsargs'][13]);
            $yarn1 = NM_utf8_urldecode($_POST['rsargs'][14]);
            $per1 = NM_utf8_urldecode($_POST['rsargs'][15]);
            $yarn2 = NM_utf8_urldecode($_POST['rsargs'][16]);
            $per2 = NM_utf8_urldecode($_POST['rsargs'][17]);
            $yarn3 = NM_utf8_urldecode($_POST['rsargs'][18]);
            $per3 = NM_utf8_urldecode($_POST['rsargs'][19]);
            $yarn4 = NM_utf8_urldecode($_POST['rsargs'][20]);
            $per4 = NM_utf8_urldecode($_POST['rsargs'][21]);
            $del1 = NM_utf8_urldecode($_POST['rsargs'][22]);
            $del2 = NM_utf8_urldecode($_POST['rsargs'][23]);
            $del3 = NM_utf8_urldecode($_POST['rsargs'][24]);
            $end1 = NM_utf8_urldecode($_POST['rsargs'][25]);
            $end2 = NM_utf8_urldecode($_POST['rsargs'][26]);
            $end3 = NM_utf8_urldecode($_POST['rsargs'][27]);
            $end4 = NM_utf8_urldecode($_POST['rsargs'][28]);
            $end5 = NM_utf8_urldecode($_POST['rsargs'][29]);
            $price = NM_utf8_urldecode($_POST['rsargs'][30]);
            $med = NM_utf8_urldecode($_POST['rsargs'][31]);
            $dark = NM_utf8_urldecode($_POST['rsargs'][32]);
            $nprice = NM_utf8_urldecode($_POST['rsargs'][33]);
            $npdate = NM_utf8_urldecode($_POST['rsargs'][34]);
            $memo = NM_utf8_urldecode($_POST['rsargs'][35]);
            $smemo = NM_utf8_urldecode($_POST['rsargs'][36]);
            $yds = NM_utf8_urldecode($_POST['rsargs'][37]);
            $lbs = NM_utf8_urldecode($_POST['rsargs'][38]);
            $dye = NM_utf8_urldecode($_POST['rsargs'][39]);
            $gc = NM_utf8_urldecode($_POST['rsargs'][40]);
            $fc = NM_utf8_urldecode($_POST['rsargs'][41]);
            $spec = NM_utf8_urldecode($_POST['rsargs'][42]);
            $gshort = NM_utf8_urldecode($_POST['rsargs'][43]);
            $ytdd = NM_utf8_urldecode($_POST['rsargs'][44]);
            $ytdy = NM_utf8_urldecode($_POST['rsargs'][45]);
            $mtdd = NM_utf8_urldecode($_POST['rsargs'][46]);
            $mtdy = NM_utf8_urldecode($_POST['rsargs'][47]);
            $histy = NM_utf8_urldecode($_POST['rsargs'][48]);
            $histd = NM_utf8_urldecode($_POST['rsargs'][49]);
            $update = NM_utf8_urldecode($_POST['rsargs'][50]);
            $avprice = NM_utf8_urldecode($_POST['rsargs'][51]);
            $lastyry = NM_utf8_urldecode($_POST['rsargs'][52]);
            $lastyrd = NM_utf8_urldecode($_POST['rsargs'][53]);
            $dyeleft = NM_utf8_urldecode($_POST['rsargs'][54]);
            $ozsquare = NM_utf8_urldecode($_POST['rsargs'][55]);
            $ozlin = NM_utf8_urldecode($_POST['rsargs'][56]);
            $sqlb = NM_utf8_urldecode($_POST['rsargs'][57]);
            $cpi = NM_utf8_urldecode($_POST['rsargs'][58]);
            $wpi = NM_utf8_urldecode($_POST['rsargs'][59]);
            $finwt = NM_utf8_urldecode($_POST['rsargs'][60]);
            $meterkilo = NM_utf8_urldecode($_POST['rsargs'][61]);
            $meter2kilo = NM_utf8_urldecode($_POST['rsargs'][62]);
            $grammeter = NM_utf8_urldecode($_POST['rsargs'][63]);
            $grammeter2 = NM_utf8_urldecode($_POST['rsargs'][64]);
            $stdputup = NM_utf8_urldecode($_POST['rsargs'][65]);
            $stdtube = NM_utf8_urldecode($_POST['rsargs'][66]);
            $date1 = NM_utf8_urldecode($_POST['rsargs'][67]);
            $date2 = NM_utf8_urldecode($_POST['rsargs'][68]);
            $date3 = NM_utf8_urldecode($_POST['rsargs'][69]);
            $date4 = NM_utf8_urldecode($_POST['rsargs'][70]);
            $date5 = NM_utf8_urldecode($_POST['rsargs'][71]);
            $date6 = NM_utf8_urldecode($_POST['rsargs'][72]);
            $name1 = NM_utf8_urldecode($_POST['rsargs'][73]);
            $name2 = NM_utf8_urldecode($_POST['rsargs'][74]);
            $name3 = NM_utf8_urldecode($_POST['rsargs'][75]);
            $name4 = NM_utf8_urldecode($_POST['rsargs'][76]);
            $name5 = NM_utf8_urldecode($_POST['rsargs'][77]);
            $name6 = NM_utf8_urldecode($_POST['rsargs'][78]);
            $method1 = NM_utf8_urldecode($_POST['rsargs'][79]);
            $method2 = NM_utf8_urldecode($_POST['rsargs'][80]);
            $method3 = NM_utf8_urldecode($_POST['rsargs'][81]);
            $method4 = NM_utf8_urldecode($_POST['rsargs'][82]);
            $method5 = NM_utf8_urldecode($_POST['rsargs'][83]);
            $method6 = NM_utf8_urldecode($_POST['rsargs'][84]);
            $test1 = NM_utf8_urldecode($_POST['rsargs'][85]);
            $test2 = NM_utf8_urldecode($_POST['rsargs'][86]);
            $test3 = NM_utf8_urldecode($_POST['rsargs'][87]);
            $test4 = NM_utf8_urldecode($_POST['rsargs'][88]);
            $lot1 = NM_utf8_urldecode($_POST['rsargs'][89]);
            $lot2 = NM_utf8_urldecode($_POST['rsargs'][90]);
            $lot3 = NM_utf8_urldecode($_POST['rsargs'][91]);
            $lot4 = NM_utf8_urldecode($_POST['rsargs'][92]);
            $lot5 = NM_utf8_urldecode($_POST['rsargs'][93]);
            $lot6 = NM_utf8_urldecode($_POST['rsargs'][94]);
            $result1 = NM_utf8_urldecode($_POST['rsargs'][95]);
            $result2 = NM_utf8_urldecode($_POST['rsargs'][96]);
            $result3 = NM_utf8_urldecode($_POST['rsargs'][97]);
            $result4 = NM_utf8_urldecode($_POST['rsargs'][98]);
            $result5 = NM_utf8_urldecode($_POST['rsargs'][99]);
            $result6 = NM_utf8_urldecode($_POST['rsargs'][100]);
            $sname1 = NM_utf8_urldecode($_POST['rsargs'][101]);
            $sname2 = NM_utf8_urldecode($_POST['rsargs'][102]);
            $sname3 = NM_utf8_urldecode($_POST['rsargs'][103]);
            $smethod1 = NM_utf8_urldecode($_POST['rsargs'][104]);
            $smethod2 = NM_utf8_urldecode($_POST['rsargs'][105]);
            $smethod3 = NM_utf8_urldecode($_POST['rsargs'][106]);
            $sstd1 = NM_utf8_urldecode($_POST['rsargs'][107]);
            $sstd2 = NM_utf8_urldecode($_POST['rsargs'][108]);
            $sstd3 = NM_utf8_urldecode($_POST['rsargs'][109]);
            $stol1 = NM_utf8_urldecode($_POST['rsargs'][110]);
            $stol2 = NM_utf8_urldecode($_POST['rsargs'][111]);
            $stol3 = NM_utf8_urldecode($_POST['rsargs'][112]);
            $conv2 = NM_utf8_urldecode($_POST['rsargs'][113]);
            $conv3 = NM_utf8_urldecode($_POST['rsargs'][114]);
            $conv = NM_utf8_urldecode($_POST['rsargs'][115]);
            $stdcost = NM_utf8_urldecode($_POST['rsargs'][116]);
            $stdgp = NM_utf8_urldecode($_POST['rsargs'][117]);
            $sprice = NM_utf8_urldecode($_POST['rsargs'][118]);
            $avcost = NM_utf8_urldecode($_POST['rsargs'][119]);
            $machine = NM_utf8_urldecode($_POST['rsargs'][120]);
            $cgs = NM_utf8_urldecode($_POST['rsargs'][121]);
            $gs = NM_utf8_urldecode($_POST['rsargs'][122]);
            $k = NM_utf8_urldecode($_POST['rsargs'][123]);
            $lbbo = NM_utf8_urldecode($_POST['rsargs'][124]);
            $bo = NM_utf8_urldecode($_POST['rsargs'][125]);
            $samples = NM_utf8_urldecode($_POST['rsargs'][126]);
            $nm_form_submit = NM_utf8_urldecode($_POST['rsargs'][127]);
            $nmgp_url_saida = NM_utf8_urldecode($_POST['rsargs'][128]);
            $nmgp_opcao = NM_utf8_urldecode($_POST['rsargs'][129]);
            $nmgp_ancora = NM_utf8_urldecode($_POST['rsargs'][130]);
            $nmgp_num_form = NM_utf8_urldecode($_POST['rsargs'][131]);
            $nmgp_parms = NM_utf8_urldecode($_POST['rsargs'][132]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][133]);
        }
        if ('ajax_line_form_navigate_form' == $_POST['rs'])
        {
            $style = NM_utf8_urldecode($_POST['rsargs'][0]);
            $id2 = NM_utf8_urldecode($_POST['rsargs'][1]);
            $nm_form_submit = NM_utf8_urldecode($_POST['rsargs'][2]);
            $nmgp_opcao = NM_utf8_urldecode($_POST['rsargs'][3]);
            $nmgp_ordem = NM_utf8_urldecode($_POST['rsargs'][4]);
            $nmgp_fast_search = NM_utf8_urldecode($_POST['rsargs'][5]);
            $nmgp_cond_fast_search = NM_utf8_urldecode($_POST['rsargs'][6]);
            $nmgp_arg_fast_search = NM_utf8_urldecode($_POST['rsargs'][7]);
            $script_case_init = NM_utf8_urldecode($_POST['rsargs'][8]);
        }
    }

    if (!empty($glo_perfil))  
    { 
        $_SESSION['scriptcase']['glo_perfil'] = $glo_perfil;
    }   
    if (isset($glo_servidor)) 
    {
        $_SESSION['scriptcase']['glo_servidor'] = $glo_servidor;
    }
    if (isset($glo_banco)) 
    {
        $_SESSION['scriptcase']['glo_banco'] = $glo_banco;
    }
    if (isset($glo_tpbanco)) 
    {
        $_SESSION['scriptcase']['glo_tpbanco'] = $glo_tpbanco;
    }
    if (isset($glo_usuario)) 
    {
        $_SESSION['scriptcase']['glo_usuario'] = $glo_usuario;
    }
    if (isset($glo_senha)) 
    {
        $_SESSION['scriptcase']['glo_senha'] = $glo_senha;
    }
    if (isset($glo_senha_protect)) 
    {
        $_SESSION['scriptcase']['glo_senha_protect'] = $glo_senha_protect;
    }
    if (isset($script_case_init) && !is_array($script_case_init) && !isset($_SESSION['sc_session'][$script_case_init]['line_form']['lig_edit_lookup']))
    { 
        $_SESSION['sc_session'][$script_case_init]['line_form']['lig_edit_lookup']     = false;
        $_SESSION['sc_session'][$script_case_init]['line_form']['lig_edit_lookup_cb']  = '';
        $_SESSION['sc_session'][$script_case_init]['line_form']['lig_edit_lookup_row'] = '';
    } 
    if (isset($script_case_init) && !is_array($script_case_init) && !isset($_SESSION['sc_session'][$script_case_init]['line_form']['embutida_call']))
    { 
        $_SESSION['sc_session'][$script_case_init]['line_form']['embutida_call'] = false;
    } 
    if (isset($script_case_init) && !is_array($script_case_init) && !isset($_SESSION['sc_session'][$script_case_init]['line_form']['embutida_proc']))
    { 
        $_SESSION['sc_session'][$script_case_init]['line_form']['embutida_proc'] = false;
    } 
    if (isset($script_case_init) && !is_array($script_case_init) && !isset($_SESSION['sc_session'][$script_case_init]['line_form']['embutida_liga_form_insert']))
    { 
        $_SESSION['sc_session'][$script_case_init]['line_form']['embutida_liga_form_insert'] = '';
    } 
    if (isset($script_case_init) && !is_array($script_case_init) && !isset($_SESSION['sc_session'][$script_case_init]['line_form']['embutida_liga_form_update']))
    { 
        $_SESSION['sc_session'][$script_case_init]['line_form']['embutida_liga_form_update'] = '';
    } 
    if (isset($script_case_init) && !is_array($script_case_init) && !isset($_SESSION['sc_session'][$script_case_init]['line_form']['embutida_liga_form_delete']))
    { 
        $_SESSION['sc_session'][$script_case_init]['line_form']['embutida_liga_form_delete'] = '';
    } 
    if (isset($script_case_init) && !is_array($script_case_init) && !isset($_SESSION['sc_session'][$script_case_init]['line_form']['embutida_liga_form_btn_nav']))
    { 
        $_SESSION['sc_session'][$script_case_init]['line_form']['embutida_liga_form_btn_nav'] = '';
    } 
    if (isset($script_case_init) && !is_array($script_case_init) && !isset($_SESSION['sc_session'][$script_case_init]['line_form']['embutida_liga_grid_edit']))
    { 
        $_SESSION['sc_session'][$script_case_init]['line_form']['embutida_liga_grid_edit'] = '';
    } 
    if (isset($script_case_init) && !is_array($script_case_init) && !isset($_SESSION['sc_session'][$script_case_init]['line_form']['embutida_liga_grid_edit_link']))
    { 
        $_SESSION['sc_session'][$script_case_init]['line_form']['embutida_liga_grid_edit_link'] = '';
    } 
    if (isset($script_case_init) && !is_array($script_case_init) && !isset($_SESSION['sc_session'][$script_case_init]['line_form']['embutida_liga_qtd_reg']))
    { 
        $_SESSION['sc_session'][$script_case_init]['line_form']['embutida_liga_qtd_reg'] = '';
    } 
    if (isset($script_case_init) && !is_array($script_case_init) && !isset($_SESSION['sc_session'][$script_case_init]['line_form']['embutida_liga_tp_pag']))
    { 
        $_SESSION['sc_session'][$script_case_init]['line_form']['embutida_liga_tp_pag'] = '';
    } 
    if (isset($script_case_init) && !is_array($script_case_init) && $_SESSION['sc_session'][$script_case_init]['line_form']['embutida_proc'])
    {
        return;
    }
    if (isset($script_case_init) && !is_array($script_case_init) && isset($_SESSION['sc_session'][$script_case_init]['line_form']['embutida_parms']))
    { 
        $nmgp_parms = $_SESSION['sc_session'][$script_case_init]['line_form']['embutida_parms'];
        unset($_SESSION['sc_session'][$script_case_init]['line_form']['embutida_parms']);
    } 
    if (isset($nmgp_parms) && !empty($nmgp_parms) && !is_array($nmgp_parms)) 
    { 
        if (isset($_SESSION['nm_aba_bg_color'])) 
        { 
            unset($_SESSION['nm_aba_bg_color']);
        }   
        $nmgp_parms = NM_decode_input($nmgp_parms);
        $nmgp_parms = str_replace("@aspass@", "'", $nmgp_parms);
        $nmgp_parms = str_replace("*scout", "?@?", $nmgp_parms);
        $nmgp_parms = str_replace("*scin", "?#?", $nmgp_parms);
        $todo = explode("?@?", $nmgp_parms);
        $ix = 0;
        while (!empty($todo[$ix]))
        {
           $cadapar = explode("?#?", $todo[$ix]);
           if (1 < sizeof($cadapar))
           {
               nm_limpa_str_line_form($cadapar[1]);
               if (isset($sc_conv_var[$cadapar[0]]))
               {
                   $cadapar[0] = $sc_conv_var[$cadapar[0]];
               }
               elseif (isset($sc_conv_var[strtolower($cadapar[0])]))
               {
                   $cadapar[0] = $sc_conv_var[strtolower($cadapar[0])];
               }
               $$cadapar[0] = $cadapar[1];
           }
           $ix++;
        }
        if (isset($var_line)) 
        {
            $_SESSION['var_line'] = $var_line;
        }
        if (isset($var_style)) 
        {
            $_SESSION['var_style'] = $var_style;
        }
    } 
    elseif (isset($script_case_init) && !empty($script_case_init) && !is_array($script_case_init) && isset($_SESSION['sc_session'][$script_case_init]['line_form']['parms']))
    {
        if (!isset($nmgp_opcao) || ($nmgp_opcao != "incluir" && $nmgp_opcao != "novo" && $nmgp_opcao != "recarga" && $nmgp_opcao != "muda_form"))
        {
            $todo = explode("?@?", $_SESSION['sc_session'][$script_case_init]['line_form']['parms']);
            $ix = 0;
            while (!empty($todo[$ix]))
            {
               $cadapar = explode("?#?", $todo[$ix]);
               $$cadapar[0] = $cadapar[1];
               $ix++;
            }
        }
    } 
    if (isset($script_case_init) && $script_case_init != preg_replace('/[^0-9]/', '', $script_case_init))
    {
        unset($script_case_init);
    }
    if (!isset($script_case_init) || empty($script_case_init) || is_array($script_case_init))
    {
        $script_case_init = rand(2, 1000);
    }
    $salva_run = "N";
    $salva_iframe = false;
    if (isset($_SESSION['sc_session'][$script_case_init]['line_form']['iframe_menu']))
    {
        $salva_iframe = $_SESSION['sc_session'][$script_case_init]['line_form']['iframe_menu'];
        unset($_SESSION['sc_session'][$script_case_init]['line_form']['iframe_menu']);
    }
    if (isset($_SESSION['sc_session'][$script_case_init]['line_form']['run_iframe']))
    {
        $salva_run = $_SESSION['sc_session'][$script_case_init]['line_form']['run_iframe'];
        unset($_SESSION['sc_session'][$script_case_init]['line_form']['run_iframe']);
    }
    if (isset($nm_run_menu) && $nm_run_menu == 1)
    {
        if (isset($_SESSION['scriptcase']['sc_aba_iframe']) && isset($_SESSION['scriptcase']['sc_apl_menu_atual']) && $script_case_init == 1)
        {
            foreach ($_SESSION['scriptcase']['sc_aba_iframe'] as $aba => $apls_aba)
            {
                if ($aba == $_SESSION['scriptcase']['sc_apl_menu_atual'])
                {
                    unset($_SESSION['scriptcase']['sc_aba_iframe'][$aba]);
                    break;
                }
            }
        }
        if ($script_case_init == 1)
        {
            $_SESSION['scriptcase']['sc_apl_menu_atual'] = "line_form";
        }
        $achou = false;
        if (isset($_SESSION['sc_session'][$script_case_init]))
        {
            foreach ($_SESSION['sc_session'][$script_case_init] as $nome_apl => $resto)
            {
                if ($nome_apl == 'line_form' || $achou)
                {
                    unset($_SESSION['sc_session'][$script_case_init][$nome_apl]);
                    if (!empty($_SESSION['sc_session'][$script_case_init][$nome_apl]))
                    {
                        $achou = true;
                    }
                }
            }
            if (!$achou && isset($nm_apl_menu))
            {
                foreach ($_SESSION['sc_session'][$script_case_init] as $nome_apl => $resto)
                {
                    if ($nome_apl == $nm_apl_menu || $achou)
                    {
                        $achou = true;
                        if ($nome_apl != $nm_apl_menu)
                        {
                            unset($_SESSION['sc_session'][$script_case_init][$nome_apl]);
                        }
                    }
                }
            }
        }
        $_SESSION['sc_session'][$script_case_init]['line_form']['iframe_menu']  = true;
        $_SESSION['sc_session'][$script_case_init]['line_form']['mostra_cab']   = "S";
        $_SESSION['sc_session'][$script_case_init]['line_form']['run_iframe']   = "N";
        $_SESSION['sc_session'][$script_case_init]['line_form']['retorno_edit'] = "";
    }
    else
    {
        $_SESSION['sc_session'][$script_case_init]['line_form']['run_iframe']  = $salva_run;
        $_SESSION['sc_session'][$script_case_init]['line_form']['iframe_menu'] = $salva_iframe;
    }

    if (!isset($_SESSION['sc_session'][$script_case_init]['line_form']['db_changed']))
    {
        $_SESSION['sc_session'][$script_case_init]['line_form']['db_changed'] = false;
    }
    if (isset($_GET['nmgp_outra_jan']) && 'true' == $_GET['nmgp_outra_jan'] && isset($_GET['nmgp_url_saida']) && 'modal' == $_GET['nmgp_url_saida'])
    {
        $_SESSION['sc_session'][$script_case_init]['line_form']['db_changed'] = false;
    }

    if (isset($_SESSION['scriptcase']['sc_outra_jan']) && $_SESSION['scriptcase']['sc_outra_jan'] == 'line_form')
    {
        $_SESSION['sc_session'][$script_case_init]['line_form']['sc_outra_jan'] = true;
         unset($_SESSION['scriptcase']['sc_outra_jan']);
    }
    if (isset($nmgp_outra_jan) && $nmgp_outra_jan == 'true')
    {
        if (isset($nmgp_url_saida) && $nmgp_url_saida == "modal")
        {
            $_SESSION['sc_session'][$script_case_init]['line_form']['sc_modal'] = true;
            $nm_url_saida = "line_form_fim.php"; 
        }
        $nm_apl_dependente = 0;
        $_SESSION['sc_session'][$script_case_init]['line_form']['sc_outra_jan'] = true;
    }
    $STR_lang    = (isset($_SESSION['scriptcase']['str_lang']) && !empty($_SESSION['scriptcase']['str_lang'])) ? $_SESSION['scriptcase']['str_lang'] : "en_us";
    $NM_arq_lang = "../_lib/lang/" . $STR_lang . ".lang.php";
    $Nm_lang = array();
    if (is_file($NM_arq_lang))
    {
        $Lixo = file($NM_arq_lang);
        foreach ($Lixo as $Cada_lin) 
        {
            if (strpos($Cada_lin, "array()") === false && (trim($Cada_lin) != "<?php")  && (trim($Cada_lin) != "?" . ">"))
            {
                eval (str_replace("\$this->", "\$", $Cada_lin));
            }
        }
    }
    $_SESSION['scriptcase']['charset'] = (isset($Nm_lang['Nm_charset']) && !empty($Nm_lang['Nm_charset'])) ? $Nm_lang['Nm_charset'] : "ISO-8859-1";
    foreach ($Nm_lang as $ind => $dados)
    {
       if ($_SESSION['scriptcase']['charset'] != "UTF-8" && NM_is_utf8($dados))
       {
           $Nm_lang[$ind] = mb_convert_encoding($dados, $_SESSION['scriptcase']['charset'], "UTF-8");
       }
    }

    if (!isset($_SESSION['sc_session'][$script_case_init]['line_form']['initialize']))
    {
        $_SESSION['sc_session'][$script_case_init]['line_form']['initialize'] = true;
    }
    elseif (!isset($_SERVER['HTTP_REFERER']))
    {
        $_SESSION['sc_session'][$script_case_init]['line_form']['initialize'] = false;
    }
    elseif (false === strpos($_SERVER['HTTP_REFERER'], '/line_form/'))
    {
        $_SESSION['sc_session'][$script_case_init]['line_form']['initialize'] = true;
    }
    else
    {
        $_SESSION['sc_session'][$script_case_init]['line_form']['initialize'] = false;
    }

    if (isset($_SESSION['sc_session'][$script_case_init]['line_form']['first_time']))
    {
        $_SESSION['sc_session'][$script_case_init]['line_form']['first_time'] = false;
    }
    else
    {
        $_SESSION['sc_session'][$script_case_init]['line_form']['first_time'] = true;
    }

    $_SESSION['sc_session'][$script_case_init]['line_form']['menu_desenv'] = false;   
    if (!defined("SC_ERROR_HANDLER"))
    {
        define("SC_ERROR_HANDLER", 1);
    }
    include_once(dirname(__FILE__) . "/line_form_erro.php");
    $nm_browser = strpos($_SERVER['HTTP_USER_AGENT'], "Konqueror") ;
    if (is_int($nm_browser))   
    {
        $nm_browser = "Konqueror"; 
    } 
    else  
    {
        $nm_browser = strpos($_SERVER['HTTP_USER_AGENT'], "Opera") ;
        if (is_int($nm_browser))   
        {
            $nm_browser = "Opera"; 
        }
    } 
    $_SESSION['scriptcase']['change_regional_old'] = '';
    $_SESSION['scriptcase']['change_regional_new'] = '';
    if (!empty($nmgp_opcao) && ($nmgp_opcao == "change_lang_t" || $nmgp_opcao == "change_lang_b" || $nmgp_opcao == "change_lang_f"))  
    {
        $Temp_lang = explode(";" , $nmgp_idioma_novo);  
        if (isset($Temp_lang[0]) && !empty($Temp_lang[0]))  
        { 
            $_SESSION['scriptcase']['str_lang'] = $Temp_lang[0];
        } 
        if (isset($Temp_lang[1]) && !empty($Temp_lang[1])) 
        { 
            $_SESSION['scriptcase']['change_regional_old'] = (isset($_SESSION['scriptcase']['str_conf_reg']) && !empty($_SESSION['scriptcase']['str_conf_reg'])) ? $_SESSION['scriptcase']['str_conf_reg'] : "en_us";
            $_SESSION['scriptcase']['str_conf_reg']        = $Temp_lang[1];
            $_SESSION['scriptcase']['change_regional_new'] = $_SESSION['scriptcase']['str_conf_reg'];
        } 
        $nmgp_opcao = "recarga";  
    } 
    if (!empty($nmgp_opcao) && ($nmgp_opcao == "change_schema_t" || $nmgp_opcao == "change_schema_b" || $nmgp_opcao == "change_schema_f"))  
    {
        if ($nmgp_opcao == "change_schema_t")  
        {
            $nmgp_schema = $nmgp_schema_t . "/" . $nmgp_schema_t;  
        } 
        elseif ($nmgp_opcao == "change_schema_b")  
        {
            $nmgp_schema = $nmgp_schema_b . "/" . $nmgp_schema_b;  
        } 
        else 
        {
            $nmgp_schema = $nmgp_schema_f . "/" . $nmgp_schema_f;  
        } 
        $_SESSION['scriptcase']['str_schema_all'] = $nmgp_schema;
        $nmgp_opcao = "recarga";  
    } 
    if (!empty($nmgp_opcao) && $nmgp_opcao == "lookup")  
    {
        $nm_opc_lookup = $nmgp_opcao;
    }
    elseif (!empty($nmgp_opcao) && $nmgp_opcao == "formphp")  
    {
        $nm_opc_form_php = $nmgp_opcao;
    }
    else
    {
        if (!empty($nmgp_opcao))  
        {
            $_SESSION['sc_session'][$script_case_init]['line_form']['opcao'] = $nmgp_opcao ; 
        }
        if (isset($_POST["var_line"])) 
        {
            $_SESSION['var_line'] = $_POST["var_line"];
             nm_limpa_str_line_form($_SESSION['var_line']);
        }
        if (isset($_GET["var_line"])) 
        {
            $_SESSION['var_line'] = $_GET["var_line"];
             nm_limpa_str_line_form($_SESSION['var_line']);
        }
        if (isset($_POST["var_style"])) 
        {
            $_SESSION['var_style'] = $_POST["var_style"];
             nm_limpa_str_line_form($_SESSION['var_style']);
        }
        if (isset($_GET["var_style"])) 
        {
            $_SESSION['var_style'] = $_GET["var_style"];
             nm_limpa_str_line_form($_SESSION['var_style']);
        }
        if (!empty($_SESSION['sc_session'][$script_case_init]['line_form']['volta_redirect_apl']))
        {
            $_SESSION['scriptcase']['sc_url_saida'][$script_case_init] = $_SESSION['sc_session'][$script_case_init]['line_form']['volta_redirect_apl']; 
            $nm_apl_dependente = $_SESSION['sc_session'][$script_case_init]['line_form']['volta_redirect_tp']; 
            $_SESSION['sc_session'][$script_case_init]['line_form']['volta_redirect_apl'] = "";
            $_SESSION['sc_session'][$script_case_init]['line_form']['volta_redirect_tp'] = "";
            $nm_url_saida = "line_form_fim.php"; 
        }
        elseif (isset($_SESSION['sc_session'][$script_case_init]['line_form']['sc_outra_jan']) && $_SESSION['sc_session'][$script_case_init]['line_form']['sc_outra_jan'] == 'true')
        {
               $nm_url_saida = "line_form_fim.php"; 
        }
        elseif ($_SESSION['sc_session'][$script_case_init]['line_form']['run_iframe'] != "F" && $_SESSION['sc_session'][$script_case_init]['line_form']['run_iframe'] != "R")
        {
           $nm_url_saida = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ""; 
           $nm_url_saida = str_replace("_fim.php", ".php", $nm_url_saida); 
            $nm_saida_global = $nm_url_saida;
            if (!empty($nmgp_url_saida) && empty($_SESSION['sc_session'][$script_case_init]['line_form']['retorno_edit'])) 
            {
                $_SESSION['sc_session'][$script_case_init]['line_form']['retorno_edit'] = $nmgp_url_saida ; 
            } 
            if (!empty($_SESSION['sc_session'][$script_case_init]['line_form']['retorno_edit'])) 
            {
                $nm_url_saida = $_SESSION['sc_session'][$script_case_init]['line_form']['retorno_edit'] . "?script_case_init=" . $script_case_init . "&script_case_session=" . session_id();  
                $nm_apl_dependente = 1 ; 
                $nm_saida_global = $nm_url_saida;
            } 
            if ($nm_apl_dependente != 1) 
            { 
                $_SESSION['sc_session'][$script_case_init]['line_form']['run_iframe'] = "N"; 
            } 
            if ($_SESSION['sc_session'][$script_case_init]['line_form']['run_iframe'] != "F" && $_SESSION['sc_session'][$script_case_init]['line_form']['run_iframe'] != "R" && (!isset($_SESSION['sc_session'][$script_case_init]['line_form']['embutida_call']) || !$_SESSION['sc_session'][$script_case_init]['line_form']['embutida_call']))
            { 
                $_SESSION['scriptcase']['sc_url_saida'][$script_case_init] = $nm_url_saida; 
                $nm_url_saida = "line_form_fim.php"; 
                $_SESSION['scriptcase']['sc_tp_saida'] = "P"; 
                if ($nm_apl_dependente == 1) 
                { 
                    $_SESSION['scriptcase']['sc_tp_saida'] = "D"; 
                } 
            } 
        }
        if (empty($_SESSION['sc_session'][$script_case_init]['line_form']['volta_tp']) && $_SESSION['sc_session'][$script_case_init]['line_form']['run_iframe'] != "F" && $_SESSION['sc_session'][$script_case_init]['line_form']['run_iframe'] != "R")
        {
            $_SESSION['sc_session'][$script_case_init]['line_form']['volta_php'] = $nm_url_saida;
            $_SESSION['sc_session'][$script_case_init]['line_form']['volta_apl'] = $nm_saida_global;
            $_SESSION['sc_session'][$script_case_init]['line_form']['volta_ss']  = (isset($_SESSION['scriptcase']['sc_url_saida'][$script_case_init])) ? $_SESSION['scriptcase']['sc_url_saida'][$script_case_init] : "";
            $_SESSION['sc_session'][$script_case_init]['line_form']['volta_dep'] = $nm_apl_dependente;
            $_SESSION['sc_session'][$script_case_init]['line_form']['volta_tp']  = (isset($_SESSION['scriptcase']['sc_tp_saida'])) ? $_SESSION['scriptcase']['sc_tp_saida'] : "";
        }
        $nm_url_saida = $_SESSION['sc_session'][$script_case_init]['line_form']['volta_php'];
        $nm_saida_global = $_SESSION['sc_session'][$script_case_init]['line_form']['volta_php'];
        $nm_apl_dependente = $_SESSION['sc_session'][$script_case_init]['line_form']['volta_dep'];
        if ($_SESSION['sc_session'][$script_case_init]['line_form']['run_iframe'] != "F" && $_SESSION['sc_session'][$script_case_init]['line_form']['run_iframe'] != "R" && !empty($_SESSION['sc_session'][$script_case_init]['line_form']['volta_ss'])) 
        { 
            $_SESSION['scriptcase']['sc_url_saida'][$script_case_init] = $_SESSION['sc_session'][$script_case_init]['line_form']['volta_ss'];
            $_SESSION['scriptcase']['sc_tp_saida']  = $_SESSION['sc_session'][$script_case_init]['line_form']['volta_tp'];
        } 
        if ($_SESSION['sc_session'][$script_case_init]['line_form']['run_iframe'] == "F" || $_SESSION['sc_session'][$script_case_init]['line_form']['run_iframe'] == "R") 
        { 
            if (!empty($nmgp_url_saida) && empty($_SESSION['sc_session'][$script_case_init]['line_form']['retorno_edit'])) 
            {
                $_SESSION['sc_session'][$script_case_init]['line_form']['retorno_edit'] = $nmgp_url_saida . "?script_case_init=" . $script_case_init . "&script_case_session=" . session_id(); 
            } 
        } 
        if (isset($_SESSION['scriptcase']['nm_sc_retorno']) && !empty($_SESSION['scriptcase']['nm_sc_retorno']) && $_SESSION['sc_session'][$script_case_init]['line_form']['run_iframe'] != "F" && $_SESSION['sc_session'][$script_case_init]['line_form']['run_iframe'] != "R") 
        { 
            $_SESSION['sc_session'][$script_case_init]['line_form']['menu_desenv'] = true;   
        } 
    }
    if (isset($nmgp_redir)) 
    { 
        $_SESSION['sc_session'][$script_case_init]['line_form']['redir'] = $nmgp_redir;   
    } 
    if (isset($nmgp_outra_jan) && $nmgp_outra_jan == 'true')
    {
        $_SESSION['sc_session'][$script_case_init]['line_form']['sc_outra_jan'] = true;
         if ($nmgp_url_saida == "modal")
         {
             $_SESSION['sc_session'][$script_case_init]['line_form']['sc_modal'] = true;
             $nm_url_saida = "line_form_fim.php"; 
         }
    }
    if (isset($_SESSION['sc_session'][$script_case_init]['line_form']['sc_outra_jan']) && $_SESSION['sc_session'][$script_case_init]['line_form']['sc_outra_jan'])
    {
        $nm_apl_dependente = 0;
    }
    $GLOBALS["NM_ERRO_IBASE"] = 0;  
    if (isset($_SESSION['nm_session']['user']['sec']['flag']) && $_SESSION['nm_session']['user']['sec']['flag'] == "N") 
    { 
        $_SESSION['scriptcase']['sc_apl_seg']['line_form'] = "on";
    } 
    if (!isset($_SESSION['scriptcase']['sc_apl_seg']['line_form']) || $_SESSION['scriptcase']['sc_apl_seg']['line_form'] != "on")
    { 
        $NM_Mens_Erro = $Nm_lang['lang_errm_unth_user'];
        $nm_botao_ok = ($_SESSION['sc_session'][$script_case_init]['line_form']['iframe_menu']) ? false : true;
        if (isset($_SESSION['scriptcase']['sc_aba_iframe']))
        {
            foreach ($_SESSION['scriptcase']['sc_aba_iframe'] as $aba => $apls_aba)
            {
                if (in_array("line_form", $apls_aba))
                {
                    $nm_botao_ok = false;
                     break;
                }
            }
        }
      $str_schema_app = (isset($_SESSION['scriptcase']['str_schema_all']) && !empty($_SESSION['scriptcase']['str_schema_all'])) ? $_SESSION['scriptcase']['str_schema_all'] : "Scriptcase7_BlueSky/Scriptcase7_BlueSky";
       $str_button_app = trim($str_button);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
            "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">

        <HTML>
         <HEAD>
          <TITLE></TITLE>
          <META http-equiv="Content-Type" content="text/html; charset=<?php echo $_SESSION['scriptcase']['charset_html'] ?>" />
          <META http-equiv="Expires" content="Fri, Jan 01 1900 00:00:00 GMT"/>          <META http-equiv="Pragma" content="no-cache"/>
          <link rel="stylesheet" type="text/css" href="../_lib/css/<?php echo $str_schema_app ?>_form.css" />
          <link rel="stylesheet" type="text/css" href="../_lib/buttons/<?php echo $str_button_app . '/' . $str_button_app ?>.css" />
         </HEAD>
         <body class="scFormPage">
          <table align="center" class="scFormBorder"><tr><td style="padding: 0">
          <table style="width: 100%" class="scFormTable"><tr><td class="scFormDataOdd" style="padding: 15px 30px; text-align: center">
           <?php echo $NM_Mens_Erro; ?>
<?php
        if ($nm_botao_ok)
        {
?>
          <br />
          <form name="Fseg" method="post" 
                              action="<?php echo $nm_url_saida; ?>" 
                              target="_self"> 
           <input type="hidden" name="script_case_init" value="<?php echo NM_encode_input($script_case_init); ?>"/> 
           <input type="hidden" name="script_case_session" value="<?php echo NM_encode_input(session_id()); ?>"/> 
           <input type="submit" name="sc_sai_seg" value="OK" class="" > 
          </form> 
          <script type="text/javascript">
            function nm_move()
            { }
            function nm_atualiza()
            { }
          </script> 
<?php
        }
?>
          </td></tr></table>
          </td></tr></table>
<?php
       if (isset($_SESSION['scriptcase']['nm_sc_retorno']) && !empty($_SESSION['scriptcase']['nm_sc_retorno']))
       {
?>
<br /><br /><br />
<table align="center" class="scFormBorder" style="width: 450px"><tr><td style="padding: 0">
 <table style="width: 100%" class="scFormTable">
  <tr>
   <td class="scFormDataOdd" style="padding: 15px 30px">
    <?php echo $Nm_lang['lang_errm_unth_hwto']; ?>
   </td>
  </tr>
 </table>
</td></tr></table>
<?php
       }
?>
         </body>
        </HTML>
<?php
        exit;
    } 
    $inicial_line_form = new line_form_edit();
    $inicial_line_form->inicializa();

    $inicial_line_form->contr_line_form->NM_ajax_info['select_html'] = array();
    $inicial_line_form->contr_line_form->NM_ajax_info['select_html']['end1'] = "class=\"sc-js-input scFormObjectOdd\" style=\";\" id=\"id_sc_field_end1\" name=\"end1\" size=1";
    $inicial_line_form->contr_line_form->NM_ajax_info['select_html']['end2'] = "class=\"sc-js-input scFormObjectOdd\" style=\";\" id=\"id_sc_field_end2\" name=\"end2\" size=1";
    $inicial_line_form->contr_line_form->NM_ajax_info['select_html']['end3'] = "class=\"sc-js-input scFormObjectOdd\" style=\";\" id=\"id_sc_field_end3\" name=\"end3\" size=1";
    $inicial_line_form->contr_line_form->NM_ajax_info['select_html']['end4'] = "class=\"sc-js-input scFormObjectOdd\" style=\";\" id=\"id_sc_field_end4\" name=\"end4\" size=1";
    $inicial_line_form->contr_line_form->NM_ajax_info['select_html']['end5'] = "class=\"sc-js-input scFormObjectOdd\" style=\";\" id=\"id_sc_field_end5\" name=\"end5\" size=1";

    if (!defined('SC_SAJAX_LOADED'))
    {
        include_once(dirname(__FILE__) . '/line_form_sajax.php');
        define('SC_SAJAX_LOADED', 'YES');
    }
    if (!class_exists('Services_JSON'))
    {
        include_once(dirname(__FILE__) . '/line_form_json.php');
    }
    $sajax_request_type = "POST";
    sajax_init();
    //$sajax_debug_mode = 1;
    sajax_export("ajax_line_form_validate_image");
    sajax_export("ajax_line_form_validate_style");
    sajax_export("ajax_line_form_validate_name");
    sajax_export("ajax_line_form_validate_width");
    sajax_export("ajax_line_form_validate_comment");
    sajax_export("ajax_line_form_validate_fiber");
    sajax_export("ajax_line_form_validate_desc");
    sajax_export("ajax_line_form_validate_line");
    sajax_export("ajax_line_form_validate_dept");
    sajax_export("ajax_line_form_validate_odesc");
    sajax_export("ajax_line_form_validate_hand");
    sajax_export("ajax_line_form_validate_date");
    sajax_export("ajax_line_form_validate_mindye");
    sajax_export("ajax_line_form_validate_minord");
    sajax_export("ajax_line_form_validate_yarn1");
    sajax_export("ajax_line_form_validate_per1");
    sajax_export("ajax_line_form_validate_yarn2");
    sajax_export("ajax_line_form_validate_per2");
    sajax_export("ajax_line_form_validate_yarn3");
    sajax_export("ajax_line_form_validate_per3");
    sajax_export("ajax_line_form_validate_yarn4");
    sajax_export("ajax_line_form_validate_per4");
    sajax_export("ajax_line_form_validate_del1");
    sajax_export("ajax_line_form_validate_del2");
    sajax_export("ajax_line_form_validate_del3");
    sajax_export("ajax_line_form_validate_end1");
    sajax_export("ajax_line_form_validate_end2");
    sajax_export("ajax_line_form_validate_end3");
    sajax_export("ajax_line_form_validate_end4");
    sajax_export("ajax_line_form_validate_end5");
    sajax_export("ajax_line_form_validate_price");
    sajax_export("ajax_line_form_validate_med");
    sajax_export("ajax_line_form_validate_dark");
    sajax_export("ajax_line_form_validate_nprice");
    sajax_export("ajax_line_form_validate_npdate");
    sajax_export("ajax_line_form_validate_memo");
    sajax_export("ajax_line_form_validate_smemo");
    sajax_export("ajax_line_form_validate_yds");
    sajax_export("ajax_line_form_validate_lbs");
    sajax_export("ajax_line_form_validate_dye");
    sajax_export("ajax_line_form_validate_gc");
    sajax_export("ajax_line_form_validate_fc");
    sajax_export("ajax_line_form_validate_spec");
    sajax_export("ajax_line_form_validate_gshort");
    sajax_export("ajax_line_form_validate_ytdd");
    sajax_export("ajax_line_form_validate_ytdy");
    sajax_export("ajax_line_form_validate_mtdd");
    sajax_export("ajax_line_form_validate_mtdy");
    sajax_export("ajax_line_form_validate_histy");
    sajax_export("ajax_line_form_validate_histd");
    sajax_export("ajax_line_form_validate_update");
    sajax_export("ajax_line_form_validate_avprice");
    sajax_export("ajax_line_form_validate_lastyry");
    sajax_export("ajax_line_form_validate_lastyrd");
    sajax_export("ajax_line_form_validate_dyeleft");
    sajax_export("ajax_line_form_validate_ozsquare");
    sajax_export("ajax_line_form_validate_ozlin");
    sajax_export("ajax_line_form_validate_sqlb");
    sajax_export("ajax_line_form_validate_cpi");
    sajax_export("ajax_line_form_validate_wpi");
    sajax_export("ajax_line_form_validate_finwt");
    sajax_export("ajax_line_form_validate_meterkilo");
    sajax_export("ajax_line_form_validate_meter2kilo");
    sajax_export("ajax_line_form_validate_grammeter");
    sajax_export("ajax_line_form_validate_grammeter2");
    sajax_export("ajax_line_form_validate_stdputup");
    sajax_export("ajax_line_form_validate_stdtube");
    sajax_export("ajax_line_form_validate_date1");
    sajax_export("ajax_line_form_validate_date2");
    sajax_export("ajax_line_form_validate_date3");
    sajax_export("ajax_line_form_validate_date4");
    sajax_export("ajax_line_form_validate_date5");
    sajax_export("ajax_line_form_validate_date6");
    sajax_export("ajax_line_form_validate_name1");
    sajax_export("ajax_line_form_validate_name2");
    sajax_export("ajax_line_form_validate_name3");
    sajax_export("ajax_line_form_validate_name4");
    sajax_export("ajax_line_form_validate_name5");
    sajax_export("ajax_line_form_validate_name6");
    sajax_export("ajax_line_form_validate_method1");
    sajax_export("ajax_line_form_validate_method2");
    sajax_export("ajax_line_form_validate_method3");
    sajax_export("ajax_line_form_validate_method4");
    sajax_export("ajax_line_form_validate_method5");
    sajax_export("ajax_line_form_validate_method6");
    sajax_export("ajax_line_form_validate_test1");
    sajax_export("ajax_line_form_validate_test2");
    sajax_export("ajax_line_form_validate_test3");
    sajax_export("ajax_line_form_validate_test4");
    sajax_export("ajax_line_form_validate_lot1");
    sajax_export("ajax_line_form_validate_lot2");
    sajax_export("ajax_line_form_validate_lot3");
    sajax_export("ajax_line_form_validate_lot4");
    sajax_export("ajax_line_form_validate_lot5");
    sajax_export("ajax_line_form_validate_lot6");
    sajax_export("ajax_line_form_validate_result1");
    sajax_export("ajax_line_form_validate_result2");
    sajax_export("ajax_line_form_validate_result3");
    sajax_export("ajax_line_form_validate_result4");
    sajax_export("ajax_line_form_validate_result5");
    sajax_export("ajax_line_form_validate_result6");
    sajax_export("ajax_line_form_validate_sname1");
    sajax_export("ajax_line_form_validate_sname2");
    sajax_export("ajax_line_form_validate_sname3");
    sajax_export("ajax_line_form_validate_smethod1");
    sajax_export("ajax_line_form_validate_smethod2");
    sajax_export("ajax_line_form_validate_smethod3");
    sajax_export("ajax_line_form_validate_sstd1");
    sajax_export("ajax_line_form_validate_sstd2");
    sajax_export("ajax_line_form_validate_sstd3");
    sajax_export("ajax_line_form_validate_stol1");
    sajax_export("ajax_line_form_validate_stol2");
    sajax_export("ajax_line_form_validate_stol3");
    sajax_export("ajax_line_form_validate_conv2");
    sajax_export("ajax_line_form_validate_conv3");
    sajax_export("ajax_line_form_validate_conv");
    sajax_export("ajax_line_form_validate_stdcost");
    sajax_export("ajax_line_form_validate_stdgp");
    sajax_export("ajax_line_form_validate_sprice");
    sajax_export("ajax_line_form_validate_avcost");
    sajax_export("ajax_line_form_validate_stdcosting");
    sajax_export("ajax_line_form_validate_machine");
    sajax_export("ajax_line_form_validate_cgs");
    sajax_export("ajax_line_form_validate_gs");
    sajax_export("ajax_line_form_validate_k");
    sajax_export("ajax_line_form_validate_grstyle");
    sajax_export("ajax_line_form_validate_lbbo");
    sajax_export("ajax_line_form_validate_bo");
    sajax_export("ajax_line_form_validate_samples");
    sajax_export("ajax_line_form_event_conv_onchange");
    sajax_export("ajax_line_form_event_stdgp_onchange");
    sajax_export("ajax_line_form_submit_form");
    sajax_export("ajax_line_form_navigate_form");
    sajax_handle_client_request();

    $inicial_line_form->contr_line_form->controle();
//
    function nm_limpa_str_line_form(&$str)
    {
        if (get_magic_quotes_gpc())
        {
            if (is_array($str))
            {
                foreach ($str as $x => $cada_str)
                {
                    $str[$x] = str_replace("@aspasd@", '"', $str[$x]);
                    $str[$x] = stripslashes($str[$x]);
                }
            }
            else
            {
                $str = str_replace("@aspasd@", '"', $str);
                $str = stripslashes($str);
            }
        }
    }

    function ajax_line_form_validate_image($image, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_image';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'image' => NM_utf8_urldecode($image),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_image

    function ajax_line_form_validate_style($style, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_style';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'style' => NM_utf8_urldecode($style),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_style

    function ajax_line_form_validate_name($name, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_name';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'name' => NM_utf8_urldecode($name),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_name

    function ajax_line_form_validate_width($width, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_width';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'width' => NM_utf8_urldecode($width),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_width

    function ajax_line_form_validate_comment($comment, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_comment';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'comment' => NM_utf8_urldecode($comment),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_comment

    function ajax_line_form_validate_fiber($fiber, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_fiber';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'fiber' => NM_utf8_urldecode($fiber),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_fiber

    function ajax_line_form_validate_desc($desc, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_desc';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'desc' => NM_utf8_urldecode($desc),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_desc

    function ajax_line_form_validate_line($line, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_line';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'line' => NM_utf8_urldecode($line),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_line

    function ajax_line_form_validate_dept($dept, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_dept';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'dept' => NM_utf8_urldecode($dept),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_dept

    function ajax_line_form_validate_odesc($odesc, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_odesc';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'odesc' => NM_utf8_urldecode($odesc),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_odesc

    function ajax_line_form_validate_hand($hand, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_hand';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'hand' => NM_utf8_urldecode($hand),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_hand

    function ajax_line_form_validate_date($date, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_date';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'date' => NM_utf8_urldecode($date),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_date

    function ajax_line_form_validate_mindye($mindye, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_mindye';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'mindye' => NM_utf8_urldecode($mindye),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_mindye

    function ajax_line_form_validate_minord($minord, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_minord';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'minord' => NM_utf8_urldecode($minord),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_minord

    function ajax_line_form_validate_yarn1($yarn1, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_yarn1';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'yarn1' => NM_utf8_urldecode($yarn1),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_yarn1

    function ajax_line_form_validate_per1($per1, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_per1';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'per1' => NM_utf8_urldecode($per1),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_per1

    function ajax_line_form_validate_yarn2($yarn2, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_yarn2';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'yarn2' => NM_utf8_urldecode($yarn2),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_yarn2

    function ajax_line_form_validate_per2($per2, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_per2';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'per2' => NM_utf8_urldecode($per2),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_per2

    function ajax_line_form_validate_yarn3($yarn3, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_yarn3';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'yarn3' => NM_utf8_urldecode($yarn3),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_yarn3

    function ajax_line_form_validate_per3($per3, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_per3';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'per3' => NM_utf8_urldecode($per3),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_per3

    function ajax_line_form_validate_yarn4($yarn4, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_yarn4';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'yarn4' => NM_utf8_urldecode($yarn4),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_yarn4

    function ajax_line_form_validate_per4($per4, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_per4';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'per4' => NM_utf8_urldecode($per4),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_per4

    function ajax_line_form_validate_del1($del1, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_del1';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'del1' => NM_utf8_urldecode($del1),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_del1

    function ajax_line_form_validate_del2($del2, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_del2';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'del2' => NM_utf8_urldecode($del2),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_del2

    function ajax_line_form_validate_del3($del3, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_del3';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'del3' => NM_utf8_urldecode($del3),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_del3

    function ajax_line_form_validate_end1($end1, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_end1';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'end1' => NM_utf8_urldecode($end1),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_end1

    function ajax_line_form_validate_end2($end2, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_end2';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'end2' => NM_utf8_urldecode($end2),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_end2

    function ajax_line_form_validate_end3($end3, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_end3';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'end3' => NM_utf8_urldecode($end3),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_end3

    function ajax_line_form_validate_end4($end4, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_end4';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'end4' => NM_utf8_urldecode($end4),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_end4

    function ajax_line_form_validate_end5($end5, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_end5';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'end5' => NM_utf8_urldecode($end5),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_end5

    function ajax_line_form_validate_price($price, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_price';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'price' => NM_utf8_urldecode($price),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_price

    function ajax_line_form_validate_med($med, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_med';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'med' => NM_utf8_urldecode($med),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_med

    function ajax_line_form_validate_dark($dark, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_dark';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'dark' => NM_utf8_urldecode($dark),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_dark

    function ajax_line_form_validate_nprice($nprice, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_nprice';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'nprice' => NM_utf8_urldecode($nprice),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_nprice

    function ajax_line_form_validate_npdate($npdate, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_npdate';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'npdate' => NM_utf8_urldecode($npdate),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_npdate

    function ajax_line_form_validate_memo($memo, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_memo';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'memo' => NM_utf8_urldecode($memo),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_memo

    function ajax_line_form_validate_smemo($smemo, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_smemo';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'smemo' => NM_utf8_urldecode($smemo),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_smemo

    function ajax_line_form_validate_yds($yds, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_yds';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'yds' => NM_utf8_urldecode($yds),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_yds

    function ajax_line_form_validate_lbs($lbs, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_lbs';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'lbs' => NM_utf8_urldecode($lbs),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_lbs

    function ajax_line_form_validate_dye($dye, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_dye';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'dye' => NM_utf8_urldecode($dye),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_dye

    function ajax_line_form_validate_gc($gc, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_gc';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'gc' => NM_utf8_urldecode($gc),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_gc

    function ajax_line_form_validate_fc($fc, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_fc';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'fc' => NM_utf8_urldecode($fc),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_fc

    function ajax_line_form_validate_spec($spec, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_spec';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'spec' => NM_utf8_urldecode($spec),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_spec

    function ajax_line_form_validate_gshort($gshort, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_gshort';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'gshort' => NM_utf8_urldecode($gshort),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_gshort

    function ajax_line_form_validate_ytdd($ytdd, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_ytdd';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'ytdd' => NM_utf8_urldecode($ytdd),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_ytdd

    function ajax_line_form_validate_ytdy($ytdy, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_ytdy';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'ytdy' => NM_utf8_urldecode($ytdy),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_ytdy

    function ajax_line_form_validate_mtdd($mtdd, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_mtdd';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'mtdd' => NM_utf8_urldecode($mtdd),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_mtdd

    function ajax_line_form_validate_mtdy($mtdy, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_mtdy';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'mtdy' => NM_utf8_urldecode($mtdy),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_mtdy

    function ajax_line_form_validate_histy($histy, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_histy';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'histy' => NM_utf8_urldecode($histy),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_histy

    function ajax_line_form_validate_histd($histd, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_histd';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'histd' => NM_utf8_urldecode($histd),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_histd

    function ajax_line_form_validate_update($update, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_update';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'update' => NM_utf8_urldecode($update),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_update

    function ajax_line_form_validate_avprice($avprice, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_avprice';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'avprice' => NM_utf8_urldecode($avprice),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_avprice

    function ajax_line_form_validate_lastyry($lastyry, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_lastyry';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'lastyry' => NM_utf8_urldecode($lastyry),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_lastyry

    function ajax_line_form_validate_lastyrd($lastyrd, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_lastyrd';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'lastyrd' => NM_utf8_urldecode($lastyrd),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_lastyrd

    function ajax_line_form_validate_dyeleft($dyeleft, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_dyeleft';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'dyeleft' => NM_utf8_urldecode($dyeleft),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_dyeleft

    function ajax_line_form_validate_ozsquare($ozsquare, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_ozsquare';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'ozsquare' => NM_utf8_urldecode($ozsquare),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_ozsquare

    function ajax_line_form_validate_ozlin($ozlin, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_ozlin';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'ozlin' => NM_utf8_urldecode($ozlin),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_ozlin

    function ajax_line_form_validate_sqlb($sqlb, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_sqlb';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'sqlb' => NM_utf8_urldecode($sqlb),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_sqlb

    function ajax_line_form_validate_cpi($cpi, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_cpi';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'cpi' => NM_utf8_urldecode($cpi),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_cpi

    function ajax_line_form_validate_wpi($wpi, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_wpi';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'wpi' => NM_utf8_urldecode($wpi),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_wpi

    function ajax_line_form_validate_finwt($finwt, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_finwt';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'finwt' => NM_utf8_urldecode($finwt),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_finwt

    function ajax_line_form_validate_meterkilo($meterkilo, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_meterkilo';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'meterkilo' => NM_utf8_urldecode($meterkilo),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_meterkilo

    function ajax_line_form_validate_meter2kilo($meter2kilo, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_meter2kilo';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'meter2kilo' => NM_utf8_urldecode($meter2kilo),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_meter2kilo

    function ajax_line_form_validate_grammeter($grammeter, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_grammeter';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'grammeter' => NM_utf8_urldecode($grammeter),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_grammeter

    function ajax_line_form_validate_grammeter2($grammeter2, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_grammeter2';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'grammeter2' => NM_utf8_urldecode($grammeter2),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_grammeter2

    function ajax_line_form_validate_stdputup($stdputup, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_stdputup';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'stdputup' => NM_utf8_urldecode($stdputup),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_stdputup

    function ajax_line_form_validate_stdtube($stdtube, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_stdtube';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'stdtube' => NM_utf8_urldecode($stdtube),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_stdtube

    function ajax_line_form_validate_date1($date1, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_date1';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'date1' => NM_utf8_urldecode($date1),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_date1

    function ajax_line_form_validate_date2($date2, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_date2';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'date2' => NM_utf8_urldecode($date2),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_date2

    function ajax_line_form_validate_date3($date3, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_date3';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'date3' => NM_utf8_urldecode($date3),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_date3

    function ajax_line_form_validate_date4($date4, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_date4';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'date4' => NM_utf8_urldecode($date4),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_date4

    function ajax_line_form_validate_date5($date5, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_date5';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'date5' => NM_utf8_urldecode($date5),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_date5

    function ajax_line_form_validate_date6($date6, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_date6';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'date6' => NM_utf8_urldecode($date6),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_date6

    function ajax_line_form_validate_name1($name1, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_name1';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'name1' => NM_utf8_urldecode($name1),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_name1

    function ajax_line_form_validate_name2($name2, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_name2';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'name2' => NM_utf8_urldecode($name2),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_name2

    function ajax_line_form_validate_name3($name3, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_name3';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'name3' => NM_utf8_urldecode($name3),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_name3

    function ajax_line_form_validate_name4($name4, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_name4';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'name4' => NM_utf8_urldecode($name4),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_name4

    function ajax_line_form_validate_name5($name5, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_name5';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'name5' => NM_utf8_urldecode($name5),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_name5

    function ajax_line_form_validate_name6($name6, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_name6';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'name6' => NM_utf8_urldecode($name6),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_name6

    function ajax_line_form_validate_method1($method1, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_method1';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'method1' => NM_utf8_urldecode($method1),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_method1

    function ajax_line_form_validate_method2($method2, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_method2';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'method2' => NM_utf8_urldecode($method2),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_method2

    function ajax_line_form_validate_method3($method3, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_method3';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'method3' => NM_utf8_urldecode($method3),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_method3

    function ajax_line_form_validate_method4($method4, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_method4';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'method4' => NM_utf8_urldecode($method4),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_method4

    function ajax_line_form_validate_method5($method5, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_method5';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'method5' => NM_utf8_urldecode($method5),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_method5

    function ajax_line_form_validate_method6($method6, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_method6';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'method6' => NM_utf8_urldecode($method6),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_method6

    function ajax_line_form_validate_test1($test1, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_test1';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'test1' => NM_utf8_urldecode($test1),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_test1

    function ajax_line_form_validate_test2($test2, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_test2';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'test2' => NM_utf8_urldecode($test2),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_test2

    function ajax_line_form_validate_test3($test3, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_test3';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'test3' => NM_utf8_urldecode($test3),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_test3

    function ajax_line_form_validate_test4($test4, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_test4';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'test4' => NM_utf8_urldecode($test4),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_test4

    function ajax_line_form_validate_lot1($lot1, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_lot1';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'lot1' => NM_utf8_urldecode($lot1),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_lot1

    function ajax_line_form_validate_lot2($lot2, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_lot2';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'lot2' => NM_utf8_urldecode($lot2),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_lot2

    function ajax_line_form_validate_lot3($lot3, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_lot3';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'lot3' => NM_utf8_urldecode($lot3),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_lot3

    function ajax_line_form_validate_lot4($lot4, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_lot4';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'lot4' => NM_utf8_urldecode($lot4),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_lot4

    function ajax_line_form_validate_lot5($lot5, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_lot5';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'lot5' => NM_utf8_urldecode($lot5),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_lot5

    function ajax_line_form_validate_lot6($lot6, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_lot6';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'lot6' => NM_utf8_urldecode($lot6),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_lot6

    function ajax_line_form_validate_result1($result1, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_result1';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'result1' => NM_utf8_urldecode($result1),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_result1

    function ajax_line_form_validate_result2($result2, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_result2';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'result2' => NM_utf8_urldecode($result2),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_result2

    function ajax_line_form_validate_result3($result3, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_result3';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'result3' => NM_utf8_urldecode($result3),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_result3

    function ajax_line_form_validate_result4($result4, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_result4';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'result4' => NM_utf8_urldecode($result4),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_result4

    function ajax_line_form_validate_result5($result5, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_result5';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'result5' => NM_utf8_urldecode($result5),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_result5

    function ajax_line_form_validate_result6($result6, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_result6';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'result6' => NM_utf8_urldecode($result6),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_result6

    function ajax_line_form_validate_sname1($sname1, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_sname1';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'sname1' => NM_utf8_urldecode($sname1),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_sname1

    function ajax_line_form_validate_sname2($sname2, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_sname2';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'sname2' => NM_utf8_urldecode($sname2),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_sname2

    function ajax_line_form_validate_sname3($sname3, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_sname3';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'sname3' => NM_utf8_urldecode($sname3),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_sname3

    function ajax_line_form_validate_smethod1($smethod1, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_smethod1';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'smethod1' => NM_utf8_urldecode($smethod1),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_smethod1

    function ajax_line_form_validate_smethod2($smethod2, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_smethod2';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'smethod2' => NM_utf8_urldecode($smethod2),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_smethod2

    function ajax_line_form_validate_smethod3($smethod3, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_smethod3';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'smethod3' => NM_utf8_urldecode($smethod3),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_smethod3

    function ajax_line_form_validate_sstd1($sstd1, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_sstd1';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'sstd1' => NM_utf8_urldecode($sstd1),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_sstd1

    function ajax_line_form_validate_sstd2($sstd2, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_sstd2';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'sstd2' => NM_utf8_urldecode($sstd2),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_sstd2

    function ajax_line_form_validate_sstd3($sstd3, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_sstd3';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'sstd3' => NM_utf8_urldecode($sstd3),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_sstd3

    function ajax_line_form_validate_stol1($stol1, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_stol1';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'stol1' => NM_utf8_urldecode($stol1),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_stol1

    function ajax_line_form_validate_stol2($stol2, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_stol2';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'stol2' => NM_utf8_urldecode($stol2),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_stol2

    function ajax_line_form_validate_stol3($stol3, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_stol3';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'stol3' => NM_utf8_urldecode($stol3),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_stol3

    function ajax_line_form_validate_conv2($conv2, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_conv2';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'conv2' => NM_utf8_urldecode($conv2),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_conv2

    function ajax_line_form_validate_conv3($conv3, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_conv3';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'conv3' => NM_utf8_urldecode($conv3),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_conv3

    function ajax_line_form_validate_conv($conv, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_conv';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'conv' => NM_utf8_urldecode($conv),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_conv

    function ajax_line_form_validate_stdcost($stdcost, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_stdcost';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'stdcost' => NM_utf8_urldecode($stdcost),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_stdcost

    function ajax_line_form_validate_stdgp($stdgp, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_stdgp';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'stdgp' => NM_utf8_urldecode($stdgp),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_stdgp

    function ajax_line_form_validate_sprice($sprice, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_sprice';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'sprice' => NM_utf8_urldecode($sprice),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_sprice

    function ajax_line_form_validate_avcost($avcost, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_avcost';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'avcost' => NM_utf8_urldecode($avcost),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_avcost

    function ajax_line_form_validate_stdcosting($stdcosting, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_stdcosting';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'stdcosting' => NM_utf8_urldecode($stdcosting),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_stdcosting

    function ajax_line_form_validate_machine($machine, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_machine';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'machine' => NM_utf8_urldecode($machine),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_machine

    function ajax_line_form_validate_cgs($cgs, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_cgs';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'cgs' => NM_utf8_urldecode($cgs),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_cgs

    function ajax_line_form_validate_gs($gs, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_gs';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'gs' => NM_utf8_urldecode($gs),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_gs

    function ajax_line_form_validate_k($k, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_k';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'k' => NM_utf8_urldecode($k),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_k

    function ajax_line_form_validate_grstyle($grstyle, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_grstyle';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'grstyle' => NM_utf8_urldecode($grstyle),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_grstyle

    function ajax_line_form_validate_lbbo($lbbo, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_lbbo';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'lbbo' => NM_utf8_urldecode($lbbo),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_lbbo

    function ajax_line_form_validate_bo($bo, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_bo';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'bo' => NM_utf8_urldecode($bo),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_bo

    function ajax_line_form_validate_samples($samples, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'validate_samples';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'samples' => NM_utf8_urldecode($samples),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_validate_samples

    function ajax_line_form_event_conv_onchange($style, $stdcost, $conv, $sprice, $stdgp, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'event_conv_onchange';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'style' => NM_utf8_urldecode($style),
                  'stdcost' => NM_utf8_urldecode($stdcost),
                  'conv' => NM_utf8_urldecode($conv),
                  'sprice' => NM_utf8_urldecode($sprice),
                  'stdgp' => NM_utf8_urldecode($stdgp),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_event_conv_onchange

    function ajax_line_form_event_stdgp_onchange($style, $stdcost, $conv, $sprice, $stdgp, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'event_stdgp_onchange';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'style' => NM_utf8_urldecode($style),
                  'stdcost' => NM_utf8_urldecode($stdcost),
                  'conv' => NM_utf8_urldecode($conv),
                  'sprice' => NM_utf8_urldecode($sprice),
                  'stdgp' => NM_utf8_urldecode($stdgp),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_event_stdgp_onchange

    function ajax_line_form_submit_form($image, $style, $name, $width, $comment, $fiber, $desc, $line, $dept, $odesc, $hand, $date, $mindye, $minord, $yarn1, $per1, $yarn2, $per2, $yarn3, $per3, $yarn4, $per4, $del1, $del2, $del3, $end1, $end2, $end3, $end4, $end5, $price, $med, $dark, $nprice, $npdate, $memo, $smemo, $yds, $lbs, $dye, $gc, $fc, $spec, $gshort, $ytdd, $ytdy, $mtdd, $mtdy, $histy, $histd, $update, $avprice, $lastyry, $lastyrd, $dyeleft, $ozsquare, $ozlin, $sqlb, $cpi, $wpi, $finwt, $meterkilo, $meter2kilo, $grammeter, $grammeter2, $stdputup, $stdtube, $date1, $date2, $date3, $date4, $date5, $date6, $name1, $name2, $name3, $name4, $name5, $name6, $method1, $method2, $method3, $method4, $method5, $method6, $test1, $test2, $test3, $test4, $lot1, $lot2, $lot3, $lot4, $lot5, $lot6, $result1, $result2, $result3, $result4, $result5, $result6, $sname1, $sname2, $sname3, $smethod1, $smethod2, $smethod3, $sstd1, $sstd2, $sstd3, $stol1, $stol2, $stol3, $conv2, $conv3, $conv, $stdcost, $stdgp, $sprice, $avcost, $machine, $cgs, $gs, $k, $lbbo, $bo, $samples, $nm_form_submit, $nmgp_url_saida, $nmgp_opcao, $nmgp_ancora, $nmgp_num_form, $nmgp_parms, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'submit_form';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'image' => NM_utf8_urldecode($image),
                  'style' => NM_utf8_urldecode($style),
                  'name' => NM_utf8_urldecode($name),
                  'width' => NM_utf8_urldecode($width),
                  'comment' => NM_utf8_urldecode($comment),
                  'fiber' => NM_utf8_urldecode($fiber),
                  'desc' => NM_utf8_urldecode($desc),
                  'line' => NM_utf8_urldecode($line),
                  'dept' => NM_utf8_urldecode($dept),
                  'odesc' => NM_utf8_urldecode($odesc),
                  'hand' => NM_utf8_urldecode($hand),
                  'date' => NM_utf8_urldecode($date),
                  'mindye' => NM_utf8_urldecode($mindye),
                  'minord' => NM_utf8_urldecode($minord),
                  'yarn1' => NM_utf8_urldecode($yarn1),
                  'per1' => NM_utf8_urldecode($per1),
                  'yarn2' => NM_utf8_urldecode($yarn2),
                  'per2' => NM_utf8_urldecode($per2),
                  'yarn3' => NM_utf8_urldecode($yarn3),
                  'per3' => NM_utf8_urldecode($per3),
                  'yarn4' => NM_utf8_urldecode($yarn4),
                  'per4' => NM_utf8_urldecode($per4),
                  'del1' => NM_utf8_urldecode($del1),
                  'del2' => NM_utf8_urldecode($del2),
                  'del3' => NM_utf8_urldecode($del3),
                  'end1' => NM_utf8_urldecode($end1),
                  'end2' => NM_utf8_urldecode($end2),
                  'end3' => NM_utf8_urldecode($end3),
                  'end4' => NM_utf8_urldecode($end4),
                  'end5' => NM_utf8_urldecode($end5),
                  'price' => NM_utf8_urldecode($price),
                  'med' => NM_utf8_urldecode($med),
                  'dark' => NM_utf8_urldecode($dark),
                  'nprice' => NM_utf8_urldecode($nprice),
                  'npdate' => NM_utf8_urldecode($npdate),
                  'memo' => NM_utf8_urldecode($memo),
                  'smemo' => NM_utf8_urldecode($smemo),
                  'yds' => NM_utf8_urldecode($yds),
                  'lbs' => NM_utf8_urldecode($lbs),
                  'dye' => NM_utf8_urldecode($dye),
                  'gc' => NM_utf8_urldecode($gc),
                  'fc' => NM_utf8_urldecode($fc),
                  'spec' => NM_utf8_urldecode($spec),
                  'gshort' => NM_utf8_urldecode($gshort),
                  'ytdd' => NM_utf8_urldecode($ytdd),
                  'ytdy' => NM_utf8_urldecode($ytdy),
                  'mtdd' => NM_utf8_urldecode($mtdd),
                  'mtdy' => NM_utf8_urldecode($mtdy),
                  'histy' => NM_utf8_urldecode($histy),
                  'histd' => NM_utf8_urldecode($histd),
                  'update' => NM_utf8_urldecode($update),
                  'avprice' => NM_utf8_urldecode($avprice),
                  'lastyry' => NM_utf8_urldecode($lastyry),
                  'lastyrd' => NM_utf8_urldecode($lastyrd),
                  'dyeleft' => NM_utf8_urldecode($dyeleft),
                  'ozsquare' => NM_utf8_urldecode($ozsquare),
                  'ozlin' => NM_utf8_urldecode($ozlin),
                  'sqlb' => NM_utf8_urldecode($sqlb),
                  'cpi' => NM_utf8_urldecode($cpi),
                  'wpi' => NM_utf8_urldecode($wpi),
                  'finwt' => NM_utf8_urldecode($finwt),
                  'meterkilo' => NM_utf8_urldecode($meterkilo),
                  'meter2kilo' => NM_utf8_urldecode($meter2kilo),
                  'grammeter' => NM_utf8_urldecode($grammeter),
                  'grammeter2' => NM_utf8_urldecode($grammeter2),
                  'stdputup' => NM_utf8_urldecode($stdputup),
                  'stdtube' => NM_utf8_urldecode($stdtube),
                  'date1' => NM_utf8_urldecode($date1),
                  'date2' => NM_utf8_urldecode($date2),
                  'date3' => NM_utf8_urldecode($date3),
                  'date4' => NM_utf8_urldecode($date4),
                  'date5' => NM_utf8_urldecode($date5),
                  'date6' => NM_utf8_urldecode($date6),
                  'name1' => NM_utf8_urldecode($name1),
                  'name2' => NM_utf8_urldecode($name2),
                  'name3' => NM_utf8_urldecode($name3),
                  'name4' => NM_utf8_urldecode($name4),
                  'name5' => NM_utf8_urldecode($name5),
                  'name6' => NM_utf8_urldecode($name6),
                  'method1' => NM_utf8_urldecode($method1),
                  'method2' => NM_utf8_urldecode($method2),
                  'method3' => NM_utf8_urldecode($method3),
                  'method4' => NM_utf8_urldecode($method4),
                  'method5' => NM_utf8_urldecode($method5),
                  'method6' => NM_utf8_urldecode($method6),
                  'test1' => NM_utf8_urldecode($test1),
                  'test2' => NM_utf8_urldecode($test2),
                  'test3' => NM_utf8_urldecode($test3),
                  'test4' => NM_utf8_urldecode($test4),
                  'lot1' => NM_utf8_urldecode($lot1),
                  'lot2' => NM_utf8_urldecode($lot2),
                  'lot3' => NM_utf8_urldecode($lot3),
                  'lot4' => NM_utf8_urldecode($lot4),
                  'lot5' => NM_utf8_urldecode($lot5),
                  'lot6' => NM_utf8_urldecode($lot6),
                  'result1' => NM_utf8_urldecode($result1),
                  'result2' => NM_utf8_urldecode($result2),
                  'result3' => NM_utf8_urldecode($result3),
                  'result4' => NM_utf8_urldecode($result4),
                  'result5' => NM_utf8_urldecode($result5),
                  'result6' => NM_utf8_urldecode($result6),
                  'sname1' => NM_utf8_urldecode($sname1),
                  'sname2' => NM_utf8_urldecode($sname2),
                  'sname3' => NM_utf8_urldecode($sname3),
                  'smethod1' => NM_utf8_urldecode($smethod1),
                  'smethod2' => NM_utf8_urldecode($smethod2),
                  'smethod3' => NM_utf8_urldecode($smethod3),
                  'sstd1' => NM_utf8_urldecode($sstd1),
                  'sstd2' => NM_utf8_urldecode($sstd2),
                  'sstd3' => NM_utf8_urldecode($sstd3),
                  'stol1' => NM_utf8_urldecode($stol1),
                  'stol2' => NM_utf8_urldecode($stol2),
                  'stol3' => NM_utf8_urldecode($stol3),
                  'conv2' => NM_utf8_urldecode($conv2),
                  'conv3' => NM_utf8_urldecode($conv3),
                  'conv' => NM_utf8_urldecode($conv),
                  'stdcost' => NM_utf8_urldecode($stdcost),
                  'stdgp' => NM_utf8_urldecode($stdgp),
                  'sprice' => NM_utf8_urldecode($sprice),
                  'avcost' => NM_utf8_urldecode($avcost),
                  'machine' => NM_utf8_urldecode($machine),
                  'cgs' => NM_utf8_urldecode($cgs),
                  'gs' => NM_utf8_urldecode($gs),
                  'k' => NM_utf8_urldecode($k),
                  'lbbo' => NM_utf8_urldecode($lbbo),
                  'bo' => NM_utf8_urldecode($bo),
                  'samples' => NM_utf8_urldecode($samples),
                  'nm_form_submit' => NM_utf8_urldecode($nm_form_submit),
                  'nmgp_url_saida' => NM_utf8_urldecode($nmgp_url_saida),
                  'nmgp_opcao' => NM_utf8_urldecode($nmgp_opcao),
                  'nmgp_ancora' => NM_utf8_urldecode($nmgp_ancora),
                  'nmgp_num_form' => NM_utf8_urldecode($nmgp_num_form),
                  'nmgp_parms' => NM_utf8_urldecode($nmgp_parms),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_submit_form

    function ajax_line_form_navigate_form($style, $id2, $nm_form_submit, $nmgp_opcao, $nmgp_ordem, $nmgp_fast_search, $nmgp_cond_fast_search, $nmgp_arg_fast_search, $script_case_init)
    {
        global $inicial_line_form;
        //register_shutdown_function("line_form_pack_ajax_response");
        $inicial_line_form->contr_line_form->NM_ajax_flag          = true;
        $inicial_line_form->contr_line_form->NM_ajax_opcao         = 'navigate_form';
        $inicial_line_form->contr_line_form->NM_ajax_info['param'] = array(
                  'style' => NM_utf8_urldecode($style),
                  'id2' => NM_utf8_urldecode($id2),
                  'nm_form_submit' => NM_utf8_urldecode($nm_form_submit),
                  'nmgp_opcao' => NM_utf8_urldecode($nmgp_opcao),
                  'nmgp_ordem' => NM_utf8_urldecode($nmgp_ordem),
                  'nmgp_fast_search' => NM_utf8_urldecode($nmgp_fast_search),
                  'nmgp_cond_fast_search' => NM_utf8_urldecode($nmgp_cond_fast_search),
                  'nmgp_arg_fast_search' => NM_utf8_urldecode($nmgp_arg_fast_search),
                  'script_case_init' => NM_utf8_urldecode($script_case_init),
                  'buffer_output' => true,
                 );
        if ($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
        {
            ob_start();
        }
        $inicial_line_form->contr_line_form->controle();
        exit;
    } // ajax_navigate_form


   function line_form_pack_ajax_response()
   {
      global $inicial_line_form;
      $aResp = array();
      if ($inicial_line_form->contr_line_form->NM_ajax_info['calendarReload'])
      {
         $aResp['result'] = 'CALENDARRELOAD';
      }
      elseif ('' != $inicial_line_form->contr_line_form->NM_ajax_info['autoComp'])
      {
         $aResp['result'] = 'AUTOCOMP';
      }
//mestre_detalhe
      elseif (!empty($inicial_line_form->contr_line_form->NM_ajax_info['newline']))
      {
         $aResp['result'] = 'NEWLINE';
         ob_end_clean();
      }
      elseif (!empty($inicial_line_form->contr_line_form->NM_ajax_info['tableRefresh']))
      {
         $aResp['result'] = 'TABLEREFRESH';
      }
//-----
      elseif (!empty($inicial_line_form->contr_line_form->NM_ajax_info['errList']))
      {
         $aResp['result'] = 'ERROR';
      }
      elseif (!empty($inicial_line_form->contr_line_form->NM_ajax_info['fldList']))
      {
         $aResp['result'] = 'SET';
      }
      else
      {
         $aResp['result'] = 'OK';
      }
      if ('AUTOCOMP' == $aResp['result'])
      {
         $aResp = $inicial_line_form->contr_line_form->NM_ajax_info['autoComp'];
      }
//mestre_detalhe
      elseif ('NEWLINE' == $aResp['result'])
      {
         $aResp = $inicial_line_form->contr_line_form->NM_ajax_info['newline'];
      }
      else
//-----
      {
         $aResp['ajaxRequest'] = $inicial_line_form->contr_line_form->NM_ajax_opcao;
         if ('CALENDARRELOAD' == $aResp['result'])
         {
            line_form_pack_calendar_reload($aResp);
         }
         elseif ('ERROR' == $aResp['result'])
         {
            line_form_pack_ajax_errors($aResp);
         }
         elseif ('SET' == $aResp['result'])
         {
            line_form_pack_ajax_set_fields($aResp);
         }
         elseif ('TABLEREFRESH' == $aResp['result'])
         {
            line_form_pack_ajax_set_fields($aResp);
            $aResp['tableRefresh'] = line_form_pack_protect_string($inicial_line_form->contr_line_form->NM_ajax_info['tableRefresh']);
         }
         if ('OK' == $aResp['result'] || 'SET' == $aResp['result'])
         {
            line_form_pack_ajax_ok($aResp);
         }
         if (isset($inicial_line_form->contr_line_form->NM_ajax_info['focus']) && '' != $inicial_line_form->contr_line_form->NM_ajax_info['focus'])
         {
            $aResp['setFocus'] = $inicial_line_form->contr_line_form->NM_ajax_info['focus'];
         }
         if (isset($inicial_line_form->contr_line_form->NM_ajax_info['closeLine']) && '' != $inicial_line_form->contr_line_form->NM_ajax_info['closeLine'])
         {
            $aResp['closeLine'] = $inicial_line_form->contr_line_form->NM_ajax_info['closeLine'];
         }
         else
         {
            $aResp['closeLine'] = 'N';
         }
         if (isset($inicial_line_form->contr_line_form->NM_ajax_info['clearUpload']) && '' != $inicial_line_form->contr_line_form->NM_ajax_info['clearUpload'])
         {
            $aResp['clearUpload'] = $inicial_line_form->contr_line_form->NM_ajax_info['clearUpload'];
         }
         else
         {
            $aResp['clearUpload'] = 'N';
         }
         if (isset($inicial_line_form->contr_line_form->NM_ajax_info['masterValue']) && '' != $inicial_line_form->contr_line_form->NM_ajax_info['masterValue'])
         {
            line_form_pack_master_value($aResp);
         }
         if (isset($inicial_line_form->contr_line_form->NM_ajax_info['ajaxAlert']) && '' != $inicial_line_form->contr_line_form->NM_ajax_info['ajaxAlert'])
         {
            line_form_pack_ajax_alert($aResp);
         }
         if (isset($inicial_line_form->contr_line_form->NM_ajax_info['ajaxMessage']) && '' != $inicial_line_form->contr_line_form->NM_ajax_info['ajaxMessage'])
         {
            line_form_pack_ajax_message($aResp);
         }
         if (isset($inicial_line_form->contr_line_form->NM_ajax_info['ajaxJavascript']) && '' != $inicial_line_form->contr_line_form->NM_ajax_info['ajaxJavascript'])
         {
            line_form_pack_ajax_javascript($aResp);
         }
         if (isset($inicial_line_form->contr_line_form->NM_ajax_info['redir']) && !empty($inicial_line_form->contr_line_form->NM_ajax_info['redir']))
         {
            line_form_pack_ajax_redir($aResp);
         }
         if (isset($inicial_line_form->contr_line_form->NM_ajax_info['redirExit']) && !empty($inicial_line_form->contr_line_form->NM_ajax_info['redirExit']))
         {
            line_form_pack_ajax_redir_exit($aResp);
         }
         if (isset($inicial_line_form->contr_line_form->NM_ajax_info['blockDisplay']) && !empty($inicial_line_form->contr_line_form->NM_ajax_info['blockDisplay']))
         {
            line_form_pack_ajax_block_display($aResp);
         }
         if (isset($inicial_line_form->contr_line_form->NM_ajax_info['fieldDisplay']) && !empty($inicial_line_form->contr_line_form->NM_ajax_info['fieldDisplay']))
         {
            line_form_pack_ajax_field_display($aResp);
         }
         if (isset($inicial_line_form->contr_line_form->NM_ajax_info['buttonDisplay']) && !empty($inicial_line_form->contr_line_form->NM_ajax_info['buttonDisplay']))
         {
            $inicial_line_form->contr_line_form->NM_ajax_info['buttonDisplay'] = $inicial_line_form->contr_line_form->nmgp_botoes;
            line_form_pack_ajax_button_display($aResp);
         }
         if (isset($inicial_line_form->contr_line_form->NM_ajax_info['fieldLabel']) && !empty($inicial_line_form->contr_line_form->NM_ajax_info['fieldLabel']))
         {
            line_form_pack_ajax_field_label($aResp);
         }
         if (isset($inicial_line_form->contr_line_form->NM_ajax_info['readOnly']) && !empty($inicial_line_form->contr_line_form->NM_ajax_info['readOnly']))
         {
            line_form_pack_ajax_readonly($aResp);
         }
         if (isset($inicial_line_form->contr_line_form->NM_ajax_info['navStatus']) && !empty($inicial_line_form->contr_line_form->NM_ajax_info['navStatus']))
         {
            line_form_pack_ajax_nav_status($aResp);
         }
         if (isset($inicial_line_form->contr_line_form->NM_ajax_info['navSummary']) && !empty($inicial_line_form->contr_line_form->NM_ajax_info['navSummary']))
         {
            line_form_pack_ajax_nav_Summary($aResp);
         }
         if (isset($inicial_line_form->contr_line_form->NM_ajax_info['navPage']))
         {
            line_form_pack_ajax_navPage($aResp);
         }
         if (isset($inicial_line_form->contr_line_form->NM_ajax_info['btnVars']) && !empty($inicial_line_form->contr_line_form->NM_ajax_info['btnVars']))
         {
            line_form_pack_ajax_btn_vars($aResp);
         }
         if (isset($inicial_line_form->contr_line_form->NM_ajax_info['quickSearchRes']) && $inicial_line_form->contr_line_form->NM_ajax_info['quickSearchRes'])
         {
            $aResp['quickSearchRes'] = 'Y';
         }
         else
         {
            $aResp['quickSearchRes'] = 'N';
         }
         $aResp['htmOutput'] = '';
    
         if (isset($inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output']) && $inicial_line_form->contr_line_form->NM_ajax_info['param']['buffer_output'])
         {
            $aResp['htmOutput'] = ob_get_contents();
            if (false === $aResp['htmOutput'])
            {
               $aResp['htmOutput'] = '';
            }
            else
            {
               $aResp['htmOutput'] = line_form_pack_protect_string(NM_charset_to_utf8($aResp['htmOutput']));
               ob_end_clean();
            }
         }
      }
      if (is_array($aResp))
      {
          $oJson = new Services_JSON();
          echo "var res = " . trim(sajax_get_js_repr($oJson->encode($aResp))) . "; res;";
      }
      else
      {
          echo "var res = " . trim(sajax_get_js_repr($aResp)) . "; res;";
      }
      exit;
   } // line_form_pack_ajax_response

   function line_form_pack_calendar_reload(&$aResp)
   {
      global $inicial_line_form;
      $aResp['calendarReload'] = 'OK';
   } // line_form_pack_calendar_reload

   function line_form_pack_ajax_errors(&$aResp)
   {
      global $inicial_line_form;
      $aResp['errList'] = array();
      foreach ($inicial_line_form->contr_line_form->NM_ajax_info['errList'] as $sField => $aMsg)
      {
         if ('geral_line_form' == $sField)
         {
             $aMsg = line_form_pack_ajax_remove_erros($aMsg);
         }
         foreach ($aMsg as $sMsg)
         {
            $iNumLinha = (isset($inicial_line_form->contr_line_form->NM_ajax_info['param']['nmgp_refresh_row']) && 'geral_line_form' != $sField)
                       ? $inicial_line_form->contr_line_form->NM_ajax_info['param']['nmgp_refresh_row'] : "";
            $aResp['errList'][] = array('fldName'  => $sField,
                                        'msgText'  => line_form_pack_protect_string(NM_charset_to_utf8($sMsg)),
                                        'numLinha' => $iNumLinha);
         }
      }
   } // line_form_pack_ajax_errors

   function line_form_pack_ajax_remove_erros($aErrors)
   {
       $aNewErrors = array();
       if (!empty($aErrors))
       {
           $sErrorMsgs = str_replace(array('<br />', '<br>', '<BR />'), array('<BR>', '<BR>', '<BR>'), implode('<br />', $aErrors));
           $aErrorMsgs = explode('<BR>', $sErrorMsgs);
           foreach ($aErrorMsgs as $sErrorMsg)
           {
               $sErrorMsg = trim($sErrorMsg);
               if ('' != $sErrorMsg && !in_array($sErrorMsg, $aNewErrors))
               {
                   $aNewErrors[] = $sErrorMsg;
               }
           }
       }
       return $aNewErrors;
   } // line_form_pack_ajax_remove_erros

   function line_form_pack_ajax_ok(&$aResp)
   {
      global $inicial_line_form;
      $iNumLinha = (isset($inicial_line_form->contr_line_form->NM_ajax_info['param']['nmgp_refresh_row']))
                 ? $inicial_line_form->contr_line_form->NM_ajax_info['param']['nmgp_refresh_row'] : "";
      $aResp['msgDisplay'] = array('msgText'  => line_form_pack_protect_string($inicial_line_form->contr_line_form->NM_ajax_info['msgDisplay']),
                                   'numLinha' => $iNumLinha);
   } // line_form_pack_ajax_ok

   function line_form_pack_ajax_set_fields(&$aResp)
   {
      global $inicial_line_form;
      $iNumLinha = (isset($inicial_line_form->contr_line_form->NM_ajax_info['param']['nmgp_refresh_row']))
                 ? $inicial_line_form->contr_line_form->NM_ajax_info['param']['nmgp_refresh_row'] : "";
      if ('' != $inicial_line_form->contr_line_form->NM_ajax_info['rsSize'])
      {
         $aResp['rsSize'] = $inicial_line_form->contr_line_form->NM_ajax_info['rsSize'];
      }
      $aResp['fldList'] = array();
      foreach ($inicial_line_form->contr_line_form->NM_ajax_info['fldList'] as $sField => $aData)
      {
         $aField = array();
         if (isset($aData['colNum']))
         {
            $aField['colNum'] = $aData['colNum'];
         }
         if (isset($aData['row']))
         {
            $aField['row'] = $aData['row'];
         }
         if (isset($aData['imgFile']))
         {
            $aField['imgFile'] = line_form_pack_protect_string($aData['imgFile']);
         }
         if (isset($aData['imgOrig']))
         {
            $aField['imgOrig'] = line_form_pack_protect_string($aData['imgOrig']);
         }
         if (isset($aData['imgLink']))
         {
            $aField['imgLink'] = line_form_pack_protect_string($aData['imgLink']);
         }
         if (isset($aData['keepImg']))
         {
            $aField['keepImg'] = $aData['keepImg'];
         }
         if (isset($aData['docLink']))
         {
            $aField['docLink'] = line_form_pack_protect_string($aData['docLink']);
         }
         if (isset($aData['docIcon']))
         {
            $aField['docIcon'] = line_form_pack_protect_string($aData['docIcon']);
         }
         if (isset($aData['keyVal']))
         {
            $aField['keyVal'] = $aData['keyVal'];
         }
         if (isset($aData['optComp']))
         {
            $aField['optComp'] = $aData['optComp'];
         }
         if (isset($aData['optClass']))
         {
            $aField['optClass'] = $aData['optClass'];
         }
         if (isset($aData['optMulti']))
         {
            $aField['optMulti'] = $aData['optMulti'];
         }
         if (isset($aData['lookupCons']))
         {
            $aField['lookupCons'] = $aData['lookupCons'];
         }
         if (isset($aData['imgHtml']))
         {
            $aField['imgHtml'] = line_form_pack_protect_string($aData['imgHtml']);
         }
         if (isset($aData['mulHtml']))
         {
            $aField['mulHtml'] = line_form_pack_protect_string($aData['mulHtml']);
         }
         if (isset($aData['updInnerHtml']))
         {
            $aField['updInnerHtml'] = $aData['updInnerHtml'];
         }
         if (isset($aData['htmComp']))
         {
            $aField['htmComp'] = str_replace("'", '__AS__', str_replace('"', '__AD__', $aData['htmComp']));
         }
         $aField['fldName']  = $sField;
         $aField['fldType']  = $aData['type'];
         $aField['numLinha'] = $iNumLinha;
         $aField['valList']  = array();
         foreach ($aData['valList'] as $iIndex => $sValue)
         {
            $aValue = array();
            if (isset($aData['labList'][$iIndex]))
            {
               $aValue['label'] = line_form_pack_protect_string($aData['labList'][$iIndex]);
            }
            $aValue['value']     = ('_autocomp' != substr($sField, -9)) ? line_form_pack_protect_string($sValue) : $sValue;
            $aField['valList'][] = $aValue;
         }
         foreach ($aField['valList'] as $iIndex => $aFieldData)
         {
             if ("null" == $aFieldData['value'])
             {
                 $aField['valList'][$iIndex]['value'] = '';
             }
         }
         if (isset($aData['optList']) && false !== $aData['optList'])
         {
            if (is_array($aData['optList']))
            {
               $aField['optList'] = array();
               foreach ($aData['optList'] as $aOptList)
               {
                  foreach ($aOptList as $sValue => $sLabel)
                  {
                     $sOpt = ($sValue !== $sLabel) ? $sValue : $sLabel;
                     $aField['optList'][] = array('value' => line_form_pack_protect_string($sOpt),
                                                  'label' => line_form_pack_protect_string($sLabel));
                  }
               }
            }
            else
            {
               $aField['optList'] = $aData['optList'];
            }
         }
         $aResp['fldList'][] = $aField;
      }
   } // line_form_pack_ajax_set_fields

   function line_form_pack_ajax_redir(&$aResp)
   {
      global $inicial_line_form;
      $aInfo              = array('metodo', 'action', 'target', 'nmgp_parms', 'nmgp_outra_jan', 'nmgp_url_saida', 'script_case_init', 'script_case_session', 'h_modal', 'w_modal');
      $aResp['redirInfo'] = array();
      foreach ($aInfo as $sTag)
      {
         if (isset($inicial_line_form->contr_line_form->NM_ajax_info['redir'][$sTag]))
         {
            $aResp['redirInfo'][$sTag] = $inicial_line_form->contr_line_form->NM_ajax_info['redir'][$sTag];
         }
      }
   } // line_form_pack_ajax_redir

   function line_form_pack_ajax_redir_exit(&$aResp)
   {
      global $inicial_line_form;
      $aInfo                  = array('metodo', 'action', 'target', 'nmgp_parms', 'nmgp_outra_jan', 'nmgp_url_saida', 'script_case_init', 'script_case_session');
      $aResp['redirExitInfo'] = array();
      foreach ($aInfo as $sTag)
      {
         if (isset($inicial_line_form->contr_line_form->NM_ajax_info['redirExit'][$sTag]))
         {
            $aResp['redirExitInfo'][$sTag] = $inicial_line_form->contr_line_form->NM_ajax_info['redirExit'][$sTag];
         }
      }
   } // line_form_pack_ajax_redir_exit

   function line_form_pack_master_value(&$aResp)
   {
      global $inicial_line_form;
      foreach ($inicial_line_form->contr_line_form->NM_ajax_info['masterValue'] as $sIndex => $sValue)
      {
         $aResp['masterValue'][] = array('index' => $sIndex,
                                         'value' => $sValue);
      }
   } // line_form_pack_master_value

   function line_form_pack_ajax_alert(&$aResp)
   {
      global $inicial_line_form;
      $aResp['ajaxAlert'] = array('message' => $inicial_line_form->contr_line_form->NM_ajax_info['ajaxAlert']['message']);
   } // line_form_pack_ajax_alert

   function line_form_pack_ajax_message(&$aResp)
   {
      global $inicial_line_form;
      $aResp['ajaxMessage'] = array('message'      => line_form_pack_protect_string($inicial_line_form->contr_line_form->NM_ajax_info['ajaxMessage']['message']),
                                    'title'        => line_form_pack_protect_string($inicial_line_form->contr_line_form->NM_ajax_info['ajaxMessage']['title']),
                                    'modal'        => isset($inicial_line_form->contr_line_form->NM_ajax_info['ajaxMessage']['modal'])        ? $inicial_line_form->contr_line_form->NM_ajax_info['ajaxMessage']['modal']        : 'N',
                                    'timeout'      => isset($inicial_line_form->contr_line_form->NM_ajax_info['ajaxMessage']['timeout'])      ? $inicial_line_form->contr_line_form->NM_ajax_info['ajaxMessage']['timeout']      : '',
                                    'button'       => isset($inicial_line_form->contr_line_form->NM_ajax_info['ajaxMessage']['button'])       ? $inicial_line_form->contr_line_form->NM_ajax_info['ajaxMessage']['button']       : '',
                                    'button_label' => isset($inicial_line_form->contr_line_form->NM_ajax_info['ajaxMessage']['button_label']) ? $inicial_line_form->contr_line_form->NM_ajax_info['ajaxMessage']['button_label'] : 'Ok',
                                    'top'          => isset($inicial_line_form->contr_line_form->NM_ajax_info['ajaxMessage']['top'])          ? $inicial_line_form->contr_line_form->NM_ajax_info['ajaxMessage']['top']          : '',
                                    'left'         => isset($inicial_line_form->contr_line_form->NM_ajax_info['ajaxMessage']['left'])         ? $inicial_line_form->contr_line_form->NM_ajax_info['ajaxMessage']['left']         : '',
                                    'width'        => isset($inicial_line_form->contr_line_form->NM_ajax_info['ajaxMessage']['width'])        ? $inicial_line_form->contr_line_form->NM_ajax_info['ajaxMessage']['width']        : '',
                                    'height'       => isset($inicial_line_form->contr_line_form->NM_ajax_info['ajaxMessage']['height'])       ? $inicial_line_form->contr_line_form->NM_ajax_info['ajaxMessage']['height']       : '',
                                    'redir'        => isset($inicial_line_form->contr_line_form->NM_ajax_info['ajaxMessage']['redir'])        ? $inicial_line_form->contr_line_form->NM_ajax_info['ajaxMessage']['redir']        : '',
                                    'show_close'   => isset($inicial_line_form->contr_line_form->NM_ajax_info['ajaxMessage']['show_close'])   ? $inicial_line_form->contr_line_form->NM_ajax_info['ajaxMessage']['show_close']   : 'Y',
                                    'body_icon'    => isset($inicial_line_form->contr_line_form->NM_ajax_info['ajaxMessage']['body_icon'])    ? $inicial_line_form->contr_line_form->NM_ajax_info['ajaxMessage']['body_icon']    : 'Y',
                                    'redir_target' => isset($inicial_line_form->contr_line_form->NM_ajax_info['ajaxMessage']['redir_target']) ? $inicial_line_form->contr_line_form->NM_ajax_info['ajaxMessage']['redir_target'] : '',
                                    'redir_par'    => isset($inicial_line_form->contr_line_form->NM_ajax_info['ajaxMessage']['redir_par'])    ? $inicial_line_form->contr_line_form->NM_ajax_info['ajaxMessage']['redir_par']    : '');
   } // line_form_pack_ajax_message

   function line_form_pack_ajax_javascript(&$aResp)
   {
      global $inicial_line_form;
      foreach ($inicial_line_form->contr_line_form->NM_ajax_info['ajaxJavascript'] as $aJsFunc)
      {
         $aResp['ajaxJavascript'][] = $aJsFunc;
      }
   } // line_form_pack_ajax_javascript

   function line_form_pack_ajax_block_display(&$aResp)
   {
      global $inicial_line_form;
      $aResp['blockDisplay'] = array();
      foreach ($inicial_line_form->contr_line_form->NM_ajax_info['blockDisplay'] as $sBlockName => $sBlockStatus)
      {
        $aResp['blockDisplay'][] = array($sBlockName, $sBlockStatus);
      }
   } // line_form_pack_ajax_block_display

   function line_form_pack_ajax_field_display(&$aResp)
   {
      global $inicial_line_form;
      $aResp['fieldDisplay'] = array();
      foreach ($inicial_line_form->contr_line_form->NM_ajax_info['fieldDisplay'] as $sFieldName => $sFieldStatus)
      {
        $aResp['fieldDisplay'][] = array($sFieldName, $sFieldStatus);
      }
   } // line_form_pack_ajax_field_display

   function line_form_pack_ajax_button_display(&$aResp)
   {
      global $inicial_line_form;
      $aResp['buttonDisplay'] = array();
      foreach ($inicial_line_form->contr_line_form->NM_ajax_info['buttonDisplay'] as $sButtonName => $sButtonStatus)
      {
        $aResp['buttonDisplay'][] = array($sButtonName, $sButtonStatus);
      }
   } // line_form_pack_ajax_button_display

   function line_form_pack_ajax_field_label(&$aResp)
   {
      global $inicial_line_form;
      $aResp['fieldLabel'] = array();
      foreach ($inicial_line_form->contr_line_form->NM_ajax_info['fieldLabel'] as $sFieldName => $sFieldLabel)
      {
        $aResp['fieldLabel'][] = array($sFieldName, line_form_pack_protect_string($sFieldLabel));
      }
   } // line_form_pack_ajax_field_label

   function line_form_pack_ajax_readonly(&$aResp)
   {
      global $inicial_line_form;
      $aResp['readOnly'] = array();
      foreach ($inicial_line_form->contr_line_form->NM_ajax_info['readOnly'] as $sFieldName => $sFieldStatus)
      {
        $aResp['readOnly'][] = array($sFieldName, $sFieldStatus);
      }
   } // line_form_pack_ajax_readonly

   function line_form_pack_ajax_nav_status(&$aResp)
   {
      global $inicial_line_form;
      $aResp['navStatus'] = array();
      if (isset($inicial_line_form->contr_line_form->NM_ajax_info['navStatus']['ret']) && '' != $inicial_line_form->contr_line_form->NM_ajax_info['navStatus']['ret'])
      {
         $aResp['navStatus']['ret'] = $inicial_line_form->contr_line_form->NM_ajax_info['navStatus']['ret'];
      }
      if (isset($inicial_line_form->contr_line_form->NM_ajax_info['navStatus']['ava']) && '' != $inicial_line_form->contr_line_form->NM_ajax_info['navStatus']['ava'])
      {
         $aResp['navStatus']['ava'] = $inicial_line_form->contr_line_form->NM_ajax_info['navStatus']['ava'];
      }
   } // line_form_pack_ajax_nav_status

   function line_form_pack_ajax_nav_Summary(&$aResp)
   {
      global $inicial_line_form;
      $aResp['navSummary'] = array();
      $aResp['navSummary']['reg_ini'] = $inicial_line_form->contr_line_form->NM_ajax_info['navSummary']['reg_ini'];
      $aResp['navSummary']['reg_qtd'] = $inicial_line_form->contr_line_form->NM_ajax_info['navSummary']['reg_qtd'];
      $aResp['navSummary']['reg_tot'] = $inicial_line_form->contr_line_form->NM_ajax_info['navSummary']['reg_tot'];
   } // line_form_pack_ajax_nav_Summary

   function line_form_pack_ajax_navPage(&$aResp)
   {
      global $inicial_line_form;
      $aResp['navPage'] = $inicial_line_form->contr_line_form->NM_ajax_info['navPage'];
   } // line_form_pack_ajax_navPage


   function line_form_pack_ajax_btn_vars(&$aResp)
   {
      global $inicial_line_form;
      $aResp['btnVars'] = array();
      foreach ($inicial_line_form->contr_line_form->NM_ajax_info['btnVars'] as $sBtnName => $sBtnValue)
      {
        $aResp['btnVars'][] = array($sBtnName, line_form_pack_protect_string($sBtnValue));
      }
   } // line_form_pack_ajax_btn_vars

   function line_form_pack_protect_string($sString)
   {
      $sString = (string) $sString;

      if (!empty($sString))
      {
         if (function_exists('NM_is_utf8') && NM_is_utf8($sString))
         {
             return $sString;
         }
         else
         {
             return htmlentities($sString);
         }
      }
      elseif ('0' === $sString || 0 === $sString)
      {
         return '0';
      }
      else
      {
         return '';
      }
   } // line_form_pack_protect_string
?>
