<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="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]['greige_greigepo_greige_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 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(41);
 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', 'old_po', 'OLD_PO', 'naomask', 'lista', 'cxab', 6, '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', 'mill', 'MILL', 'naomask', 'lista', 'cxab', 4, 'TUDO');
 NM_tab_crit[5] = new NM_critica('F1', 'ship_to', 'SHIP_TO', 'naomask', 'lista', 'cxab', 4, 'TUDO');
 NM_tab_crit[6] = new NM_critica('F1', 'style', 'STYLE', 'naomask', 'lista', 'cxab', 14, 'TUDO');
 NM_tab_crit[7] = new NM_critica('F1', 'new_style', 'NEW_STYLE', 'naomask', 'lista', 'cxab', 14, 'TUDO');
 NM_tab_crit[8] = new NM_critica('F1', 'desc1', 'DESC1', 'naomask', 'lista', 'cxab', 20, 'TUDO');
 NM_tab_crit[9] = new NM_critica('F1', 'desc2', 'DESC2', 'naomask', 'lista', 'cxab', 20, 'TUDO');
 NM_tab_crit[10] = new NM_critica('F1', 'top_p_o_', 'TOP_P_O_', 'naomask', 'lista', 'cxab', 5, 'TUDO');
 NM_tab_crit[11] = new NM_critica('F1', 'top_lbs', 'TOP_LBS', 'naomask', 'numeroedtvg', 8, -0, 99999999, '<?php echo str_replace("'", "\'", $this->field_config['top_lbs']['symbol_grp']); ?>');
 NM_tab_crit[12] = new NM_critica('F1', 'top_ship', 'TOP_SHIP', 'naomask', 'numeroedtvg', 8, -0, 99999999, '<?php echo str_replace("'", "\'", $this->field_config['top_ship']['symbol_grp']); ?>');
 NM_tab_crit[13] = new NM_critica('F1', 'top_cost', 'TOP_COST', 'naomask', 'valorvg', 4, 2, -0, 999999, '<?php echo str_replace("'", "\'", $this->field_config['top_cost']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['top_cost']['symbol_dec']); ?>');
 NM_tab_crit[14] = new NM_critica('F1', 'bot_p_o_', 'BOT_P_O_', 'naomask', 'lista', 'cxab', 5, 'TUDO');
 NM_tab_crit[15] = new NM_critica('F1', 'bot_lbs', 'BOT_LBS', 'naomask', 'numeroedtvg', 8, -0, 99999999, '<?php echo str_replace("'", "\'", $this->field_config['bot_lbs']['symbol_grp']); ?>');
 NM_tab_crit[16] = new NM_critica('F1', 'bot_ship', 'BOT_SHIP', 'naomask', 'numeroedtvg', 8, -0, 99999999, '<?php echo str_replace("'", "\'", $this->field_config['bot_ship']['symbol_grp']); ?>');
 NM_tab_crit[17] = new NM_critica('F1', 'bot_cost', 'BOT_COST', 'naomask', 'valorvg', 4, 2, -0, 999999, '<?php echo str_replace("'", "\'", $this->field_config['bot_cost']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['bot_cost']['symbol_dec']); ?>');
 NM_tab_crit[18] = new NM_critica('F1', 'terms', 'TERMS', 'naomask', 'lista', 'cxab', 15, 'TUDO');
 NM_tab_crit[19] = new NM_critica('F1', 'delivery', 'DELIVERY', 'naomask', 'lista', 'cxab', 8, 'TUDO');
 NM_tab_crit[20] = new NM_critica('F1', 'order_amt', 'ORDER_AMT', 'naomask', 'valorvg', 8, 2, -0, 9999999999, '<?php echo str_replace("'", "\'", $this->field_config['order_amt']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['order_amt']['symbol_dec']); ?>');
 NM_tab_crit[21] = new NM_critica('F1', 'lbs_ordere', 'LBS_ORDERE', 'naomask', 'numeroedtvg', 11, -0, 99999999999, '<?php echo str_replace("'", "\'", $this->field_config['lbs_ordere']['symbol_grp']); ?>');
 NM_tab_crit[22] = new NM_critica('F1', 'lbs', 'LBS', 'naomask', 'valorvg', 9, 3, -0, 999999999999, '<?php echo str_replace("'", "\'", $this->field_config['lbs']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['lbs']['symbol_dec']); ?>');
 NM_tab_crit[23] = new NM_critica('F1', 'lbs_open', 'LBS_OPEN', 'naomask', 'valorvg', 11, 0, -1000.000000, 100000.000000, '<?php echo str_replace("'", "\'", $this->field_config['lbs_open']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['lbs_open']['symbol_dec']); ?>');
 NM_tab_crit[24] = new NM_critica('F1', 'lbs_dyed', 'LBS_DYED', 'naomask', 'valorvg', 8, 2, -0, 9999999999, '<?php echo str_replace("'", "\'", $this->field_config['lbs_dyed']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['lbs_dyed']['symbol_dec']); ?>');
 NM_tab_crit[25] = new NM_critica('F1', 'adjustment', 'ADJUSTMENT', 'naomask', 'valorvg', 8, 3, -0, 99999999999, '<?php echo str_replace("'", "\'", $this->field_config['adjustment']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['adjustment']['symbol_dec']); ?>');
 NM_tab_crit[26] = new NM_critica('F1', 'inventory', 'INVENTORY', 'naomask', 'valorvg', 9, 2, -0, 99999999999, '<?php echo str_replace("'", "\'", $this->field_config['inventory']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['inventory']['symbol_dec']); ?>');
 NM_tab_crit[27] = new NM_critica('F1', 'pinv', 'PINV', 'naomask', 'valorvg', 9, 2, -0, 99999999999, '<?php echo str_replace("'", "\'", $this->field_config['pinv']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['pinv']['symbol_dec']); ?>');
 NM_tab_crit[28] = new NM_critica('F1', 'knit_price', 'KNIT_PRICE', 'naomask', 'valorvg', 4, 2, -0, 999999, '<?php echo str_replace("'", "\'", $this->field_config['knit_price']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['knit_price']['symbol_dec']); ?>');
 NM_tab_crit[29] = new NM_critica('F1', 'cost_lb_k', 'COST_LB_K', 'naomask', 'valorvg', 4, 2, -0, 999999, '<?php echo str_replace("'", "\'", $this->field_config['cost_lb_k']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['cost_lb_k']['symbol_dec']); ?>');
 NM_tab_crit[30] = new NM_critica('F1', 'totalkc', 'TOTALKC', 'naomask', 'valorvg', 9, 2, -0, 99999999999, '<?php echo str_replace("'", "\'", $this->field_config['totalkc']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['totalkc']['symbol_dec']); ?>');
 NM_tab_crit[31] = new NM_critica('F1', 'cost_lb_y', 'COST_LB_Y', 'naomask', 'valorvg', 4, 2, -0, 999999, '<?php echo str_replace("'", "\'", $this->field_config['cost_lb_y']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['cost_lb_y']['symbol_dec']); ?>');
 NM_tab_crit[32] = new NM_critica('F1', 'cost_lb', 'COST_LB', 'naomask', 'valorvg', 5, 2, -0, 9999999, '<?php echo str_replace("'", "\'", $this->field_config['cost_lb']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['cost_lb']['symbol_dec']); ?>');
 NM_tab_crit[33] = new NM_critica('F1', 'status', 'STATUS', 'naomask', 'lista', 'cxab', 4, 'TUDO');
 NM_tab_crit[34] = new NM_critica('F1', 'amount', 'AMOUNT', 'naomask', 'valorvg', 9, 2, -0, 99999999999, '<?php echo str_replace("'", "\'", $this->field_config['amount']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['amount']['symbol_dec']); ?>');
 NM_tab_crit[35] = new NM_critica('F1', 'roll_size', 'ROLL_SIZE', 'naomask', 'lista', 'cxab', 7, 'TUDO');
 NM_tab_crit[36] = new NM_critica('F1', 'spec', 'SPEC', 'naomask', 'lista', 'cxab', 25, 'TUDO');
 NM_tab_crit[37] = new NM_critica('F1', 'mach', 'MACH', 'naomask', 'lista', 'cxab', 1, 'TUDO');
 NM_tab_crit[38] = new NM_critica('F1', 'production', 'PRODUCTION', 'naomask', 'lista', 'cxab', 4, 'TUDO');
 NM_tab_crit[39] = new NM_critica('F1', 'ac', 'AC', 'naomask', 'lista', 'cxab', 4, 'TUDO');
 NM_tab_crit[40] = new NM_critica('F1', 'lbs_rack', 'LBS_RACK', 'naomask', 'valorvg', 6, 4, -0, 9999999999, '<?php echo str_replace("'", "\'", $this->field_config['lbs_rack']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['lbs_rack']['symbol_dec']); ?>');
 NM_tab_crit[41] = new NM_critica('NM_final');
 NM_tab_crit_1 = new NM_critica(41);
 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', 'old_po', 'OLD_PO', 'naomask', 'lista', 'cxab', 6, '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', 'mill', 'MILL', 'naomask', 'lista', 'cxab', 4, 'TUDO');
 NM_tab_crit_1[5] = new NM_critica('F1', 'ship_to', 'SHIP_TO', 'naomask', 'lista', 'cxab', 4, 'TUDO');
 NM_tab_crit_1[6] = new NM_critica('F1', 'style', 'STYLE', 'naomask', 'lista', 'cxab', 14, 'TUDO');
 NM_tab_crit_1[7] = new NM_critica('F1', 'new_style', 'NEW_STYLE', 'naomask', 'lista', 'cxab', 14, 'TUDO');
 NM_tab_crit_1[8] = new NM_critica('F1', 'desc1', 'DESC1', 'naomask', 'lista', 'cxab', 20, 'TUDO');
 NM_tab_crit_1[9] = new NM_critica('F1', 'desc2', 'DESC2', 'naomask', 'lista', 'cxab', 20, 'TUDO');
 NM_tab_crit_1[10] = new NM_critica('F1', 'top_p_o_', 'TOP_P_O_', 'naomask', 'lista', 'cxab', 5, 'TUDO');
 NM_tab_crit_1[11] = new NM_critica('F1', 'top_lbs', 'TOP_LBS', 'naomask', 'numeroedtvg', 8, -0, 99999999, '<?php echo str_replace("'", "\'", $this->field_config['top_lbs']['symbol_grp']); ?>');
 NM_tab_crit_1[12] = new NM_critica('F1', 'top_ship', 'TOP_SHIP', 'naomask', 'numeroedtvg', 8, -0, 99999999, '<?php echo str_replace("'", "\'", $this->field_config['top_ship']['symbol_grp']); ?>');
 NM_tab_crit_1[13] = new NM_critica('F1', 'top_cost', 'TOP_COST', 'naomask', 'valorvg', 4, 2, -0, 999999, '<?php echo str_replace("'", "\'", $this->field_config['top_cost']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['top_cost']['symbol_dec']); ?>');
 NM_tab_crit_1[14] = new NM_critica('F1', 'bot_p_o_', 'BOT_P_O_', 'naomask', 'lista', 'cxab', 5, 'TUDO');
 NM_tab_crit_1[15] = new NM_critica('F1', 'bot_lbs', 'BOT_LBS', 'naomask', 'numeroedtvg', 8, -0, 99999999, '<?php echo str_replace("'", "\'", $this->field_config['bot_lbs']['symbol_grp']); ?>');
 NM_tab_crit_1[16] = new NM_critica('F1', 'bot_ship', 'BOT_SHIP', 'naomask', 'numeroedtvg', 8, -0, 99999999, '<?php echo str_replace("'", "\'", $this->field_config['bot_ship']['symbol_grp']); ?>');
 NM_tab_crit_1[17] = new NM_critica('F1', 'bot_cost', 'BOT_COST', 'naomask', 'valorvg', 4, 2, -0, 999999, '<?php echo str_replace("'", "\'", $this->field_config['bot_cost']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['bot_cost']['symbol_dec']); ?>');
 NM_tab_crit_1[18] = new NM_critica('F1', 'terms', 'TERMS', 'naomask', 'lista', 'cxab', 15, 'TUDO');
 NM_tab_crit_1[19] = new NM_critica('F1', 'delivery', 'DELIVERY', 'naomask', 'lista', 'cxab', 8, 'TUDO');
 NM_tab_crit_1[20] = new NM_critica('F1', 'order_amt', 'ORDER_AMT', 'naomask', 'valorvg', 8, 2, -0, 9999999999, '<?php echo str_replace("'", "\'", $this->field_config['order_amt']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['order_amt']['symbol_dec']); ?>');
 NM_tab_crit_1[21] = new NM_critica('F1', 'lbs_ordere', 'LBS_ORDERE', 'naomask', 'numeroedtvg', 11, -0, 99999999999, '<?php echo str_replace("'", "\'", $this->field_config['lbs_ordere']['symbol_grp']); ?>');
 NM_tab_crit_1[22] = new NM_critica('F1', 'lbs', 'LBS', 'naomask', 'valorvg', 9, 3, -0, 999999999999, '<?php echo str_replace("'", "\'", $this->field_config['lbs']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['lbs']['symbol_dec']); ?>');
 NM_tab_crit_1[23] = new NM_critica('F1', 'lbs_open', 'LBS_OPEN', 'naomask', 'valorvg', 11, 0, -1000.000000, 100000.000000, '<?php echo str_replace("'", "\'", $this->field_config['lbs_open']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['lbs_open']['symbol_dec']); ?>');
 NM_tab_crit_1[24] = new NM_critica('F1', 'lbs_dyed', 'LBS_DYED', 'naomask', 'valorvg', 8, 2, -0, 9999999999, '<?php echo str_replace("'", "\'", $this->field_config['lbs_dyed']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['lbs_dyed']['symbol_dec']); ?>');
 NM_tab_crit_1[25] = new NM_critica('F1', 'adjustment', 'ADJUSTMENT', 'naomask', 'valorvg', 8, 3, -0, 99999999999, '<?php echo str_replace("'", "\'", $this->field_config['adjustment']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['adjustment']['symbol_dec']); ?>');
 NM_tab_crit_1[26] = new NM_critica('F1', 'inventory', 'INVENTORY', 'naomask', 'valorvg', 9, 2, -0, 99999999999, '<?php echo str_replace("'", "\'", $this->field_config['inventory']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['inventory']['symbol_dec']); ?>');
 NM_tab_crit_1[27] = new NM_critica('F1', 'pinv', 'PINV', 'naomask', 'valorvg', 9, 2, -0, 99999999999, '<?php echo str_replace("'", "\'", $this->field_config['pinv']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['pinv']['symbol_dec']); ?>');
 NM_tab_crit_1[28] = new NM_critica('F1', 'knit_price', 'KNIT_PRICE', 'naomask', 'valorvg', 4, 2, -0, 999999, '<?php echo str_replace("'", "\'", $this->field_config['knit_price']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['knit_price']['symbol_dec']); ?>');
 NM_tab_crit_1[29] = new NM_critica('F1', 'cost_lb_k', 'COST_LB_K', 'naomask', 'valorvg', 4, 2, -0, 999999, '<?php echo str_replace("'", "\'", $this->field_config['cost_lb_k']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['cost_lb_k']['symbol_dec']); ?>');
 NM_tab_crit_1[30] = new NM_critica('F1', 'totalkc', 'TOTALKC', 'naomask', 'valorvg', 9, 2, -0, 99999999999, '<?php echo str_replace("'", "\'", $this->field_config['totalkc']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['totalkc']['symbol_dec']); ?>');
 NM_tab_crit_1[31] = new NM_critica('F1', 'cost_lb_y', 'COST_LB_Y', 'naomask', 'valorvg', 4, 2, -0, 999999, '<?php echo str_replace("'", "\'", $this->field_config['cost_lb_y']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['cost_lb_y']['symbol_dec']); ?>');
 NM_tab_crit_1[32] = new NM_critica('F1', 'cost_lb', 'COST_LB', 'naomask', 'valorvg', 5, 2, -0, 9999999, '<?php echo str_replace("'", "\'", $this->field_config['cost_lb']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['cost_lb']['symbol_dec']); ?>');
 NM_tab_crit_1[33] = new NM_critica('F1', 'status', 'STATUS', 'naomask', 'lista', 'cxab', 4, 'TUDO');
 NM_tab_crit_1[34] = new NM_critica('F1', 'amount', 'AMOUNT', 'naomask', 'valorvg', 9, 2, -0, 99999999999, '<?php echo str_replace("'", "\'", $this->field_config['amount']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['amount']['symbol_dec']); ?>');
 NM_tab_crit_1[35] = new NM_critica('F1', 'roll_size', 'ROLL_SIZE', 'naomask', 'lista', 'cxab', 7, 'TUDO');
 NM_tab_crit_1[36] = new NM_critica('F1', 'spec', 'SPEC', 'naomask', 'lista', 'cxab', 25, 'TUDO');
 NM_tab_crit_1[37] = new NM_critica('F1', 'mach', 'MACH', 'naomask', 'lista', 'cxab', 1, 'TUDO');
 NM_tab_crit_1[38] = new NM_critica('F1', 'production', 'PRODUCTION', 'naomask', 'lista', 'cxab', 4, 'TUDO');
 NM_tab_crit_1[39] = new NM_critica('F1', 'ac', 'AC', 'naomask', 'lista', 'cxab', 4, 'TUDO');
 NM_tab_crit_1[40] = new NM_critica('F1', 'lbs_rack', 'LBS_RACK', 'naomask', 'valorvg', 6, 4, -0, 9999999999, '<?php echo str_replace("'", "\'", $this->field_config['lbs_rack']['symbol_grp']); ?>', '<?php echo str_replace("'", "\'", $this->field_config['lbs_rack']['symbol_dec']); ?>');
 NM_tab_crit_1[41] = 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_greige_greigepo_greige_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_greige_greigepo_greige_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 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> 
