<form name="F2" method=post 
               action="./" 
               target="_self"> 
<input type=hidden name="p_o_number" value="<?php echo NM_encode_input($this->nmgp_dados_form['p_o_number']); ?>">
<input type=hidden name="nm_form_submit" value="1">
<input type=hidden name="nmgp_opcao" value="">
<input type=hidden name="master_nav" value="off">
<input type=hidden name="sc_ifr_height" value="">
<input type="hidden" name="nmgp_parms" value=""/>
<input type="hidden" name="nmgp_ordem" value=""/>
<input type="hidden" name="nmgp_clone" value=""/>
<input type="hidden" name="nmgp_fast_search" value=""/>
<input type="hidden" name="nmgp_cond_fast_search" value=""/>
<input type="hidden" name="nmgp_arg_fast_search" 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()); ?>"> 
</form> 
<form name="F3" method="post" 
                  target="_self"> 
  <input type="hidden" name="nmgp_chave" value=""/>
  <input type="hidden" name="nmgp_opcao" value=""/>
  <input type="hidden" name="nmgp_ordem" value=""/>
  <input type="hidden" name="nmgp_chave_det" value=""/>
  <input type="hidden" name="nmgp_quant_linhas" value=""/>
  <input type="hidden" name="nmgp_url_saida" value=""/>
  <input type="hidden" name="nmgp_parms" value=""/>
  <input type="hidden" name="nmgp_outra_jan" 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()); ?>"> 
</form> 
<form name="F5" method="post" 
                  action="./" 
                  target="_self"> 
  <input type="hidden" name="nmgp_opcao" value="<?php if ($this->nm_Start_new) {echo "ini";} elseif ($this->sc_insert_on) {echo "final";} else {echo "igual";}?>"/>
  <input type="hidden" name="nmgp_parms" value="<?php echo NM_encode_input($_SESSION['sc_session'][$this->Ini->sc_page]['dye_dyeorder_show_form']['parms']); ?>"/>
  <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()); ?>"> 
</form> 
<form name="F6" method="post" 
                  action="./" 
                  target="_self"> 
  <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()); ?>"> 
</form> 
<div id="id_div_process" style="display: none; margin: 10px; whitespace: nowrap" class="scFormProcessFixed"><span class="scFormProcess"><img border="0" src="<?php echo $this->Ini->path_icones; ?>/scriptcase__NM__ajax_load.gif" align="absmiddle" />&nbsp;<?php echo $this->Ini->Nm_lang['lang_othr_prcs']; ?>...</span></div>
<div id="id_div_process_block" style="display: none; margin: 10px; whitespace: nowrap"><span class="scFormProcess"><img border="0" src="<?php echo $this->Ini->path_icones; ?>/scriptcase__NM__ajax_load.gif" align="absmiddle" />&nbsp;<?php echo $this->Ini->Nm_lang['lang_othr_prcs']; ?>...</span></div>
<div id="id_fatal_error" class="scFormLabelOdd" style="display: none; position: absolute"></div>
<script type="text/javascript"> 
 NM_tp_critica(1);
function nm_gp_submit(apl_lig, apl_saida, parms, opc, target, modal_h, modal_w) 
{ 
   if (target == 'modal') 
   {
       par_modal = '?script_case_init=<?php echo $this->Ini->sc_page ?>&script_case_session=<?php echo session_id() ?>&nmgp_outra_jan=true&nmgp_url_saida=modal';
       if (opc != null && opc != '') 
       {
           par_modal += '&nmgp_opcao=grid';
       }
       if (parms != null && parms != '') 
       {
           par_modal += '&nmgp_parms=' + parms;
       }
       tb_show('', apl_lig + par_modal + '&TB_iframe=true&modal=true&height=' + modal_h + '&width=' + modal_w, '');
       return;
   }
   document.F3.target               = "_self"; 
   document.F3.action               = apl_lig  ;
   if (opc != null && opc != "") 
   {
       document.F3.nmgp_opcao.value = "grid" ;
   }
   else
   {
       document.F3.nmgp_opcao.value = "" ;
   }
   if (target != null && target == '_blank') 
   {
       document.F3.nmgp_outra_jan.value = "true" ;
       document.F3.target           = target; 
   }
   document.F3.nmgp_url_saida.value = apl_saida ;
   document.F3.nmgp_parms.value     = parms ;
   document.F3.submit() ;
} 

function scInlineFormSend()
{
  return false;
}

function NM_critica (form, campo, label, mask, tipo, intr, dec, min, max)
{
    this.form = form;
    this.campo = campo;
    this.label = label;
    this.mask = mask;
    this.tipo = tipo;
    this.intr = intr;
    this.dec = dec;
    this.min = min;
    this.max = max;
}
 NM_tab_crit = new NM_critica(50);
 NM_tab_crit[1] = new NM_critica('F1', 'p_o_number', 'P O NUMBER', 'naomask', 'lista', 'cxab', 5, 'TUDO');
 NM_tab_crit[2] = new NM_critica('F1', 'dye_order', 'DYE ORDER', 'naomask', 'lista', 'cxab', 5, 'TUDO');
 NM_tab_crit[3] = new NM_critica('F1', 'date', 'DATE', 'naomask', 'data', '<?php echo $this->field_config['date']['date_format']; ?>'<?php echo ", '', ''"; ?>, '<?php echo $this->field_config['date']['date_sep']; ?>');
 NM_tab_crit[4] = new NM_critica('F1', 'dyer', 'DYER', 'naomask', 'lista', 'cxab', 4, 'TUDO');
 NM_tab_crit[5] = new NM_critica('F1', 'color', 'COLOR', 'naomask', 'lista', 'cxab', 25, 'TUDO');
 NM_tab_crit[6] = new NM_critica('F1', 'color_numb', 'COLOR NUMB', 'naomask', 'lista', 'cxab', 8, 'TUDO');
 NM_tab_crit[7] = new NM_critica('F1', 'finish', 'FINISH', 'naomask', 'lista', 'cxab', 25, 'TUDO');
 NM_tab_crit[8] = new NM_critica('F1', 'finish_no', 'FINISH NO', 'naomask', 'lista', 'cxab', 4, 'TUDO');
 NM_tab_crit[9] = new NM_critica('F1', 'frame', 'FRAME', 'naomask', 'lista', 'cxab', 25, 'TUDO');
 NM_tab_crit[10] = new NM_critica('F1', 'fwidth', 'FWIDTH', 'naomask', 'numeroedtvg', 6, -0, 999999, '<?php echo str_replace("'", "\'", $this->field_config['fwidth']['symbol_grp']); ?>');
 NM_tab_crit[11] = new NM_critica('F1', 'panels', 'PANELS', 'naomask', 'numeroedtvg', 4, -0, 9999, '<?php echo str_replace("'", "\'", $this->field_config['panels']['symbol_grp']); ?>');
 NM_tab_crit[12] = new NM_critica('F1', 'cpi', 'CPI', 'naomask', 'lista', 'cxab', 5, 'TUDO');
 NM_tab_crit[13] = new NM_critica('F1', 'wpi', 'WPI', 'naomask', 'lista', 'cxab', 5, 'TUDO');
 NM_tab_crit[14] = new NM_critica('F1', 'gs', 'GS', 'naomask', 'lista', 'cxab', 12, 'TUDO');
 NM_tab_crit[15] = new NM_critica('F1', 'fs', 'FS', 'naomask', 'lista', 'cxab', 12, 'TUDO');
 NM_tab_crit[16] = new NM_critica('F1', 'greige_wi', 'GREIGE WI', 'naomask', 'lista', 'cxab', 5, 'TUDO');
 NM_tab_crit[17] = new NM_critica('F1', 'req_fin_wt', 'REQ FIN WT', 'naomask', 'lista', 'cxab', 16, 'TUDO');
 NM_tab_crit[18] = new NM_critica('F1', 'req_gr_yld', 'REQ GR YLD', 'naomask', 'lista', 'cxab', 16, 'TUDO');
 NM_tab_crit[19] = new NM_critica('F1', 'put_up', 'PUT UP', 'naomask', 'lista', 'cxab', 30, 'TUDO');
 NM_tab_crit[20] = new NM_critica('F1', 'spec1', 'SPEC1', 'naomask', 'lista', 'cxab', 25, 'TUDO');
 NM_tab_crit[21] = new NM_critica('F1', 'spec2', 'SPEC2', 'naomask', 'lista', 'cxab', 25, 'TUDO');
 NM_tab_crit[22] = new NM_critica('F1', 'spec3', 'SPEC3', 'naomask', 'lista', 'cxab', 25, 'TUDO');
 NM_tab_crit[23] = new NM_critica('F1', 'sld', 'SLD', 'naomask', 'lista', 'cxab', 1, 'TUDO');
 NM_tab_crit[24] = new NM_critica('F1', 'she', 'SHE', 'naomask', 'lista', 'cxab', 1, 'TUDO');
 NM_tab_crit[25] = new NM_critica('F1', 'ld1', 'LD1', 'naomask', 'lista', 'cxab', 15, 'TUDO');
 NM_tab_crit[26] = new NM_critica('F1', 'ld2', 'LD2', 'naomask', 'lista', 'cxab', 4, 'TUDO');
 NM_tab_crit[27] = new NM_critica('F1', 'he1', 'HE1', 'naomask', 'lista', 'cxab', 15, 'TUDO');
 NM_tab_crit[28] = new NM_critica('F1', 'he2', 'HE2', 'naomask', 'lista', 'cxab', 4, 'TUDO');
 NM_tab_crit[29] = new NM_critica('F1', 'knitter', 'KNITTER', 'naomask', 'lista', 'cxab', 15, 'TUDO');
 NM_tab_crit[30] = new NM_critica('F1', 'desc1', 'DESC1', 'naomask', 'lista', 'cxab', 25, 'TUDO');
 NM_tab_crit[31] = new NM_critica('F1', 'desc2', 'DESC2', 'naomask', 'lista', 'cxab', 25, 'TUDO');
 NM_tab_crit[32] = new NM_critica('F1', 'ggd', 'GGD', 'naomask', 'data', '<?php echo $this->field_config['ggd']['date_format']; ?>'<?php echo ", '', ''"; ?>, '<?php echo $this->field_config['ggd']['date_sep']; ?>');
 NM_tab_crit[33] = new NM_critica('F1', 'price_lb_d', 'PRICE LB D', 'naomask', 'valorvg', 5, 3, -0, 99999999, '<?php echo str_replace("'", "\'", $this->field_config['price_lb_d']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['price_lb_d']['symbol_dec']); ?>');
 NM_tab_crit[34] = new NM_critica('F1', 'cost_lb_d', 'COST LB D', 'naomask', 'valorvg', 5, 3, -0, 99999999, '<?php echo str_replace("'", "\'", $this->field_config['cost_lb_d']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['cost_lb_d']['symbol_dec']); ?>');
 NM_tab_crit[35] = new NM_critica('F1', 'dye_cost', 'DYE COST', 'naomask', 'valorvg', 7, 2, -0, 999999999, '<?php echo str_replace("'", "\'", $this->field_config['dye_cost']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['dye_cost']['symbol_dec']); ?>');
 NM_tab_crit[36] = new NM_critica('F1', 'gr_lbs_o', 'GR LBS O', 'naomask', 'valorvg', 8, 2, -0, 9999999999, '<?php echo str_replace("'", "\'", $this->field_config['gr_lbs_o']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['gr_lbs_o']['symbol_dec']); ?>');
 NM_tab_crit[37] = new NM_critica('F1', 'gr_lbs_d', 'GR LBS D', 'naomask', 'valorvg', 8, 2, -0, 9999999999, '<?php echo str_replace("'", "\'", $this->field_config['gr_lbs_d']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['gr_lbs_d']['symbol_dec']); ?>');
 NM_tab_crit[38] = new NM_critica('F1', 'gr_lbs_op', 'GR LBS OP', 'naomask', 'valorvg', 8, 2, -0, 9999999999, '<?php echo str_replace("'", "\'", $this->field_config['gr_lbs_op']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['gr_lbs_op']['symbol_dec']); ?>');
 NM_tab_crit[39] = new NM_critica('F1', 'fin_lbs', 'FIN LBS', 'naomask', 'valorvg', 8, 2, -0, 9999999999, '<?php echo str_replace("'", "\'", $this->field_config['fin_lbs']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['fin_lbs']['symbol_dec']); ?>');
 NM_tab_crit[40] = new NM_critica('F1', 'work_loss', 'WORK LOSS', 'naomask', 'valorvg', 5, 2, -0, 9999999, '<?php echo str_replace("'", "\'", $this->field_config['work_loss']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['work_loss']['symbol_dec']); ?>');
 NM_tab_crit[41] = new NM_critica('F1', 'cost_lb_g', 'COST LB G', 'naomask', 'valorvg', 5, 2, -0, 9999999, '<?php echo str_replace("'", "\'", $this->field_config['cost_lb_g']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['cost_lb_g']['symbol_dec']); ?>');
 NM_tab_crit[42] = new NM_critica('F1', 'est_yards', 'EST YARDS', 'naomask', 'numeroedtvg', 11, -0, 99999999999, '<?php echo str_replace("'", "\'", $this->field_config['est_yards']['symbol_grp']); ?>');
 NM_tab_crit[43] = new NM_critica('F1', 'yards_recd', 'YARDS RECD', 'naomask', 'valorvg', 9, 3, -0, 999999999999, '<?php echo str_replace("'", "\'", $this->field_config['yards_recd']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['yards_recd']['symbol_dec']); ?>');
 NM_tab_crit[44] = new NM_critica('F1', 'cost_lb_t', 'COST LB T', 'naomask', 'valorvg', 5, 2, -0, 9999999, '<?php echo str_replace("'", "\'", $this->field_config['cost_lb_t']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['cost_lb_t']['symbol_dec']); ?>');
 NM_tab_crit[45] = new NM_critica('F1', 'gr_yield', 'GR YIELD', 'naomask', 'valorvg', 6, 3, -0, 999999999, '<?php echo str_replace("'", "\'", $this->field_config['gr_yield']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['gr_yield']['symbol_dec']); ?>');
 NM_tab_crit[46] = new NM_critica('F1', 'cost_yd_t', 'COST YD T', 'naomask', 'valorvg', 5, 2, -0, 9999999, '<?php echo str_replace("'", "\'", $this->field_config['cost_yd_t']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['cost_yd_t']['symbol_dec']); ?>');
 NM_tab_crit[47] = new NM_critica('F1', 'gr_value', 'GR VALUE', 'naomask', 'valorvg', 9, 2, -0, 99999999999, '<?php echo str_replace("'", "\'", $this->field_config['gr_value']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['gr_value']['symbol_dec']); ?>');
 NM_tab_crit[48] = new NM_critica('F1', 'status', 'STATUS', 'naomask', 'lista', 'cxab', 4, 'TUDO');
 NM_tab_crit[49] = new NM_critica('F1', 'fin_no', 'FIN NO', 'naomask', 'lista', 'cxab', 5, 'TUDO');
 NM_tab_crit[50] = new NM_critica('NM_final');
 NM_tab_crit_1 = new NM_critica(50);
 NM_tab_crit_1[1] = new NM_critica('F1', 'p_o_number', 'P O NUMBER', 'naomask', 'lista', 'cxab', 5, 'TUDO');
 NM_tab_crit_1[2] = new NM_critica('F1', 'dye_order', 'DYE ORDER', 'naomask', 'lista', 'cxab', 5, 'TUDO');
 NM_tab_crit_1[3] = new NM_critica('F1', 'date', 'DATE', 'naomask', 'data', '<?php echo $this->field_config['date']['date_format']; ?>'<?php echo ", '', ''"; ?>, '<?php echo $this->field_config['date']['date_sep']; ?>');
 NM_tab_crit_1[4] = new NM_critica('F1', 'dyer', 'DYER', 'naomask', 'lista', 'cxab', 4, 'TUDO');
 NM_tab_crit_1[5] = new NM_critica('F1', 'color', 'COLOR', 'naomask', 'lista', 'cxab', 25, 'TUDO');
 NM_tab_crit_1[6] = new NM_critica('F1', 'color_numb', 'COLOR NUMB', 'naomask', 'lista', 'cxab', 8, 'TUDO');
 NM_tab_crit_1[7] = new NM_critica('F1', 'finish', 'FINISH', 'naomask', 'lista', 'cxab', 25, 'TUDO');
 NM_tab_crit_1[8] = new NM_critica('F1', 'finish_no', 'FINISH NO', 'naomask', 'lista', 'cxab', 4, 'TUDO');
 NM_tab_crit_1[9] = new NM_critica('F1', 'frame', 'FRAME', 'naomask', 'lista', 'cxab', 25, 'TUDO');
 NM_tab_crit_1[10] = new NM_critica('F1', 'fwidth', 'FWIDTH', 'naomask', 'numeroedtvg', 6, -0, 999999, '<?php echo str_replace("'", "\'", $this->field_config['fwidth']['symbol_grp']); ?>');
 NM_tab_crit_1[11] = new NM_critica('F1', 'panels', 'PANELS', 'naomask', 'numeroedtvg', 4, -0, 9999, '<?php echo str_replace("'", "\'", $this->field_config['panels']['symbol_grp']); ?>');
 NM_tab_crit_1[12] = new NM_critica('F1', 'cpi', 'CPI', 'naomask', 'lista', 'cxab', 5, 'TUDO');
 NM_tab_crit_1[13] = new NM_critica('F1', 'wpi', 'WPI', 'naomask', 'lista', 'cxab', 5, 'TUDO');
 NM_tab_crit_1[14] = new NM_critica('F1', 'gs', 'GS', 'naomask', 'lista', 'cxab', 12, 'TUDO');
 NM_tab_crit_1[15] = new NM_critica('F1', 'fs', 'FS', 'naomask', 'lista', 'cxab', 12, 'TUDO');
 NM_tab_crit_1[16] = new NM_critica('F1', 'greige_wi', 'GREIGE WI', 'naomask', 'lista', 'cxab', 5, 'TUDO');
 NM_tab_crit_1[17] = new NM_critica('F1', 'req_fin_wt', 'REQ FIN WT', 'naomask', 'lista', 'cxab', 16, 'TUDO');
 NM_tab_crit_1[18] = new NM_critica('F1', 'req_gr_yld', 'REQ GR YLD', 'naomask', 'lista', 'cxab', 16, 'TUDO');
 NM_tab_crit_1[19] = new NM_critica('F1', 'put_up', 'PUT UP', 'naomask', 'lista', 'cxab', 30, 'TUDO');
 NM_tab_crit_1[20] = new NM_critica('F1', 'spec1', 'SPEC1', 'naomask', 'lista', 'cxab', 25, 'TUDO');
 NM_tab_crit_1[21] = new NM_critica('F1', 'spec2', 'SPEC2', 'naomask', 'lista', 'cxab', 25, 'TUDO');
 NM_tab_crit_1[22] = new NM_critica('F1', 'spec3', 'SPEC3', 'naomask', 'lista', 'cxab', 25, 'TUDO');
 NM_tab_crit_1[23] = new NM_critica('F1', 'sld', 'SLD', 'naomask', 'lista', 'cxab', 1, 'TUDO');
 NM_tab_crit_1[24] = new NM_critica('F1', 'she', 'SHE', 'naomask', 'lista', 'cxab', 1, 'TUDO');
 NM_tab_crit_1[25] = new NM_critica('F1', 'ld1', 'LD1', 'naomask', 'lista', 'cxab', 15, 'TUDO');
 NM_tab_crit_1[26] = new NM_critica('F1', 'ld2', 'LD2', 'naomask', 'lista', 'cxab', 4, 'TUDO');
 NM_tab_crit_1[27] = new NM_critica('F1', 'he1', 'HE1', 'naomask', 'lista', 'cxab', 15, 'TUDO');
 NM_tab_crit_1[28] = new NM_critica('F1', 'he2', 'HE2', 'naomask', 'lista', 'cxab', 4, 'TUDO');
 NM_tab_crit_1[29] = new NM_critica('F1', 'knitter', 'KNITTER', 'naomask', 'lista', 'cxab', 15, 'TUDO');
 NM_tab_crit_1[30] = new NM_critica('F1', 'desc1', 'DESC1', 'naomask', 'lista', 'cxab', 25, 'TUDO');
 NM_tab_crit_1[31] = new NM_critica('F1', 'desc2', 'DESC2', 'naomask', 'lista', 'cxab', 25, 'TUDO');
 NM_tab_crit_1[32] = new NM_critica('F1', 'ggd', 'GGD', 'naomask', 'data', '<?php echo $this->field_config['ggd']['date_format']; ?>'<?php echo ", '', ''"; ?>, '<?php echo $this->field_config['ggd']['date_sep']; ?>');
 NM_tab_crit_1[33] = new NM_critica('F1', 'price_lb_d', 'PRICE LB D', 'naomask', 'valorvg', 5, 3, -0, 99999999, '<?php echo str_replace("'", "\'", $this->field_config['price_lb_d']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['price_lb_d']['symbol_dec']); ?>');
 NM_tab_crit_1[34] = new NM_critica('F1', 'cost_lb_d', 'COST LB D', 'naomask', 'valorvg', 5, 3, -0, 99999999, '<?php echo str_replace("'", "\'", $this->field_config['cost_lb_d']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['cost_lb_d']['symbol_dec']); ?>');
 NM_tab_crit_1[35] = new NM_critica('F1', 'dye_cost', 'DYE COST', 'naomask', 'valorvg', 7, 2, -0, 999999999, '<?php echo str_replace("'", "\'", $this->field_config['dye_cost']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['dye_cost']['symbol_dec']); ?>');
 NM_tab_crit_1[36] = new NM_critica('F1', 'gr_lbs_o', 'GR LBS O', 'naomask', 'valorvg', 8, 2, -0, 9999999999, '<?php echo str_replace("'", "\'", $this->field_config['gr_lbs_o']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['gr_lbs_o']['symbol_dec']); ?>');
 NM_tab_crit_1[37] = new NM_critica('F1', 'gr_lbs_d', 'GR LBS D', 'naomask', 'valorvg', 8, 2, -0, 9999999999, '<?php echo str_replace("'", "\'", $this->field_config['gr_lbs_d']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['gr_lbs_d']['symbol_dec']); ?>');
 NM_tab_crit_1[38] = new NM_critica('F1', 'gr_lbs_op', 'GR LBS OP', 'naomask', 'valorvg', 8, 2, -0, 9999999999, '<?php echo str_replace("'", "\'", $this->field_config['gr_lbs_op']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['gr_lbs_op']['symbol_dec']); ?>');
 NM_tab_crit_1[39] = new NM_critica('F1', 'fin_lbs', 'FIN LBS', 'naomask', 'valorvg', 8, 2, -0, 9999999999, '<?php echo str_replace("'", "\'", $this->field_config['fin_lbs']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['fin_lbs']['symbol_dec']); ?>');
 NM_tab_crit_1[40] = new NM_critica('F1', 'work_loss', 'WORK LOSS', 'naomask', 'valorvg', 5, 2, -0, 9999999, '<?php echo str_replace("'", "\'", $this->field_config['work_loss']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['work_loss']['symbol_dec']); ?>');
 NM_tab_crit_1[41] = new NM_critica('F1', 'cost_lb_g', 'COST LB G', 'naomask', 'valorvg', 5, 2, -0, 9999999, '<?php echo str_replace("'", "\'", $this->field_config['cost_lb_g']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['cost_lb_g']['symbol_dec']); ?>');
 NM_tab_crit_1[42] = new NM_critica('F1', 'est_yards', 'EST YARDS', 'naomask', 'numeroedtvg', 11, -0, 99999999999, '<?php echo str_replace("'", "\'", $this->field_config['est_yards']['symbol_grp']); ?>');
 NM_tab_crit_1[43] = new NM_critica('F1', 'yards_recd', 'YARDS RECD', 'naomask', 'valorvg', 9, 3, -0, 999999999999, '<?php echo str_replace("'", "\'", $this->field_config['yards_recd']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['yards_recd']['symbol_dec']); ?>');
 NM_tab_crit_1[44] = new NM_critica('F1', 'cost_lb_t', 'COST LB T', 'naomask', 'valorvg', 5, 2, -0, 9999999, '<?php echo str_replace("'", "\'", $this->field_config['cost_lb_t']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['cost_lb_t']['symbol_dec']); ?>');
 NM_tab_crit_1[45] = new NM_critica('F1', 'gr_yield', 'GR YIELD', 'naomask', 'valorvg', 6, 3, -0, 999999999, '<?php echo str_replace("'", "\'", $this->field_config['gr_yield']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['gr_yield']['symbol_dec']); ?>');
 NM_tab_crit_1[46] = new NM_critica('F1', 'cost_yd_t', 'COST YD T', 'naomask', 'valorvg', 5, 2, -0, 9999999, '<?php echo str_replace("'", "\'", $this->field_config['cost_yd_t']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['cost_yd_t']['symbol_dec']); ?>');
 NM_tab_crit_1[47] = new NM_critica('F1', 'gr_value', 'GR VALUE', 'naomask', 'valorvg', 9, 2, -0, 99999999999, '<?php echo str_replace("'", "\'", $this->field_config['gr_value']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['gr_value']['symbol_dec']); ?>');
 NM_tab_crit_1[48] = new NM_critica('F1', 'status', 'STATUS', 'naomask', 'lista', 'cxab', 4, 'TUDO');
 NM_tab_crit_1[49] = new NM_critica('F1', 'fin_no', 'FIN NO', 'naomask', 'lista', 'cxab', 5, 'TUDO');
 NM_tab_crit_1[50] = new NM_critica('NM_final');

function nm_navpage(x, op) 
{ 
    nm_move('navpage', x);
} 
function nm_move(x, y, z) 
{ 
    if (Nm_Proc_Atualiz)
    {
        return;
    }
    if (("inicio" == x || "retorna" == x) && "S" != Nav_permite_ret)
    {
        return;
    }
    if (("avanca" == x || "final" == x) && "S" != Nav_permite_ava)
    {
        return;
    }
    document.F2.nmgp_opcao.value = x; 
    document.F2.nmgp_ordem.value = y; 
    document.F2.nmgp_clone.value = "";
    if ("apl_detalhe" == x)
    {
        document.F2.nmgp_opcao.value = 'igual'; 
        document.F2.master_nav.value = 'on'; 
        if (z)
        {
            document.F2.sc_ifr_height.value = z;
        }
        document.F2.submit();
        return;
    }
    if ("clone" == x)
    {
        x = "novo";
        document.F2.nmgp_clone.value = "S";
        document.F2.nmgp_opcao.value = x; 
    }
    if ("fast_search" == x)
    {
        document.F2.nmgp_ordem.value = ''; 
        document.F2.nmgp_fast_search.value = scAjaxGetFieldSelect("nmgp_fast_search_" + y); 
        document.F2.nmgp_cond_fast_search.value = scAjaxGetFieldText("nmgp_cond_fast_search_" + y); 
        document.F2.nmgp_arg_fast_search.value = scAjaxGetFieldText("nmgp_arg_fast_search_" + y); 
    }
    if ("novo" == x || "edit_novo" == x)
    {
<?php
       $NM_parm_ifr = ($NM_run_iframe == 1) ? "NM_run_iframe?#?1?@?" : "";
?>
        document.F2.nmgp_parms.value = "<?php echo $NM_parm_ifr ?>";
        document.F2.submit();
    }
    else
    {
        do_ajax_dye_dyeorder_show_form_navigate_form();
    }
} 
var sc_mupload_ok = true;
function nm_atualiza(x, y) 
{ 
    if (!sc_mupload_ok)
    {
        if (!confirm("<?php echo $this->Ini->Nm_lang['lang_errm_muok'] ?>"))
        {
            return;
        }
        sc_mupload_ok = true;
    }
    var Nm_submit_ok = true; 
    if (Nm_Proc_Atualiz)
    {
        return;
    }
    if (!scAjaxDetailProc())
    {
        return;
    }
<?php
    $NM_parm_ifr = ($NM_run_iframe == 1) ? "NM_run_iframe?#?1?@?" : "";
?>
    document.F1.nmgp_parms.value = "<?php echo $NM_parm_ifr ?>";
    document.F1.target = "_self";
    if (x == "muda_form") 
    { 
       document.F1.nmgp_num_form.value = y; 
    } 
    if (x == "excluir") 
    { 
       if (confirm ("<?php echo html_entity_decode($this->Ini->Nm_lang['lang_errm_remv']); ?>"))  
       { 
           document.F1.nmgp_opcao.value = x; 
           document.F1.submit(); 
       } 
       else 
       { 
          return; 
       } 
    } 
    else 
    { 
       document.F1.nmgp_opcao.value = x; 
       if ("incluir" == x || "muda_form" == x)
       {
           Nm_Proc_Atualiz = true;
           document.F1.submit();
       }
       else
       {
           Nm_Proc_Atualiz = true;
           do_ajax_dye_dyeorder_show_form_submit_form();
       }
    } 
    if (Nm_submit_ok)
    { 
        Nm_Proc_Atualiz = true;
    } 
} 
function nm_mostra_img(imagem, altura, largura)
{
    tb_show('', imagem, '');
}
function nm_recarga_form(nm_ult_ancora, nm_ult_page) 
{ 
    document.F1.target = "_self";
    document.F1.nmgp_parms.value = "";
    document.F1.nmgp_ancora.value= nm_ult_page; 
    document.F1.nmgp_ancora.value= nm_ult_page; 
    document.F1.nmgp_opcao.value= "recarga"; 
    document.F1.action += "#" +  nm_ult_ancora;
    document.F1.submit(); 
} 
function nm_link_url(Sc_url)
{
    if (Sc_url.substr(0, 7) != 'http://' && Sc_url.substr(0, 8) != 'https://')
    {
        Sc_url = 'http://' + Sc_url;
    }
    return Sc_url;
}
function sc_trim(str, chars) {
        return sc_ltrim(sc_rtrim(str, chars), chars);
}
function sc_ltrim(str, chars) {
        chars = chars || "\\s";
        return str.replace(new RegExp("^[" + chars + "]+", "g"), "");
}
function sc_rtrim(str, chars) {
        chars = chars || "\\s";
        return str.replace(new RegExp("[" + chars + "]+$", "g"), "");
}
var hasJsFormOnload = false;
function sc_exib_ocult_pag(N_pagina)
{
    document.getElementById('dye_dyeorder_show_form_form0').style.width='1px';
    document.getElementById('dye_dyeorder_show_form_form0').style.height='0px';
    document.getElementById('dye_dyeorder_show_form_form0').style.display='none';
    document.getElementById('dye_dyeorder_show_form_form0').style.overflow='scroll';
    document.getElementById('dye_dyeorder_show_form_form1').style.width='1px';
    document.getElementById('dye_dyeorder_show_form_form1').style.height='0px';
    document.getElementById('dye_dyeorder_show_form_form1').style.display='none';
    document.getElementById('dye_dyeorder_show_form_form1').style.overflow='scroll';
    document.getElementById(N_pagina).style.width='';
    document.getElementById(N_pagina).style.height='';
    document.getElementById(N_pagina).style.display='';
    document.getElementById(N_pagina).style.overflow='visible';
    sc_tab_pag(pag_ativa, 'scTabInactive');
    pag_ativa = N_pagina;
    sc_tab_pag(pag_ativa, 'scTabActive');
   if ("dye_dyeorder_show_form_form1" == N_pagina) {
     scAjaxDetailHeight("dye_fgtemp_form", $($("#nmsc_iframe_liga_dye_fgtemp_form")[0].contentWindow.document).innerHeight());
    }
}
function sc_tab_pag(N_pagina, C_class)
{
    document.getElementById('id_' + N_pagina + '_font').className = C_class + 'Font ' + C_class + 'FontCustom';
    document.getElementById('id_' + N_pagina + '_4').className = C_class;
    document.getElementById('id_' + N_pagina + '_5').className = C_class + ' ' + C_class + 'Bg';
    document.getElementById('id_' + N_pagina + '_6').className = C_class;
    if ('scTabActive' == C_class)
    {
        document.getElementById('id_' + N_pagina + '_tl').src = '<?php echo $this->Ini->path_img_global . '/' . $str_active_top_esq; ?>';
        document.getElementById('id_' + N_pagina + '_tr').src = '<?php echo $this->Ini->path_img_global . '/' . $str_active_top_dir; ?>';
        document.getElementById('id_' + N_pagina + '_t').style.backgroundImage = 'url(<?php echo $this->Ini->path_img_global . '/' . $str_active_lin_top; ?>)';
        document.getElementById('id_' + N_pagina + '_4').style.backgroundImage = 'url(<?php echo $this->Ini->path_img_global . '/' . $str_active_col_esq; ?>)';
        document.getElementById('id_' + N_pagina + '_6').style.backgroundImage = 'url(<?php echo $this->Ini->path_img_global . '/' . $str_active_col_dir; ?>)';
    }
    else
    {
        document.getElementById('id_' + N_pagina + '_tl').src = '<?php echo $this->Ini->path_img_global . '/' . $str_inactive_top_esq; ?>';
        document.getElementById('id_' + N_pagina + '_tr').src = '<?php echo $this->Ini->path_img_global . '/' . $str_inactive_top_dir; ?>';
        document.getElementById('id_' + N_pagina + '_t').style.backgroundImage = 'url(<?php echo $this->Ini->path_img_global . '/' . $str_inactive_lin_top; ?>)';
        document.getElementById('id_' + N_pagina + '_4').style.backgroundImage = 'url(<?php echo $this->Ini->path_img_global . '/' . $str_inactive_col_esq; ?>)';
        document.getElementById('id_' + N_pagina + '_6').style.backgroundImage = 'url(<?php echo $this->Ini->path_img_global . '/' . $str_inactive_col_dir; ?>)';
    }
}

function scCssFocus(oHtmlObj)
{
  if (navigator.userAgent && 0 < navigator.userAgent.indexOf("MSIE") && "select" == oHtmlObj.type.substr(0, 6))
    return;
  $(oHtmlObj).addClass('scFormObjectFocusOdd')
             .removeClass('scFormObjectOdd');
}

function scCssBlur(oHtmlObj)
{
  if (navigator.userAgent && 0 < navigator.userAgent.indexOf("MSIE") && "select" == oHtmlObj.type.substr(0, 6))
    return;
  $(oHtmlObj).addClass('scFormObjectOdd')
             .removeClass('scFormObjectFocusOdd');
}

</script> 
