<?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("Fabric Line "); } else { echo strip_tags("Fabric Line "); } ?></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; ?>';
 </SCRIPT>
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->path_prod; ?>/third/jquery/js/jquery.js"></SCRIPT>
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->path_prod; ?>/third/jquery/js/jquery-ui.js"></SCRIPT>
 <link rel="stylesheet" href="<?php echo $this->Ini->path_prod ?>/third/jquery/css/smoothness/jquery-ui.css" type="text/css" media="screen" />
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->url_lib_js; ?>jquery.iframe-transport.js"></SCRIPT>
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->url_lib_js; ?>jquery.fileupload.js"></SCRIPT>
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->path_prod; ?>/third/jquery_plugin/malsup-blockui/jquery.blockUI.js"></SCRIPT>
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->path_prod; ?>/third/jquery_plugin/thickbox/thickbox-compressed.js"></SCRIPT>
 <style type="text/css">
  #quicksearchph_t {
   position: relative;
  }
  #quicksearchph_t img {
   position: absolute;
   top: 0;
   right: 0;
  }
 </style>
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->url_lib_js; ?>jquery.scInput.js"></SCRIPT>
 <SCRIPT type="text/javascript" src="<?php echo $this->Ini->url_lib_js; ?>jquery.fieldSelection.js"></SCRIPT>
 <link rel="stylesheet" type="text/css" href="<?php echo $this->Ini->path_link ?>_lib/css/<?php echo $this->Ini->str_schema_all ?>_form.css" />
 <link rel="stylesheet" type="text/css" href="<?php echo $this->Ini->path_link ?>_lib/css/<?php echo $this->Ini->str_schema_all ?>_tab.css" />
 <link rel="stylesheet" type="text/css" href="<?php echo $this->Ini->path_link ?>_lib/buttons/<?php echo $this->Ini->Str_btn_form . '/' . $this->Ini->Str_btn_form ?>.css" />
 <link rel="stylesheet" type="text/css" href="<?php echo $this->Ini->path_link ?>_lib/css/<?php echo $this->Ini->str_schema_all ?>_calendar.css" />
<?php
include_once("../_lib/css/" . $this->Ini->str_schema_all . "_tab.php");
?>

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

<?php
include_once("line_form_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 substr($this->Ini->Nm_lang['lang_othr_smry_info'], strpos($this->Ini->Nm_lang['lang_othr_smry_info'], "?final?")) ?>]";
    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('line_form_jquery.php');

?>

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

  scJQElementsAdd('');

  scJQGeneralAdd();

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

  $("#hidden_bloco_0,#hidden_bloco_1,#hidden_bloco_2,#hidden_bloco_3,#hidden_bloco_4,#hidden_bloco_5,#hidden_bloco_6,#hidden_bloco_7,#hidden_bloco_8,#hidden_bloco_9,#hidden_bloco_10,#hidden_bloco_11").each(function() {
   $(this.rows[0]).bind("click", {block: this}, toggleBlock)
                  .mouseover(function() { $(this).css("cursor", "pointer"); })
                  .mouseout(function() { $(this).css("cursor", ""); });
  });

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

  var i, iTestWidth, iMaxLabelWidth = 0, $labelList = $(".scUiLabelWidthFix");
  for (i = 0; i < $labelList.length; i++) {
    iTestWidth = $($labelList[i]).width();
    sTestWidth = iTestWidth + "";
    if ("" == iTestWidth) {
      iTestWidth = 0;
    }
    else if ("px" == sTestWidth.substr(sTestWidth.length - 2)) {
      iTestWidth = parseInt(sTestWidth.substr(0, sTestWidth.length - 2));
    }
    iMaxLabelWidth = Math.max(iMaxLabelWidth, iTestWidth);
  }
  if (0 < iMaxLabelWidth) {
    $(".scUiLabelWidthFix").css("width", iMaxLabelWidth + "px");
  }
<?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 = {
    "hidden_bloco_0": true,
    "hidden_bloco_1": true,
    "hidden_bloco_2": false,
    "hidden_bloco_3": false,
    "hidden_bloco_4": true,
    "hidden_bloco_5": true,
    "hidden_bloco_6": true,
    "hidden_bloco_7": true,
    "hidden_bloco_8": true,
    "hidden_bloco_9": true,
    "hidden_bloco_10": true,
    "hidden_bloco_11": true
 };

 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]) {
    if ("hidden_bloco_11" == block_id) {
      scAjaxDetailHeight("line_cmatch_edit_grid", $($("#nmsc_iframe_liga_line_cmatch_edit_grid")[0].contentWindow.document).innerHeight());
    }
    if ("hidden_bloco_12" == block_id) {
      scAjaxDetailHeight("greige_grstyle_ro2_form", $($("#nmsc_iframe_liga_greige_grstyle_ro2_form")[0].contentWindow.document).innerHeight());
    }
  }
 }

 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]['line_form']['run_iframe'] || 'R' == $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['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]['line_form']['opc_ant'] = "novo";
    $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['recarga'] = "novo";
}
if (empty($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['recarga']))
{
    $opcao_botoes = $this->nmgp_opcao;
}
else
{
    $opcao_botoes = $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['recarga'];
}
?>
<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("line_form_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"> 
 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]['line_form']['run_iframe'] || 'R' == $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['run_iframe']) ? 0 : "0px";
?>
<?php
$_SESSION['scriptcase']['error_span_title']['line_form'] = $this->Ini->Error_icon_span;
$_SESSION['scriptcase']['error_icon_title']['line_form'] = '' != $this->Ini->Err_ico_title ? $this->Ini->path_icones . '/' . $this->Ini->Err_ico_title : '';
?>
<div style="display: none; position: absolute" id="id_error_display_table_frame">
<table class="scFormErrorTable">
<tr><?php if ($this->Ini->Error_icon_span && '' != $this->Ini->Err_ico_title) { ?><td style="padding: 0px" rowspan="2"><img src="<?php echo $this->Ini->path_icones; ?>/<?php echo $this->Ini->Err_ico_title; ?>" style="border-width: 0px" align="top"></td><?php } ?><td class="scFormErrorTitle"><table style="border-collapse: collapse; border-width: 0px; width: 100%"><tr><td class="scFormErrorTitleFont" style="padding: 0px; vertical-align: top; width: 100%"><?php if (!$this->Ini->Error_icon_span && '' != $this->Ini->Err_ico_title) { ?><img src="<?php echo $this->Ini->path_icones; ?>/<?php echo $this->Ini->Err_ico_title; ?>" style="border-width: 0px" align="top">&nbsp;<?php } ?><?php echo $this->Ini->Nm_lang['lang_errm_errt'] ?></td><td style="padding: 0px; vertical-align: top"><?php echo nmButtonOutput($this->arr_buttons, "berrm_clse", "scAjaxHideErrorDisplay('table')", "scAjaxHideErrorDisplay('table')", "", "", "", "", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
</td></tr></table></td></tr>
<tr><td class="scFormErrorMessage"><span id="id_error_display_table_text"></span></td></tr>
</table>
</div>
<div style="display: none; position: absolute" id="id_message_display_frame">
 <table class="scFormMessageTable" id="id_message_display_content" style="width: 100%">
  <tr id="id_message_display_title_line">
   <td class="scFormMessageTitle" style="height: 20px"><?php
if ('' != $this->Ini->Msg_ico_title) {
?>
<img src="<?php echo $this->Ini->path_icones . '/' . $this->Ini->Msg_ico_title; ?>" style="border-width: 0px; vertical-align: middle">&nbsp;<?php
}
?>
<?php echo nmButtonOutput($this->arr_buttons, "bmessageclose", "_scAjaxMessageBtnClose()", "_scAjaxMessageBtnClose()", "id_message_display_close_icon", "", "", "float: right", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
<span id="id_message_display_title" style="vertical-align: middle"></span></td>
  </tr>
  <tr>
   <td class="scFormMessageMessage"><?php
if ('' != $this->Ini->Msg_ico_body) {
?>
<img id="id_message_display_body_icon" src="<?php echo $this->Ini->path_icones . '/' . $this->Ini->Msg_ico_body; ?>" style="border-width: 0px; vertical-align: middle">&nbsp;<?php
}
?>
<span id="id_message_display_text"></span><div id="id_message_display_buttond" style="display: none; text-align: center"><br /><input id="id_message_display_buttone" type="button" class="scButton_default" value="Ok" onClick="_scAjaxMessageBtnClick()" ></div></td>
  </tr>
 </table>
</div>
<script type="text/javascript">
var scMsgDefTitle = "<?php echo $this->Ini->Nm_lang['lang_usr_lang_othr_msgs_titl']; ?>";
var scMsgDefButton = "Ok";
var scMsgDefClick = "close";
var scMsgDefScInit = "<?php echo $this->Ini->page; ?>";
</script>
<table id="main_table_form"  align="center" cellpadding="<?php echo $int_iframe_padding; ?>" cellspacing=0 class="scFormBorder" >
<?php
  if (!$this->Embutida_call && (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['mostra_cab']) || $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['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 "Fabric Line "; } else { echo "Fabric Line "; } ?></span></td>
            <td id="lin1_col2" class="scFormHeaderFont"><span><span id="head_mark_style_0"><?php echo $this->style ?></span></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]['line_form']['embutida_liga_form_btn_nav'])) && $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['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]['line_form']['embutida_liga_form_btn_nav'])) && $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['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]['line_form']['fast_search'])) ? $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['fast_search'][0] : "";
          $OPC_arg = (isset($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['fast_search'])) ? $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['fast_search'][1] : "";
          $OPC_dat = (isset($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['fast_search'])) ? $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['fast_search'][2] : "";
?> 
           <script type="text/javascript">var change_fast_t = "";</script>
          <select class="scFormToolbarInput" style="vertical-align: middle;" name="nmgp_fast_search_t" onChange="change_fast_t = 'CH';">
<?php 
          $SC_Label_atu['style'] = (isset($this->nm_new_label['style'])) ? $this->nm_new_label['style'] : 'STYLE'; 
          $SC_Label_atu['width'] = (isset($this->nm_new_label['width'])) ? $this->nm_new_label['width'] : 'WIDTH'; 
          $SC_Label_atu['fiber'] = (isset($this->nm_new_label['fiber'])) ? $this->nm_new_label['fiber'] : 'FIBER'; 
          $SC_Label_atu['desc'] = (isset($this->nm_new_label['desc'])) ? $this->nm_new_label['desc'] : 'DESC'; 
          $SC_Label_atu['odesc'] = (isset($this->nm_new_label['odesc'])) ? $this->nm_new_label['odesc'] : 'INTERNAL DESC'; 
          foreach ($SC_Label_atu as $CMP => $LABEL)
          {
              $OPC_sel = ($CMP == $OPC_cmp) ? " selected" : "";
              echo "           <option value='" . $CMP . "'" . $OPC_sel . ">" . $LABEL . "</option>";
          }
?> 
          </select>
          <select class="scFormToolbarInput" style="vertical-align: middle;" name="nmgp_cond_fast_search_t" onChange="change_fast_t = 'CH';">
<?php 
          $OPC_sel = ("eq" == $OPC_arg) ? " selected" : "";
           echo "           <option value='eq'" . $OPC_sel . ">" . $this->Ini->Nm_lang['lang_srch_exac'] . "</option>";
          $OPC_sel = ("ii" == $OPC_arg) ? " selected" : "";
           echo "           <option value='ii'" . $OPC_sel . ">" . $this->Ini->Nm_lang['lang_srch_stts_with'] . "</option>";
          $OPC_sel = ("qp" == $OPC_arg) ? " selected" : "";
           echo "           <option value='qp'" . $OPC_sel . ">" . $this->Ini->Nm_lang['lang_srch_like'] . "</option>";
          $OPC_sel = ("gt" == $OPC_arg) ? " selected" : "";
           echo "           <option value='gt'" . $OPC_sel . ">" . $this->Ini->Nm_lang['lang_srch_grtr'] . "</option>";
          $OPC_sel = ("ge" == $OPC_arg) ? " selected" : "";
           echo "           <option value='ge'" . $OPC_sel . ">" . $this->Ini->Nm_lang['lang_srch_grtr_equl'] . "</option>";
          $OPC_sel = ("lt" == $OPC_arg) ? " selected" : "";
           echo "           <option value='lt'" . $OPC_sel . ">" . $this->Ini->Nm_lang['lang_srch_less'] . "</option>";
          $OPC_sel = ("le" == $OPC_arg) ? " selected" : "";
           echo "           <option value='le'" . $OPC_sel . ">" . $this->Ini->Nm_lang['lang_srch_less_equl'] . "</option>";
?> 
          </select>
          <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 ($opcao_botoes != "novo") {
        $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") && (!$this->Embutida_call || $this->sc_evento == "novo" || $this->sc_evento == "insert" || $this->sc_evento == "incluir")) {
        $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") {
        $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;
    }
    if ($opcao_botoes != "novo") {
        $sCondStyle = ($this->nmgp_botoes['delete'] == "on") ? '' : 'display: none;';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "bexcluir", "nm_atualiza ('excluir'); return false;", "nm_atualiza ('excluir'); return false;", "sc_b_del_t", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
    if (($opcao_botoes != "novo") && ($opcao_botoes != "novo")) {
        $sCondStyle = ($this->nmgp_botoes['FGI'] == "on") ? '' : 'display: none;';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "fgi", "sc_btn_FGI()", "sc_btn_FGI()", "sc_FGI_top", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
    if (($opcao_botoes == "novo") && ($opcao_botoes != "novo")) {
        $sCondStyle = ($this->nmgp_botoes['FGI'] == "on") ? '' : 'display: none;';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "fgi", "sc_btn_FGI()", "sc_btn_FGI()", "sc_FGI_top", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
    if (($opcao_botoes != "novo") && ($opcao_botoes != "novo")) {
        $sCondStyle = ($this->nmgp_botoes['sc_btn_0'] == "on") ? '' : 'display: none;';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "sc_btn_0", "sc_btn_sc_btn_0()", "sc_btn_sc_btn_0()", "sc_sc_btn_0_top", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
    if (($opcao_botoes == "novo") && ($opcao_botoes != "novo")) {
        $sCondStyle = ($this->nmgp_botoes['sc_btn_0'] == "on") ? '' : 'display: none;';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "sc_btn_0", "sc_btn_sc_btn_0()", "sc_btn_sc_btn_0()", "sc_sc_btn_0_top", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
    if (($opcao_botoes != "novo") && ($opcao_botoes != "novo")) {
        $sCondStyle = ($this->nmgp_botoes['sc_btn_1'] == "on") ? '' : 'display: none;';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "sc_btn_1", "sc_btn_sc_btn_1()", "sc_btn_sc_btn_1()", "sc_sc_btn_1_top", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
    if (($opcao_botoes == "novo") && ($opcao_botoes != "novo")) {
        $sCondStyle = ($this->nmgp_botoes['sc_btn_1'] == "on") ? '' : 'display: none;';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "sc_btn_1", "sc_btn_sc_btn_1()", "sc_btn_sc_btn_1()", "sc_sc_btn_1_top", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
    if ($opcao_botoes != "novo") {
        $sCondStyle = ($this->nmgp_botoes['sc_btn_2'] == "on") ? '' : 'display: none;';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "sc_btn_2", "sc_btn_sc_btn_2()", "sc_btn_sc_btn_2()", "sc_sc_btn_2_top", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
    if ($opcao_botoes == "novo") {
        $sCondStyle = ($this->nmgp_botoes['sc_btn_2'] == "on") ? '' : 'display: none;';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "sc_btn_2", "sc_btn_sc_btn_2()", "sc_btn_sc_btn_2()", "sc_sc_btn_2_top", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
    if (($opcao_botoes != "novo") && ($opcao_botoes != "novo")) {
        $sCondStyle = ($this->nmgp_botoes['Greige'] == "on") ? '' : 'display: none;';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "greige", "sc_btn_Greige()", "sc_btn_Greige()", "sc_Greige_top", "", "", "" . $sCondStyle . "", "", "", "", $this->Ini->path_botoes, "", "", "", "");?>
 
<?php
        $NM_btn = true;
    }
    if (($opcao_botoes == "novo") && ($opcao_botoes != "novo")) {
        $sCondStyle = ($this->nmgp_botoes['Greige'] == "on") ? '' : 'display: none;';
?>
       <?php echo nmButtonOutput($this->arr_buttons, "greige", "sc_btn_Greige()", "sc_btn_Greige()", "sc_Greige_top", "", "", "" . $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]['line_form']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['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]['line_form']['run_iframe'] == "F" || $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['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]['line_form']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['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]['line_form']['run_iframe'] == "F" || $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['run_iframe'] == "R" || $this->aba_iframe || $this->nmgp_botoes['exit'] != "on") && ($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['run_iframe'] != "R" && $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['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]['line_form']['run_iframe'] == "F" || $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['run_iframe'] == "R" || $this->aba_iframe || $this->nmgp_botoes['exit'] != "on") && ($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['run_iframe'] != "R" && $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['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]['line_form']['embutida_liga_form_btn_nav'])) && $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['run_iframe'] != "F" && $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['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>";
  }
  else
  {
?>
<script type="text/javascript">
var pag_ativa = "line_form_form0";
</script>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" BGCOLOR="" width=100%>
<tr>
<?php
    if (empty($nmgp_num_form) || $nmgp_num_form == "line_form_form0")
    {
        $css_celula = "scTabActive";
        $css_fonte  = "scTabActiveFont scTabActiveFontCustom";
        $sImgTL     = $str_active_top_esq;
        $sImgT      = $str_active_lin_top;
        $sImgTR     = $str_active_top_dir;
        $sImgL      = $str_active_col_esq;
        $sImgR      = $str_active_col_dir;
    }
    else
    {
        $css_celula = "scTabInactive";
        $css_fonte  = "scTabInactiveFont scTabInactiveFontCustom";
        $sImgTL     = $str_inactive_top_esq;
        $sImgT      = $str_inactive_lin_top;
        $sImgTR     = $str_inactive_top_dir;
        $sImgL      = $str_inactive_col_esq;
        $sImgR      = $str_inactive_col_dir;
    }
?>
   <td>
         <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0">
          <TR HEIGHT="1">
           <TD WIDTH="1"><IMG ID="id_line_form_form0_tl" SRC="<?php echo $this->Ini->path_img_global . '/' . $sImgTL; ?>" BORDER="0"></TD>
           <TD ID="id_line_form_form0_t" HEIGHT="3" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgT;  ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
           <TD WIDTH="1"><IMG ID="id_line_form_form0_tr" SRC="<?php echo $this->Ini->path_img_global . '/' . $sImgTR;  ?>" BORDER="0"></TD>
          </TR>
          <TR>
           <TD ID="id_line_form_form0_4" class="<?php echo $css_celula; ?>" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgL; ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
           <TD ID="id_line_form_form0_5" nowrap class="<?php echo $css_celula; ?> <?php echo $css_celula; ?>Bg"><A HREF="javascript:sc_exib_ocult_pag ('line_form_form0')" class="<?php echo $css_fonte; ?>" ID="id_line_form_form0_font">Main</TD>
           <TD ID="id_line_form_form0_6" class="<?php echo $css_celula; ?>" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgR; ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
          </TR>
         </TABLE>
   </td>
<td><img src="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" border="0" width="1px"/></td>
<?php
    if ($nmgp_num_form == "line_form_form1")
    {
        $css_celula = "scTabActive";
        $css_fonte  = "scTabActiveFont scTabActiveFontCustom";
        $sImgTL     = $str_active_top_esq;
        $sImgT      = $str_active_lin_top;
        $sImgTR     = $str_active_top_dir;
        $sImgL      = $str_active_col_esq;
        $sImgR      = $str_active_col_dir;
    }
    else
    {
        $css_celula = "scTabInactive";
        $css_fonte  = "scTabInactiveFont scTabInactiveFontCustom";
        $sImgTL     = $str_inactive_top_esq;
        $sImgT      = $str_inactive_lin_top;
        $sImgTR     = $str_inactive_top_dir;
        $sImgL      = $str_inactive_col_esq;
        $sImgR      = $str_inactive_col_dir;
    }
?>
   <td>
         <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0">
          <TR HEIGHT="1">
           <TD WIDTH="1"><IMG ID="id_line_form_form1_tl" SRC="<?php echo $this->Ini->path_img_global . '/' . $sImgTL; ?>" BORDER="0"></TD>
           <TD ID="id_line_form_form1_t" HEIGHT="3" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgT;  ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
           <TD WIDTH="1"><IMG ID="id_line_form_form1_tr" SRC="<?php echo $this->Ini->path_img_global . '/' . $sImgTR;  ?>" BORDER="0"></TD>
          </TR>
          <TR>
           <TD ID="id_line_form_form1_4" class="<?php echo $css_celula; ?>" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgL; ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
           <TD ID="id_line_form_form1_5" nowrap class="<?php echo $css_celula; ?> <?php echo $css_celula; ?>Bg"><A HREF="javascript:sc_exib_ocult_pag ('line_form_form1')" class="<?php echo $css_fonte; ?>" ID="id_line_form_form1_font">Pricing</TD>
           <TD ID="id_line_form_form1_6" class="<?php echo $css_celula; ?>" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgR; ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
          </TR>
         </TABLE>
   </td>
<td><img src="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" border="0" width="1px"/></td>
<?php
    if ($nmgp_num_form == "line_form_form2")
    {
        $css_celula = "scTabActive";
        $css_fonte  = "scTabActiveFont scTabActiveFontCustom";
        $sImgTL     = $str_active_top_esq;
        $sImgT      = $str_active_lin_top;
        $sImgTR     = $str_active_top_dir;
        $sImgL      = $str_active_col_esq;
        $sImgR      = $str_active_col_dir;
    }
    else
    {
        $css_celula = "scTabInactive";
        $css_fonte  = "scTabInactiveFont scTabInactiveFontCustom";
        $sImgTL     = $str_inactive_top_esq;
        $sImgT      = $str_inactive_lin_top;
        $sImgTR     = $str_inactive_top_dir;
        $sImgL      = $str_inactive_col_esq;
        $sImgR      = $str_inactive_col_dir;
    }
?>
   <td>
         <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0">
          <TR HEIGHT="1">
           <TD WIDTH="1"><IMG ID="id_line_form_form2_tl" SRC="<?php echo $this->Ini->path_img_global . '/' . $sImgTL; ?>" BORDER="0"></TD>
           <TD ID="id_line_form_form2_t" HEIGHT="3" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgT;  ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
           <TD WIDTH="1"><IMG ID="id_line_form_form2_tr" SRC="<?php echo $this->Ini->path_img_global . '/' . $sImgTR;  ?>" BORDER="0"></TD>
          </TR>
          <TR>
           <TD ID="id_line_form_form2_4" class="<?php echo $css_celula; ?>" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgL; ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
           <TD ID="id_line_form_form2_5" nowrap class="<?php echo $css_celula; ?> <?php echo $css_celula; ?>Bg"><A HREF="javascript:sc_exib_ocult_pag ('line_form_form2')" class="<?php echo $css_fonte; ?>" ID="id_line_form_form2_font">Sales Notes</TD>
           <TD ID="id_line_form_form2_6" class="<?php echo $css_celula; ?>" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgR; ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
          </TR>
         </TABLE>
   </td>
<td><img src="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" border="0" width="1px"/></td>
<?php
    if ($nmgp_num_form == "line_form_form3")
    {
        $css_celula = "scTabActive";
        $css_fonte  = "scTabActiveFont scTabActiveFontCustom";
        $sImgTL     = $str_active_top_esq;
        $sImgT      = $str_active_lin_top;
        $sImgTR     = $str_active_top_dir;
        $sImgL      = $str_active_col_esq;
        $sImgR      = $str_active_col_dir;
    }
    else
    {
        $css_celula = "scTabInactive";
        $css_fonte  = "scTabInactiveFont scTabInactiveFontCustom";
        $sImgTL     = $str_inactive_top_esq;
        $sImgT      = $str_inactive_lin_top;
        $sImgTR     = $str_inactive_top_dir;
        $sImgL      = $str_inactive_col_esq;
        $sImgR      = $str_inactive_col_dir;
    }
?>
   <td>
         <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0">
          <TR HEIGHT="1">
           <TD WIDTH="1"><IMG ID="id_line_form_form3_tl" SRC="<?php echo $this->Ini->path_img_global . '/' . $sImgTL; ?>" BORDER="0"></TD>
           <TD ID="id_line_form_form3_t" HEIGHT="3" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgT;  ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
           <TD WIDTH="1"><IMG ID="id_line_form_form3_tr" SRC="<?php echo $this->Ini->path_img_global . '/' . $sImgTR;  ?>" BORDER="0"></TD>
          </TR>
          <TR>
           <TD ID="id_line_form_form3_4" class="<?php echo $css_celula; ?>" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgL; ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
           <TD ID="id_line_form_form3_5" nowrap class="<?php echo $css_celula; ?> <?php echo $css_celula; ?>Bg"><A HREF="javascript:sc_exib_ocult_pag ('line_form_form3')" class="<?php echo $css_fonte; ?>" ID="id_line_form_form3_font">Inventory Position</TD>
           <TD ID="id_line_form_form3_6" class="<?php echo $css_celula; ?>" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgR; ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
          </TR>
         </TABLE>
   </td>
<td><img src="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" border="0" width="1px"/></td>
<?php
    if ($nmgp_num_form == "line_form_form4")
    {
        $css_celula = "scTabActive";
        $css_fonte  = "scTabActiveFont scTabActiveFontCustom";
        $sImgTL     = $str_active_top_esq;
        $sImgT      = $str_active_lin_top;
        $sImgTR     = $str_active_top_dir;
        $sImgL      = $str_active_col_esq;
        $sImgR      = $str_active_col_dir;
    }
    else
    {
        $css_celula = "scTabInactive";
        $css_fonte  = "scTabInactiveFont scTabInactiveFontCustom";
        $sImgTL     = $str_inactive_top_esq;
        $sImgT      = $str_inactive_lin_top;
        $sImgTR     = $str_inactive_top_dir;
        $sImgL      = $str_inactive_col_esq;
        $sImgR      = $str_inactive_col_dir;
    }
?>
   <td>
         <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0">
          <TR HEIGHT="1">
           <TD WIDTH="1"><IMG ID="id_line_form_form4_tl" SRC="<?php echo $this->Ini->path_img_global . '/' . $sImgTL; ?>" BORDER="0"></TD>
           <TD ID="id_line_form_form4_t" HEIGHT="3" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgT;  ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
           <TD WIDTH="1"><IMG ID="id_line_form_form4_tr" SRC="<?php echo $this->Ini->path_img_global . '/' . $sImgTR;  ?>" BORDER="0"></TD>
          </TR>
          <TR>
           <TD ID="id_line_form_form4_4" class="<?php echo $css_celula; ?>" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgL; ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
           <TD ID="id_line_form_form4_5" nowrap class="<?php echo $css_celula; ?> <?php echo $css_celula; ?>Bg"><A HREF="javascript:sc_exib_ocult_pag ('line_form_form4')" class="<?php echo $css_fonte; ?>" ID="id_line_form_form4_font">Sales Data</TD>
           <TD ID="id_line_form_form4_6" class="<?php echo $css_celula; ?>" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgR; ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
          </TR>
         </TABLE>
   </td>
<td><img src="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" border="0" width="1px"/></td>
<?php
    if ($nmgp_num_form == "line_form_form5")
    {
        $css_celula = "scTabActive";
        $css_fonte  = "scTabActiveFont scTabActiveFontCustom";
        $sImgTL     = $str_active_top_esq;
        $sImgT      = $str_active_lin_top;
        $sImgTR     = $str_active_top_dir;
        $sImgL      = $str_active_col_esq;
        $sImgR      = $str_active_col_dir;
    }
    else
    {
        $css_celula = "scTabInactive";
        $css_fonte  = "scTabInactiveFont scTabInactiveFontCustom";
        $sImgTL     = $str_inactive_top_esq;
        $sImgT      = $str_inactive_lin_top;
        $sImgTR     = $str_inactive_top_dir;
        $sImgL      = $str_inactive_col_esq;
        $sImgR      = $str_inactive_col_dir;
    }
?>
   <td>
         <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0">
          <TR HEIGHT="1">
           <TD WIDTH="1"><IMG ID="id_line_form_form5_tl" SRC="<?php echo $this->Ini->path_img_global . '/' . $sImgTL; ?>" BORDER="0"></TD>
           <TD ID="id_line_form_form5_t" HEIGHT="3" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgT;  ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
           <TD WIDTH="1"><IMG ID="id_line_form_form5_tr" SRC="<?php echo $this->Ini->path_img_global . '/' . $sImgTR;  ?>" BORDER="0"></TD>
          </TR>
          <TR>
           <TD ID="id_line_form_form5_4" class="<?php echo $css_celula; ?>" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgL; ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
           <TD ID="id_line_form_form5_5" nowrap class="<?php echo $css_celula; ?> <?php echo $css_celula; ?>Bg"><A HREF="javascript:sc_exib_ocult_pag ('line_form_form5')" class="<?php echo $css_fonte; ?>" ID="id_line_form_form5_font">Physicals</TD>
           <TD ID="id_line_form_form5_6" class="<?php echo $css_celula; ?>" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgR; ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
          </TR>
         </TABLE>
   </td>
<td><img src="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" border="0" width="1px"/></td>
<?php
    if ($nmgp_num_form == "line_form_form6")
    {
        $css_celula = "scTabActive";
        $css_fonte  = "scTabActiveFont scTabActiveFontCustom";
        $sImgTL     = $str_active_top_esq;
        $sImgT      = $str_active_lin_top;
        $sImgTR     = $str_active_top_dir;
        $sImgL      = $str_active_col_esq;
        $sImgR      = $str_active_col_dir;
    }
    else
    {
        $css_celula = "scTabInactive";
        $css_fonte  = "scTabInactiveFont scTabInactiveFontCustom";
        $sImgTL     = $str_inactive_top_esq;
        $sImgT      = $str_inactive_lin_top;
        $sImgTR     = $str_inactive_top_dir;
        $sImgL      = $str_inactive_col_esq;
        $sImgR      = $str_inactive_col_dir;
    }
?>
   <td>
         <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0">
          <TR HEIGHT="1">
           <TD WIDTH="1"><IMG ID="id_line_form_form6_tl" SRC="<?php echo $this->Ini->path_img_global . '/' . $sImgTL; ?>" BORDER="0"></TD>
           <TD ID="id_line_form_form6_t" HEIGHT="3" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgT;  ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
           <TD WIDTH="1"><IMG ID="id_line_form_form6_tr" SRC="<?php echo $this->Ini->path_img_global . '/' . $sImgTR;  ?>" BORDER="0"></TD>
          </TR>
          <TR>
           <TD ID="id_line_form_form6_4" class="<?php echo $css_celula; ?>" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgL; ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
           <TD ID="id_line_form_form6_5" nowrap class="<?php echo $css_celula; ?> <?php echo $css_celula; ?>Bg"><A HREF="javascript:sc_exib_ocult_pag ('line_form_form6')" class="<?php echo $css_fonte; ?>" ID="id_line_form_form6_font">Testing</TD>
           <TD ID="id_line_form_form6_6" class="<?php echo $css_celula; ?>" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgR; ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
          </TR>
         </TABLE>
   </td>
<td><img src="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" border="0" width="1px"/></td>
<?php
    if ($nmgp_num_form == "line_form_form7")
    {
        $css_celula = "scTabActive";
        $css_fonte  = "scTabActiveFont scTabActiveFontCustom";
        $sImgTL     = $str_active_top_esq;
        $sImgT      = $str_active_lin_top;
        $sImgTR     = $str_active_top_dir;
        $sImgL      = $str_active_col_esq;
        $sImgR      = $str_active_col_dir;
    }
    else
    {
        $css_celula = "scTabInactive";
        $css_fonte  = "scTabInactiveFont scTabInactiveFontCustom";
        $sImgTL     = $str_inactive_top_esq;
        $sImgT      = $str_inactive_lin_top;
        $sImgTR     = $str_inactive_top_dir;
        $sImgL      = $str_inactive_col_esq;
        $sImgR      = $str_inactive_col_dir;
    }
?>
   <td>
         <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0">
          <TR HEIGHT="1">
           <TD WIDTH="1"><IMG ID="id_line_form_form7_tl" SRC="<?php echo $this->Ini->path_img_global . '/' . $sImgTL; ?>" BORDER="0"></TD>
           <TD ID="id_line_form_form7_t" HEIGHT="3" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgT;  ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
           <TD WIDTH="1"><IMG ID="id_line_form_form7_tr" SRC="<?php echo $this->Ini->path_img_global . '/' . $sImgTR;  ?>" BORDER="0"></TD>
          </TR>
          <TR>
           <TD ID="id_line_form_form7_4" class="<?php echo $css_celula; ?>" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgL; ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
           <TD ID="id_line_form_form7_5" nowrap class="<?php echo $css_celula; ?> <?php echo $css_celula; ?>Bg"><A HREF="javascript:sc_exib_ocult_pag ('line_form_form7')" class="<?php echo $css_fonte; ?>" ID="id_line_form_form7_font">Costing</TD>
           <TD ID="id_line_form_form7_6" class="<?php echo $css_celula; ?>" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgR; ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
          </TR>
         </TABLE>
   </td>
<td><img src="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" border="0" width="1px"/></td>
<?php
    if ($nmgp_num_form == "line_form_form8")
    {
        $css_celula = "scTabActive";
        $css_fonte  = "scTabActiveFont scTabActiveFontCustom";
        $sImgTL     = $str_active_top_esq;
        $sImgT      = $str_active_lin_top;
        $sImgTR     = $str_active_top_dir;
        $sImgL      = $str_active_col_esq;
        $sImgR      = $str_active_col_dir;
    }
    else
    {
        $css_celula = "scTabInactive";
        $css_fonte  = "scTabInactiveFont scTabInactiveFontCustom";
        $sImgTL     = $str_inactive_top_esq;
        $sImgT      = $str_inactive_lin_top;
        $sImgTR     = $str_inactive_top_dir;
        $sImgL      = $str_inactive_col_esq;
        $sImgR      = $str_inactive_col_dir;
    }
?>
   <td>
         <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0">
          <TR HEIGHT="1">
           <TD WIDTH="1"><IMG ID="id_line_form_form8_tl" SRC="<?php echo $this->Ini->path_img_global . '/' . $sImgTL; ?>" BORDER="0"></TD>
           <TD ID="id_line_form_form8_t" HEIGHT="3" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgT;  ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
           <TD WIDTH="1"><IMG ID="id_line_form_form8_tr" SRC="<?php echo $this->Ini->path_img_global . '/' . $sImgTR;  ?>" BORDER="0"></TD>
          </TR>
          <TR>
           <TD ID="id_line_form_form8_4" class="<?php echo $css_celula; ?>" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgL; ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
           <TD ID="id_line_form_form8_5" nowrap class="<?php echo $css_celula; ?> <?php echo $css_celula; ?>Bg"><A HREF="javascript:sc_exib_ocult_pag ('line_form_form8')" class="<?php echo $css_fonte; ?>" ID="id_line_form_form8_font">Greige Construction</TD>
           <TD ID="id_line_form_form8_6" class="<?php echo $css_celula; ?>" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgR; ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
          </TR>
         </TABLE>
   </td>
<td><img src="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" border="0" width="1px"/></td>
<?php
    if ($nmgp_num_form == "line_form_form9")
    {
        $css_celula = "scTabActive";
        $css_fonte  = "scTabActiveFont scTabActiveFontCustom";
        $sImgTL     = $str_active_top_esq;
        $sImgT      = $str_active_lin_top;
        $sImgTR     = $str_active_top_dir;
        $sImgL      = $str_active_col_esq;
        $sImgR      = $str_active_col_dir;
    }
    else
    {
        $css_celula = "scTabInactive";
        $css_fonte  = "scTabInactiveFont scTabInactiveFontCustom";
        $sImgTL     = $str_inactive_top_esq;
        $sImgT      = $str_inactive_lin_top;
        $sImgTR     = $str_inactive_top_dir;
        $sImgL      = $str_inactive_col_esq;
        $sImgR      = $str_inactive_col_dir;
    }
?>
   <td>
         <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0">
          <TR HEIGHT="1">
           <TD WIDTH="1"><IMG ID="id_line_form_form9_tl" SRC="<?php echo $this->Ini->path_img_global . '/' . $sImgTL; ?>" BORDER="0"></TD>
           <TD ID="id_line_form_form9_t" HEIGHT="3" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgT;  ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
           <TD WIDTH="1"><IMG ID="id_line_form_form9_tr" SRC="<?php echo $this->Ini->path_img_global . '/' . $sImgTR;  ?>" BORDER="0"></TD>
          </TR>
          <TR>
           <TD ID="id_line_form_form9_4" class="<?php echo $css_celula; ?>" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgL; ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
           <TD ID="id_line_form_form9_5" nowrap class="<?php echo $css_celula; ?> <?php echo $css_celula; ?>Bg"><A HREF="javascript:sc_exib_ocult_pag ('line_form_form9')" class="<?php echo $css_fonte; ?>" ID="id_line_form_form9_font">Order Info</TD>
           <TD ID="id_line_form_form9_6" class="<?php echo $css_celula; ?>" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgR; ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
          </TR>
         </TABLE>
   </td>
<td><img src="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" border="0" width="1px"/></td>
<?php
    if ($nmgp_num_form == "line_form_form10")
    {
        $css_celula = "scTabActive";
        $css_fonte  = "scTabActiveFont scTabActiveFontCustom";
        $sImgTL     = $str_active_top_esq;
        $sImgT      = $str_active_lin_top;
        $sImgTR     = $str_active_top_dir;
        $sImgL      = $str_active_col_esq;
        $sImgR      = $str_active_col_dir;
    }
    else
    {
        $css_celula = "scTabInactive";
        $css_fonte  = "scTabInactiveFont scTabInactiveFontCustom";
        $sImgTL     = $str_inactive_top_esq;
        $sImgT      = $str_inactive_lin_top;
        $sImgTR     = $str_inactive_top_dir;
        $sImgL      = $str_inactive_col_esq;
        $sImgR      = $str_inactive_col_dir;
    }
?>
   <td>
         <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0">
          <TR HEIGHT="1">
           <TD WIDTH="1"><IMG ID="id_line_form_form10_tl" SRC="<?php echo $this->Ini->path_img_global . '/' . $sImgTL; ?>" BORDER="0"></TD>
           <TD ID="id_line_form_form10_t" HEIGHT="3" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgT;  ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
           <TD WIDTH="1"><IMG ID="id_line_form_form10_tr" SRC="<?php echo $this->Ini->path_img_global . '/' . $sImgTR;  ?>" BORDER="0"></TD>
          </TR>
          <TR>
           <TD ID="id_line_form_form10_4" class="<?php echo $css_celula; ?>" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgL; ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
           <TD ID="id_line_form_form10_5" nowrap class="<?php echo $css_celula; ?> <?php echo $css_celula; ?>Bg"><A HREF="javascript:sc_exib_ocult_pag ('line_form_form10')" class="<?php echo $css_fonte; ?>" ID="id_line_form_form10_font">Sample Inventory</TD>
           <TD ID="id_line_form_form10_6" class="<?php echo $css_celula; ?>" BACKGROUND="<?php echo $this->Ini->path_img_global . '/' . $sImgR; ?>"><IMG SRC="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" BORDER="0"></TD>
          </TR>
         </TABLE>
   </td>
<td><img src="<?php echo $this->Ini->path_img_global ?>/scriptcase__NM__nm_transparent.gif" border="0" width="1px"/></td>
<td width=100%></td>
</tr>
</TABLE>
</td></tr> 
<tr><td style="padding: 0px <?php echo ('' == $int_iframe_padding) ? '0' : $int_iframe_padding; ?>px">
<div id="line_form_form0" style='display: none; width: 1px; height: 0px; overflow: scroll'>
<?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 -->
<?php
?>
<TABLE align="center" id="hidden_bloco_0" class="scFormTable" width="100%" style="height: 100%;"><?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['id2']))
           {
               $this->nmgp_cmp_readonly['id2'] = 'on';
           }
?>
   <tr>


    <TD colspan="8" height="20" class="scFormBlock">
     <TABLE style="padding: 0px; spacing: 0px; border-width: 0px;" width="100%" height="100%">
      <TR>
       <TD align="" valign="" class="scFormBlockFont"><?php if ('' != $this->Ini->Block_img_exp && '' != $this->Ini->Block_img_col) { echo "<table style=\"border-collapse: collapse; height: 100%; width: 100%\"><tr><td style=\"vertical-align: middle; border-width: 0px; padding: 0px 2px 0px 0px\"><img src=\"" . $this->Ini->path_icones . "/" . $this->Ini->Block_img_col . "\" style=\"border: 0px; float: left\" class=\"sc-ui-block-control\"></td><td style=\"border-width: 0px; padding: 0px; width: 100%\" class=\"scFormBlockAlign\">"; } ?>Main<?php if ('' != $this->Ini->Block_img_exp && '' != $this->Ini->Block_img_col) { echo "</td></tr></table>"; } ?></TD>
       
      </TR>
     </TABLE>
    </TD>

   </tr>
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['id2']))
    {
        $this->nm_new_label['id2'] = "ID2";
    }
?>
<?php
   $nm_cor_fun_cel  = ($nm_cor_fun_cel  == $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);
   $id2 = $this->id2;
   $sStyleHidden_id2 = '';
   if (isset($this->nmgp_cmp_hidden['id2']) && $this->nmgp_cmp_hidden['id2'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['id2']);
       $sStyleHidden_id2 = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_id2 = 'display: none;';
   $sStyleReadInp_id2 = '';
   if (/*($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || */(isset($this->nmgp_cmp_readonly["id2"]) &&  $this->nmgp_cmp_readonly["id2"] == "on"))
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['id2']);
       $sStyleReadLab_id2 = '';
       $sStyleReadInp_id2 = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['id2']) && $this->nmgp_cmp_hidden['id2'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="id2" value="<?php echo NM_encode_input($id2) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_id2" style="<?php echo $sStyleHidden_id2; ?>;"><span id="id_label_id2"><?php echo $this->nm_new_label['id2']; ?></span><?php if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['php_cmp_required']['id2']) || $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['php_cmp_required']['id2'] == "on") { ?> <span class="scFormRequiredOdd">*</span> <?php }?></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_id2" style="<?php echo $sStyleHidden_id2; ?>vertical-align: top;;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && ($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || (isset($this->nmgp_cmp_readonly["id2"]) &&  $this->nmgp_cmp_readonly["id2"] == "on")) { 

 ?>
<input type=hidden name="id2" value="<?php echo NM_encode_input($id2) . "\"><span id=\"id_ajax_label_id2\">" . $id2 . "</span>"; ?>
<?php } else { ?>
<span id="id_read_on_id2" class="sc-ui-readonly-id2" style=";<?php echo $sStyleReadLab_id2; ?>"><?php echo NM_encode_input($this->id2); ?></span><span id="id_read_off_id2" style="white-space: nowrap;<?php echo $sStyleReadInp_id2; ?>">
 <input class="sc-js-input scFormObjectOdd" style="text-align:left;" id="id_sc_field_id2" type=text name="id2" value="<?php echo NM_encode_input($id2) ?>"
 size=11 alt="{datatype: 'integer', maxLength: 11, thousandsSep: '<?php echo str_replace("'", "\'", $this->field_config['id2']['symbol_grp']); ?>', thousandsFormat: <?php echo $this->field_config['id2']['symbol_fmt']; ?>, allowNegative: false, onlyNegative: false, alignment: 'left', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', 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_id2_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_id2_text"></span></td></tr></table></td></tr></table></TD>
   <?php }?>


   <?php
    if (!isset($this->nm_new_label['style']))
    {
        $this->nm_new_label['style'] = "STYLE";
    }
?>
<?php
   $nm_cor_fun_cel  = ($nm_cor_fun_cel  == $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);
   $style = $this->style;
   $sStyleHidden_style = '';
   if (isset($this->nmgp_cmp_hidden['style']) && $this->nmgp_cmp_hidden['style'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['style']);
       $sStyleHidden_style = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_style = 'display: none;';
   $sStyleReadInp_style = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['style']) && $this->nmgp_cmp_readonly['style'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['style']);
       $sStyleReadLab_style = '';
       $sStyleReadInp_style = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['style']) && $this->nmgp_cmp_hidden['style'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="style" value="<?php echo NM_encode_input($style) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_style" style="<?php echo $sStyleHidden_style; ?>;"><span id="id_label_style"><?php echo $this->nm_new_label['style']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_style" style="<?php echo $sStyleHidden_style; ?>vertical-align: top;;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["style"]) &&  $this->nmgp_cmp_readonly["style"] == "on") { 

 ?>
<input type=hidden name="style" value="<?php echo NM_encode_input($style) . "\">" . $style . ""; ?>
<?php } else { ?>
<span id="id_read_on_style" class="sc-ui-readonly-style" style=";<?php echo $sStyleReadLab_style; ?>"><?php echo NM_encode_input($this->style); ?></span><span id="id_read_off_style" style="white-space: nowrap;<?php echo $sStyleReadInp_style; ?>">
 <input class="sc-js-input scFormObjectOdd" style=";" id="id_sc_field_style" type=text name="style" value="<?php echo NM_encode_input($style) ?>"
 size=11 maxlength=11 alt="{datatype: 'text', maxLength: 11, allowedChars: '', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', 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_style_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_style_text"></span></td></tr></table></td></tr></table></TD>
   <?php }?>


   <?php
    if (!isset($this->nm_new_label['name']))
    {
        $this->nm_new_label['name'] = "NAME";
    }
?>
<?php
   $nm_cor_fun_cel  = ($nm_cor_fun_cel  == $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);
   $name = $this->name;
   $sStyleHidden_name = '';
   if (isset($this->nmgp_cmp_hidden['name']) && $this->nmgp_cmp_hidden['name'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['name']);
       $sStyleHidden_name = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_name = 'display: none;';
   $sStyleReadInp_name = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['name']) && $this->nmgp_cmp_readonly['name'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['name']);
       $sStyleReadLab_name = '';
       $sStyleReadInp_name = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['name']) && $this->nmgp_cmp_hidden['name'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="name" value="<?php echo NM_encode_input($name) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_name" style="<?php echo $sStyleHidden_name; ?>;"><span id="id_label_name"><?php echo $this->nm_new_label['name']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_name" style="<?php echo $sStyleHidden_name; ?>vertical-align: top;;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["name"]) &&  $this->nmgp_cmp_readonly["name"] == "on") { 

 ?>
<input type=hidden name="name" value="<?php echo NM_encode_input($name) . "\">" . $name . ""; ?>
<?php } else { ?>
<span id="id_read_on_name" class="sc-ui-readonly-name" style=";<?php echo $sStyleReadLab_name; ?>"><?php echo NM_encode_input($this->name); ?></span><span id="id_read_off_name" style="white-space: nowrap;<?php echo $sStyleReadInp_name; ?>">
 <input class="sc-js-input scFormObjectOdd" style=";" id="id_sc_field_name" type=text name="name" value="<?php echo NM_encode_input($name) ?>"
 size=15 maxlength=15 alt="{datatype: 'text', maxLength: 15, allowedChars: '', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', 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_name_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_name_text"></span></td></tr></table></td></tr></table></TD>
   <?php }?>


   <?php
    if (!isset($this->nm_new_label['width']))
    {
        $this->nm_new_label['width'] = "WIDTH";
    }
?>
<?php
   $nm_cor_fun_cel  = ($nm_cor_fun_cel  == $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);
   $width = $this->width;
   $sStyleHidden_width = '';
   if (isset($this->nmgp_cmp_hidden['width']) && $this->nmgp_cmp_hidden['width'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['width']);
       $sStyleHidden_width = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_width = 'display: none;';
   $sStyleReadInp_width = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['width']) && $this->nmgp_cmp_readonly['width'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['width']);
       $sStyleReadLab_width = '';
       $sStyleReadInp_width = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['width']) && $this->nmgp_cmp_hidden['width'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="width" value="<?php echo NM_encode_input($width) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_width" style="<?php echo $sStyleHidden_width; ?>;"><span id="id_label_width"><?php echo $this->nm_new_label['width']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_width" style="<?php echo $sStyleHidden_width; ?>vertical-align: top;;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["width"]) &&  $this->nmgp_cmp_readonly["width"] == "on") { 

 ?>
<input type=hidden name="width" value="<?php echo NM_encode_input($width) . "\">" . $width . ""; ?>
<?php } else { ?>
<span id="id_read_on_width" class="sc-ui-readonly-width" style=";<?php echo $sStyleReadLab_width; ?>"><?php echo NM_encode_input($this->width); ?></span><span id="id_read_off_width" style="white-space: nowrap;<?php echo $sStyleReadInp_width; ?>">
 <input class="sc-js-input scFormObjectOdd" style=";" id="id_sc_field_width" type=text name="width" value="<?php echo NM_encode_input($width) ?>"
 size=15 maxlength=15 alt="{datatype: 'text', maxLength: 15, allowedChars: '', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', 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_width_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_width_text"></span></td></tr></table></td></tr></table></TD>
   <?php }?>


<?php if ($sc_hidden_yes > 0 && $sc_hidden_no > 0) { ?>


    <TD class="scFormDataOdd" colspan="<?php echo $sc_hidden_yes * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['comment']))
    {
        $this->nm_new_label['comment'] = "COMMENT";
    }
?>
<?php
   $nm_cor_fun_cel  = ($nm_cor_fun_cel  == $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);
   $comment = $this->comment;
   $sStyleHidden_comment = '';
   if (isset($this->nmgp_cmp_hidden['comment']) && $this->nmgp_cmp_hidden['comment'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['comment']);
       $sStyleHidden_comment = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_comment = 'display: none;';
   $sStyleReadInp_comment = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['comment']) && $this->nmgp_cmp_readonly['comment'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['comment']);
       $sStyleReadLab_comment = '';
       $sStyleReadInp_comment = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['comment']) && $this->nmgp_cmp_hidden['comment'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="comment" value="<?php echo NM_encode_input($comment) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_comment" style="<?php echo $sStyleHidden_comment; ?>;"><span id="id_label_comment"><?php echo $this->nm_new_label['comment']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_comment" style="<?php echo $sStyleHidden_comment; ?>vertical-align: top;;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["comment"]) &&  $this->nmgp_cmp_readonly["comment"] == "on") { 

 ?>
<input type=hidden name="comment" value="<?php echo NM_encode_input($comment) . "\">" . $comment . ""; ?>
<?php } else { ?>
<span id="id_read_on_comment" class="sc-ui-readonly-comment" style=";<?php echo $sStyleReadLab_comment; ?>"><?php echo NM_encode_input($this->comment); ?></span><span id="id_read_off_comment" style="white-space: nowrap;<?php echo $sStyleReadInp_comment; ?>">
 <input class="sc-js-input scFormObjectOdd" style=";" id="id_sc_field_comment" type=text name="comment" value="<?php echo NM_encode_input($comment) ?>"
 size=35 maxlength=35 alt="{datatype: 'text', maxLength: 35, allowedChars: '', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', 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_comment_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_comment_text"></span></td></tr></table></td></tr></table></TD>
   <?php }?>


   <?php
    if (!isset($this->nm_new_label['fiber']))
    {
        $this->nm_new_label['fiber'] = "FIBER";
    }
?>
<?php
   $nm_cor_fun_cel  = ($nm_cor_fun_cel  == $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);
   $fiber = $this->fiber;
   $sStyleHidden_fiber = '';
   if (isset($this->nmgp_cmp_hidden['fiber']) && $this->nmgp_cmp_hidden['fiber'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['fiber']);
       $sStyleHidden_fiber = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_fiber = 'display: none;';
   $sStyleReadInp_fiber = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['fiber']) && $this->nmgp_cmp_readonly['fiber'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['fiber']);
       $sStyleReadLab_fiber = '';
       $sStyleReadInp_fiber = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['fiber']) && $this->nmgp_cmp_hidden['fiber'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="fiber" value="<?php echo NM_encode_input($fiber) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_fiber" style="<?php echo $sStyleHidden_fiber; ?>;"><span id="id_label_fiber"><?php echo $this->nm_new_label['fiber']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_fiber" style="<?php echo $sStyleHidden_fiber; ?>vertical-align: top;;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["fiber"]) &&  $this->nmgp_cmp_readonly["fiber"] == "on") { 

 ?>
<input type=hidden name="fiber" value="<?php echo NM_encode_input($fiber) . "\">" . $fiber . ""; ?>
<?php } else { ?>
<span id="id_read_on_fiber" class="sc-ui-readonly-fiber" style=";<?php echo $sStyleReadLab_fiber; ?>"><?php echo NM_encode_input($this->fiber); ?></span><span id="id_read_off_fiber" style="white-space: nowrap;<?php echo $sStyleReadInp_fiber; ?>">
 <input class="sc-js-input scFormObjectOdd" style=";" id="id_sc_field_fiber" type=text name="fiber" value="<?php echo NM_encode_input($fiber) ?>"
 size=10 maxlength=10 alt="{datatype: 'text', maxLength: 10, allowedChars: '', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', 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_fiber_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_fiber_text"></span></td></tr></table></td></tr></table></TD>
   <?php }?>


   <?php
    if (!isset($this->nm_new_label['desc']))
    {
        $this->nm_new_label['desc'] = "DESC";
    }
?>
<?php
   $nm_cor_fun_cel  = ($nm_cor_fun_cel  == $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);
   $desc = $this->desc;
   $sStyleHidden_desc = '';
   if (isset($this->nmgp_cmp_hidden['desc']) && $this->nmgp_cmp_hidden['desc'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['desc']);
       $sStyleHidden_desc = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_desc = 'display: none;';
   $sStyleReadInp_desc = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['desc']) && $this->nmgp_cmp_readonly['desc'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['desc']);
       $sStyleReadLab_desc = '';
       $sStyleReadInp_desc = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['desc']) && $this->nmgp_cmp_hidden['desc'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="desc" value="<?php echo NM_encode_input($desc) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_desc" style="<?php echo $sStyleHidden_desc; ?>;"><span id="id_label_desc"><?php echo $this->nm_new_label['desc']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_desc" style="<?php echo $sStyleHidden_desc; ?>vertical-align: top;;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["desc"]) &&  $this->nmgp_cmp_readonly["desc"] == "on") { 

 ?>
<input type=hidden name="desc" value="<?php echo NM_encode_input($desc) . "\">" . $desc . ""; ?>
<?php } else { ?>
<span id="id_read_on_desc" class="sc-ui-readonly-desc" style=";<?php echo $sStyleReadLab_desc; ?>"><?php echo NM_encode_input($this->desc); ?></span><span id="id_read_off_desc" style="white-space: nowrap;<?php echo $sStyleReadInp_desc; ?>">
 <input class="sc-js-input scFormObjectOdd" style=";" id="id_sc_field_desc" type=text name="desc" value="<?php echo NM_encode_input($desc) ?>"
 size=45 maxlength=45 alt="{datatype: 'text', maxLength: 45, allowedChars: '', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', 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_desc_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_desc_text"></span></td></tr></table></td></tr></table></TD>
   <?php }?>


   <?php
    if (!isset($this->nm_new_label['line']))
    {
        $this->nm_new_label['line'] = "LINE";
    }
?>
<?php
   $nm_cor_fun_cel  = ($nm_cor_fun_cel  == $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);
   $line = $this->line;
   $sStyleHidden_line = '';
   if (isset($this->nmgp_cmp_hidden['line']) && $this->nmgp_cmp_hidden['line'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['line']);
       $sStyleHidden_line = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_line = 'display: none;';
   $sStyleReadInp_line = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['line']) && $this->nmgp_cmp_readonly['line'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['line']);
       $sStyleReadLab_line = '';
       $sStyleReadInp_line = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['line']) && $this->nmgp_cmp_hidden['line'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="line" value="<?php echo NM_encode_input($line) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_line" style="<?php echo $sStyleHidden_line; ?>;"><span id="id_label_line"><?php echo $this->nm_new_label['line']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_line" style="<?php echo $sStyleHidden_line; ?>vertical-align: top;;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["line"]) &&  $this->nmgp_cmp_readonly["line"] == "on") { 

 ?>
<input type=hidden name="line" value="<?php echo NM_encode_input($line) . "\">" . $line . ""; ?>
<?php } else { ?>
<span id="id_read_on_line" class="sc-ui-readonly-line" style=";<?php echo $sStyleReadLab_line; ?>"><?php echo NM_encode_input($this->line); ?></span><span id="id_read_off_line" style="white-space: nowrap;<?php echo $sStyleReadInp_line; ?>">
 <input class="sc-js-input scFormObjectOdd" style=";" id="id_sc_field_line" type=text name="line" value="<?php echo NM_encode_input($line) ?>"
 size=10 maxlength=10 alt="{datatype: 'text', maxLength: 10, allowedChars: '', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', 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_line_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_line_text"></span></td></tr></table></td></tr></table></TD>
   <?php }?>


<?php if ($sc_hidden_yes > 0 && $sc_hidden_no > 0) { ?>


    <TD class="scFormDataOdd" colspan="<?php echo $sc_hidden_yes * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['date']))
           {
               $this->nmgp_cmp_readonly['date'] = 'on';
           }
?>


   <?php
    if (!isset($this->nm_new_label['dept']))
    {
        $this->nm_new_label['dept'] = "DEPT";
    }
?>
<?php
   $nm_cor_fun_cel  = ($nm_cor_fun_cel  == $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);
   $dept = $this->dept;
   $sStyleHidden_dept = '';
   if (isset($this->nmgp_cmp_hidden['dept']) && $this->nmgp_cmp_hidden['dept'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['dept']);
       $sStyleHidden_dept = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_dept = 'display: none;';
   $sStyleReadInp_dept = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['dept']) && $this->nmgp_cmp_readonly['dept'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['dept']);
       $sStyleReadLab_dept = '';
       $sStyleReadInp_dept = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['dept']) && $this->nmgp_cmp_hidden['dept'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="dept" value="<?php echo NM_encode_input($dept) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_dept" style="<?php echo $sStyleHidden_dept; ?>;"><span id="id_label_dept"><?php echo $this->nm_new_label['dept']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_dept" style="<?php echo $sStyleHidden_dept; ?>vertical-align: top;;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["dept"]) &&  $this->nmgp_cmp_readonly["dept"] == "on") { 

 ?>
<input type=hidden name="dept" value="<?php echo NM_encode_input($dept) . "\">" . $dept . ""; ?>
<?php } else { ?>
<span id="id_read_on_dept" class="sc-ui-readonly-dept" style=";<?php echo $sStyleReadLab_dept; ?>"><?php echo NM_encode_input($this->dept); ?></span><span id="id_read_off_dept" style="white-space: nowrap;<?php echo $sStyleReadInp_dept; ?>">
 <input class="sc-js-input scFormObjectOdd" style=";" id="id_sc_field_dept" type=text name="dept" value="<?php echo NM_encode_input($dept) ?>"
 size=2 maxlength=2 alt="{datatype: 'text', maxLength: 2, allowedChars: '', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', 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_dept_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_dept_text"></span></td></tr></table></td></tr></table></TD>
   <?php }?>


   <?php
    if (!isset($this->nm_new_label['odesc']))
    {
        $this->nm_new_label['odesc'] = "INTERNAL DESC";
    }
?>
<?php
   $nm_cor_fun_cel  = ($nm_cor_fun_cel  == $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);
   $odesc = $this->odesc;
   $sStyleHidden_odesc = '';
   if (isset($this->nmgp_cmp_hidden['odesc']) && $this->nmgp_cmp_hidden['odesc'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['odesc']);
       $sStyleHidden_odesc = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_odesc = 'display: none;';
   $sStyleReadInp_odesc = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['odesc']) && $this->nmgp_cmp_readonly['odesc'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['odesc']);
       $sStyleReadLab_odesc = '';
       $sStyleReadInp_odesc = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['odesc']) && $this->nmgp_cmp_hidden['odesc'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="odesc" value="<?php echo NM_encode_input($odesc) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_odesc" style="<?php echo $sStyleHidden_odesc; ?>;"><span id="id_label_odesc"><?php echo $this->nm_new_label['odesc']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_odesc" style="<?php echo $sStyleHidden_odesc; ?>vertical-align: top;;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["odesc"]) &&  $this->nmgp_cmp_readonly["odesc"] == "on") { 

 ?>
<input type=hidden name="odesc" value="<?php echo NM_encode_input($odesc) . "\">" . $odesc . ""; ?>
<?php } else { ?>
<span id="id_read_on_odesc" class="sc-ui-readonly-odesc" style=";<?php echo $sStyleReadLab_odesc; ?>"><?php echo NM_encode_input($this->odesc); ?></span><span id="id_read_off_odesc" style="white-space: nowrap;<?php echo $sStyleReadInp_odesc; ?>">
 <input class="sc-js-input scFormObjectOdd" style=";" id="id_sc_field_odesc" type=text name="odesc" value="<?php echo NM_encode_input($odesc) ?>"
 size=45 maxlength=45 alt="{datatype: 'text', maxLength: 45, allowedChars: '', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', 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_odesc_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_odesc_text"></span></td></tr></table></td></tr></table></TD>
   <?php }?>


   <?php
    if (!isset($this->nm_new_label['hand']))
    {
        $this->nm_new_label['hand'] = "HAND";
    }
?>
<?php
   $nm_cor_fun_cel  = ($nm_cor_fun_cel  == $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);
   $hand = $this->hand;
   $sStyleHidden_hand = '';
   if (isset($this->nmgp_cmp_hidden['hand']) && $this->nmgp_cmp_hidden['hand'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['hand']);
       $sStyleHidden_hand = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_hand = 'display: none;';
   $sStyleReadInp_hand = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['hand']) && $this->nmgp_cmp_readonly['hand'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['hand']);
       $sStyleReadLab_hand = '';
       $sStyleReadInp_hand = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['hand']) && $this->nmgp_cmp_hidden['hand'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="hand" value="<?php echo NM_encode_input($hand) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_hand" style="<?php echo $sStyleHidden_hand; ?>;"><span id="id_label_hand"><?php echo $this->nm_new_label['hand']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_hand" style="<?php echo $sStyleHidden_hand; ?>vertical-align: top;;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["hand"]) &&  $this->nmgp_cmp_readonly["hand"] == "on") { 

 ?>
<input type=hidden name="hand" value="<?php echo NM_encode_input($hand) . "\">" . $hand . ""; ?>
<?php } else { ?>
<span id="id_read_on_hand" class="sc-ui-readonly-hand" style=";<?php echo $sStyleReadLab_hand; ?>"><?php echo NM_encode_input($this->hand); ?></span><span id="id_read_off_hand" style="white-space: nowrap;<?php echo $sStyleReadInp_hand; ?>">
 <input class="sc-js-input scFormObjectOdd" style=";" id="id_sc_field_hand" type=text name="hand" value="<?php echo NM_encode_input($hand) ?>"
 size=10 maxlength=10 alt="{datatype: 'text', maxLength: 10, allowedChars: '', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', 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_hand_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_hand_text"></span></td></tr></table></td></tr></table></TD>
   <?php }?>


   <?php
    if (!isset($this->nm_new_label['date']))
    {
        $this->nm_new_label['date'] = "DATE";
    }
?>
<?php
   $nm_cor_fun_cel  = ($nm_cor_fun_cel  == $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);
   $date = $this->date;
   $sStyleHidden_date = '';
   if (isset($this->nmgp_cmp_hidden['date']) && $this->nmgp_cmp_hidden['date'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['date']);
       $sStyleHidden_date = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_date = 'display: none;';
   $sStyleReadInp_date = '';
   if (/*($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || */(isset($this->nmgp_cmp_readonly["date"]) &&  $this->nmgp_cmp_readonly["date"] == "on"))
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['date']);
       $sStyleReadLab_date = '';
       $sStyleReadInp_date = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['date']) && $this->nmgp_cmp_hidden['date'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="date" value="<?php echo NM_encode_input($date) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_date" style="<?php echo $sStyleHidden_date; ?>;"><span id="id_label_date"><?php echo $this->nm_new_label['date']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_date" style="<?php echo $sStyleHidden_date; ?>vertical-align: top;;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && ($this->nmgp_opcao != "novo" && $this->nmgp_opc_ant != "incluir") || (isset($this->nmgp_cmp_readonly["date"]) &&  $this->nmgp_cmp_readonly["date"] == "on")) { 

 ?>
<input type=hidden name="date" value="<?php echo NM_encode_input($date) . "\"><span id=\"id_ajax_label_date\">" . $date . "</span>"; ?>
<?php } else { ?>
<span id="id_read_on_date" class="sc-ui-readonly-date" style=";<?php echo $sStyleReadLab_date; ?>"><?php echo NM_encode_input($this->date); ?></span><span id="id_read_off_date" style="white-space: nowrap;<?php echo $sStyleReadInp_date; ?>">
 <input class="sc-js-input scFormObjectOdd" style=";" id="id_sc_field_date" type=text name="date" value="<?php echo NM_encode_input($date) ?>"
 size=10 alt="{datatype: 'date', dateSep: '<?php echo $this->field_config['date']['date_sep']; ?>', dateFormat: '<?php echo $this->field_config['date']['date_format']; ?>', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', maskChars: '(){}[].,;:-+/ '}"><?php
$tmp_form_data = $this->field_config['date']['date_format'];
$tmp_form_data = str_replace('aaaa', 'yyyy', $tmp_form_data);
$tmp_form_data = str_replace('dd'  , $this->Ini->Nm_lang['lang_othr_date_days'], $tmp_form_data);
$tmp_form_data = str_replace('mm'  , $this->Ini->Nm_lang['lang_othr_date_mnth'], $tmp_form_data);
$tmp_form_data = str_replace('yyyy', $this->Ini->Nm_lang['lang_othr_date_year'], $tmp_form_data);
$tmp_form_data = str_replace('hh'  , $this->Ini->Nm_lang['lang_othr_date_hour'], $tmp_form_data);
$tmp_form_data = str_replace('ii'  , $this->Ini->Nm_lang['lang_othr_date_mint'], $tmp_form_data);
$tmp_form_data = str_replace('ss'  , $this->Ini->Nm_lang['lang_othr_date_scnd'], $tmp_form_data);
$tmp_form_data = str_replace(';'   , ' '                                       , $tmp_form_data);
?>
&nbsp;<?php echo $tmp_form_data; ?></span><?php } ?>
</td></tr><tr><td style="vertical-align: top; padding: 1px 0px 0px 0px"><table class="scFormFieldErrorTable" style="display: none" id="id_error_display_date_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_date_text"></span></td></tr></table></td></tr></table></TD>
   <?php }?>


<?php if ($sc_hidden_yes > 0 && $sc_hidden_no > 0) { ?>


    <TD class="scFormDataOdd" colspan="<?php echo $sc_hidden_yes * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['mindye']))
    {
        $this->nm_new_label['mindye'] = "MINDYE";
    }
?>
<?php
   $nm_cor_fun_cel  = ($nm_cor_fun_cel  == $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);
   $mindye = $this->mindye;
   $sStyleHidden_mindye = '';
   if (isset($this->nmgp_cmp_hidden['mindye']) && $this->nmgp_cmp_hidden['mindye'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['mindye']);
       $sStyleHidden_mindye = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_mindye = 'display: none;';
   $sStyleReadInp_mindye = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['mindye']) && $this->nmgp_cmp_readonly['mindye'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['mindye']);
       $sStyleReadLab_mindye = '';
       $sStyleReadInp_mindye = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['mindye']) && $this->nmgp_cmp_hidden['mindye'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="mindye" value="<?php echo NM_encode_input($mindye) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_mindye" style="<?php echo $sStyleHidden_mindye; ?>;"><span id="id_label_mindye"><?php echo $this->nm_new_label['mindye']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_mindye" style="<?php echo $sStyleHidden_mindye; ?>vertical-align: top;;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["mindye"]) &&  $this->nmgp_cmp_readonly["mindye"] == "on") { 

 ?>
<input type=hidden name="mindye" value="<?php echo NM_encode_input($mindye) . "\">" . $mindye . ""; ?>
<?php } else { ?>
<span id="id_read_on_mindye" class="sc-ui-readonly-mindye" style=";<?php echo $sStyleReadLab_mindye; ?>"><?php echo NM_encode_input($this->mindye); ?></span><span id="id_read_off_mindye" style="white-space: nowrap;<?php echo $sStyleReadInp_mindye; ?>">
 <input class="sc-js-input scFormObjectOdd" style=";" id="id_sc_field_mindye" type=text name="mindye" value="<?php echo NM_encode_input($mindye) ?>"
 size=10 maxlength=10 alt="{datatype: 'text', maxLength: 10, allowedChars: '', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', 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_mindye_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_mindye_text"></span></td></tr></table></td></tr></table></TD>
   <?php }?>


   <?php
    if (!isset($this->nm_new_label['minord']))
    {
        $this->nm_new_label['minord'] = "MINORD";
    }
?>
<?php
   $nm_cor_fun_cel  = ($nm_cor_fun_cel  == $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);
   $minord = $this->minord;
   $sStyleHidden_minord = '';
   if (isset($this->nmgp_cmp_hidden['minord']) && $this->nmgp_cmp_hidden['minord'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['minord']);
       $sStyleHidden_minord = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_minord = 'display: none;';
   $sStyleReadInp_minord = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['minord']) && $this->nmgp_cmp_readonly['minord'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['minord']);
       $sStyleReadLab_minord = '';
       $sStyleReadInp_minord = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['minord']) && $this->nmgp_cmp_hidden['minord'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="minord" value="<?php echo NM_encode_input($minord) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_minord" style="<?php echo $sStyleHidden_minord; ?>;"><span id="id_label_minord"><?php echo $this->nm_new_label['minord']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_minord" style="<?php echo $sStyleHidden_minord; ?>vertical-align: top;;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["minord"]) &&  $this->nmgp_cmp_readonly["minord"] == "on") { 

 ?>
<input type=hidden name="minord" value="<?php echo NM_encode_input($minord) . "\">" . $minord . ""; ?>
<?php } else { ?>
<span id="id_read_on_minord" class="sc-ui-readonly-minord" style=";<?php echo $sStyleReadLab_minord; ?>"><?php echo NM_encode_input($this->minord); ?></span><span id="id_read_off_minord" style="white-space: nowrap;<?php echo $sStyleReadInp_minord; ?>">
 <input class="sc-js-input scFormObjectOdd" style=";" id="id_sc_field_minord" type=text name="minord" value="<?php echo NM_encode_input($minord) ?>"
 size=10 maxlength=10 alt="{datatype: 'text', maxLength: 10, allowedChars: '', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', 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_minord_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_minord_text"></span></td></tr></table></td></tr></table></TD>
   <?php }?>


    <TD class="scFormDataOdd" colspan="4" >&nbsp;</TD>

<?php if ($sc_hidden_yes > 0) { ?>


    <TD class="scFormDataOdd" colspan="<?php echo $sc_hidden_yes * 2; ?>" >&nbsp;</TD>

<?php } ?>
   </tr>
<?php $sc_hidden_no = 1; ?>
</TABLE></div><!-- bloco_f -->
   </td>
   </tr></table>
   <a name="bloco_1"></a>
   <table width="100%" height="100%" cellpadding="0"><tr valign="top"><td width="100%" height="">
<div id="div_hidden_bloco_1"><!-- bloco_c -->
<TABLE align="center" id="hidden_bloco_1" class="scFormTable" width="100%" style="height: 100%;">   <tr>


    <TD colspan="4" height="20" class="scFormBlock">
     <TABLE style="padding: 0px; spacing: 0px; border-width: 0px;" width="100%" height="100%">
      <TR>
       <TD align="" valign="" class="scFormBlockFont"><?php if ('' != $this->Ini->Block_img_exp && '' != $this->Ini->Block_img_col) { echo "<table style=\"border-collapse: collapse; height: 100%; width: 100%\"><tr><td style=\"vertical-align: middle; border-width: 0px; padding: 0px 2px 0px 0px\"><img src=\"" . $this->Ini->path_icones . "/" . $this->Ini->Block_img_col . "\" style=\"border: 0px; float: left\" class=\"sc-ui-block-control\"></td><td style=\"border-width: 0px; padding: 0px; width: 100%\" class=\"scFormBlockAlign\">"; } ?>Yarns<?php if ('' != $this->Ini->Block_img_exp && '' != $this->Ini->Block_img_col) { echo "</td></tr></table>"; } ?></TD>
       
      </TR>
     </TABLE>
    </TD>

   </tr>
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['yarn1']))
    {
        $this->nm_new_label['yarn1'] = "YARN1";
    }
?>
<?php
   $nm_cor_fun_cel  = ($nm_cor_fun_cel  == $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);
   $yarn1 = $this->yarn1;
   $sStyleHidden_yarn1 = '';
   if (isset($this->nmgp_cmp_hidden['yarn1']) && $this->nmgp_cmp_hidden['yarn1'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['yarn1']);
       $sStyleHidden_yarn1 = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_yarn1 = 'display: none;';
   $sStyleReadInp_yarn1 = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['yarn1']) && $this->nmgp_cmp_readonly['yarn1'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['yarn1']);
       $sStyleReadLab_yarn1 = '';
       $sStyleReadInp_yarn1 = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['yarn1']) && $this->nmgp_cmp_hidden['yarn1'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="yarn1" value="<?php echo NM_encode_input($yarn1) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_yarn1" style="<?php echo $sStyleHidden_yarn1; ?>;"><span id="id_label_yarn1"><?php echo $this->nm_new_label['yarn1']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_yarn1" style="<?php echo $sStyleHidden_yarn1; ?>vertical-align: top;;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["yarn1"]) &&  $this->nmgp_cmp_readonly["yarn1"] == "on") { 

 ?>
<input type=hidden name="yarn1" value="<?php echo NM_encode_input($yarn1) . "\">" . $yarn1 . ""; ?>
<?php } else { ?>
<span id="id_read_on_yarn1" class="sc-ui-readonly-yarn1" style=";<?php echo $sStyleReadLab_yarn1; ?>"><?php echo NM_encode_input($this->yarn1); ?></span><span id="id_read_off_yarn1" style="white-space: nowrap;<?php echo $sStyleReadInp_yarn1; ?>">
 <input class="sc-js-input scFormObjectOdd" style=";" id="id_sc_field_yarn1" type=text name="yarn1" value="<?php echo NM_encode_input($yarn1) ?>"
 size=30 maxlength=30 alt="{datatype: 'text', maxLength: 30, allowedChars: '', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', 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_yarn1_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_yarn1_text"></span></td></tr></table></td></tr></table></TD>
   <?php }?>


   <?php
    if (!isset($this->nm_new_label['per1']))
    {
        $this->nm_new_label['per1'] = "PER1";
    }
?>
<?php
   $nm_cor_fun_cel  = ($nm_cor_fun_cel  == $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);
   $per1 = $this->per1;
   $sStyleHidden_per1 = '';
   if (isset($this->nmgp_cmp_hidden['per1']) && $this->nmgp_cmp_hidden['per1'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['per1']);
       $sStyleHidden_per1 = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_per1 = 'display: none;';
   $sStyleReadInp_per1 = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['per1']) && $this->nmgp_cmp_readonly['per1'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['per1']);
       $sStyleReadLab_per1 = '';
       $sStyleReadInp_per1 = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['per1']) && $this->nmgp_cmp_hidden['per1'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="per1" value="<?php echo NM_encode_input($per1) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_per1" style="<?php echo $sStyleHidden_per1; ?>;"><span id="id_label_per1"><?php echo $this->nm_new_label['per1']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_per1" style="<?php echo $sStyleHidden_per1; ?>vertical-align: top;;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["per1"]) &&  $this->nmgp_cmp_readonly["per1"] == "on") { 

 ?>
<input type=hidden name="per1" value="<?php echo NM_encode_input($per1) . "\">" . $per1 . ""; ?>
<?php } else { ?>
<span id="id_read_on_per1" class="sc-ui-readonly-per1" style=";<?php echo $sStyleReadLab_per1; ?>"><?php echo NM_encode_input($this->per1); ?></span><span id="id_read_off_per1" style="white-space: nowrap;<?php echo $sStyleReadInp_per1; ?>">
 <input class="sc-js-input scFormObjectOdd" style="text-align:left;" id="id_sc_field_per1" type=text name="per1" value="<?php echo NM_encode_input($per1) ?>"
 size=6 alt="{datatype: 'integer', maxLength: 6, thousandsSep: '<?php echo str_replace("'", "\'", $this->field_config['per1']['symbol_grp']); ?>', thousandsFormat: <?php echo $this->field_config['per1']['symbol_fmt']; ?>, allowNegative: false, onlyNegative: false, alignment: 'left', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', 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_per1_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_per1_text"></span></td></tr></table></td></tr></table></TD>
   <?php }?>


<?php if ($sc_hidden_yes > 0 && $sc_hidden_no > 0) { ?>


    <TD class="scFormDataOdd" colspan="<?php echo $sc_hidden_yes * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['yarn2']))
    {
        $this->nm_new_label['yarn2'] = "YARN2";
    }
?>
<?php
   $nm_cor_fun_cel  = ($nm_cor_fun_cel  == $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);
   $yarn2 = $this->yarn2;
   $sStyleHidden_yarn2 = '';
   if (isset($this->nmgp_cmp_hidden['yarn2']) && $this->nmgp_cmp_hidden['yarn2'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['yarn2']);
       $sStyleHidden_yarn2 = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_yarn2 = 'display: none;';
   $sStyleReadInp_yarn2 = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['yarn2']) && $this->nmgp_cmp_readonly['yarn2'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['yarn2']);
       $sStyleReadLab_yarn2 = '';
       $sStyleReadInp_yarn2 = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['yarn2']) && $this->nmgp_cmp_hidden['yarn2'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="yarn2" value="<?php echo NM_encode_input($yarn2) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_yarn2" style="<?php echo $sStyleHidden_yarn2; ?>;"><span id="id_label_yarn2"><?php echo $this->nm_new_label['yarn2']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_yarn2" style="<?php echo $sStyleHidden_yarn2; ?>vertical-align: top;;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["yarn2"]) &&  $this->nmgp_cmp_readonly["yarn2"] == "on") { 

 ?>
<input type=hidden name="yarn2" value="<?php echo NM_encode_input($yarn2) . "\">" . $yarn2 . ""; ?>
<?php } else { ?>
<span id="id_read_on_yarn2" class="sc-ui-readonly-yarn2" style=";<?php echo $sStyleReadLab_yarn2; ?>"><?php echo NM_encode_input($this->yarn2); ?></span><span id="id_read_off_yarn2" style="white-space: nowrap;<?php echo $sStyleReadInp_yarn2; ?>">
 <input class="sc-js-input scFormObjectOdd" style=";" id="id_sc_field_yarn2" type=text name="yarn2" value="<?php echo NM_encode_input($yarn2) ?>"
 size=30 maxlength=30 alt="{datatype: 'text', maxLength: 30, allowedChars: '', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', 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_yarn2_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_yarn2_text"></span></td></tr></table></td></tr></table></TD>
   <?php }?>


   <?php
    if (!isset($this->nm_new_label['per2']))
    {
        $this->nm_new_label['per2'] = "PER2";
    }
?>
<?php
   $nm_cor_fun_cel  = ($nm_cor_fun_cel  == $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);
   $per2 = $this->per2;
   $sStyleHidden_per2 = '';
   if (isset($this->nmgp_cmp_hidden['per2']) && $this->nmgp_cmp_hidden['per2'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['per2']);
       $sStyleHidden_per2 = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_per2 = 'display: none;';
   $sStyleReadInp_per2 = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['per2']) && $this->nmgp_cmp_readonly['per2'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['per2']);
       $sStyleReadLab_per2 = '';
       $sStyleReadInp_per2 = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['per2']) && $this->nmgp_cmp_hidden['per2'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="per2" value="<?php echo NM_encode_input($per2) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_per2" style="<?php echo $sStyleHidden_per2; ?>;"><span id="id_label_per2"><?php echo $this->nm_new_label['per2']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_per2" style="<?php echo $sStyleHidden_per2; ?>vertical-align: top;;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["per2"]) &&  $this->nmgp_cmp_readonly["per2"] == "on") { 

 ?>
<input type=hidden name="per2" value="<?php echo NM_encode_input($per2) . "\">" . $per2 . ""; ?>
<?php } else { ?>
<span id="id_read_on_per2" class="sc-ui-readonly-per2" style=";<?php echo $sStyleReadLab_per2; ?>"><?php echo NM_encode_input($this->per2); ?></span><span id="id_read_off_per2" style="white-space: nowrap;<?php echo $sStyleReadInp_per2; ?>">
 <input class="sc-js-input scFormObjectOdd" style="text-align:left;" id="id_sc_field_per2" type=text name="per2" value="<?php echo NM_encode_input($per2) ?>"
 size=6 alt="{datatype: 'integer', maxLength: 6, thousandsSep: '<?php echo str_replace("'", "\'", $this->field_config['per2']['symbol_grp']); ?>', thousandsFormat: <?php echo $this->field_config['per2']['symbol_fmt']; ?>, allowNegative: false, onlyNegative: false, alignment: 'left', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', 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_per2_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_per2_text"></span></td></tr></table></td></tr></table></TD>
   <?php }?>


<?php if ($sc_hidden_yes > 0 && $sc_hidden_no > 0) { ?>


    <TD class="scFormDataOdd" colspan="<?php echo $sc_hidden_yes * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['yarn3']))
    {
        $this->nm_new_label['yarn3'] = "YARN3";
    }
?>
<?php
   $nm_cor_fun_cel  = ($nm_cor_fun_cel  == $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);
   $yarn3 = $this->yarn3;
   $sStyleHidden_yarn3 = '';
   if (isset($this->nmgp_cmp_hidden['yarn3']) && $this->nmgp_cmp_hidden['yarn3'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['yarn3']);
       $sStyleHidden_yarn3 = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_yarn3 = 'display: none;';
   $sStyleReadInp_yarn3 = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['yarn3']) && $this->nmgp_cmp_readonly['yarn3'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['yarn3']);
       $sStyleReadLab_yarn3 = '';
       $sStyleReadInp_yarn3 = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['yarn3']) && $this->nmgp_cmp_hidden['yarn3'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="yarn3" value="<?php echo NM_encode_input($yarn3) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_yarn3" style="<?php echo $sStyleHidden_yarn3; ?>;"><span id="id_label_yarn3"><?php echo $this->nm_new_label['yarn3']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_yarn3" style="<?php echo $sStyleHidden_yarn3; ?>vertical-align: top;;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["yarn3"]) &&  $this->nmgp_cmp_readonly["yarn3"] == "on") { 

 ?>
<input type=hidden name="yarn3" value="<?php echo NM_encode_input($yarn3) . "\">" . $yarn3 . ""; ?>
<?php } else { ?>
<span id="id_read_on_yarn3" class="sc-ui-readonly-yarn3" style=";<?php echo $sStyleReadLab_yarn3; ?>"><?php echo NM_encode_input($this->yarn3); ?></span><span id="id_read_off_yarn3" style="white-space: nowrap;<?php echo $sStyleReadInp_yarn3; ?>">
 <input class="sc-js-input scFormObjectOdd" style=";" id="id_sc_field_yarn3" type=text name="yarn3" value="<?php echo NM_encode_input($yarn3) ?>"
 size=30 maxlength=30 alt="{datatype: 'text', maxLength: 30, allowedChars: '', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', 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_yarn3_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_yarn3_text"></span></td></tr></table></td></tr></table></TD>
   <?php }?>


   <?php
    if (!isset($this->nm_new_label['per3']))
    {
        $this->nm_new_label['per3'] = "PER3";
    }
?>
<?php
   $nm_cor_fun_cel  = ($nm_cor_fun_cel  == $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);
   $per3 = $this->per3;
   $sStyleHidden_per3 = '';
   if (isset($this->nmgp_cmp_hidden['per3']) && $this->nmgp_cmp_hidden['per3'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['per3']);
       $sStyleHidden_per3 = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_per3 = 'display: none;';
   $sStyleReadInp_per3 = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['per3']) && $this->nmgp_cmp_readonly['per3'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['per3']);
       $sStyleReadLab_per3 = '';
       $sStyleReadInp_per3 = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['per3']) && $this->nmgp_cmp_hidden['per3'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="per3" value="<?php echo NM_encode_input($per3) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_per3" style="<?php echo $sStyleHidden_per3; ?>;"><span id="id_label_per3"><?php echo $this->nm_new_label['per3']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_per3" style="<?php echo $sStyleHidden_per3; ?>vertical-align: top;;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["per3"]) &&  $this->nmgp_cmp_readonly["per3"] == "on") { 

 ?>
<input type=hidden name="per3" value="<?php echo NM_encode_input($per3) . "\">" . $per3 . ""; ?>
<?php } else { ?>
<span id="id_read_on_per3" class="sc-ui-readonly-per3" style=";<?php echo $sStyleReadLab_per3; ?>"><?php echo NM_encode_input($this->per3); ?></span><span id="id_read_off_per3" style="white-space: nowrap;<?php echo $sStyleReadInp_per3; ?>">
 <input class="sc-js-input scFormObjectOdd" style="text-align:left;" id="id_sc_field_per3" type=text name="per3" value="<?php echo NM_encode_input($per3) ?>"
 size=6 alt="{datatype: 'integer', maxLength: 6, thousandsSep: '<?php echo str_replace("'", "\'", $this->field_config['per3']['symbol_grp']); ?>', thousandsFormat: <?php echo $this->field_config['per3']['symbol_fmt']; ?>, allowNegative: false, onlyNegative: false, alignment: 'left', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', 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_per3_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_per3_text"></span></td></tr></table></td></tr></table></TD>
   <?php }?>


<?php if ($sc_hidden_yes > 0 && $sc_hidden_no > 0) { ?>


    <TD class="scFormDataOdd" colspan="<?php echo $sc_hidden_yes * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?php if ($sc_hidden_no > 0) { echo "<tr>"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['yarn4']))
    {
        $this->nm_new_label['yarn4'] = "YARN4";
    }
?>
<?php
   $nm_cor_fun_cel  = ($nm_cor_fun_cel  == $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);
   $yarn4 = $this->yarn4;
   $sStyleHidden_yarn4 = '';
   if (isset($this->nmgp_cmp_hidden['yarn4']) && $this->nmgp_cmp_hidden['yarn4'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['yarn4']);
       $sStyleHidden_yarn4 = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_yarn4 = 'display: none;';
   $sStyleReadInp_yarn4 = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['yarn4']) && $this->nmgp_cmp_readonly['yarn4'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['yarn4']);
       $sStyleReadLab_yarn4 = '';
       $sStyleReadInp_yarn4 = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['yarn4']) && $this->nmgp_cmp_hidden['yarn4'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="yarn4" value="<?php echo NM_encode_input($yarn4) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_yarn4" style="<?php echo $sStyleHidden_yarn4; ?>;"><span id="id_label_yarn4"><?php echo $this->nm_new_label['yarn4']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_yarn4" style="<?php echo $sStyleHidden_yarn4; ?>vertical-align: top;;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["yarn4"]) &&  $this->nmgp_cmp_readonly["yarn4"] == "on") { 

 ?>
<input type=hidden name="yarn4" value="<?php echo NM_encode_input($yarn4) . "\">" . $yarn4 . ""; ?>
<?php } else { ?>
<span id="id_read_on_yarn4" class="sc-ui-readonly-yarn4" style=";<?php echo $sStyleReadLab_yarn4; ?>"><?php echo NM_encode_input($this->yarn4); ?></span><span id="id_read_off_yarn4" style="white-space: nowrap;<?php echo $sStyleReadInp_yarn4; ?>">
 <input class="sc-js-input scFormObjectOdd" style=";" id="id_sc_field_yarn4" type=text name="yarn4" value="<?php echo NM_encode_input($yarn4) ?>"
 size=30 maxlength=30 alt="{datatype: 'text', maxLength: 30, allowedChars: '', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', 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_yarn4_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_yarn4_text"></span></td></tr></table></td></tr></table></TD>
   <?php }?>


   <?php
    if (!isset($this->nm_new_label['per4']))
    {
        $this->nm_new_label['per4'] = "PER4";
    }
?>
<?php
   $nm_cor_fun_cel  = ($nm_cor_fun_cel  == $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);
   $per4 = $this->per4;
   $sStyleHidden_per4 = '';
   if (isset($this->nmgp_cmp_hidden['per4']) && $this->nmgp_cmp_hidden['per4'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['per4']);
       $sStyleHidden_per4 = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_per4 = 'display: none;';
   $sStyleReadInp_per4 = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['per4']) && $this->nmgp_cmp_readonly['per4'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['per4']);
       $sStyleReadLab_per4 = '';
       $sStyleReadInp_per4 = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['per4']) && $this->nmgp_cmp_hidden['per4'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="per4" value="<?php echo NM_encode_input($per4) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_per4" style="<?php echo $sStyleHidden_per4; ?>;"><span id="id_label_per4"><?php echo $this->nm_new_label['per4']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_per4" style="<?php echo $sStyleHidden_per4; ?>vertical-align: top;;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["per4"]) &&  $this->nmgp_cmp_readonly["per4"] == "on") { 

 ?>
<input type=hidden name="per4" value="<?php echo NM_encode_input($per4) . "\">" . $per4 . ""; ?>
<?php } else { ?>
<span id="id_read_on_per4" class="sc-ui-readonly-per4" style=";<?php echo $sStyleReadLab_per4; ?>"><?php echo NM_encode_input($this->per4); ?></span><span id="id_read_off_per4" style="white-space: nowrap;<?php echo $sStyleReadInp_per4; ?>">
 <input class="sc-js-input scFormObjectOdd" style="text-align:left;" id="id_sc_field_per4" type=text name="per4" value="<?php echo NM_encode_input($per4) ?>"
 size=6 alt="{datatype: 'integer', maxLength: 6, thousandsSep: '<?php echo str_replace("'", "\'", $this->field_config['per4']['symbol_grp']); ?>', thousandsFormat: <?php echo $this->field_config['per4']['symbol_fmt']; ?>, allowNegative: false, onlyNegative: false, alignment: 'left', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', 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_per4_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_per4_text"></span></td></tr></table></td></tr></table></TD>
   <?php }?>


<?php if ($sc_hidden_yes > 0 && $sc_hidden_no > 0) { ?>


    <TD class="scFormDataOdd" colspan="<?php echo $sc_hidden_yes * 2; ?>" >&nbsp;</TD>

<?php } 
?> 


   </tr>
<?php $sc_hidden_no = 1; ?>
</TABLE></div><!-- bloco_f -->
   </td>
   </tr></table>
   <a name="bloco_2"></a>
   <table width="100%" height="100%" cellpadding="0"><tr valign="top"><td width="100%" height="">
<div id="div_hidden_bloco_2"><!-- bloco_c -->
<TABLE align="center" id="hidden_bloco_2" class="scFormTable" width="100%" style="height: 100%;">   <tr>


    <TD colspan="2" height="20" class="scFormBlock">
     <TABLE style="padding: 0px; spacing: 0px; border-width: 0px;" width="100%" height="100%">
      <TR>
       <TD align="" valign="" class="scFormBlockFont"><?php if ('' != $this->Ini->Block_img_exp && '' != $this->Ini->Block_img_col) { echo "<table style=\"border-collapse: collapse; height: 100%; width: 100%\"><tr><td style=\"vertical-align: middle; border-width: 0px; padding: 0px 2px 0px 0px\"><img src=\"" . $this->Ini->path_icones . "/" . $this->Ini->Block_img_exp . "\" style=\"border: 0px; float: left\" class=\"sc-ui-block-control\"></td><td style=\"border-width: 0px; padding: 0px; width: 100%\" class=\"scFormBlockAlign\">"; } ?>Delivery<?php if ('' != $this->Ini->Block_img_exp && '' != $this->Ini->Block_img_col) { echo "</td></tr></table>"; } ?></TD>
       
      </TR>
     </TABLE>
    </TD>

   </tr>
<?php if ($sc_hidden_no > 0) { echo "<tr style=\"display: none;\">"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['del1']))
    {
        $this->nm_new_label['del1'] = "DEL1";
    }
?>
<?php
   $nm_cor_fun_cel  = ($nm_cor_fun_cel  == $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);
   $del1 = $this->del1;
   $sStyleHidden_del1 = '';
   if (isset($this->nmgp_cmp_hidden['del1']) && $this->nmgp_cmp_hidden['del1'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['del1']);
       $sStyleHidden_del1 = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_del1 = 'display: none;';
   $sStyleReadInp_del1 = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['del1']) && $this->nmgp_cmp_readonly['del1'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['del1']);
       $sStyleReadLab_del1 = '';
       $sStyleReadInp_del1 = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['del1']) && $this->nmgp_cmp_hidden['del1'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="del1" value="<?php echo NM_encode_input($del1) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_del1" style="<?php echo $sStyleHidden_del1; ?>;"><span id="id_label_del1"><?php echo $this->nm_new_label['del1']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_del1" style="<?php echo $sStyleHidden_del1; ?>vertical-align: top;;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["del1"]) &&  $this->nmgp_cmp_readonly["del1"] == "on") { 

 ?>
<input type=hidden name="del1" value="<?php echo NM_encode_input($del1) . "\">" . $del1 . ""; ?>
<?php } else { ?>
<span id="id_read_on_del1" class="sc-ui-readonly-del1" style=";<?php echo $sStyleReadLab_del1; ?>"><?php echo NM_encode_input($this->del1); ?></span><span id="id_read_off_del1" style="white-space: nowrap;<?php echo $sStyleReadInp_del1; ?>">
 <input class="sc-js-input scFormObjectOdd" style=";" id="id_sc_field_del1" type=text name="del1" value="<?php echo NM_encode_input($del1) ?>"
 size=40 maxlength=40 alt="{datatype: 'text', maxLength: 40, allowedChars: '', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', 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_del1_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_del1_text"></span></td></tr></table></td></tr></table></TD>
   <?php }?>


<?php if ($sc_hidden_yes > 0 && $sc_hidden_no > 0) { ?>


    <TD class="scFormDataOdd" colspan="<?php echo $sc_hidden_yes * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?php if ($sc_hidden_no > 0) { echo "<tr style=\"display: none;\">"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['del2']))
    {
        $this->nm_new_label['del2'] = "DEL2";
    }
?>
<?php
   $nm_cor_fun_cel  = ($nm_cor_fun_cel  == $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);
   $del2 = $this->del2;
   $sStyleHidden_del2 = '';
   if (isset($this->nmgp_cmp_hidden['del2']) && $this->nmgp_cmp_hidden['del2'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['del2']);
       $sStyleHidden_del2 = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_del2 = 'display: none;';
   $sStyleReadInp_del2 = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['del2']) && $this->nmgp_cmp_readonly['del2'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['del2']);
       $sStyleReadLab_del2 = '';
       $sStyleReadInp_del2 = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['del2']) && $this->nmgp_cmp_hidden['del2'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="del2" value="<?php echo NM_encode_input($del2) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_del2" style="<?php echo $sStyleHidden_del2; ?>;"><span id="id_label_del2"><?php echo $this->nm_new_label['del2']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_del2" style="<?php echo $sStyleHidden_del2; ?>vertical-align: top;;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["del2"]) &&  $this->nmgp_cmp_readonly["del2"] == "on") { 

 ?>
<input type=hidden name="del2" value="<?php echo NM_encode_input($del2) . "\">" . $del2 . ""; ?>
<?php } else { ?>
<span id="id_read_on_del2" class="sc-ui-readonly-del2" style=";<?php echo $sStyleReadLab_del2; ?>"><?php echo NM_encode_input($this->del2); ?></span><span id="id_read_off_del2" style="white-space: nowrap;<?php echo $sStyleReadInp_del2; ?>">
 <input class="sc-js-input scFormObjectOdd" style=";" id="id_sc_field_del2" type=text name="del2" value="<?php echo NM_encode_input($del2) ?>"
 size=40 maxlength=40 alt="{datatype: 'text', maxLength: 40, allowedChars: '', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', 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_del2_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_del2_text"></span></td></tr></table></td></tr></table></TD>
   <?php }?>


<?php if ($sc_hidden_yes > 0 && $sc_hidden_no > 0) { ?>


    <TD class="scFormDataOdd" colspan="<?php echo $sc_hidden_yes * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?php if ($sc_hidden_no > 0) { echo "<tr style=\"display: none;\">"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
    if (!isset($this->nm_new_label['del3']))
    {
        $this->nm_new_label['del3'] = "DEL3";
    }
?>
<?php
   $nm_cor_fun_cel  = ($nm_cor_fun_cel  == $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);
   $del3 = $this->del3;
   $sStyleHidden_del3 = '';
   if (isset($this->nmgp_cmp_hidden['del3']) && $this->nmgp_cmp_hidden['del3'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['del3']);
       $sStyleHidden_del3 = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_del3 = 'display: none;';
   $sStyleReadInp_del3 = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['del3']) && $this->nmgp_cmp_readonly['del3'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['del3']);
       $sStyleReadLab_del3 = '';
       $sStyleReadInp_del3 = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['del3']) && $this->nmgp_cmp_hidden['del3'] == 'off') { $sc_hidden_yes++;  ?>
<input type=hidden name="del3" value="<?php echo NM_encode_input($del3) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_del3" style="<?php echo $sStyleHidden_del3; ?>;"><span id="id_label_del3"><?php echo $this->nm_new_label['del3']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_del3" style="<?php echo $sStyleHidden_del3; ?>vertical-align: top;;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["del3"]) &&  $this->nmgp_cmp_readonly["del3"] == "on") { 

 ?>
<input type=hidden name="del3" value="<?php echo NM_encode_input($del3) . "\">" . $del3 . ""; ?>
<?php } else { ?>
<span id="id_read_on_del3" class="sc-ui-readonly-del3" style=";<?php echo $sStyleReadLab_del3; ?>"><?php echo NM_encode_input($this->del3); ?></span><span id="id_read_off_del3" style="white-space: nowrap;<?php echo $sStyleReadInp_del3; ?>">
 <input class="sc-js-input scFormObjectOdd" style=";" id="id_sc_field_del3" type=text name="del3" value="<?php echo NM_encode_input($del3) ?>"
 size=40 maxlength=40 alt="{datatype: 'text', maxLength: 40, allowedChars: '', lettersCase: '', enterTab: false, enterSubmit: false, autoTab: false, selectOnFocus: true, watermark: '', watermarkClass: 'scFormObjectOddWm', 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_del3_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_del3_text"></span></td></tr></table></td></tr></table></TD>
   <?php }?>


<?php if ($sc_hidden_yes > 0 && $sc_hidden_no > 0) { ?>


    <TD class="scFormDataOdd" colspan="<?php echo $sc_hidden_yes * 2; ?>" >&nbsp;</TD>

<?php } 
?> 


   </tr>
<?php $sc_hidden_no = 1; ?>
</TABLE></div><!-- bloco_f -->
   </td>
   </tr></table>
   <a name="bloco_3"></a>
   <table width="100%" height="100%" cellpadding="0"><tr valign="top"><td width="100%" height="">
<div id="div_hidden_bloco_3"><!-- bloco_c -->
<TABLE align="center" id="hidden_bloco_3" class="scFormTable" width="100%" style="height: 100%;">   <tr>


    <TD colspan="10" height="20" class="scFormBlock">
     <TABLE style="padding: 0px; spacing: 0px; border-width: 0px;" width="100%" height="100%">
      <TR>
       <TD align="" valign="" class="scFormBlockFont"><?php if ('' != $this->Ini->Block_img_exp && '' != $this->Ini->Block_img_col) { echo "<table style=\"border-collapse: collapse; height: 100%; width: 100%\"><tr><td style=\"vertical-align: middle; border-width: 0px; padding: 0px 2px 0px 0px\"><img src=\"" . $this->Ini->path_icones . "/" . $this->Ini->Block_img_exp . "\" style=\"border: 0px; float: left\" class=\"sc-ui-block-control\"></td><td style=\"border-width: 0px; padding: 0px; width: 100%\" class=\"scFormBlockAlign\">"; } ?>End Uses<?php if ('' != $this->Ini->Block_img_exp && '' != $this->Ini->Block_img_col) { echo "</td></tr></table>"; } ?></TD>
       
      </TR>
     </TABLE>
    </TD>

   </tr>
<?php if ($sc_hidden_no > 0) { echo "<tr style=\"display: none;\">"; }; 
      $sc_hidden_yes = 0; $sc_hidden_no = 0; ?>


   <?php
   if (!isset($this->nm_new_label['end1']))
   {
       $this->nm_new_label['end1'] = "END1";
   }
   $nm_cor_fun_cel  = ($nm_cor_fun_cel  == $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);
   $end1 = $this->end1;
   $sStyleHidden_end1 = '';
   if (isset($this->nmgp_cmp_hidden['end1']) && $this->nmgp_cmp_hidden['end1'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['end1']);
       $sStyleHidden_end1 = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_end1 = 'display: none;';
   $sStyleReadInp_end1 = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['end1']) && $this->nmgp_cmp_readonly['end1'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['end1']);
       $sStyleReadLab_end1 = '';
       $sStyleReadInp_end1 = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['end1']) && $this->nmgp_cmp_hidden['end1'] == 'off') { $sc_hidden_yes++; ?>
<input type=hidden name="end1" value="<?php echo NM_encode_input($this->end1) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_end1" style="<?php echo $sStyleHidden_end1; ?>;"><span id="id_label_end1"><?php echo $this->nm_new_label['end1']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_end1" style="<?php echo $sStyleHidden_end1; ?>vertical-align: top;;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["end1"]) &&  $this->nmgp_cmp_readonly["end1"] == "on") { 
 
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end1']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end1'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end1']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end1'] = array(); 
}
   if (in_array(strtolower($this->Ini->nm_tpbanco), $this->Ini->nm_bases_ibase))
   { 
       $GLOBALS["NM_ERRO_IBASE"] = 1;  
   } 
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end1']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end1'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end1']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end1'] = array(); 
    }

   $old_value_id2 = $this->id2;
   $old_value_date = $this->date;
   $old_value_per1 = $this->per1;
   $old_value_per2 = $this->per2;
   $old_value_per3 = $this->per3;
   $old_value_per4 = $this->per4;
   $old_value_sprice = $this->sprice;
   $old_value_nprice = $this->nprice;
   $old_value_npdate = $this->npdate;
   $old_value_yds = $this->yds;
   $old_value_lbs = $this->lbs;
   $old_value_dye = $this->dye;
   $old_value_gc = $this->gc;
   $old_value_fc = $this->fc;
   $old_value_gshort = $this->gshort;
   $old_value_ytdd = $this->ytdd;
   $old_value_ytdy = $this->ytdy;
   $old_value_mtdd = $this->mtdd;
   $old_value_mtdy = $this->mtdy;
   $old_value_histy = $this->histy;
   $old_value_histd = $this->histd;
   $old_value_update = $this->update;
   $old_value_avprice = $this->avprice;
   $old_value_lastyry = $this->lastyry;
   $old_value_lastyrd = $this->lastyrd;
   $old_value_dyeleft = $this->dyeleft;
   $old_value_ozsquare = $this->ozsquare;
   $old_value_ozlin = $this->ozlin;
   $old_value_sqlb = $this->sqlb;
   $old_value_meterkilo = $this->meterkilo;
   $old_value_meter2kilo = $this->meter2kilo;
   $old_value_grammeter = $this->grammeter;
   $old_value_grammeter2 = $this->grammeter2;
   $old_value_date1 = $this->date1;
   $old_value_date2 = $this->date2;
   $old_value_date3 = $this->date3;
   $old_value_date4 = $this->date4;
   $old_value_date5 = $this->date5;
   $old_value_date6 = $this->date6;
   $old_value_conv2 = $this->conv2;
   $old_value_conv3 = $this->conv3;
   $old_value_conv = $this->conv;
   $old_value_stdcost = $this->stdcost;
   $old_value_stdgp = $this->stdgp;
   $old_value_avcost = $this->avcost;
   $old_value_lbbo = $this->lbbo;
   $old_value_bo = $this->bo;
   $old_value_samples = $this->samples;
   $this->nm_tira_formatacao();
   $this->nm_converte_datas(false);


   $unformatted_value_id2 = $this->id2;
   $unformatted_value_date = $this->date;
   $unformatted_value_per1 = $this->per1;
   $unformatted_value_per2 = $this->per2;
   $unformatted_value_per3 = $this->per3;
   $unformatted_value_per4 = $this->per4;
   $unformatted_value_sprice = $this->sprice;
   $unformatted_value_nprice = $this->nprice;
   $unformatted_value_npdate = $this->npdate;
   $unformatted_value_yds = $this->yds;
   $unformatted_value_lbs = $this->lbs;
   $unformatted_value_dye = $this->dye;
   $unformatted_value_gc = $this->gc;
   $unformatted_value_fc = $this->fc;
   $unformatted_value_gshort = $this->gshort;
   $unformatted_value_ytdd = $this->ytdd;
   $unformatted_value_ytdy = $this->ytdy;
   $unformatted_value_mtdd = $this->mtdd;
   $unformatted_value_mtdy = $this->mtdy;
   $unformatted_value_histy = $this->histy;
   $unformatted_value_histd = $this->histd;
   $unformatted_value_update = $this->update;
   $unformatted_value_avprice = $this->avprice;
   $unformatted_value_lastyry = $this->lastyry;
   $unformatted_value_lastyrd = $this->lastyrd;
   $unformatted_value_dyeleft = $this->dyeleft;
   $unformatted_value_ozsquare = $this->ozsquare;
   $unformatted_value_ozlin = $this->ozlin;
   $unformatted_value_sqlb = $this->sqlb;
   $unformatted_value_meterkilo = $this->meterkilo;
   $unformatted_value_meter2kilo = $this->meter2kilo;
   $unformatted_value_grammeter = $this->grammeter;
   $unformatted_value_grammeter2 = $this->grammeter2;
   $unformatted_value_date1 = $this->date1;
   $unformatted_value_date2 = $this->date2;
   $unformatted_value_date3 = $this->date3;
   $unformatted_value_date4 = $this->date4;
   $unformatted_value_date5 = $this->date5;
   $unformatted_value_date6 = $this->date6;
   $unformatted_value_conv2 = $this->conv2;
   $unformatted_value_conv3 = $this->conv3;
   $unformatted_value_conv = $this->conv;
   $unformatted_value_stdcost = $this->stdcost;
   $unformatted_value_stdgp = $this->stdgp;
   $unformatted_value_avcost = $this->avcost;
   $unformatted_value_lbbo = $this->lbbo;
   $unformatted_value_bo = $this->bo;
   $unformatted_value_samples = $this->samples;

   $nm_comando = "SELECT ECODE, ENDUSE 
FROM enduse 
ORDER BY ENDUSE";

   $this->id2 = $old_value_id2;
   $this->date = $old_value_date;
   $this->per1 = $old_value_per1;
   $this->per2 = $old_value_per2;
   $this->per3 = $old_value_per3;
   $this->per4 = $old_value_per4;
   $this->sprice = $old_value_sprice;
   $this->nprice = $old_value_nprice;
   $this->npdate = $old_value_npdate;
   $this->yds = $old_value_yds;
   $this->lbs = $old_value_lbs;
   $this->dye = $old_value_dye;
   $this->gc = $old_value_gc;
   $this->fc = $old_value_fc;
   $this->gshort = $old_value_gshort;
   $this->ytdd = $old_value_ytdd;
   $this->ytdy = $old_value_ytdy;
   $this->mtdd = $old_value_mtdd;
   $this->mtdy = $old_value_mtdy;
   $this->histy = $old_value_histy;
   $this->histd = $old_value_histd;
   $this->update = $old_value_update;
   $this->avprice = $old_value_avprice;
   $this->lastyry = $old_value_lastyry;
   $this->lastyrd = $old_value_lastyrd;
   $this->dyeleft = $old_value_dyeleft;
   $this->ozsquare = $old_value_ozsquare;
   $this->ozlin = $old_value_ozlin;
   $this->sqlb = $old_value_sqlb;
   $this->meterkilo = $old_value_meterkilo;
   $this->meter2kilo = $old_value_meter2kilo;
   $this->grammeter = $old_value_grammeter;
   $this->grammeter2 = $old_value_grammeter2;
   $this->date1 = $old_value_date1;
   $this->date2 = $old_value_date2;
   $this->date3 = $old_value_date3;
   $this->date4 = $old_value_date4;
   $this->date5 = $old_value_date5;
   $this->date6 = $old_value_date6;
   $this->conv2 = $old_value_conv2;
   $this->conv3 = $old_value_conv3;
   $this->conv = $old_value_conv;
   $this->stdcost = $old_value_stdcost;
   $this->stdgp = $old_value_stdgp;
   $this->avcost = $old_value_avcost;
   $this->lbbo = $old_value_lbbo;
   $this->bo = $old_value_bo;
   $this->samples = $old_value_samples;

   $_SESSION['scriptcase']['sc_sql_ult_comando'] = $nm_comando; 
   $_SESSION['scriptcase']['sc_sql_ult_conexao'] = ''; 
   if ($nm_comando != "" && $rs = $this->Db->Execute($nm_comando)) 
   {
       while (!$rs->EOF) 
       { 
              $nmgp_def_dados .= $rs->fields[1] . "?#?" ; 
              $nmgp_def_dados .= $rs->fields[0] . "?#?N?@?" ; 
              $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end1'][] = $rs->fields[0];
              $rs->MoveNext() ; 
       } 
       $rs->Close() ; 
   } 
   elseif ($GLOBALS["NM_ERRO_IBASE"] != 1 && $nm_comando != "")  
   {  
       $this->Erro->mensagem(__FILE__, __LINE__, "banco", $this->Ini->Nm_lang['lang_errm_dber'], $this->Db->ErrorMsg()); 
       exit; 
   } 
   $GLOBALS["NM_ERRO_IBASE"] = 0; 
   $x = 0; 
   $end1_look = ""; 
   $todo = explode("?@?", trim($nmgp_def_dados)) ; 
   while (!empty($todo[$x])) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          if (isset($this->Embutida_ronly) && $this->Embutida_ronly && isset($this->end1_1))
          {
              foreach ($this->end1_1 as $tmp_end1)
              {
                  if (trim($tmp_end1) === trim($cadaselect[1])) { $end1_look .= $cadaselect[0] . '__SC_BREAK_LINE__'; }
              }
          }
          elseif (trim($this->end1) === trim($cadaselect[1])) { $end1_look .= $cadaselect[0]; } 
          $x++; 
   }

?>
<input type=hidden name="end1" value="<?php echo NM_encode_input($end1) . "\">" . $end1_look . ""; ?>
<?php } else { ?>
 
<?php  
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end1']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end1'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end1']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end1'] = array(); 
}
   if (in_array(strtolower($this->Ini->nm_tpbanco), $this->Ini->nm_bases_ibase))
   { 
       $GLOBALS["NM_ERRO_IBASE"] = 1;  
   } 
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end1']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end1'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end1']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end1'] = array(); 
    }

   $old_value_id2 = $this->id2;
   $old_value_date = $this->date;
   $old_value_per1 = $this->per1;
   $old_value_per2 = $this->per2;
   $old_value_per3 = $this->per3;
   $old_value_per4 = $this->per4;
   $old_value_sprice = $this->sprice;
   $old_value_nprice = $this->nprice;
   $old_value_npdate = $this->npdate;
   $old_value_yds = $this->yds;
   $old_value_lbs = $this->lbs;
   $old_value_dye = $this->dye;
   $old_value_gc = $this->gc;
   $old_value_fc = $this->fc;
   $old_value_gshort = $this->gshort;
   $old_value_ytdd = $this->ytdd;
   $old_value_ytdy = $this->ytdy;
   $old_value_mtdd = $this->mtdd;
   $old_value_mtdy = $this->mtdy;
   $old_value_histy = $this->histy;
   $old_value_histd = $this->histd;
   $old_value_update = $this->update;
   $old_value_avprice = $this->avprice;
   $old_value_lastyry = $this->lastyry;
   $old_value_lastyrd = $this->lastyrd;
   $old_value_dyeleft = $this->dyeleft;
   $old_value_ozsquare = $this->ozsquare;
   $old_value_ozlin = $this->ozlin;
   $old_value_sqlb = $this->sqlb;
   $old_value_meterkilo = $this->meterkilo;
   $old_value_meter2kilo = $this->meter2kilo;
   $old_value_grammeter = $this->grammeter;
   $old_value_grammeter2 = $this->grammeter2;
   $old_value_date1 = $this->date1;
   $old_value_date2 = $this->date2;
   $old_value_date3 = $this->date3;
   $old_value_date4 = $this->date4;
   $old_value_date5 = $this->date5;
   $old_value_date6 = $this->date6;
   $old_value_conv2 = $this->conv2;
   $old_value_conv3 = $this->conv3;
   $old_value_conv = $this->conv;
   $old_value_stdcost = $this->stdcost;
   $old_value_stdgp = $this->stdgp;
   $old_value_avcost = $this->avcost;
   $old_value_lbbo = $this->lbbo;
   $old_value_bo = $this->bo;
   $old_value_samples = $this->samples;
   $this->nm_tira_formatacao();
   $this->nm_converte_datas(false);


   $unformatted_value_id2 = $this->id2;
   $unformatted_value_date = $this->date;
   $unformatted_value_per1 = $this->per1;
   $unformatted_value_per2 = $this->per2;
   $unformatted_value_per3 = $this->per3;
   $unformatted_value_per4 = $this->per4;
   $unformatted_value_sprice = $this->sprice;
   $unformatted_value_nprice = $this->nprice;
   $unformatted_value_npdate = $this->npdate;
   $unformatted_value_yds = $this->yds;
   $unformatted_value_lbs = $this->lbs;
   $unformatted_value_dye = $this->dye;
   $unformatted_value_gc = $this->gc;
   $unformatted_value_fc = $this->fc;
   $unformatted_value_gshort = $this->gshort;
   $unformatted_value_ytdd = $this->ytdd;
   $unformatted_value_ytdy = $this->ytdy;
   $unformatted_value_mtdd = $this->mtdd;
   $unformatted_value_mtdy = $this->mtdy;
   $unformatted_value_histy = $this->histy;
   $unformatted_value_histd = $this->histd;
   $unformatted_value_update = $this->update;
   $unformatted_value_avprice = $this->avprice;
   $unformatted_value_lastyry = $this->lastyry;
   $unformatted_value_lastyrd = $this->lastyrd;
   $unformatted_value_dyeleft = $this->dyeleft;
   $unformatted_value_ozsquare = $this->ozsquare;
   $unformatted_value_ozlin = $this->ozlin;
   $unformatted_value_sqlb = $this->sqlb;
   $unformatted_value_meterkilo = $this->meterkilo;
   $unformatted_value_meter2kilo = $this->meter2kilo;
   $unformatted_value_grammeter = $this->grammeter;
   $unformatted_value_grammeter2 = $this->grammeter2;
   $unformatted_value_date1 = $this->date1;
   $unformatted_value_date2 = $this->date2;
   $unformatted_value_date3 = $this->date3;
   $unformatted_value_date4 = $this->date4;
   $unformatted_value_date5 = $this->date5;
   $unformatted_value_date6 = $this->date6;
   $unformatted_value_conv2 = $this->conv2;
   $unformatted_value_conv3 = $this->conv3;
   $unformatted_value_conv = $this->conv;
   $unformatted_value_stdcost = $this->stdcost;
   $unformatted_value_stdgp = $this->stdgp;
   $unformatted_value_avcost = $this->avcost;
   $unformatted_value_lbbo = $this->lbbo;
   $unformatted_value_bo = $this->bo;
   $unformatted_value_samples = $this->samples;

   $nm_comando = "SELECT ECODE, ENDUSE 
FROM enduse 
ORDER BY ENDUSE";

   $this->id2 = $old_value_id2;
   $this->date = $old_value_date;
   $this->per1 = $old_value_per1;
   $this->per2 = $old_value_per2;
   $this->per3 = $old_value_per3;
   $this->per4 = $old_value_per4;
   $this->sprice = $old_value_sprice;
   $this->nprice = $old_value_nprice;
   $this->npdate = $old_value_npdate;
   $this->yds = $old_value_yds;
   $this->lbs = $old_value_lbs;
   $this->dye = $old_value_dye;
   $this->gc = $old_value_gc;
   $this->fc = $old_value_fc;
   $this->gshort = $old_value_gshort;
   $this->ytdd = $old_value_ytdd;
   $this->ytdy = $old_value_ytdy;
   $this->mtdd = $old_value_mtdd;
   $this->mtdy = $old_value_mtdy;
   $this->histy = $old_value_histy;
   $this->histd = $old_value_histd;
   $this->update = $old_value_update;
   $this->avprice = $old_value_avprice;
   $this->lastyry = $old_value_lastyry;
   $this->lastyrd = $old_value_lastyrd;
   $this->dyeleft = $old_value_dyeleft;
   $this->ozsquare = $old_value_ozsquare;
   $this->ozlin = $old_value_ozlin;
   $this->sqlb = $old_value_sqlb;
   $this->meterkilo = $old_value_meterkilo;
   $this->meter2kilo = $old_value_meter2kilo;
   $this->grammeter = $old_value_grammeter;
   $this->grammeter2 = $old_value_grammeter2;
   $this->date1 = $old_value_date1;
   $this->date2 = $old_value_date2;
   $this->date3 = $old_value_date3;
   $this->date4 = $old_value_date4;
   $this->date5 = $old_value_date5;
   $this->date6 = $old_value_date6;
   $this->conv2 = $old_value_conv2;
   $this->conv3 = $old_value_conv3;
   $this->conv = $old_value_conv;
   $this->stdcost = $old_value_stdcost;
   $this->stdgp = $old_value_stdgp;
   $this->avcost = $old_value_avcost;
   $this->lbbo = $old_value_lbbo;
   $this->bo = $old_value_bo;
   $this->samples = $old_value_samples;

   $_SESSION['scriptcase']['sc_sql_ult_comando'] = $nm_comando; 
   $_SESSION['scriptcase']['sc_sql_ult_conexao'] = ''; 
   if ($nm_comando != "" && $rs = $this->Db->Execute($nm_comando)) 
   {
       while (!$rs->EOF) 
       { 
              $nmgp_def_dados .= $rs->fields[1] . "?#?" ; 
              $nmgp_def_dados .= $rs->fields[0] . "?#?N?@?" ; 
              $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end1'][] = $rs->fields[0];
              $rs->MoveNext() ; 
       } 
       $rs->Close() ; 
   } 
   elseif ($GLOBALS["NM_ERRO_IBASE"] != 1 && $nm_comando != "")  
   {  
       $this->Erro->mensagem(__FILE__, __LINE__, "banco", $this->Ini->Nm_lang['lang_errm_dber'], $this->Db->ErrorMsg()); 
       exit; 
   } 
   $GLOBALS["NM_ERRO_IBASE"] = 0; 
   $x = 0 ; 
   $todo = explode("?@?", $nmgp_def_dados) ; 
   $x = 0; 
   $end1_look = ""; 
   $todo = explode("?@?", trim($nmgp_def_dados)) ; 
   while (!empty($todo[$x])) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          if (isset($this->Embutida_ronly) && $this->Embutida_ronly && isset($this->end1_1))
          {
              foreach ($this->end1_1 as $tmp_end1)
              {
                  if (trim($tmp_end1) === trim($cadaselect[1])) { $end1_look .= $cadaselect[0] . '__SC_BREAK_LINE__'; }
              }
          }
          elseif (trim($this->end1) === trim($cadaselect[1])) { $end1_look .= $cadaselect[0]; } 
          $x++; 
   }
   $x = 0; 
   echo "<span id=\"id_read_on_end1\" style=\";" .  $sStyleReadLab_end1 . "\">" . NM_encode_input($end1_look) . "</span><span id=\"id_read_off_end1\" style=\"" . $sStyleReadInp_end1 . "\">";
   echo " <span id=\"idAjaxSelect_end1\"><select class=\"sc-js-input scFormObjectOdd\" style=\";\" id=\"id_sc_field_end1\" name=\"end1\" size=1>" ; 
   echo "\r" ; 
   $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end1'][] = ''; 
   echo "  <option value=\"\">" . $_SESSION['var_end1'] . "</option>" ; 
   while (!empty($todo[$x]) && !$nm_nao_carga) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          echo "  <option value=\"$cadaselect[1]\"" ; 
          if (trim($this->end1) === trim($cadaselect[1])) 
          {
              echo " selected" ; 
          }
          if (strtoupper($cadaselect[2]) == "S") 
          {
              if (empty($this->end1)) 
              {
                  echo " selected" ;
              } 
           } 
          echo ">$cadaselect[0] </option>" ; 
          echo "\r" ; 
          $x++ ; 
   }  ; 
   echo " </select></span>" ; 
   echo "\r" ; 
   echo "</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_end1_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_end1_text"></span></td></tr></table></td></tr></table></TD>
   <?php }?>


   <?php
   if (!isset($this->nm_new_label['end2']))
   {
       $this->nm_new_label['end2'] = "END2";
   }
   $nm_cor_fun_cel  = ($nm_cor_fun_cel  == $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);
   $end2 = $this->end2;
   $sStyleHidden_end2 = '';
   if (isset($this->nmgp_cmp_hidden['end2']) && $this->nmgp_cmp_hidden['end2'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['end2']);
       $sStyleHidden_end2 = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_end2 = 'display: none;';
   $sStyleReadInp_end2 = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['end2']) && $this->nmgp_cmp_readonly['end2'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['end2']);
       $sStyleReadLab_end2 = '';
       $sStyleReadInp_end2 = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['end2']) && $this->nmgp_cmp_hidden['end2'] == 'off') { $sc_hidden_yes++; ?>
<input type=hidden name="end2" value="<?php echo NM_encode_input($this->end2) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_end2" style="<?php echo $sStyleHidden_end2; ?>;"><span id="id_label_end2"><?php echo $this->nm_new_label['end2']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_end2" style="<?php echo $sStyleHidden_end2; ?>vertical-align: top;;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["end2"]) &&  $this->nmgp_cmp_readonly["end2"] == "on") { 
 
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end2']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end2'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end2']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end2'] = array(); 
}
   if (in_array(strtolower($this->Ini->nm_tpbanco), $this->Ini->nm_bases_ibase))
   { 
       $GLOBALS["NM_ERRO_IBASE"] = 1;  
   } 
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end2']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end2'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end2']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end2'] = array(); 
    }

   $old_value_id2 = $this->id2;
   $old_value_date = $this->date;
   $old_value_per1 = $this->per1;
   $old_value_per2 = $this->per2;
   $old_value_per3 = $this->per3;
   $old_value_per4 = $this->per4;
   $old_value_sprice = $this->sprice;
   $old_value_nprice = $this->nprice;
   $old_value_npdate = $this->npdate;
   $old_value_yds = $this->yds;
   $old_value_lbs = $this->lbs;
   $old_value_dye = $this->dye;
   $old_value_gc = $this->gc;
   $old_value_fc = $this->fc;
   $old_value_gshort = $this->gshort;
   $old_value_ytdd = $this->ytdd;
   $old_value_ytdy = $this->ytdy;
   $old_value_mtdd = $this->mtdd;
   $old_value_mtdy = $this->mtdy;
   $old_value_histy = $this->histy;
   $old_value_histd = $this->histd;
   $old_value_update = $this->update;
   $old_value_avprice = $this->avprice;
   $old_value_lastyry = $this->lastyry;
   $old_value_lastyrd = $this->lastyrd;
   $old_value_dyeleft = $this->dyeleft;
   $old_value_ozsquare = $this->ozsquare;
   $old_value_ozlin = $this->ozlin;
   $old_value_sqlb = $this->sqlb;
   $old_value_meterkilo = $this->meterkilo;
   $old_value_meter2kilo = $this->meter2kilo;
   $old_value_grammeter = $this->grammeter;
   $old_value_grammeter2 = $this->grammeter2;
   $old_value_date1 = $this->date1;
   $old_value_date2 = $this->date2;
   $old_value_date3 = $this->date3;
   $old_value_date4 = $this->date4;
   $old_value_date5 = $this->date5;
   $old_value_date6 = $this->date6;
   $old_value_conv2 = $this->conv2;
   $old_value_conv3 = $this->conv3;
   $old_value_conv = $this->conv;
   $old_value_stdcost = $this->stdcost;
   $old_value_stdgp = $this->stdgp;
   $old_value_avcost = $this->avcost;
   $old_value_lbbo = $this->lbbo;
   $old_value_bo = $this->bo;
   $old_value_samples = $this->samples;
   $this->nm_tira_formatacao();
   $this->nm_converte_datas(false);


   $unformatted_value_id2 = $this->id2;
   $unformatted_value_date = $this->date;
   $unformatted_value_per1 = $this->per1;
   $unformatted_value_per2 = $this->per2;
   $unformatted_value_per3 = $this->per3;
   $unformatted_value_per4 = $this->per4;
   $unformatted_value_sprice = $this->sprice;
   $unformatted_value_nprice = $this->nprice;
   $unformatted_value_npdate = $this->npdate;
   $unformatted_value_yds = $this->yds;
   $unformatted_value_lbs = $this->lbs;
   $unformatted_value_dye = $this->dye;
   $unformatted_value_gc = $this->gc;
   $unformatted_value_fc = $this->fc;
   $unformatted_value_gshort = $this->gshort;
   $unformatted_value_ytdd = $this->ytdd;
   $unformatted_value_ytdy = $this->ytdy;
   $unformatted_value_mtdd = $this->mtdd;
   $unformatted_value_mtdy = $this->mtdy;
   $unformatted_value_histy = $this->histy;
   $unformatted_value_histd = $this->histd;
   $unformatted_value_update = $this->update;
   $unformatted_value_avprice = $this->avprice;
   $unformatted_value_lastyry = $this->lastyry;
   $unformatted_value_lastyrd = $this->lastyrd;
   $unformatted_value_dyeleft = $this->dyeleft;
   $unformatted_value_ozsquare = $this->ozsquare;
   $unformatted_value_ozlin = $this->ozlin;
   $unformatted_value_sqlb = $this->sqlb;
   $unformatted_value_meterkilo = $this->meterkilo;
   $unformatted_value_meter2kilo = $this->meter2kilo;
   $unformatted_value_grammeter = $this->grammeter;
   $unformatted_value_grammeter2 = $this->grammeter2;
   $unformatted_value_date1 = $this->date1;
   $unformatted_value_date2 = $this->date2;
   $unformatted_value_date3 = $this->date3;
   $unformatted_value_date4 = $this->date4;
   $unformatted_value_date5 = $this->date5;
   $unformatted_value_date6 = $this->date6;
   $unformatted_value_conv2 = $this->conv2;
   $unformatted_value_conv3 = $this->conv3;
   $unformatted_value_conv = $this->conv;
   $unformatted_value_stdcost = $this->stdcost;
   $unformatted_value_stdgp = $this->stdgp;
   $unformatted_value_avcost = $this->avcost;
   $unformatted_value_lbbo = $this->lbbo;
   $unformatted_value_bo = $this->bo;
   $unformatted_value_samples = $this->samples;

   $nm_comando = "SELECT ECODE, ENDUSE 
FROM enduse 
ORDER BY ENDUSE";

   $this->id2 = $old_value_id2;
   $this->date = $old_value_date;
   $this->per1 = $old_value_per1;
   $this->per2 = $old_value_per2;
   $this->per3 = $old_value_per3;
   $this->per4 = $old_value_per4;
   $this->sprice = $old_value_sprice;
   $this->nprice = $old_value_nprice;
   $this->npdate = $old_value_npdate;
   $this->yds = $old_value_yds;
   $this->lbs = $old_value_lbs;
   $this->dye = $old_value_dye;
   $this->gc = $old_value_gc;
   $this->fc = $old_value_fc;
   $this->gshort = $old_value_gshort;
   $this->ytdd = $old_value_ytdd;
   $this->ytdy = $old_value_ytdy;
   $this->mtdd = $old_value_mtdd;
   $this->mtdy = $old_value_mtdy;
   $this->histy = $old_value_histy;
   $this->histd = $old_value_histd;
   $this->update = $old_value_update;
   $this->avprice = $old_value_avprice;
   $this->lastyry = $old_value_lastyry;
   $this->lastyrd = $old_value_lastyrd;
   $this->dyeleft = $old_value_dyeleft;
   $this->ozsquare = $old_value_ozsquare;
   $this->ozlin = $old_value_ozlin;
   $this->sqlb = $old_value_sqlb;
   $this->meterkilo = $old_value_meterkilo;
   $this->meter2kilo = $old_value_meter2kilo;
   $this->grammeter = $old_value_grammeter;
   $this->grammeter2 = $old_value_grammeter2;
   $this->date1 = $old_value_date1;
   $this->date2 = $old_value_date2;
   $this->date3 = $old_value_date3;
   $this->date4 = $old_value_date4;
   $this->date5 = $old_value_date5;
   $this->date6 = $old_value_date6;
   $this->conv2 = $old_value_conv2;
   $this->conv3 = $old_value_conv3;
   $this->conv = $old_value_conv;
   $this->stdcost = $old_value_stdcost;
   $this->stdgp = $old_value_stdgp;
   $this->avcost = $old_value_avcost;
   $this->lbbo = $old_value_lbbo;
   $this->bo = $old_value_bo;
   $this->samples = $old_value_samples;

   $_SESSION['scriptcase']['sc_sql_ult_comando'] = $nm_comando; 
   $_SESSION['scriptcase']['sc_sql_ult_conexao'] = ''; 
   if ($nm_comando != "" && $rs = $this->Db->Execute($nm_comando)) 
   {
       while (!$rs->EOF) 
       { 
              $nmgp_def_dados .= $rs->fields[1] . "?#?" ; 
              $nmgp_def_dados .= $rs->fields[0] . "?#?N?@?" ; 
              $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end2'][] = $rs->fields[0];
              $rs->MoveNext() ; 
       } 
       $rs->Close() ; 
   } 
   elseif ($GLOBALS["NM_ERRO_IBASE"] != 1 && $nm_comando != "")  
   {  
       $this->Erro->mensagem(__FILE__, __LINE__, "banco", $this->Ini->Nm_lang['lang_errm_dber'], $this->Db->ErrorMsg()); 
       exit; 
   } 
   $GLOBALS["NM_ERRO_IBASE"] = 0; 
   $x = 0; 
   $end2_look = ""; 
   $todo = explode("?@?", trim($nmgp_def_dados)) ; 
   while (!empty($todo[$x])) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          if (isset($this->Embutida_ronly) && $this->Embutida_ronly && isset($this->end2_1))
          {
              foreach ($this->end2_1 as $tmp_end2)
              {
                  if (trim($tmp_end2) === trim($cadaselect[1])) { $end2_look .= $cadaselect[0] . '__SC_BREAK_LINE__'; }
              }
          }
          elseif (trim($this->end2) === trim($cadaselect[1])) { $end2_look .= $cadaselect[0]; } 
          $x++; 
   }

?>
<input type=hidden name="end2" value="<?php echo NM_encode_input($end2) . "\">" . $end2_look . ""; ?>
<?php } else { ?>
 
<?php  
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end2']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end2'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end2']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end2'] = array(); 
}
   if (in_array(strtolower($this->Ini->nm_tpbanco), $this->Ini->nm_bases_ibase))
   { 
       $GLOBALS["NM_ERRO_IBASE"] = 1;  
   } 
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end2']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end2'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end2']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end2'] = array(); 
    }

   $old_value_id2 = $this->id2;
   $old_value_date = $this->date;
   $old_value_per1 = $this->per1;
   $old_value_per2 = $this->per2;
   $old_value_per3 = $this->per3;
   $old_value_per4 = $this->per4;
   $old_value_sprice = $this->sprice;
   $old_value_nprice = $this->nprice;
   $old_value_npdate = $this->npdate;
   $old_value_yds = $this->yds;
   $old_value_lbs = $this->lbs;
   $old_value_dye = $this->dye;
   $old_value_gc = $this->gc;
   $old_value_fc = $this->fc;
   $old_value_gshort = $this->gshort;
   $old_value_ytdd = $this->ytdd;
   $old_value_ytdy = $this->ytdy;
   $old_value_mtdd = $this->mtdd;
   $old_value_mtdy = $this->mtdy;
   $old_value_histy = $this->histy;
   $old_value_histd = $this->histd;
   $old_value_update = $this->update;
   $old_value_avprice = $this->avprice;
   $old_value_lastyry = $this->lastyry;
   $old_value_lastyrd = $this->lastyrd;
   $old_value_dyeleft = $this->dyeleft;
   $old_value_ozsquare = $this->ozsquare;
   $old_value_ozlin = $this->ozlin;
   $old_value_sqlb = $this->sqlb;
   $old_value_meterkilo = $this->meterkilo;
   $old_value_meter2kilo = $this->meter2kilo;
   $old_value_grammeter = $this->grammeter;
   $old_value_grammeter2 = $this->grammeter2;
   $old_value_date1 = $this->date1;
   $old_value_date2 = $this->date2;
   $old_value_date3 = $this->date3;
   $old_value_date4 = $this->date4;
   $old_value_date5 = $this->date5;
   $old_value_date6 = $this->date6;
   $old_value_conv2 = $this->conv2;
   $old_value_conv3 = $this->conv3;
   $old_value_conv = $this->conv;
   $old_value_stdcost = $this->stdcost;
   $old_value_stdgp = $this->stdgp;
   $old_value_avcost = $this->avcost;
   $old_value_lbbo = $this->lbbo;
   $old_value_bo = $this->bo;
   $old_value_samples = $this->samples;
   $this->nm_tira_formatacao();
   $this->nm_converte_datas(false);


   $unformatted_value_id2 = $this->id2;
   $unformatted_value_date = $this->date;
   $unformatted_value_per1 = $this->per1;
   $unformatted_value_per2 = $this->per2;
   $unformatted_value_per3 = $this->per3;
   $unformatted_value_per4 = $this->per4;
   $unformatted_value_sprice = $this->sprice;
   $unformatted_value_nprice = $this->nprice;
   $unformatted_value_npdate = $this->npdate;
   $unformatted_value_yds = $this->yds;
   $unformatted_value_lbs = $this->lbs;
   $unformatted_value_dye = $this->dye;
   $unformatted_value_gc = $this->gc;
   $unformatted_value_fc = $this->fc;
   $unformatted_value_gshort = $this->gshort;
   $unformatted_value_ytdd = $this->ytdd;
   $unformatted_value_ytdy = $this->ytdy;
   $unformatted_value_mtdd = $this->mtdd;
   $unformatted_value_mtdy = $this->mtdy;
   $unformatted_value_histy = $this->histy;
   $unformatted_value_histd = $this->histd;
   $unformatted_value_update = $this->update;
   $unformatted_value_avprice = $this->avprice;
   $unformatted_value_lastyry = $this->lastyry;
   $unformatted_value_lastyrd = $this->lastyrd;
   $unformatted_value_dyeleft = $this->dyeleft;
   $unformatted_value_ozsquare = $this->ozsquare;
   $unformatted_value_ozlin = $this->ozlin;
   $unformatted_value_sqlb = $this->sqlb;
   $unformatted_value_meterkilo = $this->meterkilo;
   $unformatted_value_meter2kilo = $this->meter2kilo;
   $unformatted_value_grammeter = $this->grammeter;
   $unformatted_value_grammeter2 = $this->grammeter2;
   $unformatted_value_date1 = $this->date1;
   $unformatted_value_date2 = $this->date2;
   $unformatted_value_date3 = $this->date3;
   $unformatted_value_date4 = $this->date4;
   $unformatted_value_date5 = $this->date5;
   $unformatted_value_date6 = $this->date6;
   $unformatted_value_conv2 = $this->conv2;
   $unformatted_value_conv3 = $this->conv3;
   $unformatted_value_conv = $this->conv;
   $unformatted_value_stdcost = $this->stdcost;
   $unformatted_value_stdgp = $this->stdgp;
   $unformatted_value_avcost = $this->avcost;
   $unformatted_value_lbbo = $this->lbbo;
   $unformatted_value_bo = $this->bo;
   $unformatted_value_samples = $this->samples;

   $nm_comando = "SELECT ECODE, ENDUSE 
FROM enduse 
ORDER BY ENDUSE";

   $this->id2 = $old_value_id2;
   $this->date = $old_value_date;
   $this->per1 = $old_value_per1;
   $this->per2 = $old_value_per2;
   $this->per3 = $old_value_per3;
   $this->per4 = $old_value_per4;
   $this->sprice = $old_value_sprice;
   $this->nprice = $old_value_nprice;
   $this->npdate = $old_value_npdate;
   $this->yds = $old_value_yds;
   $this->lbs = $old_value_lbs;
   $this->dye = $old_value_dye;
   $this->gc = $old_value_gc;
   $this->fc = $old_value_fc;
   $this->gshort = $old_value_gshort;
   $this->ytdd = $old_value_ytdd;
   $this->ytdy = $old_value_ytdy;
   $this->mtdd = $old_value_mtdd;
   $this->mtdy = $old_value_mtdy;
   $this->histy = $old_value_histy;
   $this->histd = $old_value_histd;
   $this->update = $old_value_update;
   $this->avprice = $old_value_avprice;
   $this->lastyry = $old_value_lastyry;
   $this->lastyrd = $old_value_lastyrd;
   $this->dyeleft = $old_value_dyeleft;
   $this->ozsquare = $old_value_ozsquare;
   $this->ozlin = $old_value_ozlin;
   $this->sqlb = $old_value_sqlb;
   $this->meterkilo = $old_value_meterkilo;
   $this->meter2kilo = $old_value_meter2kilo;
   $this->grammeter = $old_value_grammeter;
   $this->grammeter2 = $old_value_grammeter2;
   $this->date1 = $old_value_date1;
   $this->date2 = $old_value_date2;
   $this->date3 = $old_value_date3;
   $this->date4 = $old_value_date4;
   $this->date5 = $old_value_date5;
   $this->date6 = $old_value_date6;
   $this->conv2 = $old_value_conv2;
   $this->conv3 = $old_value_conv3;
   $this->conv = $old_value_conv;
   $this->stdcost = $old_value_stdcost;
   $this->stdgp = $old_value_stdgp;
   $this->avcost = $old_value_avcost;
   $this->lbbo = $old_value_lbbo;
   $this->bo = $old_value_bo;
   $this->samples = $old_value_samples;

   $_SESSION['scriptcase']['sc_sql_ult_comando'] = $nm_comando; 
   $_SESSION['scriptcase']['sc_sql_ult_conexao'] = ''; 
   if ($nm_comando != "" && $rs = $this->Db->Execute($nm_comando)) 
   {
       while (!$rs->EOF) 
       { 
              $nmgp_def_dados .= $rs->fields[1] . "?#?" ; 
              $nmgp_def_dados .= $rs->fields[0] . "?#?N?@?" ; 
              $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end2'][] = $rs->fields[0];
              $rs->MoveNext() ; 
       } 
       $rs->Close() ; 
   } 
   elseif ($GLOBALS["NM_ERRO_IBASE"] != 1 && $nm_comando != "")  
   {  
       $this->Erro->mensagem(__FILE__, __LINE__, "banco", $this->Ini->Nm_lang['lang_errm_dber'], $this->Db->ErrorMsg()); 
       exit; 
   } 
   $GLOBALS["NM_ERRO_IBASE"] = 0; 
   $x = 0 ; 
   $todo = explode("?@?", $nmgp_def_dados) ; 
   $x = 0; 
   $end2_look = ""; 
   $todo = explode("?@?", trim($nmgp_def_dados)) ; 
   while (!empty($todo[$x])) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          if (isset($this->Embutida_ronly) && $this->Embutida_ronly && isset($this->end2_1))
          {
              foreach ($this->end2_1 as $tmp_end2)
              {
                  if (trim($tmp_end2) === trim($cadaselect[1])) { $end2_look .= $cadaselect[0] . '__SC_BREAK_LINE__'; }
              }
          }
          elseif (trim($this->end2) === trim($cadaselect[1])) { $end2_look .= $cadaselect[0]; } 
          $x++; 
   }
   $x = 0; 
   echo "<span id=\"id_read_on_end2\" style=\";" .  $sStyleReadLab_end2 . "\">" . NM_encode_input($end2_look) . "</span><span id=\"id_read_off_end2\" style=\"" . $sStyleReadInp_end2 . "\">";
   echo " <span id=\"idAjaxSelect_end2\"><select class=\"sc-js-input scFormObjectOdd\" style=\";\" id=\"id_sc_field_end2\" name=\"end2\" size=1>" ; 
   echo "\r" ; 
   $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end2'][] = ''; 
   echo "  <option value=\"\">" . $_SESSION['var_end2'] . "</option>" ; 
   while (!empty($todo[$x]) && !$nm_nao_carga) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          echo "  <option value=\"$cadaselect[1]\"" ; 
          if (trim($this->end2) === trim($cadaselect[1])) 
          {
              echo " selected" ; 
          }
          if (strtoupper($cadaselect[2]) == "S") 
          {
              if (empty($this->end2)) 
              {
                  echo " selected" ;
              } 
           } 
          echo ">$cadaselect[0] </option>" ; 
          echo "\r" ; 
          $x++ ; 
   }  ; 
   echo " </select></span>" ; 
   echo "\r" ; 
   echo "</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_end2_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_end2_text"></span></td></tr></table></td></tr></table></TD>
   <?php }?>


   <?php
   if (!isset($this->nm_new_label['end3']))
   {
       $this->nm_new_label['end3'] = "END3";
   }
   $nm_cor_fun_cel  = ($nm_cor_fun_cel  == $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);
   $end3 = $this->end3;
   $sStyleHidden_end3 = '';
   if (isset($this->nmgp_cmp_hidden['end3']) && $this->nmgp_cmp_hidden['end3'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['end3']);
       $sStyleHidden_end3 = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_end3 = 'display: none;';
   $sStyleReadInp_end3 = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['end3']) && $this->nmgp_cmp_readonly['end3'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['end3']);
       $sStyleReadLab_end3 = '';
       $sStyleReadInp_end3 = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['end3']) && $this->nmgp_cmp_hidden['end3'] == 'off') { $sc_hidden_yes++; ?>
<input type=hidden name="end3" value="<?php echo NM_encode_input($this->end3) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_end3" style="<?php echo $sStyleHidden_end3; ?>;"><span id="id_label_end3"><?php echo $this->nm_new_label['end3']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_end3" style="<?php echo $sStyleHidden_end3; ?>vertical-align: top;;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["end3"]) &&  $this->nmgp_cmp_readonly["end3"] == "on") { 
 
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end3']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end3'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end3']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end3'] = array(); 
}
   if (in_array(strtolower($this->Ini->nm_tpbanco), $this->Ini->nm_bases_ibase))
   { 
       $GLOBALS["NM_ERRO_IBASE"] = 1;  
   } 
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end3']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end3'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end3']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end3'] = array(); 
    }

   $old_value_id2 = $this->id2;
   $old_value_date = $this->date;
   $old_value_per1 = $this->per1;
   $old_value_per2 = $this->per2;
   $old_value_per3 = $this->per3;
   $old_value_per4 = $this->per4;
   $old_value_sprice = $this->sprice;
   $old_value_nprice = $this->nprice;
   $old_value_npdate = $this->npdate;
   $old_value_yds = $this->yds;
   $old_value_lbs = $this->lbs;
   $old_value_dye = $this->dye;
   $old_value_gc = $this->gc;
   $old_value_fc = $this->fc;
   $old_value_gshort = $this->gshort;
   $old_value_ytdd = $this->ytdd;
   $old_value_ytdy = $this->ytdy;
   $old_value_mtdd = $this->mtdd;
   $old_value_mtdy = $this->mtdy;
   $old_value_histy = $this->histy;
   $old_value_histd = $this->histd;
   $old_value_update = $this->update;
   $old_value_avprice = $this->avprice;
   $old_value_lastyry = $this->lastyry;
   $old_value_lastyrd = $this->lastyrd;
   $old_value_dyeleft = $this->dyeleft;
   $old_value_ozsquare = $this->ozsquare;
   $old_value_ozlin = $this->ozlin;
   $old_value_sqlb = $this->sqlb;
   $old_value_meterkilo = $this->meterkilo;
   $old_value_meter2kilo = $this->meter2kilo;
   $old_value_grammeter = $this->grammeter;
   $old_value_grammeter2 = $this->grammeter2;
   $old_value_date1 = $this->date1;
   $old_value_date2 = $this->date2;
   $old_value_date3 = $this->date3;
   $old_value_date4 = $this->date4;
   $old_value_date5 = $this->date5;
   $old_value_date6 = $this->date6;
   $old_value_conv2 = $this->conv2;
   $old_value_conv3 = $this->conv3;
   $old_value_conv = $this->conv;
   $old_value_stdcost = $this->stdcost;
   $old_value_stdgp = $this->stdgp;
   $old_value_avcost = $this->avcost;
   $old_value_lbbo = $this->lbbo;
   $old_value_bo = $this->bo;
   $old_value_samples = $this->samples;
   $this->nm_tira_formatacao();
   $this->nm_converte_datas(false);


   $unformatted_value_id2 = $this->id2;
   $unformatted_value_date = $this->date;
   $unformatted_value_per1 = $this->per1;
   $unformatted_value_per2 = $this->per2;
   $unformatted_value_per3 = $this->per3;
   $unformatted_value_per4 = $this->per4;
   $unformatted_value_sprice = $this->sprice;
   $unformatted_value_nprice = $this->nprice;
   $unformatted_value_npdate = $this->npdate;
   $unformatted_value_yds = $this->yds;
   $unformatted_value_lbs = $this->lbs;
   $unformatted_value_dye = $this->dye;
   $unformatted_value_gc = $this->gc;
   $unformatted_value_fc = $this->fc;
   $unformatted_value_gshort = $this->gshort;
   $unformatted_value_ytdd = $this->ytdd;
   $unformatted_value_ytdy = $this->ytdy;
   $unformatted_value_mtdd = $this->mtdd;
   $unformatted_value_mtdy = $this->mtdy;
   $unformatted_value_histy = $this->histy;
   $unformatted_value_histd = $this->histd;
   $unformatted_value_update = $this->update;
   $unformatted_value_avprice = $this->avprice;
   $unformatted_value_lastyry = $this->lastyry;
   $unformatted_value_lastyrd = $this->lastyrd;
   $unformatted_value_dyeleft = $this->dyeleft;
   $unformatted_value_ozsquare = $this->ozsquare;
   $unformatted_value_ozlin = $this->ozlin;
   $unformatted_value_sqlb = $this->sqlb;
   $unformatted_value_meterkilo = $this->meterkilo;
   $unformatted_value_meter2kilo = $this->meter2kilo;
   $unformatted_value_grammeter = $this->grammeter;
   $unformatted_value_grammeter2 = $this->grammeter2;
   $unformatted_value_date1 = $this->date1;
   $unformatted_value_date2 = $this->date2;
   $unformatted_value_date3 = $this->date3;
   $unformatted_value_date4 = $this->date4;
   $unformatted_value_date5 = $this->date5;
   $unformatted_value_date6 = $this->date6;
   $unformatted_value_conv2 = $this->conv2;
   $unformatted_value_conv3 = $this->conv3;
   $unformatted_value_conv = $this->conv;
   $unformatted_value_stdcost = $this->stdcost;
   $unformatted_value_stdgp = $this->stdgp;
   $unformatted_value_avcost = $this->avcost;
   $unformatted_value_lbbo = $this->lbbo;
   $unformatted_value_bo = $this->bo;
   $unformatted_value_samples = $this->samples;

   $nm_comando = "SELECT ECODE, ENDUSE 
FROM enduse 
ORDER BY ENDUSE";

   $this->id2 = $old_value_id2;
   $this->date = $old_value_date;
   $this->per1 = $old_value_per1;
   $this->per2 = $old_value_per2;
   $this->per3 = $old_value_per3;
   $this->per4 = $old_value_per4;
   $this->sprice = $old_value_sprice;
   $this->nprice = $old_value_nprice;
   $this->npdate = $old_value_npdate;
   $this->yds = $old_value_yds;
   $this->lbs = $old_value_lbs;
   $this->dye = $old_value_dye;
   $this->gc = $old_value_gc;
   $this->fc = $old_value_fc;
   $this->gshort = $old_value_gshort;
   $this->ytdd = $old_value_ytdd;
   $this->ytdy = $old_value_ytdy;
   $this->mtdd = $old_value_mtdd;
   $this->mtdy = $old_value_mtdy;
   $this->histy = $old_value_histy;
   $this->histd = $old_value_histd;
   $this->update = $old_value_update;
   $this->avprice = $old_value_avprice;
   $this->lastyry = $old_value_lastyry;
   $this->lastyrd = $old_value_lastyrd;
   $this->dyeleft = $old_value_dyeleft;
   $this->ozsquare = $old_value_ozsquare;
   $this->ozlin = $old_value_ozlin;
   $this->sqlb = $old_value_sqlb;
   $this->meterkilo = $old_value_meterkilo;
   $this->meter2kilo = $old_value_meter2kilo;
   $this->grammeter = $old_value_grammeter;
   $this->grammeter2 = $old_value_grammeter2;
   $this->date1 = $old_value_date1;
   $this->date2 = $old_value_date2;
   $this->date3 = $old_value_date3;
   $this->date4 = $old_value_date4;
   $this->date5 = $old_value_date5;
   $this->date6 = $old_value_date6;
   $this->conv2 = $old_value_conv2;
   $this->conv3 = $old_value_conv3;
   $this->conv = $old_value_conv;
   $this->stdcost = $old_value_stdcost;
   $this->stdgp = $old_value_stdgp;
   $this->avcost = $old_value_avcost;
   $this->lbbo = $old_value_lbbo;
   $this->bo = $old_value_bo;
   $this->samples = $old_value_samples;

   $_SESSION['scriptcase']['sc_sql_ult_comando'] = $nm_comando; 
   $_SESSION['scriptcase']['sc_sql_ult_conexao'] = ''; 
   if ($nm_comando != "" && $rs = $this->Db->Execute($nm_comando)) 
   {
       while (!$rs->EOF) 
       { 
              $nmgp_def_dados .= $rs->fields[1] . "?#?" ; 
              $nmgp_def_dados .= $rs->fields[0] . "?#?N?@?" ; 
              $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end3'][] = $rs->fields[0];
              $rs->MoveNext() ; 
       } 
       $rs->Close() ; 
   } 
   elseif ($GLOBALS["NM_ERRO_IBASE"] != 1 && $nm_comando != "")  
   {  
       $this->Erro->mensagem(__FILE__, __LINE__, "banco", $this->Ini->Nm_lang['lang_errm_dber'], $this->Db->ErrorMsg()); 
       exit; 
   } 
   $GLOBALS["NM_ERRO_IBASE"] = 0; 
   $x = 0; 
   $end3_look = ""; 
   $todo = explode("?@?", trim($nmgp_def_dados)) ; 
   while (!empty($todo[$x])) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          if (isset($this->Embutida_ronly) && $this->Embutida_ronly && isset($this->end3_1))
          {
              foreach ($this->end3_1 as $tmp_end3)
              {
                  if (trim($tmp_end3) === trim($cadaselect[1])) { $end3_look .= $cadaselect[0] . '__SC_BREAK_LINE__'; }
              }
          }
          elseif (trim($this->end3) === trim($cadaselect[1])) { $end3_look .= $cadaselect[0]; } 
          $x++; 
   }

?>
<input type=hidden name="end3" value="<?php echo NM_encode_input($end3) . "\">" . $end3_look . ""; ?>
<?php } else { ?>
 
<?php  
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end3']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end3'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end3']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end3'] = array(); 
}
   if (in_array(strtolower($this->Ini->nm_tpbanco), $this->Ini->nm_bases_ibase))
   { 
       $GLOBALS["NM_ERRO_IBASE"] = 1;  
   } 
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end3']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end3'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end3']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end3'] = array(); 
    }

   $old_value_id2 = $this->id2;
   $old_value_date = $this->date;
   $old_value_per1 = $this->per1;
   $old_value_per2 = $this->per2;
   $old_value_per3 = $this->per3;
   $old_value_per4 = $this->per4;
   $old_value_sprice = $this->sprice;
   $old_value_nprice = $this->nprice;
   $old_value_npdate = $this->npdate;
   $old_value_yds = $this->yds;
   $old_value_lbs = $this->lbs;
   $old_value_dye = $this->dye;
   $old_value_gc = $this->gc;
   $old_value_fc = $this->fc;
   $old_value_gshort = $this->gshort;
   $old_value_ytdd = $this->ytdd;
   $old_value_ytdy = $this->ytdy;
   $old_value_mtdd = $this->mtdd;
   $old_value_mtdy = $this->mtdy;
   $old_value_histy = $this->histy;
   $old_value_histd = $this->histd;
   $old_value_update = $this->update;
   $old_value_avprice = $this->avprice;
   $old_value_lastyry = $this->lastyry;
   $old_value_lastyrd = $this->lastyrd;
   $old_value_dyeleft = $this->dyeleft;
   $old_value_ozsquare = $this->ozsquare;
   $old_value_ozlin = $this->ozlin;
   $old_value_sqlb = $this->sqlb;
   $old_value_meterkilo = $this->meterkilo;
   $old_value_meter2kilo = $this->meter2kilo;
   $old_value_grammeter = $this->grammeter;
   $old_value_grammeter2 = $this->grammeter2;
   $old_value_date1 = $this->date1;
   $old_value_date2 = $this->date2;
   $old_value_date3 = $this->date3;
   $old_value_date4 = $this->date4;
   $old_value_date5 = $this->date5;
   $old_value_date6 = $this->date6;
   $old_value_conv2 = $this->conv2;
   $old_value_conv3 = $this->conv3;
   $old_value_conv = $this->conv;
   $old_value_stdcost = $this->stdcost;
   $old_value_stdgp = $this->stdgp;
   $old_value_avcost = $this->avcost;
   $old_value_lbbo = $this->lbbo;
   $old_value_bo = $this->bo;
   $old_value_samples = $this->samples;
   $this->nm_tira_formatacao();
   $this->nm_converte_datas(false);


   $unformatted_value_id2 = $this->id2;
   $unformatted_value_date = $this->date;
   $unformatted_value_per1 = $this->per1;
   $unformatted_value_per2 = $this->per2;
   $unformatted_value_per3 = $this->per3;
   $unformatted_value_per4 = $this->per4;
   $unformatted_value_sprice = $this->sprice;
   $unformatted_value_nprice = $this->nprice;
   $unformatted_value_npdate = $this->npdate;
   $unformatted_value_yds = $this->yds;
   $unformatted_value_lbs = $this->lbs;
   $unformatted_value_dye = $this->dye;
   $unformatted_value_gc = $this->gc;
   $unformatted_value_fc = $this->fc;
   $unformatted_value_gshort = $this->gshort;
   $unformatted_value_ytdd = $this->ytdd;
   $unformatted_value_ytdy = $this->ytdy;
   $unformatted_value_mtdd = $this->mtdd;
   $unformatted_value_mtdy = $this->mtdy;
   $unformatted_value_histy = $this->histy;
   $unformatted_value_histd = $this->histd;
   $unformatted_value_update = $this->update;
   $unformatted_value_avprice = $this->avprice;
   $unformatted_value_lastyry = $this->lastyry;
   $unformatted_value_lastyrd = $this->lastyrd;
   $unformatted_value_dyeleft = $this->dyeleft;
   $unformatted_value_ozsquare = $this->ozsquare;
   $unformatted_value_ozlin = $this->ozlin;
   $unformatted_value_sqlb = $this->sqlb;
   $unformatted_value_meterkilo = $this->meterkilo;
   $unformatted_value_meter2kilo = $this->meter2kilo;
   $unformatted_value_grammeter = $this->grammeter;
   $unformatted_value_grammeter2 = $this->grammeter2;
   $unformatted_value_date1 = $this->date1;
   $unformatted_value_date2 = $this->date2;
   $unformatted_value_date3 = $this->date3;
   $unformatted_value_date4 = $this->date4;
   $unformatted_value_date5 = $this->date5;
   $unformatted_value_date6 = $this->date6;
   $unformatted_value_conv2 = $this->conv2;
   $unformatted_value_conv3 = $this->conv3;
   $unformatted_value_conv = $this->conv;
   $unformatted_value_stdcost = $this->stdcost;
   $unformatted_value_stdgp = $this->stdgp;
   $unformatted_value_avcost = $this->avcost;
   $unformatted_value_lbbo = $this->lbbo;
   $unformatted_value_bo = $this->bo;
   $unformatted_value_samples = $this->samples;

   $nm_comando = "SELECT ECODE, ENDUSE 
FROM enduse 
ORDER BY ENDUSE";

   $this->id2 = $old_value_id2;
   $this->date = $old_value_date;
   $this->per1 = $old_value_per1;
   $this->per2 = $old_value_per2;
   $this->per3 = $old_value_per3;
   $this->per4 = $old_value_per4;
   $this->sprice = $old_value_sprice;
   $this->nprice = $old_value_nprice;
   $this->npdate = $old_value_npdate;
   $this->yds = $old_value_yds;
   $this->lbs = $old_value_lbs;
   $this->dye = $old_value_dye;
   $this->gc = $old_value_gc;
   $this->fc = $old_value_fc;
   $this->gshort = $old_value_gshort;
   $this->ytdd = $old_value_ytdd;
   $this->ytdy = $old_value_ytdy;
   $this->mtdd = $old_value_mtdd;
   $this->mtdy = $old_value_mtdy;
   $this->histy = $old_value_histy;
   $this->histd = $old_value_histd;
   $this->update = $old_value_update;
   $this->avprice = $old_value_avprice;
   $this->lastyry = $old_value_lastyry;
   $this->lastyrd = $old_value_lastyrd;
   $this->dyeleft = $old_value_dyeleft;
   $this->ozsquare = $old_value_ozsquare;
   $this->ozlin = $old_value_ozlin;
   $this->sqlb = $old_value_sqlb;
   $this->meterkilo = $old_value_meterkilo;
   $this->meter2kilo = $old_value_meter2kilo;
   $this->grammeter = $old_value_grammeter;
   $this->grammeter2 = $old_value_grammeter2;
   $this->date1 = $old_value_date1;
   $this->date2 = $old_value_date2;
   $this->date3 = $old_value_date3;
   $this->date4 = $old_value_date4;
   $this->date5 = $old_value_date5;
   $this->date6 = $old_value_date6;
   $this->conv2 = $old_value_conv2;
   $this->conv3 = $old_value_conv3;
   $this->conv = $old_value_conv;
   $this->stdcost = $old_value_stdcost;
   $this->stdgp = $old_value_stdgp;
   $this->avcost = $old_value_avcost;
   $this->lbbo = $old_value_lbbo;
   $this->bo = $old_value_bo;
   $this->samples = $old_value_samples;

   $_SESSION['scriptcase']['sc_sql_ult_comando'] = $nm_comando; 
   $_SESSION['scriptcase']['sc_sql_ult_conexao'] = ''; 
   if ($nm_comando != "" && $rs = $this->Db->Execute($nm_comando)) 
   {
       while (!$rs->EOF) 
       { 
              $nmgp_def_dados .= $rs->fields[1] . "?#?" ; 
              $nmgp_def_dados .= $rs->fields[0] . "?#?N?@?" ; 
              $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end3'][] = $rs->fields[0];
              $rs->MoveNext() ; 
       } 
       $rs->Close() ; 
   } 
   elseif ($GLOBALS["NM_ERRO_IBASE"] != 1 && $nm_comando != "")  
   {  
       $this->Erro->mensagem(__FILE__, __LINE__, "banco", $this->Ini->Nm_lang['lang_errm_dber'], $this->Db->ErrorMsg()); 
       exit; 
   } 
   $GLOBALS["NM_ERRO_IBASE"] = 0; 
   $x = 0 ; 
   $todo = explode("?@?", $nmgp_def_dados) ; 
   $x = 0; 
   $end3_look = ""; 
   $todo = explode("?@?", trim($nmgp_def_dados)) ; 
   while (!empty($todo[$x])) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          if (isset($this->Embutida_ronly) && $this->Embutida_ronly && isset($this->end3_1))
          {
              foreach ($this->end3_1 as $tmp_end3)
              {
                  if (trim($tmp_end3) === trim($cadaselect[1])) { $end3_look .= $cadaselect[0] . '__SC_BREAK_LINE__'; }
              }
          }
          elseif (trim($this->end3) === trim($cadaselect[1])) { $end3_look .= $cadaselect[0]; } 
          $x++; 
   }
   $x = 0; 
   echo "<span id=\"id_read_on_end3\" style=\";" .  $sStyleReadLab_end3 . "\">" . NM_encode_input($end3_look) . "</span><span id=\"id_read_off_end3\" style=\"" . $sStyleReadInp_end3 . "\">";
   echo " <span id=\"idAjaxSelect_end3\"><select class=\"sc-js-input scFormObjectOdd\" style=\";\" id=\"id_sc_field_end3\" name=\"end3\" size=1>" ; 
   echo "\r" ; 
   $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end3'][] = ''; 
   echo "  <option value=\"\">" . $_SESSION['var_end3'] . "</option>" ; 
   while (!empty($todo[$x]) && !$nm_nao_carga) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          echo "  <option value=\"$cadaselect[1]\"" ; 
          if (trim($this->end3) === trim($cadaselect[1])) 
          {
              echo " selected" ; 
          }
          if (strtoupper($cadaselect[2]) == "S") 
          {
              if (empty($this->end3)) 
              {
                  echo " selected" ;
              } 
           } 
          echo ">$cadaselect[0] </option>" ; 
          echo "\r" ; 
          $x++ ; 
   }  ; 
   echo " </select></span>" ; 
   echo "\r" ; 
   echo "</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_end3_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_end3_text"></span></td></tr></table></td></tr></table></TD>
   <?php }?>


   <?php
   if (!isset($this->nm_new_label['end4']))
   {
       $this->nm_new_label['end4'] = "END4";
   }
   $nm_cor_fun_cel  = ($nm_cor_fun_cel  == $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);
   $end4 = $this->end4;
   $sStyleHidden_end4 = '';
   if (isset($this->nmgp_cmp_hidden['end4']) && $this->nmgp_cmp_hidden['end4'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['end4']);
       $sStyleHidden_end4 = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_end4 = 'display: none;';
   $sStyleReadInp_end4 = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['end4']) && $this->nmgp_cmp_readonly['end4'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['end4']);
       $sStyleReadLab_end4 = '';
       $sStyleReadInp_end4 = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['end4']) && $this->nmgp_cmp_hidden['end4'] == 'off') { $sc_hidden_yes++; ?>
<input type=hidden name="end4" value="<?php echo NM_encode_input($this->end4) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_end4" style="<?php echo $sStyleHidden_end4; ?>;"><span id="id_label_end4"><?php echo $this->nm_new_label['end4']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_end4" style="<?php echo $sStyleHidden_end4; ?>vertical-align: top;;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["end4"]) &&  $this->nmgp_cmp_readonly["end4"] == "on") { 
 
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end4']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end4'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end4']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end4'] = array(); 
}
   if (in_array(strtolower($this->Ini->nm_tpbanco), $this->Ini->nm_bases_ibase))
   { 
       $GLOBALS["NM_ERRO_IBASE"] = 1;  
   } 
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end4']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end4'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end4']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end4'] = array(); 
    }

   $old_value_id2 = $this->id2;
   $old_value_date = $this->date;
   $old_value_per1 = $this->per1;
   $old_value_per2 = $this->per2;
   $old_value_per3 = $this->per3;
   $old_value_per4 = $this->per4;
   $old_value_sprice = $this->sprice;
   $old_value_nprice = $this->nprice;
   $old_value_npdate = $this->npdate;
   $old_value_yds = $this->yds;
   $old_value_lbs = $this->lbs;
   $old_value_dye = $this->dye;
   $old_value_gc = $this->gc;
   $old_value_fc = $this->fc;
   $old_value_gshort = $this->gshort;
   $old_value_ytdd = $this->ytdd;
   $old_value_ytdy = $this->ytdy;
   $old_value_mtdd = $this->mtdd;
   $old_value_mtdy = $this->mtdy;
   $old_value_histy = $this->histy;
   $old_value_histd = $this->histd;
   $old_value_update = $this->update;
   $old_value_avprice = $this->avprice;
   $old_value_lastyry = $this->lastyry;
   $old_value_lastyrd = $this->lastyrd;
   $old_value_dyeleft = $this->dyeleft;
   $old_value_ozsquare = $this->ozsquare;
   $old_value_ozlin = $this->ozlin;
   $old_value_sqlb = $this->sqlb;
   $old_value_meterkilo = $this->meterkilo;
   $old_value_meter2kilo = $this->meter2kilo;
   $old_value_grammeter = $this->grammeter;
   $old_value_grammeter2 = $this->grammeter2;
   $old_value_date1 = $this->date1;
   $old_value_date2 = $this->date2;
   $old_value_date3 = $this->date3;
   $old_value_date4 = $this->date4;
   $old_value_date5 = $this->date5;
   $old_value_date6 = $this->date6;
   $old_value_conv2 = $this->conv2;
   $old_value_conv3 = $this->conv3;
   $old_value_conv = $this->conv;
   $old_value_stdcost = $this->stdcost;
   $old_value_stdgp = $this->stdgp;
   $old_value_avcost = $this->avcost;
   $old_value_lbbo = $this->lbbo;
   $old_value_bo = $this->bo;
   $old_value_samples = $this->samples;
   $this->nm_tira_formatacao();
   $this->nm_converte_datas(false);


   $unformatted_value_id2 = $this->id2;
   $unformatted_value_date = $this->date;
   $unformatted_value_per1 = $this->per1;
   $unformatted_value_per2 = $this->per2;
   $unformatted_value_per3 = $this->per3;
   $unformatted_value_per4 = $this->per4;
   $unformatted_value_sprice = $this->sprice;
   $unformatted_value_nprice = $this->nprice;
   $unformatted_value_npdate = $this->npdate;
   $unformatted_value_yds = $this->yds;
   $unformatted_value_lbs = $this->lbs;
   $unformatted_value_dye = $this->dye;
   $unformatted_value_gc = $this->gc;
   $unformatted_value_fc = $this->fc;
   $unformatted_value_gshort = $this->gshort;
   $unformatted_value_ytdd = $this->ytdd;
   $unformatted_value_ytdy = $this->ytdy;
   $unformatted_value_mtdd = $this->mtdd;
   $unformatted_value_mtdy = $this->mtdy;
   $unformatted_value_histy = $this->histy;
   $unformatted_value_histd = $this->histd;
   $unformatted_value_update = $this->update;
   $unformatted_value_avprice = $this->avprice;
   $unformatted_value_lastyry = $this->lastyry;
   $unformatted_value_lastyrd = $this->lastyrd;
   $unformatted_value_dyeleft = $this->dyeleft;
   $unformatted_value_ozsquare = $this->ozsquare;
   $unformatted_value_ozlin = $this->ozlin;
   $unformatted_value_sqlb = $this->sqlb;
   $unformatted_value_meterkilo = $this->meterkilo;
   $unformatted_value_meter2kilo = $this->meter2kilo;
   $unformatted_value_grammeter = $this->grammeter;
   $unformatted_value_grammeter2 = $this->grammeter2;
   $unformatted_value_date1 = $this->date1;
   $unformatted_value_date2 = $this->date2;
   $unformatted_value_date3 = $this->date3;
   $unformatted_value_date4 = $this->date4;
   $unformatted_value_date5 = $this->date5;
   $unformatted_value_date6 = $this->date6;
   $unformatted_value_conv2 = $this->conv2;
   $unformatted_value_conv3 = $this->conv3;
   $unformatted_value_conv = $this->conv;
   $unformatted_value_stdcost = $this->stdcost;
   $unformatted_value_stdgp = $this->stdgp;
   $unformatted_value_avcost = $this->avcost;
   $unformatted_value_lbbo = $this->lbbo;
   $unformatted_value_bo = $this->bo;
   $unformatted_value_samples = $this->samples;

   $nm_comando = "SELECT ECODE, ENDUSE 
FROM enduse 
ORDER BY ENDUSE";

   $this->id2 = $old_value_id2;
   $this->date = $old_value_date;
   $this->per1 = $old_value_per1;
   $this->per2 = $old_value_per2;
   $this->per3 = $old_value_per3;
   $this->per4 = $old_value_per4;
   $this->sprice = $old_value_sprice;
   $this->nprice = $old_value_nprice;
   $this->npdate = $old_value_npdate;
   $this->yds = $old_value_yds;
   $this->lbs = $old_value_lbs;
   $this->dye = $old_value_dye;
   $this->gc = $old_value_gc;
   $this->fc = $old_value_fc;
   $this->gshort = $old_value_gshort;
   $this->ytdd = $old_value_ytdd;
   $this->ytdy = $old_value_ytdy;
   $this->mtdd = $old_value_mtdd;
   $this->mtdy = $old_value_mtdy;
   $this->histy = $old_value_histy;
   $this->histd = $old_value_histd;
   $this->update = $old_value_update;
   $this->avprice = $old_value_avprice;
   $this->lastyry = $old_value_lastyry;
   $this->lastyrd = $old_value_lastyrd;
   $this->dyeleft = $old_value_dyeleft;
   $this->ozsquare = $old_value_ozsquare;
   $this->ozlin = $old_value_ozlin;
   $this->sqlb = $old_value_sqlb;
   $this->meterkilo = $old_value_meterkilo;
   $this->meter2kilo = $old_value_meter2kilo;
   $this->grammeter = $old_value_grammeter;
   $this->grammeter2 = $old_value_grammeter2;
   $this->date1 = $old_value_date1;
   $this->date2 = $old_value_date2;
   $this->date3 = $old_value_date3;
   $this->date4 = $old_value_date4;
   $this->date5 = $old_value_date5;
   $this->date6 = $old_value_date6;
   $this->conv2 = $old_value_conv2;
   $this->conv3 = $old_value_conv3;
   $this->conv = $old_value_conv;
   $this->stdcost = $old_value_stdcost;
   $this->stdgp = $old_value_stdgp;
   $this->avcost = $old_value_avcost;
   $this->lbbo = $old_value_lbbo;
   $this->bo = $old_value_bo;
   $this->samples = $old_value_samples;

   $_SESSION['scriptcase']['sc_sql_ult_comando'] = $nm_comando; 
   $_SESSION['scriptcase']['sc_sql_ult_conexao'] = ''; 
   if ($nm_comando != "" && $rs = $this->Db->Execute($nm_comando)) 
   {
       while (!$rs->EOF) 
       { 
              $nmgp_def_dados .= $rs->fields[1] . "?#?" ; 
              $nmgp_def_dados .= $rs->fields[0] . "?#?N?@?" ; 
              $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end4'][] = $rs->fields[0];
              $rs->MoveNext() ; 
       } 
       $rs->Close() ; 
   } 
   elseif ($GLOBALS["NM_ERRO_IBASE"] != 1 && $nm_comando != "")  
   {  
       $this->Erro->mensagem(__FILE__, __LINE__, "banco", $this->Ini->Nm_lang['lang_errm_dber'], $this->Db->ErrorMsg()); 
       exit; 
   } 
   $GLOBALS["NM_ERRO_IBASE"] = 0; 
   $x = 0; 
   $end4_look = ""; 
   $todo = explode("?@?", trim($nmgp_def_dados)) ; 
   while (!empty($todo[$x])) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          if (isset($this->Embutida_ronly) && $this->Embutida_ronly && isset($this->end4_1))
          {
              foreach ($this->end4_1 as $tmp_end4)
              {
                  if (trim($tmp_end4) === trim($cadaselect[1])) { $end4_look .= $cadaselect[0] . '__SC_BREAK_LINE__'; }
              }
          }
          elseif (trim($this->end4) === trim($cadaselect[1])) { $end4_look .= $cadaselect[0]; } 
          $x++; 
   }

?>
<input type=hidden name="end4" value="<?php echo NM_encode_input($end4) . "\">" . $end4_look . ""; ?>
<?php } else { ?>
 
<?php  
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end4']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end4'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end4']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end4'] = array(); 
}
   if (in_array(strtolower($this->Ini->nm_tpbanco), $this->Ini->nm_bases_ibase))
   { 
       $GLOBALS["NM_ERRO_IBASE"] = 1;  
   } 
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end4']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end4'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end4']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end4'] = array(); 
    }

   $old_value_id2 = $this->id2;
   $old_value_date = $this->date;
   $old_value_per1 = $this->per1;
   $old_value_per2 = $this->per2;
   $old_value_per3 = $this->per3;
   $old_value_per4 = $this->per4;
   $old_value_sprice = $this->sprice;
   $old_value_nprice = $this->nprice;
   $old_value_npdate = $this->npdate;
   $old_value_yds = $this->yds;
   $old_value_lbs = $this->lbs;
   $old_value_dye = $this->dye;
   $old_value_gc = $this->gc;
   $old_value_fc = $this->fc;
   $old_value_gshort = $this->gshort;
   $old_value_ytdd = $this->ytdd;
   $old_value_ytdy = $this->ytdy;
   $old_value_mtdd = $this->mtdd;
   $old_value_mtdy = $this->mtdy;
   $old_value_histy = $this->histy;
   $old_value_histd = $this->histd;
   $old_value_update = $this->update;
   $old_value_avprice = $this->avprice;
   $old_value_lastyry = $this->lastyry;
   $old_value_lastyrd = $this->lastyrd;
   $old_value_dyeleft = $this->dyeleft;
   $old_value_ozsquare = $this->ozsquare;
   $old_value_ozlin = $this->ozlin;
   $old_value_sqlb = $this->sqlb;
   $old_value_meterkilo = $this->meterkilo;
   $old_value_meter2kilo = $this->meter2kilo;
   $old_value_grammeter = $this->grammeter;
   $old_value_grammeter2 = $this->grammeter2;
   $old_value_date1 = $this->date1;
   $old_value_date2 = $this->date2;
   $old_value_date3 = $this->date3;
   $old_value_date4 = $this->date4;
   $old_value_date5 = $this->date5;
   $old_value_date6 = $this->date6;
   $old_value_conv2 = $this->conv2;
   $old_value_conv3 = $this->conv3;
   $old_value_conv = $this->conv;
   $old_value_stdcost = $this->stdcost;
   $old_value_stdgp = $this->stdgp;
   $old_value_avcost = $this->avcost;
   $old_value_lbbo = $this->lbbo;
   $old_value_bo = $this->bo;
   $old_value_samples = $this->samples;
   $this->nm_tira_formatacao();
   $this->nm_converte_datas(false);


   $unformatted_value_id2 = $this->id2;
   $unformatted_value_date = $this->date;
   $unformatted_value_per1 = $this->per1;
   $unformatted_value_per2 = $this->per2;
   $unformatted_value_per3 = $this->per3;
   $unformatted_value_per4 = $this->per4;
   $unformatted_value_sprice = $this->sprice;
   $unformatted_value_nprice = $this->nprice;
   $unformatted_value_npdate = $this->npdate;
   $unformatted_value_yds = $this->yds;
   $unformatted_value_lbs = $this->lbs;
   $unformatted_value_dye = $this->dye;
   $unformatted_value_gc = $this->gc;
   $unformatted_value_fc = $this->fc;
   $unformatted_value_gshort = $this->gshort;
   $unformatted_value_ytdd = $this->ytdd;
   $unformatted_value_ytdy = $this->ytdy;
   $unformatted_value_mtdd = $this->mtdd;
   $unformatted_value_mtdy = $this->mtdy;
   $unformatted_value_histy = $this->histy;
   $unformatted_value_histd = $this->histd;
   $unformatted_value_update = $this->update;
   $unformatted_value_avprice = $this->avprice;
   $unformatted_value_lastyry = $this->lastyry;
   $unformatted_value_lastyrd = $this->lastyrd;
   $unformatted_value_dyeleft = $this->dyeleft;
   $unformatted_value_ozsquare = $this->ozsquare;
   $unformatted_value_ozlin = $this->ozlin;
   $unformatted_value_sqlb = $this->sqlb;
   $unformatted_value_meterkilo = $this->meterkilo;
   $unformatted_value_meter2kilo = $this->meter2kilo;
   $unformatted_value_grammeter = $this->grammeter;
   $unformatted_value_grammeter2 = $this->grammeter2;
   $unformatted_value_date1 = $this->date1;
   $unformatted_value_date2 = $this->date2;
   $unformatted_value_date3 = $this->date3;
   $unformatted_value_date4 = $this->date4;
   $unformatted_value_date5 = $this->date5;
   $unformatted_value_date6 = $this->date6;
   $unformatted_value_conv2 = $this->conv2;
   $unformatted_value_conv3 = $this->conv3;
   $unformatted_value_conv = $this->conv;
   $unformatted_value_stdcost = $this->stdcost;
   $unformatted_value_stdgp = $this->stdgp;
   $unformatted_value_avcost = $this->avcost;
   $unformatted_value_lbbo = $this->lbbo;
   $unformatted_value_bo = $this->bo;
   $unformatted_value_samples = $this->samples;

   $nm_comando = "SELECT ECODE, ENDUSE 
FROM enduse 
ORDER BY ENDUSE";

   $this->id2 = $old_value_id2;
   $this->date = $old_value_date;
   $this->per1 = $old_value_per1;
   $this->per2 = $old_value_per2;
   $this->per3 = $old_value_per3;
   $this->per4 = $old_value_per4;
   $this->sprice = $old_value_sprice;
   $this->nprice = $old_value_nprice;
   $this->npdate = $old_value_npdate;
   $this->yds = $old_value_yds;
   $this->lbs = $old_value_lbs;
   $this->dye = $old_value_dye;
   $this->gc = $old_value_gc;
   $this->fc = $old_value_fc;
   $this->gshort = $old_value_gshort;
   $this->ytdd = $old_value_ytdd;
   $this->ytdy = $old_value_ytdy;
   $this->mtdd = $old_value_mtdd;
   $this->mtdy = $old_value_mtdy;
   $this->histy = $old_value_histy;
   $this->histd = $old_value_histd;
   $this->update = $old_value_update;
   $this->avprice = $old_value_avprice;
   $this->lastyry = $old_value_lastyry;
   $this->lastyrd = $old_value_lastyrd;
   $this->dyeleft = $old_value_dyeleft;
   $this->ozsquare = $old_value_ozsquare;
   $this->ozlin = $old_value_ozlin;
   $this->sqlb = $old_value_sqlb;
   $this->meterkilo = $old_value_meterkilo;
   $this->meter2kilo = $old_value_meter2kilo;
   $this->grammeter = $old_value_grammeter;
   $this->grammeter2 = $old_value_grammeter2;
   $this->date1 = $old_value_date1;
   $this->date2 = $old_value_date2;
   $this->date3 = $old_value_date3;
   $this->date4 = $old_value_date4;
   $this->date5 = $old_value_date5;
   $this->date6 = $old_value_date6;
   $this->conv2 = $old_value_conv2;
   $this->conv3 = $old_value_conv3;
   $this->conv = $old_value_conv;
   $this->stdcost = $old_value_stdcost;
   $this->stdgp = $old_value_stdgp;
   $this->avcost = $old_value_avcost;
   $this->lbbo = $old_value_lbbo;
   $this->bo = $old_value_bo;
   $this->samples = $old_value_samples;

   $_SESSION['scriptcase']['sc_sql_ult_comando'] = $nm_comando; 
   $_SESSION['scriptcase']['sc_sql_ult_conexao'] = ''; 
   if ($nm_comando != "" && $rs = $this->Db->Execute($nm_comando)) 
   {
       while (!$rs->EOF) 
       { 
              $nmgp_def_dados .= $rs->fields[1] . "?#?" ; 
              $nmgp_def_dados .= $rs->fields[0] . "?#?N?@?" ; 
              $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end4'][] = $rs->fields[0];
              $rs->MoveNext() ; 
       } 
       $rs->Close() ; 
   } 
   elseif ($GLOBALS["NM_ERRO_IBASE"] != 1 && $nm_comando != "")  
   {  
       $this->Erro->mensagem(__FILE__, __LINE__, "banco", $this->Ini->Nm_lang['lang_errm_dber'], $this->Db->ErrorMsg()); 
       exit; 
   } 
   $GLOBALS["NM_ERRO_IBASE"] = 0; 
   $x = 0 ; 
   $todo = explode("?@?", $nmgp_def_dados) ; 
   $x = 0; 
   $end4_look = ""; 
   $todo = explode("?@?", trim($nmgp_def_dados)) ; 
   while (!empty($todo[$x])) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          if (isset($this->Embutida_ronly) && $this->Embutida_ronly && isset($this->end4_1))
          {
              foreach ($this->end4_1 as $tmp_end4)
              {
                  if (trim($tmp_end4) === trim($cadaselect[1])) { $end4_look .= $cadaselect[0] . '__SC_BREAK_LINE__'; }
              }
          }
          elseif (trim($this->end4) === trim($cadaselect[1])) { $end4_look .= $cadaselect[0]; } 
          $x++; 
   }
   $x = 0; 
   echo "<span id=\"id_read_on_end4\" style=\";" .  $sStyleReadLab_end4 . "\">" . NM_encode_input($end4_look) . "</span><span id=\"id_read_off_end4\" style=\"" . $sStyleReadInp_end4 . "\">";
   echo " <span id=\"idAjaxSelect_end4\"><select class=\"sc-js-input scFormObjectOdd\" style=\";\" id=\"id_sc_field_end4\" name=\"end4\" size=1>" ; 
   echo "\r" ; 
   $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end4'][] = ''; 
   echo "  <option value=\"\">" . $_SESSION['var_end4'] . "</option>" ; 
   while (!empty($todo[$x]) && !$nm_nao_carga) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          echo "  <option value=\"$cadaselect[1]\"" ; 
          if (trim($this->end4) === trim($cadaselect[1])) 
          {
              echo " selected" ; 
          }
          if (strtoupper($cadaselect[2]) == "S") 
          {
              if (empty($this->end4)) 
              {
                  echo " selected" ;
              } 
           } 
          echo ">$cadaselect[0] </option>" ; 
          echo "\r" ; 
          $x++ ; 
   }  ; 
   echo " </select></span>" ; 
   echo "\r" ; 
   echo "</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_end4_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_end4_text"></span></td></tr></table></td></tr></table></TD>
   <?php }?>


   <?php
   if (!isset($this->nm_new_label['end5']))
   {
       $this->nm_new_label['end5'] = "END5";
   }
   $nm_cor_fun_cel  = ($nm_cor_fun_cel  == $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);
   $end5 = $this->end5;
   $sStyleHidden_end5 = '';
   if (isset($this->nmgp_cmp_hidden['end5']) && $this->nmgp_cmp_hidden['end5'] == 'off')
   {
       unset($this->nmgp_cmp_hidden['end5']);
       $sStyleHidden_end5 = 'display: none;';
   }
   $bTestReadOnly = true;
   $sStyleReadLab_end5 = 'display: none;';
   $sStyleReadInp_end5 = '';
   if (/*$this->nmgp_opcao != "novo" && */isset($this->nmgp_cmp_readonly['end5']) && $this->nmgp_cmp_readonly['end5'] == 'on')
   {
       $bTestReadOnly = false;
       unset($this->nmgp_cmp_readonly['end5']);
       $sStyleReadLab_end5 = '';
       $sStyleReadInp_end5 = 'display: none;';
   }
?>
<?php if (isset($this->nmgp_cmp_hidden['end5']) && $this->nmgp_cmp_hidden['end5'] == 'off') { $sc_hidden_yes++; ?>
<input type=hidden name="end5" value="<?php echo NM_encode_input($this->end5) . "\">"; ?>
<?php } else { $sc_hidden_no++; ?>

    <TD class="scFormLabelOdd scUiLabelWidthFix" id="hidden_field_label_end5" style="<?php echo $sStyleHidden_end5; ?>;"><span id="id_label_end5"><?php echo $this->nm_new_label['end5']; ?></span></TD>
    <TD class="scFormDataOdd" id="hidden_field_data_end5" style="<?php echo $sStyleHidden_end5; ?>vertical-align: top;;"><table style="border-width: 0px; border-collapse: collapse; width: 100%"><tr><td  class="scFormDataFontOdd" style=";;vertical-align: top;padding: 0px">
<?php if ($bTestReadOnly && $this->nmgp_opcao != "novo" && isset($this->nmgp_cmp_readonly["end5"]) &&  $this->nmgp_cmp_readonly["end5"] == "on") { 
 
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end5']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end5'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end5']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end5'] = array(); 
}
   if (in_array(strtolower($this->Ini->nm_tpbanco), $this->Ini->nm_bases_ibase))
   { 
       $GLOBALS["NM_ERRO_IBASE"] = 1;  
   } 
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end5']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end5'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end5']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end5'] = array(); 
    }

   $old_value_id2 = $this->id2;
   $old_value_date = $this->date;
   $old_value_per1 = $this->per1;
   $old_value_per2 = $this->per2;
   $old_value_per3 = $this->per3;
   $old_value_per4 = $this->per4;
   $old_value_sprice = $this->sprice;
   $old_value_nprice = $this->nprice;
   $old_value_npdate = $this->npdate;
   $old_value_yds = $this->yds;
   $old_value_lbs = $this->lbs;
   $old_value_dye = $this->dye;
   $old_value_gc = $this->gc;
   $old_value_fc = $this->fc;
   $old_value_gshort = $this->gshort;
   $old_value_ytdd = $this->ytdd;
   $old_value_ytdy = $this->ytdy;
   $old_value_mtdd = $this->mtdd;
   $old_value_mtdy = $this->mtdy;
   $old_value_histy = $this->histy;
   $old_value_histd = $this->histd;
   $old_value_update = $this->update;
   $old_value_avprice = $this->avprice;
   $old_value_lastyry = $this->lastyry;
   $old_value_lastyrd = $this->lastyrd;
   $old_value_dyeleft = $this->dyeleft;
   $old_value_ozsquare = $this->ozsquare;
   $old_value_ozlin = $this->ozlin;
   $old_value_sqlb = $this->sqlb;
   $old_value_meterkilo = $this->meterkilo;
   $old_value_meter2kilo = $this->meter2kilo;
   $old_value_grammeter = $this->grammeter;
   $old_value_grammeter2 = $this->grammeter2;
   $old_value_date1 = $this->date1;
   $old_value_date2 = $this->date2;
   $old_value_date3 = $this->date3;
   $old_value_date4 = $this->date4;
   $old_value_date5 = $this->date5;
   $old_value_date6 = $this->date6;
   $old_value_conv2 = $this->conv2;
   $old_value_conv3 = $this->conv3;
   $old_value_conv = $this->conv;
   $old_value_stdcost = $this->stdcost;
   $old_value_stdgp = $this->stdgp;
   $old_value_avcost = $this->avcost;
   $old_value_lbbo = $this->lbbo;
   $old_value_bo = $this->bo;
   $old_value_samples = $this->samples;
   $this->nm_tira_formatacao();
   $this->nm_converte_datas(false);


   $unformatted_value_id2 = $this->id2;
   $unformatted_value_date = $this->date;
   $unformatted_value_per1 = $this->per1;
   $unformatted_value_per2 = $this->per2;
   $unformatted_value_per3 = $this->per3;
   $unformatted_value_per4 = $this->per4;
   $unformatted_value_sprice = $this->sprice;
   $unformatted_value_nprice = $this->nprice;
   $unformatted_value_npdate = $this->npdate;
   $unformatted_value_yds = $this->yds;
   $unformatted_value_lbs = $this->lbs;
   $unformatted_value_dye = $this->dye;
   $unformatted_value_gc = $this->gc;
   $unformatted_value_fc = $this->fc;
   $unformatted_value_gshort = $this->gshort;
   $unformatted_value_ytdd = $this->ytdd;
   $unformatted_value_ytdy = $this->ytdy;
   $unformatted_value_mtdd = $this->mtdd;
   $unformatted_value_mtdy = $this->mtdy;
   $unformatted_value_histy = $this->histy;
   $unformatted_value_histd = $this->histd;
   $unformatted_value_update = $this->update;
   $unformatted_value_avprice = $this->avprice;
   $unformatted_value_lastyry = $this->lastyry;
   $unformatted_value_lastyrd = $this->lastyrd;
   $unformatted_value_dyeleft = $this->dyeleft;
   $unformatted_value_ozsquare = $this->ozsquare;
   $unformatted_value_ozlin = $this->ozlin;
   $unformatted_value_sqlb = $this->sqlb;
   $unformatted_value_meterkilo = $this->meterkilo;
   $unformatted_value_meter2kilo = $this->meter2kilo;
   $unformatted_value_grammeter = $this->grammeter;
   $unformatted_value_grammeter2 = $this->grammeter2;
   $unformatted_value_date1 = $this->date1;
   $unformatted_value_date2 = $this->date2;
   $unformatted_value_date3 = $this->date3;
   $unformatted_value_date4 = $this->date4;
   $unformatted_value_date5 = $this->date5;
   $unformatted_value_date6 = $this->date6;
   $unformatted_value_conv2 = $this->conv2;
   $unformatted_value_conv3 = $this->conv3;
   $unformatted_value_conv = $this->conv;
   $unformatted_value_stdcost = $this->stdcost;
   $unformatted_value_stdgp = $this->stdgp;
   $unformatted_value_avcost = $this->avcost;
   $unformatted_value_lbbo = $this->lbbo;
   $unformatted_value_bo = $this->bo;
   $unformatted_value_samples = $this->samples;

   $nm_comando = "SELECT ECODE, ENDUSE 
FROM enduse 
ORDER BY ENDUSE";

   $this->id2 = $old_value_id2;
   $this->date = $old_value_date;
   $this->per1 = $old_value_per1;
   $this->per2 = $old_value_per2;
   $this->per3 = $old_value_per3;
   $this->per4 = $old_value_per4;
   $this->sprice = $old_value_sprice;
   $this->nprice = $old_value_nprice;
   $this->npdate = $old_value_npdate;
   $this->yds = $old_value_yds;
   $this->lbs = $old_value_lbs;
   $this->dye = $old_value_dye;
   $this->gc = $old_value_gc;
   $this->fc = $old_value_fc;
   $this->gshort = $old_value_gshort;
   $this->ytdd = $old_value_ytdd;
   $this->ytdy = $old_value_ytdy;
   $this->mtdd = $old_value_mtdd;
   $this->mtdy = $old_value_mtdy;
   $this->histy = $old_value_histy;
   $this->histd = $old_value_histd;
   $this->update = $old_value_update;
   $this->avprice = $old_value_avprice;
   $this->lastyry = $old_value_lastyry;
   $this->lastyrd = $old_value_lastyrd;
   $this->dyeleft = $old_value_dyeleft;
   $this->ozsquare = $old_value_ozsquare;
   $this->ozlin = $old_value_ozlin;
   $this->sqlb = $old_value_sqlb;
   $this->meterkilo = $old_value_meterkilo;
   $this->meter2kilo = $old_value_meter2kilo;
   $this->grammeter = $old_value_grammeter;
   $this->grammeter2 = $old_value_grammeter2;
   $this->date1 = $old_value_date1;
   $this->date2 = $old_value_date2;
   $this->date3 = $old_value_date3;
   $this->date4 = $old_value_date4;
   $this->date5 = $old_value_date5;
   $this->date6 = $old_value_date6;
   $this->conv2 = $old_value_conv2;
   $this->conv3 = $old_value_conv3;
   $this->conv = $old_value_conv;
   $this->stdcost = $old_value_stdcost;
   $this->stdgp = $old_value_stdgp;
   $this->avcost = $old_value_avcost;
   $this->lbbo = $old_value_lbbo;
   $this->bo = $old_value_bo;
   $this->samples = $old_value_samples;

   $_SESSION['scriptcase']['sc_sql_ult_comando'] = $nm_comando; 
   $_SESSION['scriptcase']['sc_sql_ult_conexao'] = ''; 
   if ($nm_comando != "" && $rs = $this->Db->Execute($nm_comando)) 
   {
       while (!$rs->EOF) 
       { 
              $nmgp_def_dados .= $rs->fields[1] . "?#?" ; 
              $nmgp_def_dados .= $rs->fields[0] . "?#?N?@?" ; 
              $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end5'][] = $rs->fields[0];
              $rs->MoveNext() ; 
       } 
       $rs->Close() ; 
   } 
   elseif ($GLOBALS["NM_ERRO_IBASE"] != 1 && $nm_comando != "")  
   {  
       $this->Erro->mensagem(__FILE__, __LINE__, "banco", $this->Ini->Nm_lang['lang_errm_dber'], $this->Db->ErrorMsg()); 
       exit; 
   } 
   $GLOBALS["NM_ERRO_IBASE"] = 0; 
   $x = 0; 
   $end5_look = ""; 
   $todo = explode("?@?", trim($nmgp_def_dados)) ; 
   while (!empty($todo[$x])) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          if (isset($this->Embutida_ronly) && $this->Embutida_ronly && isset($this->end5_1))
          {
              foreach ($this->end5_1 as $tmp_end5)
              {
                  if (trim($tmp_end5) === trim($cadaselect[1])) { $end5_look .= $cadaselect[0] . '__SC_BREAK_LINE__'; }
              }
          }
          elseif (trim($this->end5) === trim($cadaselect[1])) { $end5_look .= $cadaselect[0]; } 
          $x++; 
   }

?>
<input type=hidden name="end5" value="<?php echo NM_encode_input($end5) . "\">" . $end5_look . ""; ?>
<?php } else { ?>
 
<?php  
$nmgp_def_dados = "" ; 
if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end5']))
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end5'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end5']); 
}
else
{
    $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end5'] = array(); 
}
   if (in_array(strtolower($this->Ini->nm_tpbanco), $this->Ini->nm_bases_ibase))
   { 
       $GLOBALS["NM_ERRO_IBASE"] = 1;  
   } 
   $nm_nao_carga = false;
   $nmgp_def_dados = "" ; 
   if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end5']))
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end5'] = array_unique($_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end5']); 
   }
   else
   {
       $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end5'] = array(); 
    }

   $old_value_id2 = $this->id2;
   $old_value_date = $this->date;
   $old_value_per1 = $this->per1;
   $old_value_per2 = $this->per2;
   $old_value_per3 = $this->per3;
   $old_value_per4 = $this->per4;
   $old_value_sprice = $this->sprice;
   $old_value_nprice = $this->nprice;
   $old_value_npdate = $this->npdate;
   $old_value_yds = $this->yds;
   $old_value_lbs = $this->lbs;
   $old_value_dye = $this->dye;
   $old_value_gc = $this->gc;
   $old_value_fc = $this->fc;
   $old_value_gshort = $this->gshort;
   $old_value_ytdd = $this->ytdd;
   $old_value_ytdy = $this->ytdy;
   $old_value_mtdd = $this->mtdd;
   $old_value_mtdy = $this->mtdy;
   $old_value_histy = $this->histy;
   $old_value_histd = $this->histd;
   $old_value_update = $this->update;
   $old_value_avprice = $this->avprice;
   $old_value_lastyry = $this->lastyry;
   $old_value_lastyrd = $this->lastyrd;
   $old_value_dyeleft = $this->dyeleft;
   $old_value_ozsquare = $this->ozsquare;
   $old_value_ozlin = $this->ozlin;
   $old_value_sqlb = $this->sqlb;
   $old_value_meterkilo = $this->meterkilo;
   $old_value_meter2kilo = $this->meter2kilo;
   $old_value_grammeter = $this->grammeter;
   $old_value_grammeter2 = $this->grammeter2;
   $old_value_date1 = $this->date1;
   $old_value_date2 = $this->date2;
   $old_value_date3 = $this->date3;
   $old_value_date4 = $this->date4;
   $old_value_date5 = $this->date5;
   $old_value_date6 = $this->date6;
   $old_value_conv2 = $this->conv2;
   $old_value_conv3 = $this->conv3;
   $old_value_conv = $this->conv;
   $old_value_stdcost = $this->stdcost;
   $old_value_stdgp = $this->stdgp;
   $old_value_avcost = $this->avcost;
   $old_value_lbbo = $this->lbbo;
   $old_value_bo = $this->bo;
   $old_value_samples = $this->samples;
   $this->nm_tira_formatacao();
   $this->nm_converte_datas(false);


   $unformatted_value_id2 = $this->id2;
   $unformatted_value_date = $this->date;
   $unformatted_value_per1 = $this->per1;
   $unformatted_value_per2 = $this->per2;
   $unformatted_value_per3 = $this->per3;
   $unformatted_value_per4 = $this->per4;
   $unformatted_value_sprice = $this->sprice;
   $unformatted_value_nprice = $this->nprice;
   $unformatted_value_npdate = $this->npdate;
   $unformatted_value_yds = $this->yds;
   $unformatted_value_lbs = $this->lbs;
   $unformatted_value_dye = $this->dye;
   $unformatted_value_gc = $this->gc;
   $unformatted_value_fc = $this->fc;
   $unformatted_value_gshort = $this->gshort;
   $unformatted_value_ytdd = $this->ytdd;
   $unformatted_value_ytdy = $this->ytdy;
   $unformatted_value_mtdd = $this->mtdd;
   $unformatted_value_mtdy = $this->mtdy;
   $unformatted_value_histy = $this->histy;
   $unformatted_value_histd = $this->histd;
   $unformatted_value_update = $this->update;
   $unformatted_value_avprice = $this->avprice;
   $unformatted_value_lastyry = $this->lastyry;
   $unformatted_value_lastyrd = $this->lastyrd;
   $unformatted_value_dyeleft = $this->dyeleft;
   $unformatted_value_ozsquare = $this->ozsquare;
   $unformatted_value_ozlin = $this->ozlin;
   $unformatted_value_sqlb = $this->sqlb;
   $unformatted_value_meterkilo = $this->meterkilo;
   $unformatted_value_meter2kilo = $this->meter2kilo;
   $unformatted_value_grammeter = $this->grammeter;
   $unformatted_value_grammeter2 = $this->grammeter2;
   $unformatted_value_date1 = $this->date1;
   $unformatted_value_date2 = $this->date2;
   $unformatted_value_date3 = $this->date3;
   $unformatted_value_date4 = $this->date4;
   $unformatted_value_date5 = $this->date5;
   $unformatted_value_date6 = $this->date6;
   $unformatted_value_conv2 = $this->conv2;
   $unformatted_value_conv3 = $this->conv3;
   $unformatted_value_conv = $this->conv;
   $unformatted_value_stdcost = $this->stdcost;
   $unformatted_value_stdgp = $this->stdgp;
   $unformatted_value_avcost = $this->avcost;
   $unformatted_value_lbbo = $this->lbbo;
   $unformatted_value_bo = $this->bo;
   $unformatted_value_samples = $this->samples;

   $nm_comando = "SELECT ECODE, ENDUSE 
FROM enduse 
ORDER BY ENDUSE";

   $this->id2 = $old_value_id2;
   $this->date = $old_value_date;
   $this->per1 = $old_value_per1;
   $this->per2 = $old_value_per2;
   $this->per3 = $old_value_per3;
   $this->per4 = $old_value_per4;
   $this->sprice = $old_value_sprice;
   $this->nprice = $old_value_nprice;
   $this->npdate = $old_value_npdate;
   $this->yds = $old_value_yds;
   $this->lbs = $old_value_lbs;
   $this->dye = $old_value_dye;
   $this->gc = $old_value_gc;
   $this->fc = $old_value_fc;
   $this->gshort = $old_value_gshort;
   $this->ytdd = $old_value_ytdd;
   $this->ytdy = $old_value_ytdy;
   $this->mtdd = $old_value_mtdd;
   $this->mtdy = $old_value_mtdy;
   $this->histy = $old_value_histy;
   $this->histd = $old_value_histd;
   $this->update = $old_value_update;
   $this->avprice = $old_value_avprice;
   $this->lastyry = $old_value_lastyry;
   $this->lastyrd = $old_value_lastyrd;
   $this->dyeleft = $old_value_dyeleft;
   $this->ozsquare = $old_value_ozsquare;
   $this->ozlin = $old_value_ozlin;
   $this->sqlb = $old_value_sqlb;
   $this->meterkilo = $old_value_meterkilo;
   $this->meter2kilo = $old_value_meter2kilo;
   $this->grammeter = $old_value_grammeter;
   $this->grammeter2 = $old_value_grammeter2;
   $this->date1 = $old_value_date1;
   $this->date2 = $old_value_date2;
   $this->date3 = $old_value_date3;
   $this->date4 = $old_value_date4;
   $this->date5 = $old_value_date5;
   $this->date6 = $old_value_date6;
   $this->conv2 = $old_value_conv2;
   $this->conv3 = $old_value_conv3;
   $this->conv = $old_value_conv;
   $this->stdcost = $old_value_stdcost;
   $this->stdgp = $old_value_stdgp;
   $this->avcost = $old_value_avcost;
   $this->lbbo = $old_value_lbbo;
   $this->bo = $old_value_bo;
   $this->samples = $old_value_samples;

   $_SESSION['scriptcase']['sc_sql_ult_comando'] = $nm_comando; 
   $_SESSION['scriptcase']['sc_sql_ult_conexao'] = ''; 
   if ($nm_comando != "" && $rs = $this->Db->Execute($nm_comando)) 
   {
       while (!$rs->EOF) 
       { 
              $nmgp_def_dados .= $rs->fields[1] . "?#?" ; 
              $nmgp_def_dados .= $rs->fields[0] . "?#?N?@?" ; 
              $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end5'][] = $rs->fields[0];
              $rs->MoveNext() ; 
       } 
       $rs->Close() ; 
   } 
   elseif ($GLOBALS["NM_ERRO_IBASE"] != 1 && $nm_comando != "")  
   {  
       $this->Erro->mensagem(__FILE__, __LINE__, "banco", $this->Ini->Nm_lang['lang_errm_dber'], $this->Db->ErrorMsg()); 
       exit; 
   } 
   $GLOBALS["NM_ERRO_IBASE"] = 0; 
   $x = 0 ; 
   $todo = explode("?@?", $nmgp_def_dados) ; 
   $x = 0; 
   $end5_look = ""; 
   $todo = explode("?@?", trim($nmgp_def_dados)) ; 
   while (!empty($todo[$x])) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          if (isset($this->Embutida_ronly) && $this->Embutida_ronly && isset($this->end5_1))
          {
              foreach ($this->end5_1 as $tmp_end5)
              {
                  if (trim($tmp_end5) === trim($cadaselect[1])) { $end5_look .= $cadaselect[0] . '__SC_BREAK_LINE__'; }
              }
          }
          elseif (trim($this->end5) === trim($cadaselect[1])) { $end5_look .= $cadaselect[0]; } 
          $x++; 
   }
   $x = 0; 
   echo "<span id=\"id_read_on_end5\" style=\";" .  $sStyleReadLab_end5 . "\">" . NM_encode_input($end5_look) . "</span><span id=\"id_read_off_end5\" style=\"" . $sStyleReadInp_end5 . "\">";
   echo " <span id=\"idAjaxSelect_end5\"><select class=\"sc-js-input scFormObjectOdd\" style=\";\" id=\"id_sc_field_end5\" name=\"end5\" size=1>" ; 
   echo "\r" ; 
   $_SESSION['sc_session'][$this->Ini->sc_page]['line_form']['Lookup_end5'][] = ''; 
   echo "  <option value=\"\">" . $_SESSION['var_end5'] . "</option>" ; 
   while (!empty($todo[$x]) && !$nm_nao_carga) 
   {
          $cadaselect = explode("?#?", $todo[$x]) ; 
          echo "  <option value=\"$cadaselect[1]\"" ; 
          if (trim($this->end5) === trim($cadaselect[1])) 
          {
              echo " selected" ; 
          }
          if (strtoupper($cadaselect[2]) == "S") 
          {
              if (empty($this->end5)) 
              {
                  echo " selected" ;
              } 
           } 
          echo ">$cadaselect[0] </option>" ; 
          echo "\r" ; 
          $x++ ; 
   }  ; 
   echo " </select></span>" ; 
   echo "\r" ; 
   echo "</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_end5_frame"><tr><td class="scFormFieldErrorMessage"><span id="id_error_display_end5_text"></span></td></tr></table></td></tr></table></TD>
   <?php }?>


<?php if ($sc_hidden_yes > 0 && $sc_hidden_no > 0) { ?>


    <TD class="scFormDataOdd" colspan="<?php echo $sc_hidden_yes * 2; ?>" >&nbsp;</TD>

<?php } 
?> 
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['sprice']))
           {
               $this->nmgp_cmp_readonly['sprice'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['yds']))
           {
               $this->nmgp_cmp_readonly['yds'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['lbs']))
           {
               $this->nmgp_cmp_readonly['lbs'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['dye']))
           {
               $this->nmgp_cmp_readonly['dye'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['gc']))
           {
               $this->nmgp_cmp_readonly['gc'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['fc']))
           {
               $this->nmgp_cmp_readonly['fc'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['gshort']))
           {
               $this->nmgp_cmp_readonly['gshort'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['ytdd']))
           {
               $this->nmgp_cmp_readonly['ytdd'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['ytdy']))
           {
               $this->nmgp_cmp_readonly['ytdy'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['mtdd']))
           {
               $this->nmgp_cmp_readonly['mtdd'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['mtdy']))
           {
               $this->nmgp_cmp_readonly['mtdy'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['histy']))
           {
               $this->nmgp_cmp_readonly['histy'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['histd']))
           {
               $this->nmgp_cmp_readonly['histd'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['update']))
           {
               $this->nmgp_cmp_readonly['update'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['avprice']))
           {
               $this->nmgp_cmp_readonly['avprice'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['lastyry']))
           {
               $this->nmgp_cmp_readonly['lastyry'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['lastyrd']))
           {
               $this->nmgp_cmp_readonly['lastyrd'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['dyeleft']))
           {
               $this->nmgp_cmp_readonly['dyeleft'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['ozlin']))
           {
               $this->nmgp_cmp_readonly['ozlin'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['meterkilo']))
           {
               $this->nmgp_cmp_readonly['meterkilo'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['meter2kilo']))
           {
               $this->nmgp_cmp_readonly['meter2kilo'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['grammeter']))
           {
               $this->nmgp_cmp_readonly['grammeter'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['grammeter2']))
           {
               $this->nmgp_cmp_readonly['grammeter2'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['conv2']))
           {
               $this->nmgp_cmp_readonly['conv2'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['conv3']))
           {
               $this->nmgp_cmp_readonly['conv3'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['stdcost']))
           {
               $this->nmgp_cmp_readonly['stdcost'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['avcost']))
           {
               $this->nmgp_cmp_readonly['avcost'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['lbbo']))
           {
               $this->nmgp_cmp_readonly['lbbo'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['bo']))
           {
               $this->nmgp_cmp_readonly['bo'] = 'on';
           }
?>
<?php
           if ('novo' != $this->nmgp_opcao && !isset($this->nmgp_cmp_readonly['samples']))
           {
               $this->nmgp_cmp_readonly['samples'] = 'on';
           }
?>


<?php } ?>
   </td></tr></table>
   </tr>
</TABLE></div><!-- bloco_f -->
   </div>
