<?php
class test_grpcs_editable_grid_form extends test_grpcs_editable_grid_apl
{
function Form_Init()
{
   global $sc_seq_vert, $nm_apl_dependente, $opcao_botoes, $nm_url_saida; 
?>
<?php

if (!isset($this->NM_ajax_info['param']['buffer_output']) || !$this->NM_ajax_info['param']['buffer_output'])
{
    $sOBContents = ob_get_contents();
    ob_end_clean();
}

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
            "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">

<html<?php echo $_SESSION['scriptcase']['reg_conf']['html_dir'] ?>>
<HEAD>
 <TITLE><?php if ('novo' == $this->nmgp_opcao) { echo strip_tags("" . $this->Ini->Nm_lang['lang_othr_frmi_titl'] . " - grpcs"); } else { echo strip_tags("" . $this->Ini->Nm_lang['lang_othr_frmu_titl'] . " - grpcs"); } ?></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="Last-Modified" content="<?php echo gmdate("D, d M Y H:i:s"); ?> GMT"/>
 <META http-equiv="Cache-Control" content="no-store, no-cache, must-revalidate"/>
 <META http-equiv="Cache-Control" content="post-check=0, pre-check=0"/>
 <META http-equiv="Pragma" content="no-cache"/>
 <link rel="stylesheet" href="<?php echo $this->Ini->path_prod ?>/third/jquery_plugin/thickbox/thickbox.css" type="text/css" media="screen" />
 <SCRIPT type="text/javascript">
  var sc_pathToTB = '<?php echo $this->Ini->path_prod ?>/third/jquery_plugin/thickbox/';
  var sc_blockCol = '<?php echo $this->Ini->Block_img_col; ?>';
  var sc_blockExp = '<?php echo $this->Ini->Block_img_exp; ?>';
  var sc_ajaxBg = '<?php echo $this->Ini->Color_bg_ajax; ?>';
  var sc_ajaxBordC = '<?php echo $this->Ini->Border_c_ajax; ?>';
  var sc_ajaxBordS = '<?php echo $this->Ini->Border_s_ajax; ?>';
  var sc_ajaxBordW = '<?php echo $this->Ini->Border_w_ajax; ?>';
  var sc_ajaxMsgTime = 2;
  var sc_img_status_ok = '<?php echo $this->Ini->path_icones; ?>/<?php echo $this->Ini->Img_status_ok; ?>';
  var sc_img_status_err = '<?php echo $this->Ini->path_icones; ?>/<?php echo $this->Ini->Img_status_err; ?>';
  var sc_css_status = '<?php echo $this->Ini->Css_status; ?>';
<?php
if ($this->Embutida_form && isset($_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['sc_modal']) && $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['sc_modal'] && isset($_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['sc_redir_atualiz']) && $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['sc_redir_atualiz'] == 'ok')
{
?>
  var sc_closeChange = true;
<?php
}
else
{
?>
  var sc_closeChange = false;
<?php
}
?>
 </SCRIPT>
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->path_prod; ?>/third/jquery/js/jquery.js"></SCRIPT>
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->path_prod; ?>/third/jquery/js/jquery-ui.js"></SCRIPT>
 <link rel="stylesheet" href="<?php echo $this->Ini->path_prod ?>/third/jquery/css/smoothness/jquery-ui.css" type="text/css" media="screen" />
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->url_lib_js; ?>jquery.iframe-transport.js"></SCRIPT>
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->url_lib_js; ?>jquery.fileupload.js"></SCRIPT>
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->path_prod; ?>/third/jquery_plugin/malsup-blockui/jquery.blockUI.js"></SCRIPT>
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->path_prod; ?>/third/jquery_plugin/thickbox/thickbox-compressed.js"></SCRIPT>
 <style type="text/css">
  #quicksearchph_t {
   position: relative;
  }
  #quicksearchph_t img {
   position: absolute;
   top: 0;
   right: 0;
  }
 </style>
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->url_lib_js; ?>jquery.scInput.js"></SCRIPT>
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->url_lib_js; ?>jquery.fieldSelection.js"></SCRIPT>
 <link rel="stylesheet" type="text/css" href="<?php echo $this->Ini->path_link ?>_lib/css/<?php echo $this->Ini->str_schema_all ?>_form.css" />
 <link rel="stylesheet" type="text/css" href="<?php echo $this->Ini->path_link ?>_lib/css/<?php echo $this->Ini->str_schema_all ?>_tab.css" />
 <link rel="stylesheet" type="text/css" href="<?php echo $this->Ini->path_link ?>_lib/buttons/<?php echo $this->Ini->Str_btn_form . '/' . $this->Ini->Str_btn_form ?>.css" />
 <link rel="stylesheet" type="text/css" href="<?php echo $this->Ini->path_link ?>_lib/css/<?php echo $this->Ini->str_schema_all ?>_calendar.css" />
<?php
include_once("../_lib/css/" . $this->Ini->str_schema_all . "_tab.php");
?>

<script>
var scFocusFirstErrorField = false;
var scFocusFirstErrorName  = "<?php echo $this->scFormFocusErrorName; ?>";
</script>

<?php
include_once("test_grpcs_editable_grid_sajax_js.php");
?>
<script type="text/javascript">
if (document.getElementById("id_error_display_fixed"))
{
 scCenterFixedElement("id_error_display_fixed");
}
var posDispLeft = 0;
var posDispTop = 0;
var Nm_Proc_Atualiz = false;
function findPos(obj)
{
 var posCurLeft = posCurTop = 0;
 if (obj.offsetParent)
 {
  posCurLeft = obj.offsetLeft
  posCurTop = obj.offsetTop
  while (obj = obj.offsetParent)
  {
   posCurLeft += obj.offsetLeft
   posCurTop += obj.offsetTop
  }
 }
 posDispLeft = posCurLeft - 10;
 posDispTop = posCurTop + 30;
}
var Nav_permite_ret = "<?php if ($this->Nav_permite_ret) { echo 'S'; } else { echo 'N'; } ?>";
var Nav_permite_ava = "<?php if ($this->Nav_permite_ava) { echo 'S'; } else { echo 'N'; } ?>";
var Nav_binicio     = "<?php echo $this->arr_buttons['binicio']['type']; ?>";
var Nav_binicio_off = "<?php echo $this->arr_buttons['binicio_off']['type']; ?>";
var Nav_bavanca     = "<?php echo $this->arr_buttons['bavanca']['type']; ?>";
var Nav_bavanca_off = "<?php echo $this->arr_buttons['bavanca_off']['type']; ?>";
var Nav_bretorna    = "<?php echo $this->arr_buttons['bretorna']['type']; ?>";
var Nav_bretorna_off = "<?php echo $this->arr_buttons['bretorna_off']['type']; ?>";
var Nav_bfinal      = "<?php echo $this->arr_buttons['bfinal']['type']; ?>";
var Nav_bfinal_off  = "<?php echo $this->arr_buttons['bfinal_off']['type']; ?>";
function nav_atualiza(str_ret, str_ava, str_pos)
{
 if ('S' == str_ret)
 {
  if (Nav_binicio == 'image')
  {
      if (document.getElementById("sc_b_ini_" + str_pos)) {
        sImg = document.getElementById("id_img_sc_b_ini_" + str_pos).src;
        nav_liga_img();
        document.getElementById("id_img_sc_b_ini_" + str_pos).src = sImg;
        document.getElementById("sc_b_ini_" + str_pos).disabled = false;
      }
  }
  else
  {
      if (document.getElementById("sc_b_ini_" + str_pos)){
        document.getElementById("sc_b_ini_" + str_pos).className = "scButton_<?php echo $this->arr_buttons['binicio']['style'] ?>";
        document.getElementById("sc_b_ini_" + str_pos).disabled = false;
        if('only_img' == '<?php echo $this->arr_buttons['binicio']['display']; ?>' || 'text_img' == '<?php echo $this->arr_buttons['binicio']['display']; ?>')
        {
            sImg = document.getElementById("id_img_sc_b_ini_" + str_pos).src;
            nav_liga_img();
            document.getElementById("id_img_sc_b_ini_" + str_pos).src = sImg;
        }
      }
  }
  if (Nav_bretorna == 'image')
  {
      if (document.getElementById("sc_b_ret_" + str_pos)) {
        sImg = document.getElementById("id_img_sc_b_ret_" + str_pos).src;
        nav_liga_img();
        document.getElementById("id_img_sc_b_ret_" + str_pos).src = sImg;
        document.getElementById("sc_b_ret_" + str_pos).disabled = false;
      }
  }
  else
  {
      if (document.getElementById("sc_b_ret_" + str_pos)) {
        document.getElementById("sc_b_ret_" + str_pos).className = "scButton_<?php echo $this->arr_buttons['bretorna']['style'] ?>";
        document.getElementById("sc_b_ret_" + str_pos).disabled = false;
        if('only_img' == '<?php echo $this->arr_buttons['bretorna']['display']; ?>' || 'text_img' == '<?php echo $this->arr_buttons['bretorna']['display']; ?>')
        {
            sImg = document.getElementById("id_img_sc_b_ret_" + str_pos).src;
            nav_liga_img();
            document.getElementById("id_img_sc_b_ret_" + str_pos).src = sImg;
        }
      }
  }
 }
 else
 {
  if (Nav_binicio_off == 'image')
  {
      if (document.getElementById("sc_b_ini_" + str_pos)) {
        sImg = document.getElementById("id_img_sc_b_ini_" + str_pos).src;
        nav_desliga_img();
        document.getElementById("id_img_sc_b_ini_" + str_pos).src = sImg;
        document.getElementById("sc_b_ini_" + str_pos).disabled = true;
      }
  }
  else
  {
      if (document.getElementById("sc_b_ini_" + str_pos)) {
        document.getElementById("sc_b_ini_" + str_pos).className = "scButton_<?php echo $this->arr_buttons['binicio_off']['style'] ?>";
        document.getElementById("sc_b_ini_" + str_pos).disabled = true;
        if('only_img' == '<?php echo $this->arr_buttons['binicio_off']['display']; ?>' || 'text_img' == '<?php echo $this->arr_buttons['binicio_off']['display']; ?>')
        {
            sImg = document.getElementById("id_img_sc_b_ini_" + str_pos).src;
            nav_desliga_img();
            document.getElementById("id_img_sc_b_ini_" + str_pos).src = sImg;
        }
      }
  }
  if (Nav_bretorna_off == 'image')
  {
      if (document.getElementById("sc_b_ret_" + str_pos)) {
        sImg = document.getElementById("id_img_sc_b_ret_" + str_pos).src;
        nav_desliga_img();
        document.getElementById("id_img_sc_b_ret_" + str_pos).src = sImg;
        document.getElementById("sc_b_ret_" + str_pos).disabled = true;
      }
  }
  else
  {
      if (document.getElementById("sc_b_ret_" + str_pos)) {
        document.getElementById("sc_b_ret_" + str_pos).className = "scButton_<?php echo $this->arr_buttons['bretorna_off']['style'] ?>";
        document.getElementById("sc_b_ret_" + str_pos).disabled = true;
        if('only_img' == '<?php echo $this->arr_buttons['bretorna_off']['display']; ?>' || 'text_img' == '<?php echo $this->arr_buttons['bretorna_off']['display']; ?>')
        {
            sImg = document.getElementById("id_img_sc_b_ret_" + str_pos).src;
            nav_desliga_img();
            document.getElementById("id_img_sc_b_ret_" + str_pos).src = sImg;
        }
      }
  }
 }
 if ('S' == str_ava)
 {
  if (Nav_bavanca == 'image')
  {
      if (document.getElementById("sc_b_avc_" + str_pos)) {
        sImg = document.getElementById("id_img_sc_b_avc_" + str_pos).src;
        nav_liga_img();
        document.getElementById("id_img_sc_b_avc_" + str_pos).src = sImg;
        document.getElementById("sc_b_avc_" + str_pos).disabled = false;
      }
  }
  else
  {
      if (document.getElementById("sc_b_avc_" + str_pos)) {
        document.getElementById("sc_b_avc_" + str_pos).className = "scButton_<?php echo $this->arr_buttons['bavanca']['style'] ?>";
        document.getElementById("sc_b_avc_" + str_pos).disabled = false;
        if('only_img' == '<?php echo $this->arr_buttons['bavanca']['display']; ?>' || 'text_img' == '<?php echo $this->arr_buttons['bavanca']['display']; ?>')
        {
            sImg = document.getElementById("id_img_sc_b_avc_" + str_pos).src;
            nav_liga_img();
            document.getElementById("id_img_sc_b_avc_" + str_pos).src = sImg;
        }
      }
  }
  if (Nav_bfinal == 'image')
  {
      if (document.getElementById("sc_b_fim_" + str_pos)) {
        sImg = document.getElementById("id_img_sc_b_fim_" + str_pos).src;
        nav_liga_img();
        document.getElementById("id_img_sc_b_fim_" + str_pos).src = sImg;
        document.getElementById("sc_b_fim_" + str_pos).disabled = false;
      }
  }
  else
  {
      if (document.getElementById("sc_b_fim_" + str_pos)) {
        document.getElementById("sc_b_fim_" + str_pos).className = "scButton_<?php echo $this->arr_buttons['bfinal']['style'] ?>";
        document.getElementById("sc_b_fim_" + str_pos).disabled = false;
        if('only_img' == '<?php echo $this->arr_buttons['bfinal']['display']; ?>' || 'text_img' == '<?php echo $this->arr_buttons['bfinal']['display']; ?>')
        {
            sImg = document.getElementById("id_img_sc_b_fim_" + str_pos).src;
            nav_liga_img();
            document.getElementById("id_img_sc_b_fim_" + str_pos).src = sImg;
        }
      }
  }
 }
 else
 {
  if (Nav_bavanca_off == 'image')
  {
      if (document.getElementById("sc_b_avc_" + str_pos)) {
        sImg = document.getElementById("id_img_sc_b_avc_" + str_pos).src;
        nav_desliga_img();
        document.getElementById("id_img_sc_b_avc_" + str_pos).src = sImg;
        document.getElementById("sc_b_avc_" + str_pos).disabled = true;
      }
  }
  else
  {
      if (document.getElementById("sc_b_avc_" + str_pos)) {
        document.getElementById("sc_b_avc_" + str_pos).className = "scButton_<?php echo $this->arr_buttons['bavanca_off']['style'] ?>";
        document.getElementById("sc_b_avc_" + str_pos).disabled = true;
        if('only_img' == '<?php echo $this->arr_buttons['bavanca_off']['display']; ?>' || 'text_img' == '<?php echo $this->arr_buttons['bavanca_off']['display']; ?>')
        {
            sImg = document.getElementById("id_img_sc_b_avc_" + str_pos).src;
            nav_desliga_img();
            document.getElementById("id_img_sc_b_avc_" + str_pos).src = sImg;
        }
      }
  }
  if (Nav_bfinal_off == 'image')
  {
      if (document.getElementById("sc_b_fim_" + str_pos)) {
        sImg = document.getElementById("id_img_sc_b_fim_" + str_pos).src;
        nav_desliga_img();
        document.getElementById("id_img_sc_b_fim_" + str_pos).src = sImg;
        document.getElementById("sc_b_fim_" + str_pos).disabled = true;
      }
  }
  else
  {
      if (document.getElementById("sc_b_fim_" + str_pos)) {
        document.getElementById("sc_b_fim_" + str_pos).className = "scButton_<?php echo $this->arr_buttons['bfinal_off']['style'] ?>";
        document.getElementById("sc_b_fim_" + str_pos).disabled = true;
        if('only_img' == '<?php echo $this->arr_buttons['bfinal_off']['display']; ?>' || 'text_img' == '<?php echo $this->arr_buttons['bfinal_off']['display']; ?>')
        {
            sImg = document.getElementById("id_img_sc_b_fim_" + str_pos).src;
            nav_desliga_img();
            document.getElementById("id_img_sc_b_fim_" + str_pos).src = sImg;
        }
      }
  }
 }
}
function nav_liga_img()
{
 sExt = sImg.substr(sImg.length - 4);
 sImg = sImg.substr(0, sImg.length - 4);
 if ('_off' == sImg.substr(sImg.length - 4))
 {
  sImg = sImg.substr(0, sImg.length - 4);
 }
 sImg += sExt;
}
function nav_desliga_img()
{
 sExt = sImg.substr(sImg.length - 4);
 sImg = sImg.substr(0, sImg.length - 4);
 if ('_off' != sImg.substr(sImg.length - 4))
 {
  sImg += '_off';
 }
 sImg += sExt;
}
function summary_atualiza(reg_ini, reg_qtd, reg_tot)
{
    nm_sumario = "[<?php echo $this->Ini->Nm_lang['lang_othr_smry_info']?>]";
    nm_sumario = nm_sumario.replace("?start?", reg_ini);
    nm_sumario = nm_sumario.replace("?final?", reg_qtd);
    nm_sumario = nm_sumario.replace("?total?", reg_tot);
    if (reg_qtd < 1) {
        nm_sumario = "";
    }
    if (document.getElementById("sc_b_summary_b")) document.getElementById("sc_b_summary_b").innerHTML = nm_sumario;
}
function navpage_atualiza(str_navpage)
{
    if (document.getElementById("sc_b_navpage_b")) document.getElementById("sc_b_navpage_b").innerHTML = str_navpage;
}
<?php

include_once('test_grpcs_editable_grid_jquery.php');

?>

 var scQSInit = true;
 var scQSPos = {};
 $(function() {


  scJQGeneralAdd();

  $('#SC_fast_search_t').keyup(function(e) {
   scQuickSearchKeyUp('t', e);
  });

  $(document).bind('drop dragover', function (e) {
      e.preventDefault();
  });

<?php
if (!$this->NM_ajax_flag && isset($this->NM_non_ajax_info['ajaxJavascript']) && !empty($this->NM_non_ajax_info['ajaxJavascript']))
{
    foreach ($this->NM_non_ajax_info['ajaxJavascript'] as $aFnData)
    {
?>
  <?php echo $aFnData[0]; ?>(<?php echo implode(', ', $aFnData[1]); ?>);

<?php
    }
}
?>
 });

   $(window).load(function() {
     scQuickSearchInit(false, '');
     $('#SC_fast_search_t').listen();
     scQuickSearchKeyUp('t', null);
     scQSInit = false;
   });
   function scQuickSearchSubmit_t() {
     nm_move('fast_search', 't');
   }

   function scQuickSearchInit(bPosOnly, sPos) {
     if (!bPosOnly) {
       if ('' == sPos || 't' == sPos) scQuickSearchSize('SC_fast_search_t', 'SC_fast_search_close_t', 'SC_fast_search_submit_t', 'quicksearchph_t');
     }
   }
   function scQuickSearchSize(sIdInput, sIdClose, sIdSubmit, sPlaceHolder) {
     var oInput = $('#' + sIdInput),
         oClose = $('#' + sIdClose),
         oSubmit = $('#' + sIdSubmit),
         oPlace = $('#' + sPlaceHolder),
         iInputP = parseInt(oInput.css('padding-right')) || 0,
         iInputB = parseInt(oInput.css('border-right-width')) || 0,
         iInputW = oInput.outerWidth(),
         iPlaceW = oPlace.outerWidth(),
         oInputO = oInput.offset(),
         oPlaceO = oPlace.offset(),
         iNewRight;
     iNewRight = (iPlaceW - iInputW) - (oInputO.left - oPlaceO.left) + iInputB + 1;
     oInput.css({
       'height': Math.max(oInput.height(), 16) + 'px',
       'padding-right': iInputP + 16 + <?php echo $this->Ini->Str_qs_image_padding ?> + 'px'
     });
     oClose.css({
       'right': iNewRight + <?php echo $this->Ini->Str_qs_image_padding ?> + 'px',
       'cursor': 'pointer'
     });
     oSubmit.css({
       'right': iNewRight + <?php echo $this->Ini->Str_qs_image_padding ?> + 'px',
       'cursor': 'pointer'
     });
   }
   function scQuickSearchKeyUp(sPos, e) {
     if ('' != scQSInitVal && $('#SC_fast_search_' + sPos).val() == scQSInitVal && scQSInit) {
       $('#SC_fast_search_close_' + sPos).show();
       $('#SC_fast_search_submit_' + sPos).hide();
     }
     else {
       $('#SC_fast_search_close_' + sPos).hide();
       $('#SC_fast_search_submit_' + sPos).show();
     }
     if (null != e) {
       var keyPressed = e.charCode || e.keyCode || e.which;
       if (13 == keyPressed) {
         if ('t' == sPos) scQuickSearchSubmit_t();
       }
     }
   }
 if($(".sc-ui-block-control").length) {
  preloadBlock = new Image();
  preloadBlock.src = "<?php echo $this->Ini->path_icones; ?>/" + sc_blockExp;
 }

 var show_block = {
  
 };

 function toggleBlock(e) {
  var block = e.data.block,
      block_id = $(block).attr("id");
      block_img = $("#" + block_id + " .sc-ui-block-control");

  if (1 >= block.rows.length) {
   return;
  }

  show_block[block_id] = !show_block[block_id];

  if (show_block[block_id]) {
    $(block).css("height", "100%");
    if (block_img.length) block_img.attr("src", changeImgName(block_img.attr("src"), sc_blockCol));
  }
  else {
    $(block).css("height", "");
    if (block_img.length) block_img.attr("src", changeImgName(block_img.attr("src"), sc_blockExp));
  }

  for (var i = 1; i < block.rows.length; i++) {
   if (show_block[block_id])
    $(block.rows[i]).show();
   else
    $(block.rows[i]).hide();
  }

  if (show_block[block_id]) {
  }
 }

 function changeImgName(imgOld, imgNew) {
   var aOld = imgOld.split("/");
   aOld.pop();
   aOld.push(imgNew);
   return aOld.join("/");
 }

</script>
</HEAD>
<?php
$str_iframe_body = ('F' == $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['run_iframe'] || 'R' == $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['run_iframe']) ? 'margin: 2px;' : '';
 if (isset($_SESSION['nm_aba_bg_color']))
 {
     $this->Ini->cor_bg_grid = $_SESSION['nm_aba_bg_color'];
     $this->Ini->img_fun_pag = $_SESSION['nm_aba_bg_img'];
 }
if ($GLOBALS["erro_incl"] == 1)
{
    $this->nmgp_opcao = "novo";
    $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['opc_ant'] = "novo";
    $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['recarga'] = "novo";
}
if (empty($_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['recarga']))
{
    $opcao_botoes = $this->nmgp_opcao;
}
else
{
    $opcao_botoes = $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['recarga'];
}
if ('novo' == $opcao_botoes && $this->Embutida_form)
{
    $opcao_botoes = 'inicio';
}
?>
<body class="scFormPage" style="<?php echo $str_iframe_body; ?>">
<?php

if (!isset($this->NM_ajax_info['param']['buffer_output']) || !$this->NM_ajax_info['param']['buffer_output'])
{
    echo $sOBContents;
}

?>
<div id="idJSSpecChar" style="display: none;"></div>
<script type="text/javascript">
function NM_tp_critica(TP)
{
    if (TP == 0 || TP == 1 || TP == 2)
    {
        nmdg_tipo_crit = TP;
    }
}
</script> 
<?php
 include_once("test_grpcs_editable_grid_js0.php");
?>
<script type="text/javascript" src="<?php echo str_replace("{str_idioma}", $this->Ini->str_lang, "../_lib/js/tab_erro_{str_idioma}.js"); ?>"> 
</script> 
<script type="text/javascript"> 
  sc_quant_excl = <?php echo count($sc_check_excl); ?>; 
 function setLocale(oSel)
 {
  var sLocale = "";
  if (-1 < oSel.selectedIndex)
  {
   sLocale = oSel.options[oSel.selectedIndex].value;
  }
  document.F1.nmgp_idioma_novo.value = sLocale;
 }
 function setSchema(oSel)
 {
  var sLocale = "";
  if (-1 < oSel.selectedIndex)
  {
   sLocale = oSel.options[oSel.selectedIndex].value;
  }
  document.F1.nmgp_schema_f.value = sLocale;
 }
 </script>
<form name="F1" method=post 
               action="./" 
               target="_self"> 
<input type=hidden name="nm_form_submit" value="1">
<input type=hidden name="nmgp_idioma_novo" value="">
<input type=hidden name="nmgp_schema_f" value="">
<input type=hidden name="nmgp_url_saida" value="">
<input type=hidden name="nmgp_opcao" value="">
<input type=hidden name="nmgp_ancora" value="">
<input type=hidden name="nmgp_num_form" value="<?php  echo NM_encode_input($nmgp_num_form); ?>">
<input type=hidden name="nmgp_parms" value="">
<input type=hidden name="script_case_init" value="<?php  echo NM_encode_input($this->Ini->sc_page); ?>"> 
<input type=hidden name="script_case_session" value="<?php  echo NM_encode_input(session_id()); ?>"> 
<?php
$int_iframe_padding = ('F' == $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['run_iframe'] || 'R' == $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['run_iframe']) ? 0 : "0px";
?>
<?php
$_SESSION['scriptcase']['error_span_title']['test_grpcs_editable_grid'] = $this->Ini->Error_icon_span;
$_SESSION['scriptcase']['error_icon_title']['test_grpcs_editable_grid'] = '' != $this->Ini->Err_ico_title ? $this->Ini->path_icones . '/' . $this->Ini->Err_ico_title : '';
?>
<div style="display: none; position: absolute" id="id_error_display_table_frame">
<table class="scFormErrorTable">
<tr><?php if ($this->Ini->Error_icon_span && '' != $this->Ini->Err_ico_title) { ?><td style="padding: 0px" rowspan="2"><img src="<?php echo $this->Ini->path_icones; ?>/<?php echo $this->Ini->Err_ico_title; ?>" style="border-width: 0px" align="top"></td><?php } ?><td class="scFormErrorTitle"><table style="border-collapse: collapse; border-width: 0px; width: 100%"><tr><td class="scFormErrorTitleFont" style="padding: 0px; vertical-align: top; width: 100%"><?php if (!$this->Ini->Error_icon_span && '' != $this->Ini->Err_ico_title) { ?><img src="<?php echo $this->Ini->path_icones; ?>/<?php echo $this->Ini->Err_ico_title; ?>" style="border-width: 0px" align="top">&nbsp;<?php } ?><?php echo $this->Ini->Nm_lang['lang_errm_errt'] ?></td><td style="padding: 0px; vertical-align: top"><?php echo nmButtonOutput($this->arr_buttons, "berrm_clse", "scAjaxHideErrorDisplay('table')", "scAjaxHideErrorDisplay('table')", "", "", "", "", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
</td></tr></table></td></tr>
<tr><td class="scFormErrorMessage"><span id="id_error_display_table_text"></span></td></tr>
</table>
</div>
<div style="display: none; position: absolute" id="id_message_display_frame">
 <table class="scFormMessageTable" id="id_message_display_content" style="width: 100%">
  <tr id="id_message_display_title_line">
   <td class="scFormMessageTitle" style="height: 20px"><?php
if ('' != $this->Ini->Msg_ico_title) {
?>
<img src="<?php echo $this->Ini->path_icones . '/' . $this->Ini->Msg_ico_title; ?>" style="border-width: 0px; vertical-align: middle">&nbsp;<?php
}
?>
<?php echo nmButtonOutput($this->arr_buttons, "bmessageclose", "_scAjaxMessageBtnClose()", "_scAjaxMessageBtnClose()", "id_message_display_close_icon", "", "", "float: right", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
<span id="id_message_display_title" style="vertical-align: middle"></span></td>
  </tr>
  <tr>
   <td class="scFormMessageMessage"><?php
if ('' != $this->Ini->Msg_ico_body) {
?>
<img id="id_message_display_body_icon" src="<?php echo $this->Ini->path_icones . '/' . $this->Ini->Msg_ico_body; ?>" style="border-width: 0px; vertical-align: middle">&nbsp;<?php
}
?>
<span id="id_message_display_text"></span><div id="id_message_display_buttond" style="display: none; text-align: center"><br /><input id="id_message_display_buttone" type="button" class="scButton_default" value="Ok" onClick="_scAjaxMessageBtnClick()" ></div></td>
  </tr>
 </table>
</div>
<script type="text/javascript">
var scMsgDefTitle = "<?php echo $this->Ini->Nm_lang['lang_usr_lang_othr_msgs_titl']; ?>";
var scMsgDefButton = "Ok";
var scMsgDefClick = "close";
var scMsgDefScInit = "<?php echo $this->Ini->page; ?>";
</script>
<table id="main_table_form"  align="center" cellpadding="<?php echo $int_iframe_padding; ?>" cellspacing=0 class="scFormBorder" >
<?php
  if (!$this->Embutida_call && (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['mostra_cab']) || $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['mostra_cab'] != "N"))
  {
?>
<tr><td>
<style>
#lin1_col1 { padding-left:9px; padding-top:7px;  height:27px; overflow:hidden; text-align:left;}			 
#lin1_col2 { padding-right:9px; padding-top:7px; height:27px; text-align:right; overflow:hidden;   font-size:12px; font-weight:normal;}
</style>

<div style="width: 100%">
 <div class="scFormHeader" style="height:11px; display: block; border-width:0px; "></div>
 <div style="height:37px; border-width:0px 0px 1px 0px;  border-style: dashed; border-color:#ddd; display: block">
 	<table style="width:100%; border-collapse:collapse; padding:0;">
    	<tr>
        	<td id="lin1_col1" class="scFormHeaderFont"><span><?php if ($this->nmgp_opcao == "novo") { echo "" . $this->Ini->Nm_lang['lang_othr_frmi_titl'] . " - grpcs"; } else { echo "" . $this->Ini->Nm_lang['lang_othr_frmu_titl'] . " - grpcs"; } ?></span></td>
            <td id="lin1_col2" class="scFormHeaderFont"><span><?php echo date($this->dateDefaultFormat()); ?></span></td>
        </tr>
    </table>		 
 </div>
</div>
</td></tr>
<?php
  }
?>
<tr><td>
<?php
if (($this->Embutida_form || !$this->Embutida_call || $this->Grid_editavel || $this->Embutida_multi || ($this->Embutida_call && 'on' == $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['embutida_liga_form_btn_nav'])) && $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['run_iframe'] != "R")
{
?>
    <table style="border-collapse: collapse; border-width: 0px; width: 100%"><tr><td class="scFormToolbar" style="padding: 0px; spacing: 0px">
    <table style="border-collapse: collapse; border-width: 0px; width: 100%">
    <tr> 
     <td nowrap align="left" valign="middle" width="33%" class="scFormToolbarPadding"> 
<?php
}
if (($this->Embutida_form || !$this->Embutida_call || $this->Grid_editavel || $this->Embutida_multi || ($this->Embutida_call && 'on' == $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['embutida_liga_form_btn_nav'])) && $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['run_iframe'] != "R")
{
    $NM_btn = false;
      if ($this->nmgp_botoes['qsearch'] == "on" && $opcao_botoes != "novo")
      {
          $OPC_cmp = (isset($_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['fast_search'])) ? $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['fast_search'][0] : "";
          $OPC_arg = (isset($_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['fast_search'])) ? $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['fast_search'][1] : "";
          $OPC_dat = (isset($_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['fast_search'])) ? $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['fast_search'][2] : "";
?> 
           <script type="text/javascript">var change_fast_t = "";</script>
          <input type="hidden" name="nmgp_fast_search_t" value="SC_all_Cmp">
          <input type="hidden" name="nmgp_cond_fast_search_t" value="qp">
          <script type="text/javascript">var scQSInitVal = "<?php echo $OPC_dat ?>";</script>
          <span id="quicksearchph_t">
           <input type="text" id="SC_fast_search_t" class="scFormToolbarInput" style="vertical-align: middle" name="nmgp_arg_fast_search_t" value="<?php echo NM_encode_input($OPC_dat) ?>" size="10" onChange="change_fast_t = 'CH';" alt="{watermark:'<?php echo $this->Ini->Nm_lang['lang_othr_qk_watermark'] ?>', watermarkClass: 'scFormToolbarInputWm', maxLength: 255}">
           <img style="position: absolute; display: none; height: 16px; width: 16px" id="SC_fast_search_close_t" src="<?php echo $this->Ini->path_botoes ?>/<?php echo $this->Ini->Img_qs_clean; ?>" onclick="document.getElementById('SC_fast_search_t').value = ''; nm_move('fast_search', 't');">
           <img style="position: absolute; display: none; height: 16px; width: 16px" id="SC_fast_search_submit_t" src="<?php echo $this->Ini->path_botoes ?>/<?php echo $this->Ini->Img_qs_search; ?>" onclick="scQuickSearchSubmit_t();">
          </span>
<?php 
      }
?> 
     </td> 
     <td nowrap align="center" valign="middle" width="33%" class="scFormToolbarPadding"> 
<?php 
    if ($this->Embutida_form) {
        $sCondStyle = ($this->nmgp_botoes['new'] == "on") ? '' : 'display: none;';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "bnovo", "do_ajax_test_grpcs_editable_grid_add_new_line(); return false;", "do_ajax_test_grpcs_editable_grid_add_new_line(); return false;", "sc_b_new_t", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
    if (($opcao_botoes != "novo") && (!isset($this->Grid_editavel) || !$this->Grid_editavel) && (!$this->Embutida_form) && (!$this->Embutida_call || $this->Embutida_multi)) {
        $sCondStyle = ($this->nmgp_botoes['new'] == "on") ? '' : 'display: none;';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "bnovo", "nm_move ('novo'); return false;", "nm_move ('novo'); return false;", "sc_b_new_t", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
    if (($opcao_botoes == "novo") && (!isset($this->Grid_editavel) || !$this->Grid_editavel) && (!$this->Embutida_form) && (!$this->Embutida_call || $this->Embutida_multi)) {
        $sCondStyle = ($this->nmgp_botoes['insert'] == "on") ? '' : 'display: none;';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "bincluir", "nm_atualiza ('incluir'); return false;", "nm_atualiza ('incluir'); return false;", "sc_b_ins_t", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
    if (($opcao_botoes == "novo") && (!$this->Embutida_call || $this->sc_evento == "novo" || $this->sc_evento == "insert" || $this->sc_evento == "incluir")) {
        $sCondStyle = ($this->nmgp_botoes['insert'] == "on") && ($this->nm_flag_saida_novo != "S" || $this->nmgp_botoes['exit'] != "on") ? '' : 'display: none;';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "bcancelar", "document.F5.submit();return false;", "document.F5.submit();return false;", "sc_b_sai_t", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
    if (($opcao_botoes != "novo") && (!isset($this->Grid_editavel) || !$this->Grid_editavel) && (!$this->Embutida_form) && (!$this->Embutida_call || $this->Embutida_multi)) {
        $sCondStyle = ($this->nmgp_botoes['update'] == "on") ? '' : 'display: none;';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "balterar", "nm_atualiza ('alterar'); return false;", "nm_atualiza ('alterar'); return false;", "sc_b_upd_t", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
?> 
     </td> 
     <td nowrap align="right" valign="middle" width="33%" class="scFormToolbarPadding"> 
<?php 
    if ('' != $this->url_webhelp) {
        $sCondStyle = '';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "bhelp", "window.open('" . $this->url_webhelp. "', '', 'resizable, scrollbars'); ", "window.open('" . $this->url_webhelp. "', '', 'resizable, scrollbars'); ", "", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
    if (($opcao_botoes == "novo") && (isset($_SESSION['scriptcase']['nm_sc_retorno']) && !empty($_SESSION['scriptcase']['nm_sc_retorno']) && ($nm_apl_dependente != 1 || $this->nm_Start_new) && $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['run_iframe'] != "R") && (!$this->Embutida_call)) {
        $sCondStyle = (($this->nm_flag_saida_novo == "S" || ($this->nm_Start_new && !$this->aba_iframe)) && $this->nmgp_botoes['exit'] == "on") ? '' : 'display: none;';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "bvoltar", "document.F5.action='" . $nm_url_saida. "'; document.F5.submit();return false;", "document.F5.action='" . $nm_url_saida. "'; document.F5.submit();return false;", "sc_b_sai_t", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
    if (($opcao_botoes == "novo") && (!isset($_SESSION['scriptcase']['nm_sc_retorno']) || empty($_SESSION['scriptcase']['nm_sc_retorno']) || $nm_apl_dependente == 1 || $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['run_iframe'] == "F" || $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['run_iframe'] == "R") && (!$this->Embutida_call)) {
        $sCondStyle = ($this->nm_flag_saida_novo == "S" && $this->nmgp_botoes['exit'] == "on") ? '' : 'display: none;';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "bvoltar", "document.F5.action='" . $nm_url_saida. "'; document.F5.submit();return false;", "document.F5.action='" . $nm_url_saida. "'; document.F5.submit();return false;", "sc_b_sai_t", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
    if (($opcao_botoes != "novo") && (!$this->Embutida_call)) {
        $sCondStyle = (isset($_SESSION['scriptcase']['nm_sc_retorno']) && !empty($_SESSION['scriptcase']['nm_sc_retorno']) && $nm_apl_dependente != 1 && $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['run_iframe'] != "R" && (!$this->aba_iframe || $this->is_calendar_app) && $this->nmgp_botoes['exit'] == "on") ? '' : 'display: none;';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "bsair", "document.F6.action='" . $nm_url_saida. "'; document.F6.submit(); return false;", "document.F6.action='" . $nm_url_saida. "'; document.F6.submit(); return false;", "sc_b_sai_t", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
    if (($opcao_botoes != "novo") && (!$this->Embutida_call)) {
        $sCondStyle = (!isset($_SESSION['scriptcase']['nm_sc_retorno']) || empty($_SESSION['scriptcase']['nm_sc_retorno']) || $nm_apl_dependente == 1 || $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['run_iframe'] == "F" || $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['run_iframe'] == "R" || $this->aba_iframe || $this->nmgp_botoes['exit'] != "on") && ($_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['run_iframe'] != "R" && $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['run_iframe'] != "F" && $this->nmgp_botoes['exit'] == "on") && ($nm_apl_dependente == 1 && $this->nmgp_botoes['exit'] == "on") ? '' : 'display: none;';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "bvoltar", "document.F6.action='" . $nm_url_saida. "'; document.F6.submit(); return false;", "document.F6.action='" . $nm_url_saida. "'; document.F6.submit(); return false;", "sc_b_sai_t", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
    if (($opcao_botoes != "novo") && (!$this->Embutida_call)) {
        $sCondStyle = (!isset($_SESSION['scriptcase']['nm_sc_retorno']) || empty($_SESSION['scriptcase']['nm_sc_retorno']) || $nm_apl_dependente == 1 || $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['run_iframe'] == "F" || $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['run_iframe'] == "R" || $this->aba_iframe || $this->nmgp_botoes['exit'] != "on") && ($_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['run_iframe'] != "R" && $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['run_iframe'] != "F" && $this->nmgp_botoes['exit'] == "on") && ($nm_apl_dependente != 1 || $this->nmgp_botoes['exit'] != "on") && (!$this->aba_iframe && $this->nmgp_botoes['exit'] == "on") ? '' : 'display: none;';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "bsair", "document.F6.action='" . $nm_url_saida. "'; document.F6.submit(); return false;", "document.F6.action='" . $nm_url_saida. "'; document.F6.submit(); return false;", "sc_b_sai_t", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
}
if (($this->Embutida_form || !$this->Embutida_call || $this->Grid_editavel || $this->Embutida_multi || ($this->Embutida_call && 'on' == $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['embutida_liga_form_btn_nav'])) && $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['run_iframe'] != "R")
{
?>
   </td></tr> 
   </table> 
   </td></tr></table> 
<?php
}
?>
<?php
if (!$NM_btn && isset($NM_ult_sep))
{
    echo "    <script language=\"javascript\">";
    echo "      document.getElementById('" .  $NM_ult_sep . "').style.display='none';";
    echo "    </script>";
}
unset($NM_ult_sep);
?>
<?php if ('novo' != $this->nmgp_opcao || $this->Embutida_form) { ?><script>nav_atualiza(Nav_permite_ret, Nav_permite_ava, 't');</script><?php } ?>
</td></tr> 
<tr><td>
<?php
  if ($this->nmgp_form_empty)
  {
       echo "</td></tr><tr><td align=center>";
       echo "<font face=\"" . $this->Ini->pag_fonte_tipo . "\" color=\"" . $this->Ini->cor_txt_grid . "\" size=\"2\"><b>" . $this->Ini->Nm_lang['lang_errm_empt'] . "</b></font>";
       echo "</td></tr>";
       echo "<tr><td>";
  }
?>
<?php $sc_hidden_no = 1; $sc_hidden_yes = 0; ?>
   <a name="bloco_0"></a>
   <table width="100%" height="100%" cellpadding="0"><tr valign="top"><td width="100%" height="">
<div id="div_hidden_bloco_0"><!-- bloco_c -->
     <div id="SC_tab_mult_reg">
<?php
}

function Form_Table($Table_refresh = false)
{
   global $sc_seq_vert, $nm_apl_dependente, $opcao_botoes, $nm_url_saida; 
   if ($Table_refresh) 
   { 
       ob_start();
   }
?>
<?php
?>
<TABLE align="center" id="hidden_bloco_0" class="scFormTable" width="100%" style="height: 100%;">   <tr>
<?php
$orderColName = '';
$orderColOrient = '';
?>
    <script type="text/javascript">
     var orderImgAsc = "<?php echo $this->Ini->path_img_global . "/" . $this->Ini->Label_sort_asc ?>";
     var orderImgDesc = "<?php echo $this->Ini->path_img_global . "/" . $this->Ini->Label_sort_desc ?>";
     var orderImgNone = "<?php echo $this->Ini->path_img_global . "/" . $this->Ini->Label_sort ?>";
     var orderColName = "";
     function scSetOrderColumn(clickedColumn) {
      $(".sc-ui-img-order-column").attr("src", orderImgNone);
      if (clickedColumn != orderColName) {
       orderColName = clickedColumn;
       orderColOrient = orderImgAsc;
      }
      else if ("" != orderColName) {
       orderColOrient = orderColOrient == orderImgAsc ? orderImgDesc : orderImgAsc;
      }
      else {
       orderColName = "";
       orderColOrient = "";
      }
      $("#sc-id-img-order-" + orderColName).attr("src", orderColOrient);
     }
    </script>
<?php
     $Col_span = "";


       if (!$this->Embutida_form && $this->nmgp_opcao != "novo" && $this->nmgp_botoes['delete'] == "on") { $Col_span = " colspan=2"; }
    if (!$this->Embutida_form && $this->nmgp_opcao == "novo") { $Col_span = " colspan=2"; }
 ?>

    <TD class="scFormLabelOddMult" style="display: none;" <?php echo $Col_span ?>> &nbsp; </TD>
   

   <?php if ($this->Embutida_form && $this->nmgp_botoes['insert'] == "on") {?>
    <TD class="scFormLabelOddMult"  width="10">  </TD>
   <?php }?>

   <?php if ($this->Embutida_form && $this->nmgp_botoes['insert'] != "on") {?>
    <TD class="scFormLabelOddMult"  width="10"> &nbsp; </TD>
   <?php }?>

   <?php if (isset($this->nmgp_cmp_hidden['p_o_number_']) && $this->nmgp_cmp_hidden['p_o_number_'] == 'off') { $sStyleHidden_p_o_number_ = 'display: none'; }
      if (1 || !isset($this->nmgp_cmp_hidden['p_o_number_']) || $this->nmgp_cmp_hidden['p_o_number_'] == 'on') {
      if (!isset($this->nm_new_label['p_o_number_'])) {
          $this->nm_new_label['p_o_number_'] = "P_O_NUMBER"; } ?>

    <TD class="scFormLabelOddMult" id="hidden_field_label_p_o_number_" style=";<?php echo $sStyleHidden_p_o_number_; ?>" > <?php echo $this->nm_new_label['p_o_number_'] ?> </TD>
   <?php } ?>


   <?php if (isset($this->nmgp_cmp_hidden['invoice_']) && $this->nmgp_cmp_hidden['invoice_'] == 'off') { $sStyleHidden_invoice_ = 'display: none'; }
      if (1 || !isset($this->nmgp_cmp_hidden['invoice_']) || $this->nmgp_cmp_hidden['invoice_'] == 'on') {
      if (!isset($this->nm_new_label['invoice_'])) {
          $this->nm_new_label['invoice_'] = "INVOICE"; } ?>

    <TD class="scFormLabelOddMult" id="hidden_field_label_invoice_" style=";<?php echo $sStyleHidden_invoice_; ?>" > <?php echo $this->nm_new_label['invoice_'] ?> </TD>
   <?php } ?>


   <?php if (isset($this->nmgp_cmp_hidden['case_']) && $this->nmgp_cmp_hidden['case_'] == 'off') { $sStyleHidden_case_ = 'display: none'; }
      if (1 || !isset($this->nmgp_cmp_hidden['case_']) || $this->nmgp_cmp_hidden['case_'] == 'on') {
      if (!isset($this->nm_new_label['case_'])) {
          $this->nm_new_label['case_'] = "CASE"; } ?>

    <TD class="scFormLabelOddMult" id="hidden_field_label_case_" style=";<?php echo $sStyleHidden_case_; ?>" > <?php echo $this->nm_new_label['case_'] ?> </TD>
   <?php } ?>


   <?php if (isset($this->nmgp_cmp_hidden['piece_']) && $this->nmgp_cmp_hidden['piece_'] == 'off') { $sStyleHidden_piece_ = 'display: none'; }
      if (1 || !isset($this->nmgp_cmp_hidden['piece_']) || $this->nmgp_cmp_hidden['piece_'] == 'on') {
      if (!isset($this->nm_new_label['piece_'])) {
          $this->nm_new_label['piece_'] = "PIECE"; } ?>

    <TD class="scFormLabelOddMult" id="hidden_field_label_piece_" style=";<?php echo $sStyleHidden_piece_; ?>" > <?php echo $this->nm_new_label['piece_'] ?> </TD>
   <?php } ?>


   <?php if (isset($this->nmgp_cmp_hidden['racks_']) && $this->nmgp_cmp_hidden['racks_'] == 'off') { $sStyleHidden_racks_ = 'display: none'; }
      if (1 || !isset($this->nmgp_cmp_hidden['racks_']) || $this->nmgp_cmp_hidden['racks_'] == 'on') {
      if (!isset($this->nm_new_label['racks_'])) {
          $this->nm_new_label['racks_'] = "RACKS"; } ?>

    <TD class="scFormLabelOddMult" id="hidden_field_label_racks_" style=";<?php echo $sStyleHidden_racks_; ?>" > <?php echo $this->nm_new_label['racks_'] ?> </TD>
   <?php } ?>


   <?php if (isset($this->nmgp_cmp_hidden['lbs_recd_']) && $this->nmgp_cmp_hidden['lbs_recd_'] == 'off') { $sStyleHidden_lbs_recd_ = 'display: none'; }
      if (1 || !isset($this->nmgp_cmp_hidden['lbs_recd_']) || $this->nmgp_cmp_hidden['lbs_recd_'] == 'on') {
      if (!isset($this->nm_new_label['lbs_recd_'])) {
          $this->nm_new_label['lbs_recd_'] = "LBS_RECD"; } ?>

    <TD class="scFormLabelOddMult" id="hidden_field_label_lbs_recd_" style="text-align:right;<?php echo $sStyleHidden_lbs_recd_; ?>" > <?php echo $this->nm_new_label['lbs_recd_'] ?> </TD>
   <?php } ?>


   <?php if (isset($this->nmgp_cmp_hidden['lbs_used_']) && $this->nmgp_cmp_hidden['lbs_used_'] == 'off') { $sStyleHidden_lbs_used_ = 'display: none'; }
      if (1 || !isset($this->nmgp_cmp_hidden['lbs_used_']) || $this->nmgp_cmp_hidden['lbs_used_'] == 'on') {
      if (!isset($this->nm_new_label['lbs_used_'])) {
          $this->nm_new_label['lbs_used_'] = "LBS_USED"; } ?>

    <TD class="scFormLabelOddMult" id="hidden_field_label_lbs_used_" style="text-align:right;<?php echo $sStyleHidden_lbs_used_; ?>" > <?php echo $this->nm_new_label['lbs_used_'] ?> </TD>
   <?php } ?>


   <?php if (isset($this->nmgp_cmp_hidden['dye_order_']) && $this->nmgp_cmp_hidden['dye_order_'] == 'off') { $sStyleHidden_dye_order_ = 'display: none'; }
      if (1 || !isset($this->nmgp_cmp_hidden['dye_order_']) || $this->nmgp_cmp_hidden['dye_order_'] == 'on') {
      if (!isset($this->nm_new_label['dye_order_'])) {
          $this->nm_new_label['dye_order_'] = "DYE_ORDER"; } ?>

    <TD class="scFormLabelOddMult" id="hidden_field_label_dye_order_" style=";<?php echo $sStyleHidden_dye_order_; ?>" >       
<?php
      $link_img = "";
      $SC_Label = "" . $this->nm_new_label['dye_order_']  . "";
      $nome_img = $this->Ini->Label_sort;
      if ($_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['ordem_cmp'] == "DYE_ORDER")
      {
          $orderColName = "DYE_ORDER";
          if ($_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['ordem_ord'] == " desc")
          {
              $orderColOrient = $nome_img = $this->Ini->Label_sort_desc;
          }
          else
          {
              $orderColOrient = $nome_img = $this->Ini->Label_sort_asc;
          }
      }
      if (empty($this->Ini->Label_sort_pos))
      {
          $this->Ini->Label_sort_pos = "right_field";
      }
      if (empty($nome_img))
      {
          $link_img = $SC_Label;
      }
      elseif ($this->Ini->Label_sort_pos == "right_field")
      {
          $link_img = $SC_Label . "<IMG SRC=\"" . $this->Ini->path_img_global . "/" . $nome_img . "\" BORDER=\"0\" class=\"sc-ui-img-order-column\" id=\"sc-id-img-order-DYE_ORDER\" />";
      }
      elseif ($this->Ini->Label_sort_pos == "left_field")
      {
          $link_img = "<IMG SRC=\"" . $this->Ini->path_img_global . "/" . $nome_img . "\" BORDER=\"0\" class=\"sc-ui-img-order-column\" id=\"sc-id-img-order-DYE_ORDER\" />" . $SC_Label;
      }
      elseif ($this->Ini->Label_sort_pos == "right_cell")
      {
          $link_img = "<IMG style=\"float: right\" SRC=\"" . $this->Ini->path_img_global . "/" . $nome_img . "\" BORDER=\"0\" class=\"sc-ui-img-order-column\" id=\"sc-id-img-order-DYE_ORDER\" />" . $SC_Label;
      }
      elseif ($this->Ini->Label_sort_pos == "left_cell")
      {
          $link_img = "<IMG style=\"float: left\" SRC=\"" . $this->Ini->path_img_global . "/" . $nome_img . "\" BORDER=\"0\" class=\"sc-ui-img-order-column\" id=\"sc-id-img-order-DYE_ORDER\" />" . $SC_Label;
      }
      ?>
<a href="javascript:nm_move('ordem', 'DYE_ORDER')" class="scFormLabelLink scFormLabelLinkOddMult"><?php echo $link_img ?></a> </TD>
   <?php } ?>


   <?php if (isset($this->nmgp_cmp_hidden['adate_']) && $this->nmgp_cmp_hidden['adate_'] == 'off') { $sStyleHidden_adate_ = 'display: none'; }
      if (1 || !isset($this->nmgp_cmp_hidden['adate_']) || $this->nmgp_cmp_hidden['adate_'] == 'on') {
      if (!isset($this->nm_new_label['adate_'])) {
          $this->nm_new_label['adate_'] = "ADATE"; } ?>

    <TD class="scFormLabelOddMult" id="hidden_field_label_adate_" style=";<?php echo $sStyleHidden_adate_; ?>" > <?php echo $this->nm_new_label['adate_'] ?> </TD>
   <?php } ?>


   <?php if (isset($this->nmgp_cmp_hidden['edate_']) && $this->nmgp_cmp_hidden['edate_'] == 'off') { $sStyleHidden_edate_ = 'display: none'; }
      if (1 || !isset($this->nmgp_cmp_hidden['edate_']) || $this->nmgp_cmp_hidden['edate_'] == 'on') {
      if (!isset($this->nm_new_label['edate_'])) {
          $this->nm_new_label['edate_'] = "EDATE"; } ?>

    <TD class="scFormLabelOddMult" id="hidden_field_label_edate_" style=";<?php echo $sStyleHidden_edate_; ?>" > <?php echo $this->nm_new_label['edate_'] ?> </TD>
   <?php } ?>


   <?php if (isset($this->nmgp_cmp_hidden['ddate_']) && $this->nmgp_cmp_hidden['ddate_'] == 'off') { $sStyleHidden_ddate_ = 'display: none'; }
      if (1 || !isset($this->nmgp_cmp_hidden['ddate_']) || $this->nmgp_cmp_hidden['ddate_'] == 'on') {
      if (!isset($this->nm_new_label['ddate_'])) {
          $this->nm_new_label['ddate_'] = "DDATE"; } ?>

    <TD class="scFormLabelOddMult" id="hidden_field_label_ddate_" style=";<?php echo $sStyleHidden_ddate_; ?>" > <?php echo $this->nm_new_label['ddate_'] ?> </TD>
   <?php } ?>


   <?php if (isset($this->nmgp_cmp_hidden['shipto_']) && $this->nmgp_cmp_hidden['shipto_'] == 'off') { $sStyleHidden_shipto_ = 'display: none'; }
      if (1 || !isset($this->nmgp_cmp_hidden['shipto_']) || $this->nmgp_cmp_hidden['shipto_'] == 'on') {
      if (!isset($this->nm_new_label['shipto_'])) {
          $this->nm_new_label['shipto_'] = "SHIPTO"; } ?>

    <TD class="scFormLabelOddMult" id="hidden_field_label_shipto_" style=";<?php echo $sStyleHidden_shipto_; ?>" > <?php echo $this->nm_new_label['shipto_'] ?> </TD>
   <?php } ?>


   <?php if (isset($this->nmgp_cmp_hidden['sdate_']) && $this->nmgp_cmp_hidden['sdate_'] == 'off') { $sStyleHidden_sdate_ = 'display: none'; }
      if (1 || !isset($this->nmgp_cmp_hidden['sdate_']) || $this->nmgp_cmp_hidden['sdate_'] == 'on') {
      if (!isset($this->nm_new_label['sdate_'])) {
          $this->nm_new_label['sdate_'] = "SDATE"; } ?>

    <TD class="scFormLabelOddMult" id="hidden_field_label_sdate_" style=";<?php echo $sStyleHidden_sdate_; ?>" > <?php echo $this->nm_new_label['sdate_'] ?> </TD>
   <?php } ?>


   <?php if (isset($this->nmgp_cmp_hidden['ac_']) && $this->nmgp_cmp_hidden['ac_'] == 'off') { $sStyleHidden_ac_ = 'display: none'; }
      if (1 || !isset($this->nmgp_cmp_hidden['ac_']) || $this->nmgp_cmp_hidden['ac_'] == 'on') {
      if (!isset($this->nm_new_label['ac_'])) {
          $this->nm_new_label['ac_'] = "AC"; } ?>

    <TD class="scFormLabelOddMult" id="hidden_field_label_ac_" style=";<?php echo $sStyleHidden_ac_; ?>" > <?php echo $this->nm_new_label['ac_'] ?> </TD>
   <?php } ?>


   <?php if (isset($this->nmgp_cmp_hidden['defects_']) && $this->nmgp_cmp_hidden['defects_'] == 'off') { $sStyleHidden_defects_ = 'display: none'; }
      if (1 || !isset($this->nmgp_cmp_hidden['defects_']) || $this->nmgp_cmp_hidden['defects_'] == 'on') {
      if (!isset($this->nm_new_label['defects_'])) {
          $this->nm_new_label['defects_'] = "DEFECTS"; } ?>

    <TD class="scFormLabelOddMult" id="hidden_field_label_defects_" style="text-align:right;<?php echo $sStyleHidden_defects_; ?>" > <?php echo $this->nm_new_label['defects_'] ?> </TD>
   <?php } ?>


   <?php if (isset($this->nmgp_cmp_hidden['rpd_']) && $this->nmgp_cmp_hidden['rpd_'] == 'off') { $sStyleHidden_rpd_ = 'display: none'; }
      if (1 || !isset($this->nmgp_cmp_hidden['rpd_']) || $this->nmgp_cmp_hidden['rpd_'] == 'on') {
      if (!isset($this->nm_new_label['rpd_'])) {
          $this->nm_new_label['rpd_'] = "RPD"; } ?>

    <TD class="scFormLabelOddMult" id="hidden_field_label_rpd_" style="text-align:right;<?php echo $sStyleHidden_rpd_; ?>" > <?php echo $this->nm_new_label['rpd_'] ?> </TD>
   <?php } ?>






    <script type="text/javascript">
     var orderColOrient = "<?php echo $orderColOrient ?>";
     scSetOrderColumn("<?php echo $orderColName ?>");
    </script>
   </tr>
<?php   
} 
function Form_Corpo($Line_Add = false, $Table_refresh = false) 
{ 
   global $sc_seq_vert; 
   if ($Line_Add) 
   { 
       ob_start();
       $iStart = sizeof($this->form_vert_test_grpcs_editable_grid);
       $guarda_nmgp_opcao = $this->nmgp_opcao;
       $guarda_form_vert_test_grpcs_editable_grid = $this->form_vert_test_grpcs_editable_grid;
       $this->nmgp_opcao = 'novo';
   } 
   if ($this->Embutida_form && empty($this->form_vert_test_grpcs_editable_grid))
   {
       $sc_seq_vert = 0;
   }
   foreach ($this->form_vert_test_grpcs_editable_grid as $sc_seq_vert => $sc_lixo)
   {
       if (isset($this->Embutida_ronly) && $this->Embutida_ronly && !$Line_Add)
       {
           $this->nmgp_cmp_readonly['p_o_number_'] = true;
           $this->nmgp_cmp_readonly['invoice_'] = true;
           $this->nmgp_cmp_readonly['case_'] = true;
           $this->nmgp_cmp_readonly['piece_'] = true;
           $this->nmgp_cmp_readonly['racks_'] = true;
           $this->nmgp_cmp_readonly['lbs_recd_'] = true;
           $this->nmgp_cmp_readonly['lbs_used_'] = true;
           $this->nmgp_cmp_readonly['dye_order_'] = true;
           $this->nmgp_cmp_readonly['adate_'] = true;
           $this->nmgp_cmp_readonly['edate_'] = true;
           $this->nmgp_cmp_readonly['ddate_'] = true;
           $this->nmgp_cmp_readonly['shipto_'] = true;
           $this->nmgp_cmp_readonly['sdate_'] = true;
           $this->nmgp_cmp_readonly['ac_'] = true;
           $this->nmgp_cmp_readonly['defects_'] = true;
           $this->nmgp_cmp_readonly['rpd_'] = true;
       }
       elseif ($Line_Add)
       {
           if (!isset($this->nmgp_cmp_readonly['p_o_number_']) || $this->nmgp_cmp_readonly['p_o_number_'] != "on") {$this->nmgp_cmp_readonly['p_o_number_'] = false;}
           if (!isset($this->nmgp_cmp_readonly['invoice_']) || $this->nmgp_cmp_readonly['invoice_'] != "on") {$this->nmgp_cmp_readonly['invoice_'] = false;}
           if (!isset($this->nmgp_cmp_readonly['case_']) || $this->nmgp_cmp_readonly['case_'] != "on") {$this->nmgp_cmp_readonly['case_'] = false;}
           if (!isset($this->nmgp_cmp_readonly['piece_']) || $this->nmgp_cmp_readonly['piece_'] != "on") {$this->nmgp_cmp_readonly['piece_'] = false;}
           if (!isset($this->nmgp_cmp_readonly['racks_']) || $this->nmgp_cmp_readonly['racks_'] != "on") {$this->nmgp_cmp_readonly['racks_'] = false;}
           if (!isset($this->nmgp_cmp_readonly['lbs_recd_']) || $this->nmgp_cmp_readonly['lbs_recd_'] != "on") {$this->nmgp_cmp_readonly['lbs_recd_'] = false;}
           if (!isset($this->nmgp_cmp_readonly['lbs_used_']) || $this->nmgp_cmp_readonly['lbs_used_'] != "on") {$this->nmgp_cmp_readonly['lbs_used_'] = false;}
           if (!isset($this->nmgp_cmp_readonly['dye_order_']) || $this->nmgp_cmp_readonly['dye_order_'] != "on") {$this->nmgp_cmp_readonly['dye_order_'] = false;}
           if (!isset($this->nmgp_cmp_readonly['adate_']) || $this->nmgp_cmp_readonly['adate_'] != "on") {$this->nmgp_cmp_readonly['adate_'] = false;}
           if (!isset($this->nmgp_cmp_readonly['edate_']) || $this->nmgp_cmp_readonly['edate_'] != "on") {$this->nmgp_cmp_readonly['edate_'] = false;}
           if (!isset($this->nmgp_cmp_readonly['ddate_']) || $this->nmgp_cmp_readonly['ddate_'] != "on") {$this->nmgp_cmp_readonly['ddate_'] = false;}
           if (!isset($this->nmgp_cmp_readonly['shipto_']) || $this->nmgp_cmp_readonly['shipto_'] != "on") {$this->nmgp_cmp_readonly['shipto_'] = false;}
           if (!isset($this->nmgp_cmp_readonly['sdate_']) || $this->nmgp_cmp_readonly['sdate_'] != "on") {$this->nmgp_cmp_readonly['sdate_'] = false;}
           if (!isset($this->nmgp_cmp_readonly['ac_']) || $this->nmgp_cmp_readonly['ac_'] != "on") {$this->nmgp_cmp_readonly['ac_'] = false;}
           if (!isset($this->nmgp_cmp_readonly['defects_']) || $this->nmgp_cmp_readonly['defects_'] != "on") {$this->nmgp_cmp_readonly['defects_'] = false;}
           if (!isset($this->nmgp_cmp_readonly['rpd_']) || $this->nmgp_cmp_readonly['rpd_'] != "on") {$this->nmgp_cmp_readonly['rpd_'] = false;}
       }
              foreach ($this->form_vert_form_preenchimento[$sc_seq_vert] as $sCmpNome => $mCmpVal)
              {
                  eval("\$this->" . $sCmpNome . " = \$mCmpVal;");
              }
        $this->p_o_number_ = $this->form_vert_test_grpcs_editable_grid[$sc_seq_vert]['p_o_number_']; 
       $p_o_number_ = $this->p_o_number_; 
       $sStyleHidden_p_o_number_ = '';
       if (isset($sCheckRead_p_o_number_))
       {
           unset($sCheckRead_p_o_number_);
       }
       if (isset($this->nmgp_cmp_readonly['p_o_number_']))
       {
           $sCheckRead_p_o_number_ = $this->nmgp_cmp_readonly['p_o_number_'];
       }
       if (isset($this->nmgp_cmp_hidden['p_o_number_']) && $this->nmgp_cmp_hidden['p_o_number_'] == 'off')
       {
           unset($this->nmgp_cmp_hidden['p_o_number_']);
           $sStyleHidden_p_o_number_ = 'display: none;';
       }
       $bTestReadOnly_p_o_number_ = true;
       $sStyleReadLab_p_o_number_ = 'display: none;';
       $sStyleReadInp_p_o_number_ = '';
       if (isset($this->nmgp_cmp_readonly['p_o_number_']) && $this->nmgp_cmp_readonly['p_o_number_'] == 'on')
       {
           $bTestReadOnly_p_o_number_ = false;
           unset($this->nmgp_cmp_readonly['p_o_number_']);
           $sStyleReadLab_p_o_number_ = '';
           $sStyleReadInp_p_o_number_ = 'display: none;';
       }
       $this->invoice_ = $this->form_vert_test_grpcs_editable_grid[$sc_seq_vert]['invoice_']; 
       $invoice_ = $this->invoice_; 
       $sStyleHidden_invoice_ = '';
       if (isset($sCheckRead_invoice_))
       {
           unset($sCheckRead_invoice_);
       }
       if (isset($this->nmgp_cmp_readonly['invoice_']))
       {
           $sCheckRead_invoice_ = $this->nmgp_cmp_readonly['invoice_'];
       }
       if (isset($this->nmgp_cmp_hidden['invoice_']) && $this->nmgp_cmp_hidden['invoice_'] == 'off')
       {
           unset($this->nmgp_cmp_hidden['invoice_']);
           $sStyleHidden_invoice_ = 'display: none;';
       }
       $bTestReadOnly_invoice_ = true;
       $sStyleReadLab_invoice_ = 'display: none;';
       $sStyleReadInp_invoice_ = '';
       if (isset($this->nmgp_cmp_readonly['invoice_']) && $this->nmgp_cmp_readonly['invoice_'] == 'on')
       {
           $bTestReadOnly_invoice_ = false;
           unset($this->nmgp_cmp_readonly['invoice_']);
           $sStyleReadLab_invoice_ = '';
           $sStyleReadInp_invoice_ = 'display: none;';
       }
       $this->case_ = $this->form_vert_test_grpcs_editable_grid[$sc_seq_vert]['case_']; 
       $case_ = $this->case_; 
       $sStyleHidden_case_ = '';
       if (isset($sCheckRead_case_))
       {
           unset($sCheckRead_case_);
       }
       if (isset($this->nmgp_cmp_readonly['case_']))
       {
           $sCheckRead_case_ = $this->nmgp_cmp_readonly['case_'];
       }
       if (isset($this->nmgp_cmp_hidden['case_']) && $this->nmgp_cmp_hidden['case_'] == 'off')
       {
           unset($this->nmgp_cmp_hidden['case_']);
           $sStyleHidden_case_ = 'display: none;';
       }
       $bTestReadOnly_case_ = true;
       $sStyleReadLab_case_ = 'display: none;';
       $sStyleReadInp_case_ = '';
       if (isset($this->nmgp_cmp_readonly['case_']) && $this->nmgp_cmp_readonly['case_'] == 'on')
       {
           $bTestReadOnly_case_ = false;
           unset($this->nmgp_cmp_readonly['case_']);
           $sStyleReadLab_case_ = '';
           $sStyleReadInp_case_ = 'display: none;';
       }
       $this->piece_ = $this->form_vert_test_grpcs_editable_grid[$sc_seq_vert]['piece_']; 
       $piece_ = $this->piece_; 
       $sStyleHidden_piece_ = '';
       if (isset($sCheckRead_piece_))
       {
           unset($sCheckRead_piece_);
       }
       if (isset($this->nmgp_cmp_readonly['piece_']))
       {
           $sCheckRead_piece_ = $this->nmgp_cmp_readonly['piece_'];
       }
       if (isset($this->nmgp_cmp_hidden['piece_']) && $this->nmgp_cmp_hidden['piece_'] == 'off')
       {
           unset($this->nmgp_cmp_hidden['piece_']);
           $sStyleHidden_piece_ = 'display: none;';
       }
       $bTestReadOnly_piece_ = true;
       $sStyleReadLab_piece_ = 'display: none;';
       $sStyleReadInp_piece_ = '';
       if (isset($this->nmgp_cmp_readonly['piece_']) && $this->nmgp_cmp_readonly['piece_'] == 'on')
       {
           $bTestReadOnly_piece_ = false;
           unset($this->nmgp_cmp_readonly['piece_']);
           $sStyleReadLab_piece_ = '';
           $sStyleReadInp_piece_ = 'display: none;';
       }
       $this->racks_ = $this->form_vert_test_grpcs_editable_grid[$sc_seq_vert]['racks_']; 
       $racks_ = $this->racks_; 
       $sStyleHidden_racks_ = '';
       if (isset($sCheckRead_racks_))
       {
           unset($sCheckRead_racks_);
       }
       if (isset($this->nmgp_cmp_readonly['racks_']))
       {
           $sCheckRead_racks_ = $this->nmgp_cmp_readonly['racks_'];
       }
       if (isset($this->nmgp_cmp_hidden['racks_']) && $this->nmgp_cmp_hidden['racks_'] == 'off')
       {
           unset($this->nmgp_cmp_hidden['racks_']);
           $sStyleHidden_racks_ = 'display: none;';
       }
       $bTestReadOnly_racks_ = true;
       $sStyleReadLab_racks_ = 'display: none;';
       $sStyleReadInp_racks_ = '';
       if (isset($this->nmgp_cmp_readonly['racks_']) && $this->nmgp_cmp_readonly['racks_'] == 'on')
       {
           $bTestReadOnly_racks_ = false;
           unset($this->nmgp_cmp_readonly['racks_']);
           $sStyleReadLab_racks_ = '';
           $sStyleReadInp_racks_ = 'display: none;';
       }
       $this->lbs_recd_ = $this->form_vert_test_grpcs_editable_grid[$sc_seq_vert]['lbs_recd_']; 
       $lbs_recd_ = $this->lbs_recd_; 
       $sStyleHidden_lbs_recd_ = '';
       if (isset($sCheckRead_lbs_recd_))
       {
           unset($sCheckRead_lbs_recd_);
       }
       if (isset($this->nmgp_cmp_readonly['lbs_recd_']))
       {
           $sCheckRead_lbs_recd_ = $this->nmgp_cmp_readonly['lbs_recd_'];
       }
       if (isset($this->nmgp_cmp_hidden['lbs_recd_']) && $this->nmgp_cmp_hidden['lbs_recd_'] == 'off')
       {
           unset($this->nmgp_cmp_hidden['lbs_recd_']);
           $sStyleHidden_lbs_recd_ = 'display: none;';
       }
       $bTestReadOnly_lbs_recd_ = true;
       $sStyleReadLab_lbs_recd_ = 'display: none;';
       $sStyleReadInp_lbs_recd_ = '';
       if (isset($this->nmgp_cmp_readonly['lbs_recd_']) && $this->nmgp_cmp_readonly['lbs_recd_'] == 'on')
       {
           $bTestReadOnly_lbs_recd_ = false;
           unset($this->nmgp_cmp_readonly['lbs_recd_']);
           $sStyleReadLab_lbs_recd_ = '';
           $sStyleReadInp_lbs_recd_ = 'display: none;';
       }
       $this->lbs_used_ = $this->form_vert_test_grpcs_editable_grid[$sc_seq_vert]['lbs_used_']; 
       $lbs_used_ = $this->lbs_used_; 
       $sStyleHidden_lbs_used_ = '';
       if (isset($sCheckRead_lbs_used_))
       {
           unset($sCheckRead_lbs_used_);
       }
       if (isset($this->nmgp_cmp_readonly['lbs_used_']))
       {
           $sCheckRead_lbs_used_ = $this->nmgp_cmp_readonly['lbs_used_'];
       }
       if (isset($this->nmgp_cmp_hidden['lbs_used_']) && $this->nmgp_cmp_hidden['lbs_used_'] == 'off')
       {
           unset($this->nmgp_cmp_hidden['lbs_used_']);
           $sStyleHidden_lbs_used_ = 'display: none;';
       }
       $bTestReadOnly_lbs_used_ = true;
       $sStyleReadLab_lbs_used_ = 'display: none;';
       $sStyleReadInp_lbs_used_ = '';
       if (isset($this->nmgp_cmp_readonly['lbs_used_']) && $this->nmgp_cmp_readonly['lbs_used_'] == 'on')
       {
           $bTestReadOnly_lbs_used_ = false;
           unset($this->nmgp_cmp_readonly['lbs_used_']);
           $sStyleReadLab_lbs_used_ = '';
           $sStyleReadInp_lbs_used_ = 'display: none;';
       }
       $this->dye_order_ = $this->form_vert_test_grpcs_editable_grid[$sc_seq_vert]['dye_order_']; 
       $dye_order_ = $this->dye_order_; 
       $sStyleHidden_dye_order_ = '';
       if (isset($sCheckRead_dye_order_))
       {
           unset($sCheckRead_dye_order_);
       }
       if (isset($this->nmgp_cmp_readonly['dye_order_']))
       {
           $sCheckRead_dye_order_ = $this->nmgp_cmp_readonly['dye_order_'];
       }
       if (isset($this->nmgp_cmp_hidden['dye_order_']) && $this->nmgp_cmp_hidden['dye_order_'] == 'off')
       {
           unset($this->nmgp_cmp_hidden['dye_order_']);
           $sStyleHidden_dye_order_ = 'display: none;';
       }
       $bTestReadOnly_dye_order_ = true;
       $sStyleReadLab_dye_order_ = 'display: none;';
       $sStyleReadInp_dye_order_ = '';
       if (isset($this->nmgp_cmp_readonly['dye_order_']) && $this->nmgp_cmp_readonly['dye_order_'] == 'on')
       {
           $bTestReadOnly_dye_order_ = false;
           unset($this->nmgp_cmp_readonly['dye_order_']);
           $sStyleReadLab_dye_order_ = '';
           $sStyleReadInp_dye_order_ = 'display: none;';
       }
       $this->adate_ = $this->form_vert_test_grpcs_editable_grid[$sc_seq_vert]['adate_']; 
       $adate_ = $this->adate_; 
       $sStyleHidden_adate_ = '';
       if (isset($sCheckRead_adate_))
       {
           unset($sCheckRead_adate_);
       }
       if (isset($this->nmgp_cmp_readonly['adate_']))
       {
           $sCheckRead_adate_ = $this->nmgp_cmp_readonly['adate_'];
       }
       if (isset($this->nmgp_cmp_hidden['adate_']) && $this->nmgp_cmp_hidden['adate_'] == 'off')
       {
           unset($this->nmgp_cmp_hidden['adate_']);
           $sStyleHidden_adate_ = 'display: none;';
       }
       $bTestReadOnly_adate_ = true;
       $sStyleReadLab_adate_ = 'display: none;';
       $sStyleReadInp_adate_ = '';
       if (isset($this->nmgp_cmp_readonly['adate_']) && $this->nmgp_cmp_readonly['adate_'] == 'on')
       {
           $bTestReadOnly_adate_ = false;
           unset($this->nmgp_cmp_readonly['adate_']);
           $sStyleReadLab_adate_ = '';
           $sStyleReadInp_adate_ = 'display: none;';
       }
       $this->edate_ = $this->form_vert_test_grpcs_editable_grid[$sc_seq_vert]['edate_']; 
       $edate_ = $this->edate_; 
       $sStyleHidden_edate_ = '';
       if (isset($sCheckRead_edate_))
       {
           unset($sCheckRead_edate_);
       }
       if (isset($this->nmgp_cmp_readonly['edate_']))
       {
           $sCheckRead_edate_ = $this->nmgp_cmp_readonly['edate_'];
       }
       if (isset($this->nmgp_cmp_hidden['edate_']) && $this->nmgp_cmp_hidden['edate_'] == 'off')
       {
           unset($this->nmgp_cmp_hidden['edate_']);
           $sStyleHidden_edate_ = 'display: none;';
       }
       $bTestReadOnly_edate_ = true;
       $sStyleReadLab_edate_ = 'display: none;';
       $sStyleReadInp_edate_ = '';
       if (isset($this->nmgp_cmp_readonly['edate_']) && $this->nmgp_cmp_readonly['edate_'] == 'on')
       {
           $bTestReadOnly_edate_ = false;
           unset($this->nmgp_cmp_readonly['edate_']);
           $sStyleReadLab_edate_ = '';
           $sStyleReadInp_edate_ = 'display: none;';
       }
       $this->ddate_ = $this->form_vert_test_grpcs_editable_grid[$sc_seq_vert]['ddate_']; 
       $ddate_ = $this->ddate_; 
       $sStyleHidden_ddate_ = '';
       if (isset($sCheckRead_ddate_))
       {
           unset($sCheckRead_ddate_);
       }
       if (isset($this->nmgp_cmp_readonly['ddate_']))
       {
           $sCheckRead_ddate_ = $this->nmgp_cmp_readonly['ddate_'];
       }
       if (isset($this->nmgp_cmp_hidden['ddate_']) && $this->nmgp_cmp_hidden['ddate_'] == 'off')
       {
           unset($this->nmgp_cmp_hidden['ddate_']);
           $sStyleHidden_ddate_ = 'display: none;';
       }
       $bTestReadOnly_ddate_ = true;
       $sStyleReadLab_ddate_ = 'display: none;';
       $sStyleReadInp_ddate_ = '';
       if (isset($this->nmgp_cmp_readonly['ddate_']) && $this->nmgp_cmp_readonly['ddate_'] == 'on')
       {
           $bTestReadOnly_ddate_ = false;
           unset($this->nmgp_cmp_readonly['ddate_']);
           $sStyleReadLab_ddate_ = '';
           $sStyleReadInp_ddate_ = 'display: none;';
       }
       $this->shipto_ = $this->form_vert_test_grpcs_editable_grid[$sc_seq_vert]['shipto_']; 
       $shipto_ = $this->shipto_; 
       $sStyleHidden_shipto_ = '';
       if (isset($sCheckRead_shipto_))
       {
           unset($sCheckRead_shipto_);
       }
       if (isset($this->nmgp_cmp_readonly['shipto_']))
       {
           $sCheckRead_shipto_ = $this->nmgp_cmp_readonly['shipto_'];
       }
       if (isset($this->nmgp_cmp_hidden['shipto_']) && $this->nmgp_cmp_hidden['shipto_'] == 'off')
       {
           unset($this->nmgp_cmp_hidden['shipto_']);
           $sStyleHidden_shipto_ = 'display: none;';
       }
       $bTestReadOnly_shipto_ = true;
       $sStyleReadLab_shipto_ = 'display: none;';
       $sStyleReadInp_shipto_ = '';
       if (isset($this->nmgp_cmp_readonly['shipto_']) && $this->nmgp_cmp_readonly['shipto_'] == 'on')
       {
           $bTestReadOnly_shipto_ = false;
           unset($this->nmgp_cmp_readonly['shipto_']);
           $sStyleReadLab_shipto_ = '';
           $sStyleReadInp_shipto_ = 'display: none;';
       }
       $this->sdate_ = $this->form_vert_test_grpcs_editable_grid[$sc_seq_vert]['sdate_']; 
       $sdate_ = $this->sdate_; 
       $sStyleHidden_sdate_ = '';
       if (isset($sCheckRead_sdate_))
       {
           unset($sCheckRead_sdate_);
       }
       if (isset($this->nmgp_cmp_readonly['sdate_']))
       {
           $sCheckRead_sdate_ = $this->nmgp_cmp_readonly['sdate_'];
       }
       if (isset($this->nmgp_cmp_hidden['sdate_']) && $this->nmgp_cmp_hidden['sdate_'] == 'off')
       {
           unset($this->nmgp_cmp_hidden['sdate_']);
           $sStyleHidden_sdate_ = 'display: none;';
       }
       $bTestReadOnly_sdate_ = true;
       $sStyleReadLab_sdate_ = 'display: none;';
       $sStyleReadInp_sdate_ = '';
       if (isset($this->nmgp_cmp_readonly['sdate_']) && $this->nmgp_cmp_readonly['sdate_'] == 'on')
       {
           $bTestReadOnly_sdate_ = false;
           unset($this->nmgp_cmp_readonly['sdate_']);
           $sStyleReadLab_sdate_ = '';
           $sStyleReadInp_sdate_ = 'display: none;';
       }
       $this->ac_ = $this->form_vert_test_grpcs_editable_grid[$sc_seq_vert]['ac_']; 
       $ac_ = $this->ac_; 
       $sStyleHidden_ac_ = '';
       if (isset($sCheckRead_ac_))
       {
           unset($sCheckRead_ac_);
       }
       if (isset($this->nmgp_cmp_readonly['ac_']))
       {
           $sCheckRead_ac_ = $this->nmgp_cmp_readonly['ac_'];
       }
       if (isset($this->nmgp_cmp_hidden['ac_']) && $this->nmgp_cmp_hidden['ac_'] == 'off')
       {
           unset($this->nmgp_cmp_hidden['ac_']);
           $sStyleHidden_ac_ = 'display: none;';
       }
       $bTestReadOnly_ac_ = true;
       $sStyleReadLab_ac_ = 'display: none;';
       $sStyleReadInp_ac_ = '';
       if (isset($this->nmgp_cmp_readonly['ac_']) && $this->nmgp_cmp_readonly['ac_'] == 'on')
       {
           $bTestReadOnly_ac_ = false;
           unset($this->nmgp_cmp_readonly['ac_']);
           $sStyleReadLab_ac_ = '';
           $sStyleReadInp_ac_ = 'display: none;';
       }
       $this->defects_ = $this->form_vert_test_grpcs_editable_grid[$sc_seq_vert]['defects_']; 
       $defects_ = $this->defects_; 
       $sStyleHidden_defects_ = '';
       if (isset($sCheckRead_defects_))
       {
           unset($sCheckRead_defects_);
       }
       if (isset($this->nmgp_cmp_readonly['defects_']))
       {
           $sCheckRead_defects_ = $this->nmgp_cmp_readonly['defects_'];
       }
       if (isset($this->nmgp_cmp_hidden['defects_']) && $this->nmgp_cmp_hidden['defects_'] == 'off')
       {
           unset($this->nmgp_cmp_hidden['defects_']);
           $sStyleHidden_defects_ = 'display: none;';
       }
       $bTestReadOnly_defects_ = true;
       $sStyleReadLab_defects_ = 'display: none;';
       $sStyleReadInp_defects_ = '';
       if (isset($this->nmgp_cmp_readonly['defects_']) && $this->nmgp_cmp_readonly['defects_'] == 'on')
       {
           $bTestReadOnly_defects_ = false;
           unset($this->nmgp_cmp_readonly['defects_']);
           $sStyleReadLab_defects_ = '';
           $sStyleReadInp_defects_ = 'display: none;';
       }
       $this->rpd_ = $this->form_vert_test_grpcs_editable_grid[$sc_seq_vert]['rpd_']; 
       $rpd_ = $this->rpd_; 
       $sStyleHidden_rpd_ = '';
       if (isset($sCheckRead_rpd_))
       {
           unset($sCheckRead_rpd_);
       }
       if (isset($this->nmgp_cmp_readonly['rpd_']))
       {
           $sCheckRead_rpd_ = $this->nmgp_cmp_readonly['rpd_'];
       }
       if (isset($this->nmgp_cmp_hidden['rpd_']) && $this->nmgp_cmp_hidden['rpd_'] == 'off')
       {
           unset($this->nmgp_cmp_hidden['rpd_']);
           $sStyleHidden_rpd_ = 'display: none;';
       }
       $bTestReadOnly_rpd_ = true;
       $sStyleReadLab_rpd_ = 'display: none;';
       $sStyleReadInp_rpd_ = '';
       if (isset($this->nmgp_cmp_readonly['rpd_']) && $this->nmgp_cmp_readonly['rpd_'] == 'on')
       {
           $bTestReadOnly_rpd_ = false;
           unset($this->nmgp_cmp_readonly['rpd_']);
           $sStyleReadLab_rpd_ = '';
           $sStyleReadInp_rpd_ = 'display: none;';
       }

       $nm_cor_fun_vert = ($nm_cor_fun_vert == $this->Ini->cor_grid_impar ? $this->Ini->cor_grid_par : $this->Ini->cor_grid_impar);
       $nm_img_fun_cel  = ($nm_img_fun_cel  == $this->Ini->img_fun_imp    ? $this->Ini->img_fun_par  : $this->Ini->img_fun_imp);

       $sHideNewLine = '';
?>   
   <tr id="idVertRow<?php echo $sc_seq_vert; ?>"<?php echo $sHideNewLine; ?>>


   
    <TD class="scFormDataOddMult"  id="hidden_field_data_sc_seq<?php echo $sc_seq_vert; ?>"  style="display: none;"> <?php echo $sc_seq_vert; ?> </TD>
   

   <?php if (!$this->Embutida_form && $this->nmgp_opcao != "novo" && $this->nmgp_botoes['delete'] == "on") {?>
    <TD class="scFormDataOddMult" > 
<input type=checkbox name="sc_check_vert[<?php echo $sc_seq_vert ?>]" value="<?php echo $sc_seq_vert . "\""; if (in_array($sc_seq_vert, $sc_check_excl)) { echo " checked";} ?> onclick="if (this.checked) {sc_quant_excl++; } else {sc_quant_excl--; }"> </TD>
   <?php }?>

   <?php if (!$this->Embutida_form && $this->nmgp_opcao == "novo") {?>
    <TD class="scFormDataOddMult" > 
<input type=checkbox name="sc_check_vert[<?php echo $sc_seq_vert ?>]" value="<?php echo $sc_seq_vert . "\"" ; if (in_array($sc_seq_vert, $sc_check_incl)) { echo " checked";} ?>> </TD>
   <?php }?>

   <?php if ($this->Embutida_form) {?>
    <TD class="scFormDataOddMult"  id="hidden_field_data_sc_actions<?php echo $sc_seq_vert; ?>" NOWRAP> <?php if ($this->nmgp_botoes['delete'] == "on" && $this->nmgp_opcao != "novo") {?>
<?php echo nmButtonOutput($this->arr_buttons, "bmd_excluir", "nm_atualiza_line('excluir', " . $sc_seq_vert . ")", "nm_atualiza_line('excluir', " . $sc_seq_vert . ")", "sc_exc_line_" . $sc_seq_vert . "", "", "", "display: ''", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
<?php }?>

<?php
if ($this->nmgp_botoes['update'] == "on" && $this->nmgp_opcao != "novo") {
    if ($this->Embutida_ronly) {
?>
<?php echo nmButtonOutput($this->arr_buttons, "bmd_edit", "mdOpenLine(" . $sc_seq_vert . ")", "mdOpenLine(" . $sc_seq_vert . ")", "sc_open_line_" . $sc_seq_vert . "", "", "", "", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
<?php
        $sButDisp = 'display: none';
    }
    else
    {
        $sButDisp = '';
    }
?>
<?php echo nmButtonOutput($this->arr_buttons, "bmd_alterar", "findPos(this); nm_atualiza_line('alterar', " . $sc_seq_vert . ")", "findPos(this); nm_atualiza_line('alterar', " . $sc_seq_vert . ")", "sc_upd_line_" . $sc_seq_vert . "", "", "", "" . $sButDisp. "", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
<?php
}
?>

<?php if ($this->nmgp_botoes['insert'] == "on" && $this->nmgp_opcao == "novo") {?>
<?php echo nmButtonOutput($this->arr_buttons, "bmd_incluir", "findPos(this); nm_atualiza_line('incluir', " . $sc_seq_vert . ")", "findPos(this); nm_atualiza_line('incluir', " . $sc_seq_vert . ")", "sc_ins_line_" . $sc_seq_vert . "", "", "", "display: ''", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
<?php if ($this->nmgp_botoes['delete'] == "on") {?>
<?php echo nmButtonOutput($this->arr_buttons, "bmd_excluir", "nm_atualiza_line('excluir', " . $sc_seq_vert . ")", "nm_atualiza_line('excluir', " . $sc_seq_vert . ")", "sc_exc_line_" . $sc_seq_vert . "", "", "", "display: none", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
<?php }?>

<?php if ($Line_Add && $this->Embutida_ronly) {?>
<?php echo nmButtonOutput($this->arr_buttons, "bmd_edit", "mdOpenLine(" . $sc_seq_vert . ")", "mdOpenLine(" . $sc_seq_vert . ")", "sc_open_line_" . $sc_seq_vert . "", "", "", "display: none", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
<?php }?>

<?php if ($this->nmgp_botoes['update'] == "on") {?>
<?php echo nmButtonOutput($this->arr_buttons, "bmd_alterar", "findPos(this); nm_atualiza_line('alterar', " . $sc_seq_vert . ")", "findPos(this); nm_atualiza_line('alterar', " . $sc_seq_vert . ")", "sc_upd_line_" . $sc_seq_vert . "", "", "", "display: none", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
<?php }?>
<?php }?>
<?php if ($this->nmgp_botoes['insert'] == "on") {?>
<?php echo nmButtonOutput($this->arr_buttons, "bmd_novo", "do_ajax_test_grpcs_editable_grid_add_new_line(" . $sc_seq_vert . ")", "do_ajax_test_grpcs_editable_grid_add_new_line(" . $sc_seq_vert . ")", "sc_new_line_" . $sc_seq_vert . "", "", "", "display: none", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
<?php }?>
<?php
  $Style_add_line = (!$Line_Add) ? "display: none" : "";
?>
<?php echo nmButtonOutput($this->arr_buttons, "bmd_cancelar", "do_ajax_test_grpcs_editable_grid_cancel_insert(" . $sc_seq_vert . ")", "do_ajax_test_grpcs_editable_grid_cancel_insert(" . $sc_seq_vert . ")", "sc_canceli_line_" . $sc_seq_vert . "", "", "", "" . $Style_add_line . "", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
<?php echo nmButtonOutput($this->arr_buttons, "bmd_cancelar", "do_ajax_test_grpcs_editable_grid_cancel_update(" . $sc_seq_vert . ")", "do_ajax_test_grpcs_editable_grid_cancel_update(" . $sc_seq_vert . ")", "sc_cancelu_line_" . $sc_seq_vert . "", "", "", "display: none", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
 </TD>
   <?php }?>

   <?php if (isset($this->nmgp_cmp_hidden['p_o_number_']) && $this->nmgp_cmp_hidden['p_o_number_'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="p_o_number_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($p_o_number_) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOddMult" id="hidden_field_data_p_o_number_<?php echo $sc_seq_vert; ?>" style="<?php echo $sStyleHidden_p_o_number_; ?>;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOddMult" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly_p_o_number_ && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["p_o_number_"]) &&  $this->nmgp_cmp_readonly["p_o_number_"] == "on") { 

 ?>
<input type=hidden name="p_o_number_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($p_o_number_) . "\">" . $p_o_number_ . ""; ?>
<?php } else { ?>
<span id="id_read_on_p_o_number_<?php echo $sc_seq_vert ?>" class="sc-ui-readonly-p_o_number_<?php echo $sc_seq_vert ?>" style=";<?php echo $sStyleReadLab_p_o_number_; ?>"><?php echo NM_encode_input($this->p_o_number_); ?></span><span id="id_read_off_p_o_number_<?php echo $sc_seq_vert ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_p_o_number_; ?>">
 <input class="sc-js-input scFormObjectOddMult" style=";" id="id_sc_field_p_o_number_<?php echo $sc_seq_vert ?>" type=text name="p_o_number_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($p_o_number_) ?>"
 size=5 maxlength=5 alt="{datatype: 'text', maxLength: 5, allowedChars: '', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddMultWm', maskChars: '(){}[].,;:-+/ '}"></span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_p_o_number_<?php echo $sc_seq_vert; ?>_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_p_o_number_<?php echo $sc_seq_vert; ?>_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>


   <?php if (isset($this->nmgp_cmp_hidden['invoice_']) && $this->nmgp_cmp_hidden['invoice_'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="invoice_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($invoice_) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOddMult" id="hidden_field_data_invoice_<?php echo $sc_seq_vert; ?>" style="<?php echo $sStyleHidden_invoice_; ?>;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOddMult" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly_invoice_ && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["invoice_"]) &&  $this->nmgp_cmp_readonly["invoice_"] == "on") { 

 ?>
<input type=hidden name="invoice_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($invoice_) . "\">" . $invoice_ . ""; ?>
<?php } else { ?>
<span id="id_read_on_invoice_<?php echo $sc_seq_vert ?>" class="sc-ui-readonly-invoice_<?php echo $sc_seq_vert ?>" style=";<?php echo $sStyleReadLab_invoice_; ?>"><?php echo NM_encode_input($this->invoice_); ?></span><span id="id_read_off_invoice_<?php echo $sc_seq_vert ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_invoice_; ?>">
 <input class="sc-js-input scFormObjectOddMult" style=";" id="id_sc_field_invoice_<?php echo $sc_seq_vert ?>" type=text name="invoice_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($invoice_) ?>"
 size=8 maxlength=8 alt="{datatype: 'text', maxLength: 8, allowedChars: '', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddMultWm', maskChars: '(){}[].,;:-+/ '}"></span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_invoice_<?php echo $sc_seq_vert; ?>_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_invoice_<?php echo $sc_seq_vert; ?>_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>


   <?php if (isset($this->nmgp_cmp_hidden['case_']) && $this->nmgp_cmp_hidden['case_'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="case_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($case_) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOddMult" id="hidden_field_data_case_<?php echo $sc_seq_vert; ?>" style="<?php echo $sStyleHidden_case_; ?>;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOddMult" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly_case_ && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["case_"]) &&  $this->nmgp_cmp_readonly["case_"] == "on") { 

 ?>
<input type=hidden name="case_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($case_) . "\">" . $case_ . ""; ?>
<?php } else { ?>
<span id="id_read_on_case_<?php echo $sc_seq_vert ?>" class="sc-ui-readonly-case_<?php echo $sc_seq_vert ?>" style=";<?php echo $sStyleReadLab_case_; ?>"><?php echo NM_encode_input($this->case_); ?></span><span id="id_read_off_case_<?php echo $sc_seq_vert ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_case_; ?>">
 <input class="sc-js-input scFormObjectOddMult" style=";" id="id_sc_field_case_<?php echo $sc_seq_vert ?>" type=text name="case_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($case_) ?>"
 size=11 maxlength=11 alt="{datatype: 'text', maxLength: 11, allowedChars: '', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddMultWm', maskChars: '(){}[].,;:-+/ '}"></span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_case_<?php echo $sc_seq_vert; ?>_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_case_<?php echo $sc_seq_vert; ?>_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>


   <?php if (isset($this->nmgp_cmp_hidden['piece_']) && $this->nmgp_cmp_hidden['piece_'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="piece_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($piece_) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOddMult" id="hidden_field_data_piece_<?php echo $sc_seq_vert; ?>" style="<?php echo $sStyleHidden_piece_; ?>;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOddMult" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly_piece_ && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["piece_"]) &&  $this->nmgp_cmp_readonly["piece_"] == "on") { 

 ?>
<input type=hidden name="piece_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($piece_) . "\">" . $piece_ . ""; ?>
<?php } else { ?>
<span id="id_read_on_piece_<?php echo $sc_seq_vert ?>" class="sc-ui-readonly-piece_<?php echo $sc_seq_vert ?>" style=";<?php echo $sStyleReadLab_piece_; ?>"><?php echo NM_encode_input($this->piece_); ?></span><span id="id_read_off_piece_<?php echo $sc_seq_vert ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_piece_; ?>">
 <input class="sc-js-input scFormObjectOddMult" style=";" id="id_sc_field_piece_<?php echo $sc_seq_vert ?>" type=text name="piece_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($piece_) ?>"
 size=11 maxlength=11 alt="{datatype: 'text', maxLength: 11, allowedChars: '', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddMultWm', maskChars: '(){}[].,;:-+/ '}"></span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_piece_<?php echo $sc_seq_vert; ?>_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_piece_<?php echo $sc_seq_vert; ?>_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>


   <?php if (isset($this->nmgp_cmp_hidden['racks_']) && $this->nmgp_cmp_hidden['racks_'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="racks_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($racks_) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOddMult" id="hidden_field_data_racks_<?php echo $sc_seq_vert; ?>" style="<?php echo $sStyleHidden_racks_; ?>;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOddMult" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly_racks_ && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["racks_"]) &&  $this->nmgp_cmp_readonly["racks_"] == "on") { 

 ?>
<input type=hidden name="racks_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($racks_) . "\">" . $racks_ . ""; ?>
<?php } else { ?>
<span id="id_read_on_racks_<?php echo $sc_seq_vert ?>" class="sc-ui-readonly-racks_<?php echo $sc_seq_vert ?>" style=";<?php echo $sStyleReadLab_racks_; ?>"><?php echo NM_encode_input($this->racks_); ?></span><span id="id_read_off_racks_<?php echo $sc_seq_vert ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_racks_; ?>">
 <input class="sc-js-input scFormObjectOddMult" style=";" id="id_sc_field_racks_<?php echo $sc_seq_vert ?>" type=text name="racks_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($racks_) ?>"
 size=4 maxlength=4 alt="{datatype: 'text', maxLength: 4, allowedChars: '', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddMultWm', maskChars: '(){}[].,;:-+/ '}"></span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_racks_<?php echo $sc_seq_vert; ?>_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_racks_<?php echo $sc_seq_vert; ?>_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>


   <?php if (isset($this->nmgp_cmp_hidden['lbs_recd_']) && $this->nmgp_cmp_hidden['lbs_recd_'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="lbs_recd_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($lbs_recd_) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOddMult" id="hidden_field_data_lbs_recd_<?php echo $sc_seq_vert; ?>" style="<?php echo $sStyleHidden_lbs_recd_; ?>text-align:right;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%;float:right"><tr><td  class="scFormDataFontOddMult" style="text-align:right;;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly_lbs_recd_ && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["lbs_recd_"]) &&  $this->nmgp_cmp_readonly["lbs_recd_"] == "on") { 

 ?>
<input type=hidden name="lbs_recd_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($lbs_recd_) . "\">" . $lbs_recd_ . ""; ?>
<?php } else { ?>
<span id="id_read_on_lbs_recd_<?php echo $sc_seq_vert ?>" class="sc-ui-readonly-lbs_recd_<?php echo $sc_seq_vert ?>" style="text-align:right;<?php echo $sStyleReadLab_lbs_recd_; ?>"><?php echo NM_encode_input($this->lbs_recd_); ?></span><span id="id_read_off_lbs_recd_<?php echo $sc_seq_vert ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_lbs_recd_; ?>">
 <input class="sc-js-input scFormObjectOddMult" style="text-align:left;" id="id_sc_field_lbs_recd_<?php echo $sc_seq_vert ?>" type=text name="lbs_recd_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($lbs_recd_) ?>"
 size=9 alt="{datatype: 'integer', maxLength: 9, thousandsSep: '<?php echo str_replace("'", "\'", $this->field_config['lbs_recd_']['symbol_grp']); ?>', thousandsFormat: <?php echo $this->field_config['lbs_recd_']['symbol_fmt']; ?>, allowNegative: false, onlyNegative: false, alignment: 'left', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddMultWm', maskChars: '(){}[].,;:-+/ '}"></span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_lbs_recd_<?php echo $sc_seq_vert; ?>_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_lbs_recd_<?php echo $sc_seq_vert; ?>_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>


   <?php if (isset($this->nmgp_cmp_hidden['lbs_used_']) && $this->nmgp_cmp_hidden['lbs_used_'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="lbs_used_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($lbs_used_) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOddMult" id="hidden_field_data_lbs_used_<?php echo $sc_seq_vert; ?>" style="<?php echo $sStyleHidden_lbs_used_; ?>text-align:right;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%;float:right"><tr><td  class="scFormDataFontOddMult" style="text-align:right;;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly_lbs_used_ && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["lbs_used_"]) &&  $this->nmgp_cmp_readonly["lbs_used_"] == "on") { 

 ?>
<input type=hidden name="lbs_used_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($lbs_used_) . "\">" . $lbs_used_ . ""; ?>
<?php } else { ?>
<span id="id_read_on_lbs_used_<?php echo $sc_seq_vert ?>" class="sc-ui-readonly-lbs_used_<?php echo $sc_seq_vert ?>" style="text-align:right;<?php echo $sStyleReadLab_lbs_used_; ?>"><?php echo NM_encode_input($this->lbs_used_); ?></span><span id="id_read_off_lbs_used_<?php echo $sc_seq_vert ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_lbs_used_; ?>">
 <input class="sc-js-input scFormObjectOddMult" style="text-align:left;" id="id_sc_field_lbs_used_<?php echo $sc_seq_vert ?>" type=text name="lbs_used_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($lbs_used_) ?>"
 size=9 alt="{datatype: 'integer', maxLength: 9, thousandsSep: '<?php echo str_replace("'", "\'", $this->field_config['lbs_used_']['symbol_grp']); ?>', thousandsFormat: <?php echo $this->field_config['lbs_used_']['symbol_fmt']; ?>, allowNegative: false, onlyNegative: false, alignment: 'left', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddMultWm', maskChars: '(){}[].,;:-+/ '}"></span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_lbs_used_<?php echo $sc_seq_vert; ?>_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_lbs_used_<?php echo $sc_seq_vert; ?>_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>


   <?php if (isset($this->nmgp_cmp_hidden['dye_order_']) && $this->nmgp_cmp_hidden['dye_order_'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="dye_order_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($dye_order_) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOddMult" id="hidden_field_data_dye_order_<?php echo $sc_seq_vert; ?>" style="<?php echo $sStyleHidden_dye_order_; ?>;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOddMult" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly_dye_order_ && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["dye_order_"]) &&  $this->nmgp_cmp_readonly["dye_order_"] == "on") { 

 ?>
<input type=hidden name="dye_order_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($dye_order_) . "\">" . $dye_order_ . ""; ?>
<?php } else { ?>
<span id="id_read_on_dye_order_<?php echo $sc_seq_vert ?>" class="sc-ui-readonly-dye_order_<?php echo $sc_seq_vert ?>" style=";<?php echo $sStyleReadLab_dye_order_; ?>"><?php echo NM_encode_input($this->dye_order_); ?></span><span id="id_read_off_dye_order_<?php echo $sc_seq_vert ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_dye_order_; ?>">
 <input class="sc-js-input scFormObjectOddMult" style=";" id="id_sc_field_dye_order_<?php echo $sc_seq_vert ?>" type=text name="dye_order_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($dye_order_) ?>"
 size=5 maxlength=5 alt="{datatype: 'text', maxLength: 5, allowedChars: '', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddMultWm', maskChars: '(){}[].,;:-+/ '}"></span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_dye_order_<?php echo $sc_seq_vert; ?>_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_dye_order_<?php echo $sc_seq_vert; ?>_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>


   <?php if (isset($this->nmgp_cmp_hidden['adate_']) && $this->nmgp_cmp_hidden['adate_'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="adate_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($adate_) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOddMult" id="hidden_field_data_adate_<?php echo $sc_seq_vert; ?>" style="<?php echo $sStyleHidden_adate_; ?>;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOddMult" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly_adate_ && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["adate_"]) &&  $this->nmgp_cmp_readonly["adate_"] == "on") { 

 ?>
<input type=hidden name="adate_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($adate_) . "\">" . $adate_ . ""; ?>
<?php } else { ?>
<span id="id_read_on_adate_<?php echo $sc_seq_vert ?>" class="sc-ui-readonly-adate_<?php echo $sc_seq_vert ?>" style=";<?php echo $sStyleReadLab_adate_; ?>"><?php echo NM_encode_input($this->adate_); ?></span><span id="id_read_off_adate_<?php echo $sc_seq_vert ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_adate_; ?>">
 <input class="sc-js-input scFormObjectOddMult" style=";" id="id_sc_field_adate_<?php echo $sc_seq_vert ?>" type=text name="adate_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($adate_) ?>"
 size=10 alt="{datatype: 'date', dateSep: '<?php echo $this->field_config['adate_']['date_sep']; ?>', dateFormat: '<?php echo $this->field_config['adate_']['date_format']; ?>', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddMultWm', maskChars: '(){}[].,;:-+/ '}"><?php
$tmp_form_data = $this->field_config['adate_']['date_format'];
$tmp_form_data = str_replace('aaaa', 'yyyy', $tmp_form_data);
$tmp_form_data = str_replace('dd'  , $this->Ini->Nm_lang['lang_othr_date_days'], $tmp_form_data);
$tmp_form_data = str_replace('mm'  , $this->Ini->Nm_lang['lang_othr_date_mnth'], $tmp_form_data);
$tmp_form_data = str_replace('yyyy', $this->Ini->Nm_lang['lang_othr_date_year'], $tmp_form_data);
$tmp_form_data = str_replace('hh'  , $this->Ini->Nm_lang['lang_othr_date_hour'], $tmp_form_data);
$tmp_form_data = str_replace('ii'  , $this->Ini->Nm_lang['lang_othr_date_mint'], $tmp_form_data);
$tmp_form_data = str_replace('ss'  , $this->Ini->Nm_lang['lang_othr_date_scnd'], $tmp_form_data);
$tmp_form_data = str_replace(';'   , ' '                                       , $tmp_form_data);
?>
</span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_adate_<?php echo $sc_seq_vert; ?>_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_adate_<?php echo $sc_seq_vert; ?>_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>


   <?php if (isset($this->nmgp_cmp_hidden['edate_']) && $this->nmgp_cmp_hidden['edate_'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="edate_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($edate_) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOddMult" id="hidden_field_data_edate_<?php echo $sc_seq_vert; ?>" style="<?php echo $sStyleHidden_edate_; ?>;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOddMult" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly_edate_ && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["edate_"]) &&  $this->nmgp_cmp_readonly["edate_"] == "on") { 

 ?>
<input type=hidden name="edate_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($edate_) . "\">" . $edate_ . ""; ?>
<?php } else { ?>
<span id="id_read_on_edate_<?php echo $sc_seq_vert ?>" class="sc-ui-readonly-edate_<?php echo $sc_seq_vert ?>" style=";<?php echo $sStyleReadLab_edate_; ?>"><?php echo NM_encode_input($this->edate_); ?></span><span id="id_read_off_edate_<?php echo $sc_seq_vert ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_edate_; ?>">
 <input class="sc-js-input scFormObjectOddMult" style=";" id="id_sc_field_edate_<?php echo $sc_seq_vert ?>" type=text name="edate_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($edate_) ?>"
 size=10 alt="{datatype: 'date', dateSep: '<?php echo $this->field_config['edate_']['date_sep']; ?>', dateFormat: '<?php echo $this->field_config['edate_']['date_format']; ?>', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddMultWm', maskChars: '(){}[].,;:-+/ '}"><?php
$tmp_form_data = $this->field_config['edate_']['date_format'];
$tmp_form_data = str_replace('aaaa', 'yyyy', $tmp_form_data);
$tmp_form_data = str_replace('dd'  , $this->Ini->Nm_lang['lang_othr_date_days'], $tmp_form_data);
$tmp_form_data = str_replace('mm'  , $this->Ini->Nm_lang['lang_othr_date_mnth'], $tmp_form_data);
$tmp_form_data = str_replace('yyyy', $this->Ini->Nm_lang['lang_othr_date_year'], $tmp_form_data);
$tmp_form_data = str_replace('hh'  , $this->Ini->Nm_lang['lang_othr_date_hour'], $tmp_form_data);
$tmp_form_data = str_replace('ii'  , $this->Ini->Nm_lang['lang_othr_date_mint'], $tmp_form_data);
$tmp_form_data = str_replace('ss'  , $this->Ini->Nm_lang['lang_othr_date_scnd'], $tmp_form_data);
$tmp_form_data = str_replace(';'   , ' '                                       , $tmp_form_data);
?>
</span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_edate_<?php echo $sc_seq_vert; ?>_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_edate_<?php echo $sc_seq_vert; ?>_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>


   <?php if (isset($this->nmgp_cmp_hidden['ddate_']) && $this->nmgp_cmp_hidden['ddate_'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="ddate_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($ddate_) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOddMult" id="hidden_field_data_ddate_<?php echo $sc_seq_vert; ?>" style="<?php echo $sStyleHidden_ddate_; ?>;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOddMult" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly_ddate_ && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["ddate_"]) &&  $this->nmgp_cmp_readonly["ddate_"] == "on") { 

 ?>
<input type=hidden name="ddate_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($ddate_) . "\">" . $ddate_ . ""; ?>
<?php } else { ?>
<span id="id_read_on_ddate_<?php echo $sc_seq_vert ?>" class="sc-ui-readonly-ddate_<?php echo $sc_seq_vert ?>" style=";<?php echo $sStyleReadLab_ddate_; ?>"><?php echo NM_encode_input($this->ddate_); ?></span><span id="id_read_off_ddate_<?php echo $sc_seq_vert ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_ddate_; ?>">
 <input class="sc-js-input scFormObjectOddMult" style=";" id="id_sc_field_ddate_<?php echo $sc_seq_vert ?>" type=text name="ddate_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($ddate_) ?>"
 size=10 alt="{datatype: 'date', dateSep: '<?php echo $this->field_config['ddate_']['date_sep']; ?>', dateFormat: '<?php echo $this->field_config['ddate_']['date_format']; ?>', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddMultWm', maskChars: '(){}[].,;:-+/ '}"><?php
$tmp_form_data = $this->field_config['ddate_']['date_format'];
$tmp_form_data = str_replace('aaaa', 'yyyy', $tmp_form_data);
$tmp_form_data = str_replace('dd'  , $this->Ini->Nm_lang['lang_othr_date_days'], $tmp_form_data);
$tmp_form_data = str_replace('mm'  , $this->Ini->Nm_lang['lang_othr_date_mnth'], $tmp_form_data);
$tmp_form_data = str_replace('yyyy', $this->Ini->Nm_lang['lang_othr_date_year'], $tmp_form_data);
$tmp_form_data = str_replace('hh'  , $this->Ini->Nm_lang['lang_othr_date_hour'], $tmp_form_data);
$tmp_form_data = str_replace('ii'  , $this->Ini->Nm_lang['lang_othr_date_mint'], $tmp_form_data);
$tmp_form_data = str_replace('ss'  , $this->Ini->Nm_lang['lang_othr_date_scnd'], $tmp_form_data);
$tmp_form_data = str_replace(';'   , ' '                                       , $tmp_form_data);
?>
</span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_ddate_<?php echo $sc_seq_vert; ?>_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_ddate_<?php echo $sc_seq_vert; ?>_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>


   <?php if (isset($this->nmgp_cmp_hidden['shipto_']) && $this->nmgp_cmp_hidden['shipto_'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="shipto_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($shipto_) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOddMult" id="hidden_field_data_shipto_<?php echo $sc_seq_vert; ?>" style="<?php echo $sStyleHidden_shipto_; ?>;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOddMult" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly_shipto_ && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["shipto_"]) &&  $this->nmgp_cmp_readonly["shipto_"] == "on") { 

 ?>
<input type=hidden name="shipto_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($shipto_) . "\">" . $shipto_ . ""; ?>
<?php } else { ?>
<span id="id_read_on_shipto_<?php echo $sc_seq_vert ?>" class="sc-ui-readonly-shipto_<?php echo $sc_seq_vert ?>" style=";<?php echo $sStyleReadLab_shipto_; ?>"><?php echo NM_encode_input($this->shipto_); ?></span><span id="id_read_off_shipto_<?php echo $sc_seq_vert ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_shipto_; ?>">
 <input class="sc-js-input scFormObjectOddMult" style=";" id="id_sc_field_shipto_<?php echo $sc_seq_vert ?>" type=text name="shipto_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($shipto_) ?>"
 size=4 maxlength=4 alt="{datatype: 'text', maxLength: 4, allowedChars: '', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddMultWm', maskChars: '(){}[].,;:-+/ '}"></span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_shipto_<?php echo $sc_seq_vert; ?>_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_shipto_<?php echo $sc_seq_vert; ?>_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>


   <?php if (isset($this->nmgp_cmp_hidden['sdate_']) && $this->nmgp_cmp_hidden['sdate_'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="sdate_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($sdate_) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOddMult" id="hidden_field_data_sdate_<?php echo $sc_seq_vert; ?>" style="<?php echo $sStyleHidden_sdate_; ?>;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOddMult" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly_sdate_ && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["sdate_"]) &&  $this->nmgp_cmp_readonly["sdate_"] == "on") { 

 ?>
<input type=hidden name="sdate_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($sdate_) . "\">" . $sdate_ . ""; ?>
<?php } else { ?>
<span id="id_read_on_sdate_<?php echo $sc_seq_vert ?>" class="sc-ui-readonly-sdate_<?php echo $sc_seq_vert ?>" style=";<?php echo $sStyleReadLab_sdate_; ?>"><?php echo NM_encode_input($this->sdate_); ?></span><span id="id_read_off_sdate_<?php echo $sc_seq_vert ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_sdate_; ?>">
 <input class="sc-js-input scFormObjectOddMult" style=";" id="id_sc_field_sdate_<?php echo $sc_seq_vert ?>" type=text name="sdate_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($sdate_) ?>"
 size=10 alt="{datatype: 'date', dateSep: '<?php echo $this->field_config['sdate_']['date_sep']; ?>', dateFormat: '<?php echo $this->field_config['sdate_']['date_format']; ?>', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddMultWm', maskChars: '(){}[].,;:-+/ '}"><?php
$tmp_form_data = $this->field_config['sdate_']['date_format'];
$tmp_form_data = str_replace('aaaa', 'yyyy', $tmp_form_data);
$tmp_form_data = str_replace('dd'  , $this->Ini->Nm_lang['lang_othr_date_days'], $tmp_form_data);
$tmp_form_data = str_replace('mm'  , $this->Ini->Nm_lang['lang_othr_date_mnth'], $tmp_form_data);
$tmp_form_data = str_replace('yyyy', $this->Ini->Nm_lang['lang_othr_date_year'], $tmp_form_data);
$tmp_form_data = str_replace('hh'  , $this->Ini->Nm_lang['lang_othr_date_hour'], $tmp_form_data);
$tmp_form_data = str_replace('ii'  , $this->Ini->Nm_lang['lang_othr_date_mint'], $tmp_form_data);
$tmp_form_data = str_replace('ss'  , $this->Ini->Nm_lang['lang_othr_date_scnd'], $tmp_form_data);
$tmp_form_data = str_replace(';'   , ' '                                       , $tmp_form_data);
?>
</span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_sdate_<?php echo $sc_seq_vert; ?>_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_sdate_<?php echo $sc_seq_vert; ?>_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>


   <?php if (isset($this->nmgp_cmp_hidden['ac_']) && $this->nmgp_cmp_hidden['ac_'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="ac_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($ac_) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOddMult" id="hidden_field_data_ac_<?php echo $sc_seq_vert; ?>" style="<?php echo $sStyleHidden_ac_; ?>;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOddMult" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly_ac_ && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["ac_"]) &&  $this->nmgp_cmp_readonly["ac_"] == "on") { 

 ?>
<input type=hidden name="ac_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($ac_) . "\">" . $ac_ . ""; ?>
<?php } else { ?>
<span id="id_read_on_ac_<?php echo $sc_seq_vert ?>" class="sc-ui-readonly-ac_<?php echo $sc_seq_vert ?>" style=";<?php echo $sStyleReadLab_ac_; ?>"><?php echo NM_encode_input($this->ac_); ?></span><span id="id_read_off_ac_<?php echo $sc_seq_vert ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_ac_; ?>">
 <input class="sc-js-input scFormObjectOddMult" style=";" id="id_sc_field_ac_<?php echo $sc_seq_vert ?>" type=text name="ac_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($ac_) ?>"
 size=4 maxlength=4 alt="{datatype: 'text', maxLength: 4, allowedChars: '', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddMultWm', maskChars: '(){}[].,;:-+/ '}"></span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_ac_<?php echo $sc_seq_vert; ?>_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_ac_<?php echo $sc_seq_vert; ?>_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>


   <?php if (isset($this->nmgp_cmp_hidden['defects_']) && $this->nmgp_cmp_hidden['defects_'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="defects_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($defects_) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOddMult" id="hidden_field_data_defects_<?php echo $sc_seq_vert; ?>" style="<?php echo $sStyleHidden_defects_; ?>text-align:right;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%;float:right"><tr><td  class="scFormDataFontOddMult" style="text-align:right;;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly_defects_ && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["defects_"]) &&  $this->nmgp_cmp_readonly["defects_"] == "on") { 

 ?>
<input type=hidden name="defects_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($defects_) . "\">" . $defects_ . ""; ?>
<?php } else { ?>
<span id="id_read_on_defects_<?php echo $sc_seq_vert ?>" class="sc-ui-readonly-defects_<?php echo $sc_seq_vert ?>" style="text-align:right;<?php echo $sStyleReadLab_defects_; ?>"><?php echo NM_encode_input($this->defects_); ?></span><span id="id_read_off_defects_<?php echo $sc_seq_vert ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_defects_; ?>">
 <input class="sc-js-input scFormObjectOddMult" style="text-align:left;" id="id_sc_field_defects_<?php echo $sc_seq_vert ?>" type=text name="defects_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($defects_) ?>"
 size=6 alt="{datatype: 'integer', maxLength: 6, thousandsSep: '<?php echo str_replace("'", "\'", $this->field_config['defects_']['symbol_grp']); ?>', thousandsFormat: <?php echo $this->field_config['defects_']['symbol_fmt']; ?>, allowNegative: false, onlyNegative: false, alignment: 'left', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddMultWm', maskChars: '(){}[].,;:-+/ '}"></span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_defects_<?php echo $sc_seq_vert; ?>_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_defects_<?php echo $sc_seq_vert; ?>_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>


   <?php if (isset($this->nmgp_cmp_hidden['rpd_']) && $this->nmgp_cmp_hidden['rpd_'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="rpd_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($rpd_) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOddMult" id="hidden_field_data_rpd_<?php echo $sc_seq_vert; ?>" style="<?php echo $sStyleHidden_rpd_; ?>text-align:right;"> <table style="border-width: 0px; border-collapse: collapse; width: 100%;float:right"><tr><td  class="scFormDataFontOddMult" style="text-align:right;;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly_rpd_ && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["rpd_"]) &&  $this->nmgp_cmp_readonly["rpd_"] == "on") { 

 ?>
<input type=hidden name="rpd_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($rpd_) . "\">" . $rpd_ . ""; ?>
<?php } else { ?>
<span id="id_read_on_rpd_<?php echo $sc_seq_vert ?>" class="sc-ui-readonly-rpd_<?php echo $sc_seq_vert ?>" style="text-align:right;<?php echo $sStyleReadLab_rpd_; ?>"><?php echo NM_encode_input($this->rpd_); ?></span><span id="id_read_off_rpd_<?php echo $sc_seq_vert ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_rpd_; ?>">
 <input class="sc-js-input scFormObjectOddMult" style="text-align:left;" id="id_sc_field_rpd_<?php echo $sc_seq_vert ?>" type=text name="rpd_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($rpd_) ?>"
 size=11 alt="{datatype: 'integer', maxLength: 11, thousandsSep: '<?php echo str_replace("'", "\'", $this->field_config['rpd_']['symbol_grp']); ?>', thousandsFormat: <?php echo $this->field_config['rpd_']['symbol_fmt']; ?>, allowNegative: false, onlyNegative: false, alignment: 'left', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddMultWm', maskChars: '(){}[].,;:-+/ '}"></span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_rpd_<?php echo $sc_seq_vert; ?>_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_rpd_<?php echo $sc_seq_vert; ?>_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>






   </tr>
<?php   
        if (isset($sCheckRead_p_o_number_))
       {
           $this->nmgp_cmp_readonly['p_o_number_'] = $sCheckRead_p_o_number_;
       }
       if ('display: none;' == $sStyleHidden_p_o_number_)
       {
           $this->nmgp_cmp_hidden['p_o_number_'] = 'off';
       }
       if (isset($sCheckRead_invoice_))
       {
           $this->nmgp_cmp_readonly['invoice_'] = $sCheckRead_invoice_;
       }
       if ('display: none;' == $sStyleHidden_invoice_)
       {
           $this->nmgp_cmp_hidden['invoice_'] = 'off';
       }
       if (isset($sCheckRead_case_))
       {
           $this->nmgp_cmp_readonly['case_'] = $sCheckRead_case_;
       }
       if ('display: none;' == $sStyleHidden_case_)
       {
           $this->nmgp_cmp_hidden['case_'] = 'off';
       }
       if (isset($sCheckRead_piece_))
       {
           $this->nmgp_cmp_readonly['piece_'] = $sCheckRead_piece_;
       }
       if ('display: none;' == $sStyleHidden_piece_)
       {
           $this->nmgp_cmp_hidden['piece_'] = 'off';
       }
       if (isset($sCheckRead_racks_))
       {
           $this->nmgp_cmp_readonly['racks_'] = $sCheckRead_racks_;
       }
       if ('display: none;' == $sStyleHidden_racks_)
       {
           $this->nmgp_cmp_hidden['racks_'] = 'off';
       }
       if (isset($sCheckRead_lbs_recd_))
       {
           $this->nmgp_cmp_readonly['lbs_recd_'] = $sCheckRead_lbs_recd_;
       }
       if ('display: none;' == $sStyleHidden_lbs_recd_)
       {
           $this->nmgp_cmp_hidden['lbs_recd_'] = 'off';
       }
       if (isset($sCheckRead_lbs_used_))
       {
           $this->nmgp_cmp_readonly['lbs_used_'] = $sCheckRead_lbs_used_;
       }
       if ('display: none;' == $sStyleHidden_lbs_used_)
       {
           $this->nmgp_cmp_hidden['lbs_used_'] = 'off';
       }
       if (isset($sCheckRead_dye_order_))
       {
           $this->nmgp_cmp_readonly['dye_order_'] = $sCheckRead_dye_order_;
       }
       if ('display: none;' == $sStyleHidden_dye_order_)
       {
           $this->nmgp_cmp_hidden['dye_order_'] = 'off';
       }
       if (isset($sCheckRead_adate_))
       {
           $this->nmgp_cmp_readonly['adate_'] = $sCheckRead_adate_;
       }
       if ('display: none;' == $sStyleHidden_adate_)
       {
           $this->nmgp_cmp_hidden['adate_'] = 'off';
       }
       if (isset($sCheckRead_edate_))
       {
           $this->nmgp_cmp_readonly['edate_'] = $sCheckRead_edate_;
       }
       if ('display: none;' == $sStyleHidden_edate_)
       {
           $this->nmgp_cmp_hidden['edate_'] = 'off';
       }
       if (isset($sCheckRead_ddate_))
       {
           $this->nmgp_cmp_readonly['ddate_'] = $sCheckRead_ddate_;
       }
       if ('display: none;' == $sStyleHidden_ddate_)
       {
           $this->nmgp_cmp_hidden['ddate_'] = 'off';
       }
       if (isset($sCheckRead_shipto_))
       {
           $this->nmgp_cmp_readonly['shipto_'] = $sCheckRead_shipto_;
       }
       if ('display: none;' == $sStyleHidden_shipto_)
       {
           $this->nmgp_cmp_hidden['shipto_'] = 'off';
       }
       if (isset($sCheckRead_sdate_))
       {
           $this->nmgp_cmp_readonly['sdate_'] = $sCheckRead_sdate_;
       }
       if ('display: none;' == $sStyleHidden_sdate_)
       {
           $this->nmgp_cmp_hidden['sdate_'] = 'off';
       }
       if (isset($sCheckRead_ac_))
       {
           $this->nmgp_cmp_readonly['ac_'] = $sCheckRead_ac_;
       }
       if ('display: none;' == $sStyleHidden_ac_)
       {
           $this->nmgp_cmp_hidden['ac_'] = 'off';
       }
       if (isset($sCheckRead_defects_))
       {
           $this->nmgp_cmp_readonly['defects_'] = $sCheckRead_defects_;
       }
       if ('display: none;' == $sStyleHidden_defects_)
       {
           $this->nmgp_cmp_hidden['defects_'] = 'off';
       }
       if (isset($sCheckRead_rpd_))
       {
           $this->nmgp_cmp_readonly['rpd_'] = $sCheckRead_rpd_;
       }
       if ('display: none;' == $sStyleHidden_rpd_)
       {
           $this->nmgp_cmp_hidden['rpd_'] = 'off';
       }

   }
   if ($Line_Add) 
   { 
       $this->New_Line = ob_get_contents();
       ob_end_clean();
       $this->nmgp_opcao = $guarda_nmgp_opcao;
       $this->form_vert_test_grpcs_editable_grid = $guarda_form_vert_test_grpcs_editable_grid;
   } 
   if ($Table_refresh) 
   { 
       $this->Table_refresh = ob_get_contents();
       ob_end_clean();
   } 
}

function Form_Fim() 
{
   global $sc_seq_vert, $opcao_botoes, $nm_url_saida; 
?>   
</TABLE></div><!-- bloco_f -->
 </div> 
<?php
$iContrVert = $this->Embutida_form ? $sc_seq_vert + 1 : $sc_seq_vert + 1;
if ($sc_seq_vert < $this->sc_max_reg)
{
    echo " <script type=\"text/javascript\">";
    echo "    bRefreshTable = true;";
    echo "</script>";
}
?>
<input type=hidden name="sc_contr_vert" value="<?php echo NM_encode_input($iContrVert); ?>">
<?php
    $sEmptyStyle = 0 == $sc_seq_vert ? '' : 'display: none;';
?>
</td></tr>
<tr id="sc-ui-empty-form" style="<?php echo $sEmptyStyle; ?>"><td class="scFormPageText" style="padding: 10px; text-align: center">
<?php echo $this->Ini->Nm_lang['lang_errm_empt'];
?>
</td></tr> 
<tr><td>
<?php
if (($this->Embutida_form || !$this->Embutida_call || $this->Grid_editavel || $this->Embutida_multi || ($this->Embutida_call && 'on' == $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['embutida_liga_form_btn_nav'])) && $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['run_iframe'] != "R")
{
?>
    <table style="border-collapse: collapse; border-width: 0px; width: 100%"><tr><td class="scFormToolbar" style="padding: 0px; spacing: 0px">
    <table style="border-collapse: collapse; border-width: 0px; width: 100%">
    <tr> 
     <td nowrap align="left" valign="middle" width="33%" class="scFormToolbarPadding"> 
<?php
}
if (($this->Embutida_form || !$this->Embutida_call || $this->Grid_editavel || $this->Embutida_multi || ($this->Embutida_call && 'on' == $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['embutida_liga_form_btn_nav'])) && $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['run_iframe'] != "R")
{
    $NM_btn = false;
      if ($opcao_botoes != "novo" && $this->nmgp_botoes['goto'] == "on")
      {
        $sCondStyle = '';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "birpara", " nm_navpage(document.F1.nmgp_rec_b.value, 'P');document.F1.nmgp_rec_b.value = ''", " nm_navpage(document.F1.nmgp_rec_b.value, 'P');document.F1.nmgp_rec_b.value = ''", "brec_b", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
 
<?php
?> 
   <input type="text" class="scFormToolbarInput" name="nmgp_rec_b" value="" style="width:25px;vertical-align: middle;"/> 
<?php 
      }
      if ($opcao_botoes != "novo" && $this->nmgp_botoes['qtline'] == "on")
      {
?> 
          <span class="<?php echo $this->css_css_toolbar_obj ?>" style="border: 0px;"><?php echo $this->Ini->Nm_lang['lang_btns_rows'] ?></span>
          <select class="scFormToolbarInput" name="nmgp_quant_linhas_b" onchange="document.F7.nmgp_max_line.value = this.value; document.F7.submit();"> 
<?php 
              $obj_sel = ($this->sc_max_reg == 10) ? " selected" : "";
?> 
           <option value="10" <?php echo $obj_sel ?>>10</option>
<?php 
              $obj_sel = ($this->sc_max_reg == 20) ? " selected" : "";
?> 
           <option value="20" <?php echo $obj_sel ?>>20</option>
<?php 
              $obj_sel = ($this->sc_max_reg == 50) ? " selected" : "";
?> 
           <option value="50" <?php echo $obj_sel ?>>50</option>
          </select>
<?php 
      }
?> 
     </td> 
     <td nowrap align="center" valign="middle" width="33%" class="scFormToolbarPadding"> 
<?php 
    if (($opcao_botoes != "novo") && ('total' != $this->form_paginacao)) {
        $sCondStyle = ($this->nmgp_botoes['first'] == "on") ? '' : 'display: none;';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "binicio", "nm_move ('inicio'); return false;", "nm_move ('inicio'); return false;", "sc_b_ini_b", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
    if (($opcao_botoes != "novo") && ('total' != $this->form_paginacao)) {
        $sCondStyle = ($this->nmgp_botoes['back'] == "on") ? '' : 'display: none;';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "bretorna", "nm_move ('retorna'); return false;", "nm_move ('retorna'); return false;", "sc_b_ret_b", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
if ($opcao_botoes != "novo" && $this->nmgp_botoes['navpage'] == "on")
{
?> 
     <span nowrap id="sc_b_navpage_b" class="scFormToolbarPadding"></span> 
<?php 
}
    if (($opcao_botoes != "novo") && ('total' != $this->form_paginacao)) {
        $sCondStyle = ($this->nmgp_botoes['forward'] == "on") ? '' : 'display: none;';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "bavanca", "nm_move ('avanca'); return false;", "nm_move ('avanca'); return false;", "sc_b_avc_b", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
    if (($opcao_botoes != "novo") && ('total' != $this->form_paginacao)) {
        $sCondStyle = ($this->nmgp_botoes['last'] == "on") ? '' : 'display: none;';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "bfinal", "nm_move ('final'); return false;", "nm_move ('final'); return false;", "sc_b_fim_b", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
?> 
     </td> 
     <td nowrap align="right" valign="middle" width="33%" class="scFormToolbarPadding"> 
<?php 
if ($opcao_botoes != "novo" && $this->nmgp_botoes['summary'] == "on")
{
?> 
     <span nowrap id="sc_b_summary_b" class="scFormToolbarPadding"></span> 
<?php 
}
}
if (($this->Embutida_form || !$this->Embutida_call || $this->Grid_editavel || $this->Embutida_multi || ($this->Embutida_call && 'on' == $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['embutida_liga_form_btn_nav'])) && $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['run_iframe'] != "R")
{
?>
   </td></tr> 
   </table> 
   </td></tr></table> 
<?php
}
?>
<?php
if (!$NM_btn && isset($NM_ult_sep))
{
    echo "    <script language=\"javascript\">";
    echo "      document.getElementById('" .  $NM_ult_sep . "').style.display='none';";
    echo "    </script>";
}
unset($NM_ult_sep);
?>
<?php if ('novo' != $this->nmgp_opcao || $this->Embutida_form) { ?><script>nav_atualiza(Nav_permite_ret, Nav_permite_ava, 'b');</script><?php } ?>
<?php if (('novo' != $this->nmgp_opcao || $this->Embutida_form) && !$this->nmgp_form_empty && $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['run_iframe'] != "R" && $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['run_iframe'] != "F") { ?><script>summary_atualiza(<?php echo ($_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['reg_start'] + 1). ", " . $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['reg_qtd'] . ", " . ($_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['total'] + 1)?>);</script><?php } ?>
<?php if (('novo' != $this->nmgp_opcao || $this->Embutida_form) && !$this->nmgp_form_empty && $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['run_iframe'] != "R" && $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['run_iframe'] != "F") { ?><script>navpage_atualiza('<?php echo $this->SC_nav_page ?>');</script><?php } ?>
</td></tr> 
</table> 

<div id="id_debug_window" style="display: none; position: absolute; left: 50px; top: 50px"><table class="scFormMessageTable">
<tr><td class="scFormMessageTitle"><?php echo nmButtonOutput($this->arr_buttons, "berrm_clse", "scAjaxHideDebug()", "scAjaxHideDebug()", "", "", "", "", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
&nbsp;&nbsp;Output</td></tr>
<tr><td class="scFormMessageMessage" style="padding: 0px; vertical-align: top"><div style="padding: 2px; height: 200px; width: 350px; overflow: auto" id="id_debug_text"></div></td></tr>
</table></div>
<script> 
 var iAjaxNewLine = <?php echo $sc_seq_vert; ?>;
 for (var iLine = 1; iLine <= iAjaxNewLine; iLine++) {
  scJQElementsAdd(iLine);
 }
</script> 
<div id="new_line_dummy" style="display: none">
</div>

</form> 
<script> 
<?php
  $nm_sc_blocos_da_pag = array(0);

  foreach ($this->Ini->nm_hidden_blocos as $bloco => $hidden)
  {
      if ($hidden == "off" && in_array($bloco, $nm_sc_blocos_da_pag))
      {
          echo "document.getElementById('hidden_bloco_" . $bloco . "').style.display = 'none';";
          if (isset($nm_sc_blocos_aba[$bloco]))
          {
               echo "document.getElementById('id_tabs_" . $nm_sc_blocos_aba[$bloco] . "_" . $bloco . "').style.display = 'none';";
          }
      }
  }
?>
</script> 
   </td></tr></table>
<script>
function updateHeaderFooter(sFldName, sFldValue)
{
  if (sFldValue[0] && sFldValue[0]["value"])
  {
    sFldValue = sFldValue[0]["value"];
  }
}
</script>
<?php
if (isset($_POST['master_nav']) && 'on' == $_POST['master_nav'])
{
    $sTamanhoIframe = isset($_POST['sc_ifr_height']) && '' != $_POST['sc_ifr_height'] ? '"' . $_POST['sc_ifr_height'] . '"' : '$(document).innerHeight()';
?>
<script>
 parent.scAjaxDetailStatus("test_grpcs_editable_grid");
 parent.scAjaxDetailHeight("test_grpcs_editable_grid", <?php echo $sTamanhoIframe; ?>);
</script>
<?php
}
elseif (isset($_GET['script_case_detail']) && 'Y' == $_GET['script_case_detail'])
{
    $sTamanhoIframe = isset($_GET['sc_ifr_height']) && '' != $_GET['sc_ifr_height'] ? '"' . $_GET['sc_ifr_height'] . '"' : '$(document).innerHeight()';
?>
<script>
 parent.scAjaxDetailHeight("test_grpcs_editable_grid", <?php echo $sTamanhoIframe; ?>);
</script>
<?php
}
?>
<?php
if (isset($this->NM_ajax_info['displayMsg']) && $this->NM_ajax_info['displayMsg'])
{
?>
<script type="text/javascript">
_scAjaxShowMessage(scMsgDefTitle, "<?php echo $this->NM_ajax_info['displayMsgTxt']; ?>", false, sc_ajaxMsgTime, false, "Ok", 0, 0, 0, 0, "", "", "", false, true);
</script>
<?php
}
?>
<?php
if ('' != $this->scFormFocusErrorName)
{
?>
<script>
scAjaxFocusError();
</script>
<?php
}
?>
<script>
bLigEditLookupCall = <?php if ($this->lig_edit_lookup_call) { ?>true<?php } else { ?>false<?php } ?>;
function scLigEditLookupCall()
{
<?php
if ($this->lig_edit_lookup && isset($_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['sc_modal']) && $_SESSION['sc_session'][$this->Ini->sc_page]['test_grpcs_editable_grid']['sc_modal'])
{
?>
  parent.<?php echo $this->lig_edit_lookup_cb; ?>(<?php echo $this->lig_edit_lookup_row; ?>);
<?php
}
elseif ($this->lig_edit_lookup)
{
?>
  opener.<?php echo $this->lig_edit_lookup_cb; ?>(<?php echo $this->lig_edit_lookup_row; ?>);
<?php
}
?>
}
if (bLigEditLookupCall)
{
  scLigEditLookupCall();
}
<?php
if (isset($this->redir_modal) && !empty($this->redir_modal))
{
    echo $this->redir_modal;
}
?>
</script>
</body> 
</html> 
<?php 
 } 
} 
?> 
