<?php
class pack_pyalloc_edit_grid_form extends pack_pyalloc_edit_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'] . " - pyalloc"); } else { echo strip_tags("" . $this->Ini->Nm_lang['lang_othr_frmu_titl'] . " - pyalloc"); } ?></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]['pack_pyalloc_edit_grid']['sc_modal']) && $_SESSION['sc_session'][$this->Ini->sc_page]['pack_pyalloc_edit_grid']['sc_modal'] && isset($_SESSION['sc_session'][$this->Ini->sc_page]['pack_pyalloc_edit_grid']['sc_redir_atualiz']) && $_SESSION['sc_session'][$this->Ini->sc_page]['pack_pyalloc_edit_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" />
<?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("pack_pyalloc_edit_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('pack_pyalloc_edit_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]['pack_pyalloc_edit_grid']['run_iframe'] || 'R' == $_SESSION['sc_session'][$this->Ini->sc_page]['pack_pyalloc_edit_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]['pack_pyalloc_edit_grid']['opc_ant'] = "novo";
    $_SESSION['sc_session'][$this->Ini->sc_page]['pack_pyalloc_edit_grid']['recarga'] = "novo";
}
if (empty($_SESSION['sc_session'][$this->Ini->sc_page]['pack_pyalloc_edit_grid']['recarga']))
{
    $opcao_botoes = $this->nmgp_opcao;
}
else
{
    $opcao_botoes = $_SESSION['sc_session'][$this->Ini->sc_page]['pack_pyalloc_edit_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("pack_pyalloc_edit_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]['pack_pyalloc_edit_grid']['run_iframe'] || 'R' == $_SESSION['sc_session'][$this->Ini->sc_page]['pack_pyalloc_edit_grid']['run_iframe']) ? 0 : "0px";
?>
<?php
$_SESSION['scriptcase']['error_span_title']['pack_pyalloc_edit_grid'] = $this->Ini->Error_icon_span;
$_SESSION['scriptcase']['error_icon_title']['pack_pyalloc_edit_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"  width="100%">
<?php
  if (!$this->Embutida_call && (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['pack_pyalloc_edit_grid']['mostra_cab']) || $_SESSION['sc_session'][$this->Ini->sc_page]['pack_pyalloc_edit_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'] . " - pyalloc"; } else { echo "" . $this->Ini->Nm_lang['lang_othr_frmu_titl'] . " - pyalloc"; } ?></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]['pack_pyalloc_edit_grid']['embutida_liga_form_btn_nav'])) && $_SESSION['sc_session'][$this->Ini->sc_page]['pack_pyalloc_edit_grid']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['pack_pyalloc_edit_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]['pack_pyalloc_edit_grid']['embutida_liga_form_btn_nav'])) && $_SESSION['sc_session'][$this->Ini->sc_page]['pack_pyalloc_edit_grid']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['pack_pyalloc_edit_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]['pack_pyalloc_edit_grid']['fast_search'])) ? $_SESSION['sc_session'][$this->Ini->sc_page]['pack_pyalloc_edit_grid']['fast_search'][0] : "";
          $OPC_arg = (isset($_SESSION['sc_session'][$this->Ini->sc_page]['pack_pyalloc_edit_grid']['fast_search'])) ? $_SESSION['sc_session'][$this->Ini->sc_page]['pack_pyalloc_edit_grid']['fast_search'][1] : "";
          $OPC_dat = (isset($_SESSION['sc_session'][$this->Ini->sc_page]['pack_pyalloc_edit_grid']['fast_search'])) ? $_SESSION['sc_session'][$this->Ini->sc_page]['pack_pyalloc_edit_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_pack_pyalloc_edit_grid_add_new_line(); return false;", "do_ajax_pack_pyalloc_edit_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]['pack_pyalloc_edit_grid']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['pack_pyalloc_edit_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]['pack_pyalloc_edit_grid']['run_iframe'] == "F" || $_SESSION['sc_session'][$this->Ini->sc_page]['pack_pyalloc_edit_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]['pack_pyalloc_edit_grid']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['pack_pyalloc_edit_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]['pack_pyalloc_edit_grid']['run_iframe'] == "F" || $_SESSION['sc_session'][$this->Ini->sc_page]['pack_pyalloc_edit_grid']['run_iframe'] == "R" || $this->aba_iframe || $this->nmgp_botoes['exit'] != "on") && ($_SESSION['sc_session'][$this->Ini->sc_page]['pack_pyalloc_edit_grid']['run_iframe'] != "R" && $_SESSION['sc_session'][$this->Ini->sc_page]['pack_pyalloc_edit_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]['pack_pyalloc_edit_grid']['run_iframe'] == "F" || $_SESSION['sc_session'][$this->Ini->sc_page]['pack_pyalloc_edit_grid']['run_iframe'] == "R" || $this->aba_iframe || $this->nmgp_botoes['exit'] != "on") && ($_SESSION['sc_session'][$this->Ini->sc_page]['pack_pyalloc_edit_grid']['run_iframe'] != "R" && $_SESSION['sc_session'][$this->Ini->sc_page]['pack_pyalloc_edit_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]['pack_pyalloc_edit_grid']['embutida_liga_form_btn_nav'])) && $_SESSION['sc_session'][$this->Ini->sc_page]['pack_pyalloc_edit_grid']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['pack_pyalloc_edit_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['yarn_order_']) && $this->nmgp_cmp_hidden['yarn_order_'] == 'off') { $sStyleHidden_yarn_order_ = 'display: none'; }
      if (1 || !isset($this->nmgp_cmp_hidden['yarn_order_']) || $this->nmgp_cmp_hidden['yarn_order_'] == 'on') {
      if (!isset($this->nm_new_label['yarn_order_'])) {
          $this->nm_new_label['yarn_order_'] = "YARN ORDER"; } ?>

    <TD class="scFormLabelOddMult" id="hidden_field_label_yarn_order_" style=";<?php echo $sStyleHidden_yarn_order_; ?>" > <?php echo $this->nm_new_label['yarn_order_'] ?> </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['lbs_ordere_']) && $this->nmgp_cmp_hidden['lbs_ordere_'] == 'off') { $sStyleHidden_lbs_ordere_ = 'display: none'; }
      if (1 || !isset($this->nmgp_cmp_hidden['lbs_ordere_']) || $this->nmgp_cmp_hidden['lbs_ordere_'] == 'on') {
      if (!isset($this->nm_new_label['lbs_ordere_'])) {
          $this->nm_new_label['lbs_ordere_'] = "LBS ORDERE"; } ?>

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


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

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


   <?php if (isset($this->nmgp_cmp_hidden['cost_lb_y_']) && $this->nmgp_cmp_hidden['cost_lb_y_'] == 'off') { $sStyleHidden_cost_lb_y_ = 'display: none'; }
      if (1 || !isset($this->nmgp_cmp_hidden['cost_lb_y_']) || $this->nmgp_cmp_hidden['cost_lb_y_'] == 'on') {
      if (!isset($this->nm_new_label['cost_lb_y_'])) {
          $this->nm_new_label['cost_lb_y_'] = "COST LB Y"; } ?>

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


   <?php if (isset($this->nmgp_cmp_hidden['net_cost_l_']) && $this->nmgp_cmp_hidden['net_cost_l_'] == 'off') { $sStyleHidden_net_cost_l_ = 'display: none'; }
      if (1 || !isset($this->nmgp_cmp_hidden['net_cost_l_']) || $this->nmgp_cmp_hidden['net_cost_l_'] == 'on') {
      if (!isset($this->nm_new_label['net_cost_l_'])) {
          $this->nm_new_label['net_cost_l_'] = "NET COST L"; } ?>

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


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

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


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

    <TD class="scFormLabelOddMult" id="hidden_field_label_twarp_" style="text-align:right;<?php echo $sStyleHidden_twarp_; ?>" > <?php echo $this->nm_new_label['twarp_'] ?> </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_pack_pyalloc_edit_grid);
       $guarda_nmgp_opcao = $this->nmgp_opcao;
       $guarda_form_vert_pack_pyalloc_edit_grid = $this->form_vert_pack_pyalloc_edit_grid;
       $this->nmgp_opcao = 'novo';
   } 
   if ($this->Embutida_form && empty($this->form_vert_pack_pyalloc_edit_grid))
   {
       $sc_seq_vert = 0;
   }
   foreach ($this->form_vert_pack_pyalloc_edit_grid as $sc_seq_vert => $sc_lixo)
   {
       if (isset($this->Embutida_ronly) && $this->Embutida_ronly && !$Line_Add)
       {
           $this->nmgp_cmp_readonly['yarn_order_'] = true;
           $this->nmgp_cmp_readonly['p_o_number_'] = true;
           $this->nmgp_cmp_readonly['lbs_ordere_'] = true;
           $this->nmgp_cmp_readonly['warp_perc_'] = true;
           $this->nmgp_cmp_readonly['cost_lb_y_'] = true;
           $this->nmgp_cmp_readonly['net_cost_l_'] = true;
           $this->nmgp_cmp_readonly['lbs_warped_'] = true;
           $this->nmgp_cmp_readonly['twarp_'] = true;
       }
       elseif ($Line_Add)
       {
           if (!isset($this->nmgp_cmp_readonly['yarn_order_']) || $this->nmgp_cmp_readonly['yarn_order_'] != "on") {$this->nmgp_cmp_readonly['yarn_order_'] = false;}
           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['lbs_ordere_']) || $this->nmgp_cmp_readonly['lbs_ordere_'] != "on") {$this->nmgp_cmp_readonly['lbs_ordere_'] = false;}
           if (!isset($this->nmgp_cmp_readonly['warp_perc_']) || $this->nmgp_cmp_readonly['warp_perc_'] != "on") {$this->nmgp_cmp_readonly['warp_perc_'] = false;}
           if (!isset($this->nmgp_cmp_readonly['cost_lb_y_']) || $this->nmgp_cmp_readonly['cost_lb_y_'] != "on") {$this->nmgp_cmp_readonly['cost_lb_y_'] = false;}
           if (!isset($this->nmgp_cmp_readonly['net_cost_l_']) || $this->nmgp_cmp_readonly['net_cost_l_'] != "on") {$this->nmgp_cmp_readonly['net_cost_l_'] = false;}
           if (!isset($this->nmgp_cmp_readonly['lbs_warped_']) || $this->nmgp_cmp_readonly['lbs_warped_'] != "on") {$this->nmgp_cmp_readonly['lbs_warped_'] = false;}
           if (!isset($this->nmgp_cmp_readonly['twarp_']) || $this->nmgp_cmp_readonly['twarp_'] != "on") {$this->nmgp_cmp_readonly['twarp_'] = false;}
       }
              foreach ($this->form_vert_form_preenchimento[$sc_seq_vert] as $sCmpNome => $mCmpVal)
              {
                  eval("\$this->" . $sCmpNome . " = \$mCmpVal;");
              }
        $this->yarn_order_ = $this->form_vert_pack_pyalloc_edit_grid[$sc_seq_vert]['yarn_order_']; 
       $yarn_order_ = $this->yarn_order_; 
       $sStyleHidden_yarn_order_ = '';
       if (isset($sCheckRead_yarn_order_))
       {
           unset($sCheckRead_yarn_order_);
       }
       if (isset($this->nmgp_cmp_readonly['yarn_order_']))
       {
           $sCheckRead_yarn_order_ = $this->nmgp_cmp_readonly['yarn_order_'];
       }
       if (isset($this->nmgp_cmp_hidden['yarn_order_']) && $this->nmgp_cmp_hidden['yarn_order_'] == 'off')
       {
           unset($this->nmgp_cmp_hidden['yarn_order_']);
           $sStyleHidden_yarn_order_ = 'display: none;';
       }
       $bTestReadOnly_yarn_order_ = true;
       $sStyleReadLab_yarn_order_ = 'display: none;';
       $sStyleReadInp_yarn_order_ = '';
       if (isset($this->nmgp_cmp_readonly['yarn_order_']) && $this->nmgp_cmp_readonly['yarn_order_'] == 'on')
       {
           $bTestReadOnly_yarn_order_ = false;
           unset($this->nmgp_cmp_readonly['yarn_order_']);
           $sStyleReadLab_yarn_order_ = '';
           $sStyleReadInp_yarn_order_ = 'display: none;';
       }
       $this->p_o_number_ = $this->form_vert_pack_pyalloc_edit_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->lbs_ordere_ = $this->form_vert_pack_pyalloc_edit_grid[$sc_seq_vert]['lbs_ordere_']; 
       $lbs_ordere_ = $this->lbs_ordere_; 
       $sStyleHidden_lbs_ordere_ = '';
       if (isset($sCheckRead_lbs_ordere_))
       {
           unset($sCheckRead_lbs_ordere_);
       }
       if (isset($this->nmgp_cmp_readonly['lbs_ordere_']))
       {
           $sCheckRead_lbs_ordere_ = $this->nmgp_cmp_readonly['lbs_ordere_'];
       }
       if (isset($this->nmgp_cmp_hidden['lbs_ordere_']) && $this->nmgp_cmp_hidden['lbs_ordere_'] == 'off')
       {
           unset($this->nmgp_cmp_hidden['lbs_ordere_']);
           $sStyleHidden_lbs_ordere_ = 'display: none;';
       }
       $bTestReadOnly_lbs_ordere_ = true;
       $sStyleReadLab_lbs_ordere_ = 'display: none;';
       $sStyleReadInp_lbs_ordere_ = '';
       if (isset($this->nmgp_cmp_readonly['lbs_ordere_']) && $this->nmgp_cmp_readonly['lbs_ordere_'] == 'on')
       {
           $bTestReadOnly_lbs_ordere_ = false;
           unset($this->nmgp_cmp_readonly['lbs_ordere_']);
           $sStyleReadLab_lbs_ordere_ = '';
           $sStyleReadInp_lbs_ordere_ = 'display: none;';
       }
       $this->warp_perc_ = $this->form_vert_pack_pyalloc_edit_grid[$sc_seq_vert]['warp_perc_']; 
       $warp_perc_ = $this->warp_perc_; 
       $sStyleHidden_warp_perc_ = '';
       if (isset($sCheckRead_warp_perc_))
       {
           unset($sCheckRead_warp_perc_);
       }
       if (isset($this->nmgp_cmp_readonly['warp_perc_']))
       {
           $sCheckRead_warp_perc_ = $this->nmgp_cmp_readonly['warp_perc_'];
       }
       if (isset($this->nmgp_cmp_hidden['warp_perc_']) && $this->nmgp_cmp_hidden['warp_perc_'] == 'off')
       {
           unset($this->nmgp_cmp_hidden['warp_perc_']);
           $sStyleHidden_warp_perc_ = 'display: none;';
       }
       $bTestReadOnly_warp_perc_ = true;
       $sStyleReadLab_warp_perc_ = 'display: none;';
       $sStyleReadInp_warp_perc_ = '';
       if (isset($this->nmgp_cmp_readonly['warp_perc_']) && $this->nmgp_cmp_readonly['warp_perc_'] == 'on')
       {
           $bTestReadOnly_warp_perc_ = false;
           unset($this->nmgp_cmp_readonly['warp_perc_']);
           $sStyleReadLab_warp_perc_ = '';
           $sStyleReadInp_warp_perc_ = 'display: none;';
       }
       $this->cost_lb_y_ = $this->form_vert_pack_pyalloc_edit_grid[$sc_seq_vert]['cost_lb_y_']; 
       $cost_lb_y_ = $this->cost_lb_y_; 
       $sStyleHidden_cost_lb_y_ = '';
       if (isset($sCheckRead_cost_lb_y_))
       {
           unset($sCheckRead_cost_lb_y_);
       }
       if (isset($this->nmgp_cmp_readonly['cost_lb_y_']))
       {
           $sCheckRead_cost_lb_y_ = $this->nmgp_cmp_readonly['cost_lb_y_'];
       }
       if (isset($this->nmgp_cmp_hidden['cost_lb_y_']) && $this->nmgp_cmp_hidden['cost_lb_y_'] == 'off')
       {
           unset($this->nmgp_cmp_hidden['cost_lb_y_']);
           $sStyleHidden_cost_lb_y_ = 'display: none;';
       }
       $bTestReadOnly_cost_lb_y_ = true;
       $sStyleReadLab_cost_lb_y_ = 'display: none;';
       $sStyleReadInp_cost_lb_y_ = '';
       if (isset($this->nmgp_cmp_readonly['cost_lb_y_']) && $this->nmgp_cmp_readonly['cost_lb_y_'] == 'on')
       {
           $bTestReadOnly_cost_lb_y_ = false;
           unset($this->nmgp_cmp_readonly['cost_lb_y_']);
           $sStyleReadLab_cost_lb_y_ = '';
           $sStyleReadInp_cost_lb_y_ = 'display: none;';
       }
       $this->net_cost_l_ = $this->form_vert_pack_pyalloc_edit_grid[$sc_seq_vert]['net_cost_l_']; 
       $net_cost_l_ = $this->net_cost_l_; 
       $sStyleHidden_net_cost_l_ = '';
       if (isset($sCheckRead_net_cost_l_))
       {
           unset($sCheckRead_net_cost_l_);
       }
       if (isset($this->nmgp_cmp_readonly['net_cost_l_']))
       {
           $sCheckRead_net_cost_l_ = $this->nmgp_cmp_readonly['net_cost_l_'];
       }
       if (isset($this->nmgp_cmp_hidden['net_cost_l_']) && $this->nmgp_cmp_hidden['net_cost_l_'] == 'off')
       {
           unset($this->nmgp_cmp_hidden['net_cost_l_']);
           $sStyleHidden_net_cost_l_ = 'display: none;';
       }
       $bTestReadOnly_net_cost_l_ = true;
       $sStyleReadLab_net_cost_l_ = 'display: none;';
       $sStyleReadInp_net_cost_l_ = '';
       if (isset($this->nmgp_cmp_readonly['net_cost_l_']) && $this->nmgp_cmp_readonly['net_cost_l_'] == 'on')
       {
           $bTestReadOnly_net_cost_l_ = false;
           unset($this->nmgp_cmp_readonly['net_cost_l_']);
           $sStyleReadLab_net_cost_l_ = '';
           $sStyleReadInp_net_cost_l_ = 'display: none;';
       }
       $this->lbs_warped_ = $this->form_vert_pack_pyalloc_edit_grid[$sc_seq_vert]['lbs_warped_']; 
       $lbs_warped_ = $this->lbs_warped_; 
       $sStyleHidden_lbs_warped_ = '';
       if (isset($sCheckRead_lbs_warped_))
       {
           unset($sCheckRead_lbs_warped_);
       }
       if (isset($this->nmgp_cmp_readonly['lbs_warped_']))
       {
           $sCheckRead_lbs_warped_ = $this->nmgp_cmp_readonly['lbs_warped_'];
       }
       if (isset($this->nmgp_cmp_hidden['lbs_warped_']) && $this->nmgp_cmp_hidden['lbs_warped_'] == 'off')
       {
           unset($this->nmgp_cmp_hidden['lbs_warped_']);
           $sStyleHidden_lbs_warped_ = 'display: none;';
       }
       $bTestReadOnly_lbs_warped_ = true;
       $sStyleReadLab_lbs_warped_ = 'display: none;';
       $sStyleReadInp_lbs_warped_ = '';
       if (isset($this->nmgp_cmp_readonly['lbs_warped_']) && $this->nmgp_cmp_readonly['lbs_warped_'] == 'on')
       {
           $bTestReadOnly_lbs_warped_ = false;
           unset($this->nmgp_cmp_readonly['lbs_warped_']);
           $sStyleReadLab_lbs_warped_ = '';
           $sStyleReadInp_lbs_warped_ = 'display: none;';
       }
       $this->twarp_ = $this->form_vert_pack_pyalloc_edit_grid[$sc_seq_vert]['twarp_']; 
       $twarp_ = $this->twarp_; 
       $sStyleHidden_twarp_ = '';
       if (isset($sCheckRead_twarp_))
       {
           unset($sCheckRead_twarp_);
       }
       if (isset($this->nmgp_cmp_readonly['twarp_']))
       {
           $sCheckRead_twarp_ = $this->nmgp_cmp_readonly['twarp_'];
       }
       if (isset($this->nmgp_cmp_hidden['twarp_']) && $this->nmgp_cmp_hidden['twarp_'] == 'off')
       {
           unset($this->nmgp_cmp_hidden['twarp_']);
           $sStyleHidden_twarp_ = 'display: none;';
       }
       $bTestReadOnly_twarp_ = true;
       $sStyleReadLab_twarp_ = 'display: none;';
       $sStyleReadInp_twarp_ = '';
       if (isset($this->nmgp_cmp_readonly['twarp_']) && $this->nmgp_cmp_readonly['twarp_'] == 'on')
       {
           $bTestReadOnly_twarp_ = false;
           unset($this->nmgp_cmp_readonly['twarp_']);
           $sStyleReadLab_twarp_ = '';
           $sStyleReadInp_twarp_ = '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_pack_pyalloc_edit_grid_add_new_line(" . $sc_seq_vert . ")", "do_ajax_pack_pyalloc_edit_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_pack_pyalloc_edit_grid_cancel_insert(" . $sc_seq_vert . ")", "do_ajax_pack_pyalloc_edit_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_pack_pyalloc_edit_grid_cancel_update(" . $sc_seq_vert . ")", "do_ajax_pack_pyalloc_edit_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['yarn_order_']) && $this->nmgp_cmp_hidden['yarn_order_'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="yarn_order_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($yarn_order_) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

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

 ?>
<input type=hidden name="yarn_order_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($yarn_order_) . "\">" . $yarn_order_ . ""; ?>
<?php } else { ?>
<span id="id_read_on_yarn_order_<?php echo $sc_seq_vert ?>" class="sc-ui-readonly-yarn_order_<?php echo $sc_seq_vert ?>" style=";<?php echo $sStyleReadLab_yarn_order_; ?>"><?php echo NM_encode_input($this->yarn_order_); ?></span><span id="id_read_off_yarn_order_<?php echo $sc_seq_vert ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_yarn_order_; ?>">
 <input class="sc-js-input scFormObjectOddMult" style=";" id="id_sc_field_yarn_order_<?php echo $sc_seq_vert ?>" type=text name="yarn_order_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($yarn_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_yarn_order_<?php echo $sc_seq_vert; ?>_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_yarn_order_<?php echo $sc_seq_vert; ?>_text"></span></td></tr></table></td></tr></table> </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['lbs_ordere_']) && $this->nmgp_cmp_hidden['lbs_ordere_'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="lbs_ordere_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($lbs_ordere_) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormDataOddMult" id="hidden_field_data_lbs_ordere_<?php echo $sc_seq_vert; ?>" style="<?php echo $sStyleHidden_lbs_ordere_; ?>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_ordere_ && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["lbs_ordere_"]) &&  $this->nmgp_cmp_readonly["lbs_ordere_"] == "on") { 

 ?>
<input type=hidden name="lbs_ordere_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($lbs_ordere_) . "\">" . $lbs_ordere_ . ""; ?>
<?php } else { ?>
<span id="id_read_on_lbs_ordere_<?php echo $sc_seq_vert ?>" class="sc-ui-readonly-lbs_ordere_<?php echo $sc_seq_vert ?>" style="text-align:right;<?php echo $sStyleReadLab_lbs_ordere_; ?>"><?php echo NM_encode_input($this->lbs_ordere_); ?></span><span id="id_read_off_lbs_ordere_<?php echo $sc_seq_vert ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_lbs_ordere_; ?>">
 <input class="sc-js-input scFormObjectOddMult" style="text-align:left;" id="id_sc_field_lbs_ordere_<?php echo $sc_seq_vert ?>" type=text name="lbs_ordere_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($lbs_ordere_) ?>"
 size=11 alt="{datatype: 'integer', maxLength: 11, thousandsSep: '<?php echo str_replace("'", "\'", $this->field_config['lbs_ordere_']['symbol_grp']); ?>', thousandsFormat: <?php echo $this->field_config['lbs_ordere_']['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_ordere_<?php echo $sc_seq_vert; ?>_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_lbs_ordere_<?php echo $sc_seq_vert; ?>_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>


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

    <TD class="scFormDataOddMult" id="hidden_field_data_warp_perc_<?php echo $sc_seq_vert; ?>" style="<?php echo $sStyleHidden_warp_perc_; ?>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_warp_perc_ && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["warp_perc_"]) &&  $this->nmgp_cmp_readonly["warp_perc_"] == "on") { 

 ?>
<input type=hidden name="warp_perc_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($warp_perc_) . "\">" . $warp_perc_ . ""; ?>
<?php } else { ?>
<span id="id_read_on_warp_perc_<?php echo $sc_seq_vert ?>" class="sc-ui-readonly-warp_perc_<?php echo $sc_seq_vert ?>" style="text-align:right;<?php echo $sStyleReadLab_warp_perc_; ?>"><?php echo NM_encode_input($this->warp_perc_); ?></span><span id="id_read_off_warp_perc_<?php echo $sc_seq_vert ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_warp_perc_; ?>">
 <input class="sc-js-input scFormObjectOddMult" style="text-align:left;" id="id_sc_field_warp_perc_<?php echo $sc_seq_vert ?>" type=text name="warp_perc_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($warp_perc_) ?>"
 size=6 alt="{datatype: 'decimal', maxLength: 6, precision: 2, decimalSep: '<?php echo str_replace("'", "\'", $this->field_config['warp_perc_']['symbol_dec']); ?>', thousandsSep: '<?php echo str_replace("'", "\'", $this->field_config['warp_perc_']['symbol_grp']); ?>', thousandsFormat: <?php echo $this->field_config['warp_perc_']['symbol_fmt']; ?>, manualDecimals: false, 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_warp_perc_<?php echo $sc_seq_vert; ?>_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_warp_perc_<?php echo $sc_seq_vert; ?>_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>


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

    <TD class="scFormDataOddMult" id="hidden_field_data_cost_lb_y_<?php echo $sc_seq_vert; ?>" style="<?php echo $sStyleHidden_cost_lb_y_; ?>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_cost_lb_y_ && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["cost_lb_y_"]) &&  $this->nmgp_cmp_readonly["cost_lb_y_"] == "on") { 

 ?>
<input type=hidden name="cost_lb_y_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($cost_lb_y_) . "\">" . $cost_lb_y_ . ""; ?>
<?php } else { ?>
<span id="id_read_on_cost_lb_y_<?php echo $sc_seq_vert ?>" class="sc-ui-readonly-cost_lb_y_<?php echo $sc_seq_vert ?>" style="text-align:right;<?php echo $sStyleReadLab_cost_lb_y_; ?>"><?php echo NM_encode_input($this->cost_lb_y_); ?></span><span id="id_read_off_cost_lb_y_<?php echo $sc_seq_vert ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_cost_lb_y_; ?>">
 <input class="sc-js-input scFormObjectOddMult" style="text-align:left;" id="id_sc_field_cost_lb_y_<?php echo $sc_seq_vert ?>" type=text name="cost_lb_y_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($cost_lb_y_) ?>"
 size=6 alt="{datatype: 'decimal', maxLength: 6, precision: 2, decimalSep: '<?php echo str_replace("'", "\'", $this->field_config['cost_lb_y_']['symbol_dec']); ?>', thousandsSep: '<?php echo str_replace("'", "\'", $this->field_config['cost_lb_y_']['symbol_grp']); ?>', thousandsFormat: <?php echo $this->field_config['cost_lb_y_']['symbol_fmt']; ?>, manualDecimals: false, 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_cost_lb_y_<?php echo $sc_seq_vert; ?>_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_cost_lb_y_<?php echo $sc_seq_vert; ?>_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>


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

    <TD class="scFormDataOddMult" id="hidden_field_data_net_cost_l_<?php echo $sc_seq_vert; ?>" style="<?php echo $sStyleHidden_net_cost_l_; ?>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_net_cost_l_ && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["net_cost_l_"]) &&  $this->nmgp_cmp_readonly["net_cost_l_"] == "on") { 

 ?>
<input type=hidden name="net_cost_l_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($net_cost_l_) . "\">" . $net_cost_l_ . ""; ?>
<?php } else { ?>
<span id="id_read_on_net_cost_l_<?php echo $sc_seq_vert ?>" class="sc-ui-readonly-net_cost_l_<?php echo $sc_seq_vert ?>" style="text-align:right;<?php echo $sStyleReadLab_net_cost_l_; ?>"><?php echo NM_encode_input($this->net_cost_l_); ?></span><span id="id_read_off_net_cost_l_<?php echo $sc_seq_vert ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_net_cost_l_; ?>">
 <input class="sc-js-input scFormObjectOddMult" style="text-align:left;" id="id_sc_field_net_cost_l_<?php echo $sc_seq_vert ?>" type=text name="net_cost_l_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($net_cost_l_) ?>"
 size=6 alt="{datatype: 'decimal', maxLength: 6, precision: 2, decimalSep: '<?php echo str_replace("'", "\'", $this->field_config['net_cost_l_']['symbol_dec']); ?>', thousandsSep: '<?php echo str_replace("'", "\'", $this->field_config['net_cost_l_']['symbol_grp']); ?>', thousandsFormat: <?php echo $this->field_config['net_cost_l_']['symbol_fmt']; ?>, manualDecimals: false, 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_net_cost_l_<?php echo $sc_seq_vert; ?>_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_net_cost_l_<?php echo $sc_seq_vert; ?>_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>


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

    <TD class="scFormDataOddMult" id="hidden_field_data_lbs_warped_<?php echo $sc_seq_vert; ?>" style="<?php echo $sStyleHidden_lbs_warped_; ?>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_warped_ && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["lbs_warped_"]) &&  $this->nmgp_cmp_readonly["lbs_warped_"] == "on") { 

 ?>
<input type=hidden name="lbs_warped_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($lbs_warped_) . "\">" . $lbs_warped_ . ""; ?>
<?php } else { ?>
<span id="id_read_on_lbs_warped_<?php echo $sc_seq_vert ?>" class="sc-ui-readonly-lbs_warped_<?php echo $sc_seq_vert ?>" style="text-align:right;<?php echo $sStyleReadLab_lbs_warped_; ?>"><?php echo NM_encode_input($this->lbs_warped_); ?></span><span id="id_read_off_lbs_warped_<?php echo $sc_seq_vert ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_lbs_warped_; ?>">
 <input class="sc-js-input scFormObjectOddMult" style="text-align:left;" id="id_sc_field_lbs_warped_<?php echo $sc_seq_vert ?>" type=text name="lbs_warped_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($lbs_warped_) ?>"
 size=8 alt="{datatype: 'decimal', maxLength: 8, precision: 1, decimalSep: '<?php echo str_replace("'", "\'", $this->field_config['lbs_warped_']['symbol_dec']); ?>', thousandsSep: '<?php echo str_replace("'", "\'", $this->field_config['lbs_warped_']['symbol_grp']); ?>', thousandsFormat: <?php echo $this->field_config['lbs_warped_']['symbol_fmt']; ?>, manualDecimals: false, 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_warped_<?php echo $sc_seq_vert; ?>_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_lbs_warped_<?php echo $sc_seq_vert; ?>_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>


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

    <TD class="scFormDataOddMult" id="hidden_field_data_twarp_<?php echo $sc_seq_vert; ?>" style="<?php echo $sStyleHidden_twarp_; ?>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_twarp_ && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["twarp_"]) &&  $this->nmgp_cmp_readonly["twarp_"] == "on") { 

 ?>
<input type=hidden name="twarp_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($twarp_) . "\">" . $twarp_ . ""; ?>
<?php } else { ?>
<span id="id_read_on_twarp_<?php echo $sc_seq_vert ?>" class="sc-ui-readonly-twarp_<?php echo $sc_seq_vert ?>" style="text-align:right;<?php echo $sStyleReadLab_twarp_; ?>"><?php echo NM_encode_input($this->twarp_); ?></span><span id="id_read_off_twarp_<?php echo $sc_seq_vert ?>" style="white-space: nowrap;<?php echo $sStyleReadInp_twarp_; ?>">
 <input class="sc-js-input scFormObjectOddMult" style="text-align:left;" id="id_sc_field_twarp_<?php echo $sc_seq_vert ?>" type=text name="twarp_<?php echo $sc_seq_vert ?>" value="<?php echo NM_encode_input($twarp_) ?>"
 size=8 alt="{datatype: 'decimal', maxLength: 8, precision: 1, decimalSep: '<?php echo str_replace("'", "\'", $this->field_config['twarp_']['symbol_dec']); ?>', thousandsSep: '<?php echo str_replace("'", "\'", $this->field_config['twarp_']['symbol_grp']); ?>', thousandsFormat: <?php echo $this->field_config['twarp_']['symbol_fmt']; ?>, manualDecimals: false, 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_twarp_<?php echo $sc_seq_vert; ?>_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_twarp_<?php echo $sc_seq_vert; ?>_text"></span></td></tr></table></td></tr></table> </TD>
   <?php }?>






   </tr>
<?php   
        if (isset($sCheckRead_yarn_order_))
       {
           $this->nmgp_cmp_readonly['yarn_order_'] = $sCheckRead_yarn_order_;
       }
       if ('display: none;' == $sStyleHidden_yarn_order_)
       {
           $this->nmgp_cmp_hidden['yarn_order_'] = 'off';
       }
       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_lbs_ordere_))
       {
           $this->nmgp_cmp_readonly['lbs_ordere_'] = $sCheckRead_lbs_ordere_;
       }
       if ('display: none;' == $sStyleHidden_lbs_ordere_)
       {
           $this->nmgp_cmp_hidden['lbs_ordere_'] = 'off';
       }
       if (isset($sCheckRead_warp_perc_))
       {
           $this->nmgp_cmp_readonly['warp_perc_'] = $sCheckRead_warp_perc_;
       }
       if ('display: none;' == $sStyleHidden_warp_perc_)
       {
           $this->nmgp_cmp_hidden['warp_perc_'] = 'off';
       }
       if (isset($sCheckRead_cost_lb_y_))
       {
           $this->nmgp_cmp_readonly['cost_lb_y_'] = $sCheckRead_cost_lb_y_;
       }
       if ('display: none;' == $sStyleHidden_cost_lb_y_)
       {
           $this->nmgp_cmp_hidden['cost_lb_y_'] = 'off';
       }
       if (isset($sCheckRead_net_cost_l_))
       {
           $this->nmgp_cmp_readonly['net_cost_l_'] = $sCheckRead_net_cost_l_;
       }
       if ('display: none;' == $sStyleHidden_net_cost_l_)
       {
           $this->nmgp_cmp_hidden['net_cost_l_'] = 'off';
       }
       if (isset($sCheckRead_lbs_warped_))
       {
           $this->nmgp_cmp_readonly['lbs_warped_'] = $sCheckRead_lbs_warped_;
       }
       if ('display: none;' == $sStyleHidden_lbs_warped_)
       {
           $this->nmgp_cmp_hidden['lbs_warped_'] = 'off';
       }
       if (isset($sCheckRead_twarp_))
       {
           $this->nmgp_cmp_readonly['twarp_'] = $sCheckRead_twarp_;
       }
       if ('display: none;' == $sStyleHidden_twarp_)
       {
           $this->nmgp_cmp_hidden['twarp_'] = 'off';
       }

   }
   if ($Line_Add) 
   { 
       $this->New_Line = ob_get_contents();
       ob_end_clean();
       $this->nmgp_opcao = $guarda_nmgp_opcao;
       $this->form_vert_pack_pyalloc_edit_grid = $guarda_form_vert_pack_pyalloc_edit_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]['pack_pyalloc_edit_grid']['embutida_liga_form_btn_nav'])) && $_SESSION['sc_session'][$this->Ini->sc_page]['pack_pyalloc_edit_grid']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['pack_pyalloc_edit_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]['pack_pyalloc_edit_grid']['embutida_liga_form_btn_nav'])) && $_SESSION['sc_session'][$this->Ini->sc_page]['pack_pyalloc_edit_grid']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['pack_pyalloc_edit_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]['pack_pyalloc_edit_grid']['embutida_liga_form_btn_nav'])) && $_SESSION['sc_session'][$this->Ini->sc_page]['pack_pyalloc_edit_grid']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['pack_pyalloc_edit_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]['pack_pyalloc_edit_grid']['run_iframe'] != "R" && $_SESSION['sc_session'][$this->Ini->sc_page]['pack_pyalloc_edit_grid']['run_iframe'] != "F") { ?><script>summary_atualiza(<?php echo ($_SESSION['sc_session'][$this->Ini->sc_page]['pack_pyalloc_edit_grid']['reg_start'] + 1). ", " . $_SESSION['sc_session'][$this->Ini->sc_page]['pack_pyalloc_edit_grid']['reg_qtd'] . ", " . ($_SESSION['sc_session'][$this->Ini->sc_page]['pack_pyalloc_edit_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]['pack_pyalloc_edit_grid']['run_iframe'] != "R" && $_SESSION['sc_session'][$this->Ini->sc_page]['pack_pyalloc_edit_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("pack_pyalloc_edit_grid");
 parent.scAjaxDetailHeight("pack_pyalloc_edit_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("pack_pyalloc_edit_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]['pack_pyalloc_edit_grid']['sc_modal']) && $_SESSION['sc_session'][$this->Ini->sc_page]['pack_pyalloc_edit_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 
 } 
} 
?> 
