function fin_fgi_grid_fv_p_o_number_getValue(seqRow) {
  seqRow = scSeqNormalize(seqRow);
  return $("#id_sc_field_p_o_number" + seqRow).html();
}

function fin_fgi_grid_fv_p_o_number_setValue(newValue, seqRow) {
  seqRow = scSeqNormalize(seqRow);
  $("#id_sc_field_p_o_number" + seqRow).html(newValue);
}

function fin_fgi_grid_fv_dye_lot_getValue(seqRow) {
  seqRow = scSeqNormalize(seqRow);
  return $("#id_sc_field_dye_lot" + seqRow).html();
}

function fin_fgi_grid_fv_dye_lot_setValue(newValue, seqRow) {
  seqRow = scSeqNormalize(seqRow);
  $("#id_sc_field_dye_lot" + seqRow).html(newValue);
}

function fin_fgi_grid_fv_invoice_getValue(seqRow) {
  seqRow = scSeqNormalize(seqRow);
  return $("#id_sc_field_invoice" + seqRow).html();
}

function fin_fgi_grid_fv_invoice_setValue(newValue, seqRow) {
  seqRow = scSeqNormalize(seqRow);
  $("#id_sc_field_invoice" + seqRow).html(newValue);
}

function fin_fgi_grid_fv_location_getValue(seqRow) {
  seqRow = scSeqNormalize(seqRow);
  return $("#id_sc_field_location" + seqRow).html();
}

function fin_fgi_grid_fv_location_setValue(newValue, seqRow) {
  seqRow = scSeqNormalize(seqRow);
  $("#id_sc_field_location" + seqRow).html(newValue);
}

function fin_fgi_grid_fv_style_getValue(seqRow) {
  seqRow = scSeqNormalize(seqRow);
  return $("#id_sc_field_style" + seqRow).html();
}

function fin_fgi_grid_fv_style_setValue(newValue, seqRow) {
  seqRow = scSeqNormalize(seqRow);
  $("#id_sc_field_style" + seqRow).html(newValue);
}

function fin_fgi_grid_fv_color_getValue(seqRow) {
  seqRow = scSeqNormalize(seqRow);
  return $("#id_sc_field_color" + seqRow).html();
}

function fin_fgi_grid_fv_color_setValue(newValue, seqRow) {
  seqRow = scSeqNormalize(seqRow);
  $("#id_sc_field_color" + seqRow).html(newValue);
}

function fin_fgi_grid_fv_color_no_getValue(seqRow) {
  seqRow = scSeqNormalize(seqRow);
  return $("#id_sc_field_color_no" + seqRow).html();
}

function fin_fgi_grid_fv_color_no_setValue(newValue, seqRow) {
  seqRow = scSeqNormalize(seqRow);
  $("#id_sc_field_color_no" + seqRow).html(newValue);
}

function fin_fgi_grid_fv_width_getValue(seqRow) {
  seqRow = scSeqNormalize(seqRow);
  return $("#id_sc_field_width" + seqRow).html();
}

function fin_fgi_grid_fv_width_setValue(newValue, seqRow) {
  seqRow = scSeqNormalize(seqRow);
  $("#id_sc_field_width" + seqRow).html(newValue);
}

function fin_fgi_grid_fv_finish_getValue(seqRow) {
  seqRow = scSeqNormalize(seqRow);
  return $("#id_sc_field_finish" + seqRow).html();
}

function fin_fgi_grid_fv_finish_setValue(newValue, seqRow) {
  seqRow = scSeqNormalize(seqRow);
  $("#id_sc_field_finish" + seqRow).html(newValue);
}

function fin_fgi_grid_fv_putup_getValue(seqRow) {
  seqRow = scSeqNormalize(seqRow);
  return $("#id_sc_field_putup" + seqRow).html();
}

function fin_fgi_grid_fv_putup_setValue(newValue, seqRow) {
  seqRow = scSeqNormalize(seqRow);
  $("#id_sc_field_putup" + seqRow).html(newValue);
}

function fin_fgi_grid_fv_open_getValue(seqRow) {
  seqRow = scSeqNormalize(seqRow);
  return $("#id_sc_field_open" + seqRow).html();
}

function fin_fgi_grid_fv_open_setValue(newValue, seqRow) {
  seqRow = scSeqNormalize(seqRow);
  $("#id_sc_field_open" + seqRow).html(newValue);
}

function fin_fgi_grid_fv_amount_getValue(seqRow) {
  seqRow = scSeqNormalize(seqRow);
  return $("#id_sc_field_amount" + seqRow).html();
}

function fin_fgi_grid_fv_amount_setValue(newValue, seqRow) {
  seqRow = scSeqNormalize(seqRow);
  $("#id_sc_field_amount" + seqRow).html(newValue);
}

function fin_fgi_grid_fv_sell_at_getValue(seqRow) {
  seqRow = scSeqNormalize(seqRow);
  return $("#id_sc_field_sell_at" + seqRow).html();
}

function fin_fgi_grid_fv_sell_at_setValue(newValue, seqRow) {
  seqRow = scSeqNormalize(seqRow);
  $("#id_sc_field_sell_at" + seqRow).html(newValue);
}

function fin_fgi_grid_fv_trans_getValue(seqRow) {
  seqRow = scSeqNormalize(seqRow);
  return $("#id_sc_field_trans" + seqRow).html();
}

function fin_fgi_grid_fv_trans_setValue(newValue, seqRow) {
  seqRow = scSeqNormalize(seqRow);
  $("#id_sc_field_trans" + seqRow).html(newValue);
}

function fin_fgi_grid_fv_getValue(field, seqRow) {
  seqRow = scSeqNormalize(seqRow);
  if ("p_o_number" == field) {
    return fin_fgi_grid_fv_p_o_number_getValue(seqRow);
  }
  if ("dye_lot" == field) {
    return fin_fgi_grid_fv_dye_lot_getValue(seqRow);
  }
  if ("invoice" == field) {
    return fin_fgi_grid_fv_invoice_getValue(seqRow);
  }
  if ("location" == field) {
    return fin_fgi_grid_fv_location_getValue(seqRow);
  }
  if ("style" == field) {
    return fin_fgi_grid_fv_style_getValue(seqRow);
  }
  if ("color" == field) {
    return fin_fgi_grid_fv_color_getValue(seqRow);
  }
  if ("color_no" == field) {
    return fin_fgi_grid_fv_color_no_getValue(seqRow);
  }
  if ("width" == field) {
    return fin_fgi_grid_fv_width_getValue(seqRow);
  }
  if ("finish" == field) {
    return fin_fgi_grid_fv_finish_getValue(seqRow);
  }
  if ("putup" == field) {
    return fin_fgi_grid_fv_putup_getValue(seqRow);
  }
  if ("open" == field) {
    return fin_fgi_grid_fv_open_getValue(seqRow);
  }
  if ("amount" == field) {
    return fin_fgi_grid_fv_amount_getValue(seqRow);
  }
  if ("sell_at" == field) {
    return fin_fgi_grid_fv_sell_at_getValue(seqRow);
  }
  if ("trans" == field) {
    return fin_fgi_grid_fv_trans_getValue(seqRow);
  }
}

function fin_fgi_grid_fv_setValue(field, newValue, seqRow) {
  seqRow = scSeqNormalize(seqRow);
  if ("p_o_number" == field) {
    fin_fgi_grid_fv_p_o_number_setValue(newValue, seqRow);
  }
  if ("dye_lot" == field) {
    fin_fgi_grid_fv_dye_lot_setValue(newValue, seqRow);
  }
  if ("invoice" == field) {
    fin_fgi_grid_fv_invoice_setValue(newValue, seqRow);
  }
  if ("location" == field) {
    fin_fgi_grid_fv_location_setValue(newValue, seqRow);
  }
  if ("style" == field) {
    fin_fgi_grid_fv_style_setValue(newValue, seqRow);
  }
  if ("color" == field) {
    fin_fgi_grid_fv_color_setValue(newValue, seqRow);
  }
  if ("color_no" == field) {
    fin_fgi_grid_fv_color_no_setValue(newValue, seqRow);
  }
  if ("width" == field) {
    fin_fgi_grid_fv_width_setValue(newValue, seqRow);
  }
  if ("finish" == field) {
    fin_fgi_grid_fv_finish_setValue(newValue, seqRow);
  }
  if ("putup" == field) {
    fin_fgi_grid_fv_putup_setValue(newValue, seqRow);
  }
  if ("open" == field) {
    fin_fgi_grid_fv_open_setValue(newValue, seqRow);
  }
  if ("amount" == field) {
    fin_fgi_grid_fv_amount_setValue(newValue, seqRow);
  }
  if ("sell_at" == field) {
    fin_fgi_grid_fv_sell_at_setValue(newValue, seqRow);
  }
  if ("trans" == field) {
    fin_fgi_grid_fv_trans_setValue(newValue, seqRow);
  }
}

function scJQAddEvents(seqRow) {
  seqRow = scSeqNormalize(seqRow);
}

function scSeqNormalize(seqRow) {
  var newSeqRow = seqRow.toString();
  if ("" == newSeqRow) {
    return "";
  }
  if ("_" != newSeqRow.substr(0, 1)) {
    return "_" + newSeqRow;
  }
  return newSeqRow;
}
function ajax_navigate(opc, parm)
{
    scAjaxProcOn();
    $.ajax({
      type: "POST",
      url: "index.php",
      data: "nmgp_opcao=ajax_navigate&script_case_init=" + document.F4.script_case_init.value + "&script_case_session=" + document.F4.script_case_session.value + "&opc=" + opc  + "&parm=" + parm,
      success: function(jsonNavigate) {
        var i, oResp;
        eval("oResp = " + jsonNavigate);
        document.getElementById('nmsc_iframe_liga_A_fin_fgi_grid_fv').src = 'NM_Blank_Page.htm';
        document.getElementById('nmsc_iframe_liga_E_fin_fgi_grid_fv').src = 'NM_Blank_Page.htm';
        document.getElementById('nmsc_iframe_liga_D_fin_fgi_grid_fv').src = 'NM_Blank_Page.htm';
        document.getElementById('nmsc_iframe_liga_B_fin_fgi_grid_fv').src = 'NM_Blank_Page.htm';
        document.getElementById('nmsc_iframe_liga_A_fin_fgi_grid_fv').style.height = '0px';
        document.getElementById('nmsc_iframe_liga_E_fin_fgi_grid_fv').style.height = '0px';
        document.getElementById('nmsc_iframe_liga_D_fin_fgi_grid_fv').style.height = '0px';
        document.getElementById('nmsc_iframe_liga_B_fin_fgi_grid_fv').style.height = '0px';
        document.getElementById('nmsc_iframe_liga_A_fin_fgi_grid_fv').style.width  = '0px';
        document.getElementById('nmsc_iframe_liga_E_fin_fgi_grid_fv').style.width  = '0px';
        document.getElementById('nmsc_iframe_liga_D_fin_fgi_grid_fv').style.width  = '0px';
        document.getElementById('nmsc_iframe_liga_B_fin_fgi_grid_fv').style.width  = '0px';
        if (oResp["redirInfo"]) {
           scAjaxRedir(oResp);
        }
        if (oResp["setValue"]) {
          for (i = 0; i < oResp["setValue"].length; i++) {
               $("#" + oResp["setValue"][i]["field"]).html(oResp["setValue"][i]["value"]);
          }
        }
        if (oResp["setVar"]) {
          for (i = 0; i < oResp["setVar"].length; i++) {
               eval (oResp["setVar"][i]["var"] + ' = \"' + oResp["setVar"][i]["value"] + '\"');
          }
        }
        if (oResp["setDisplay"]) {
          for (i = 0; i < oResp["setDisplay"].length; i++) {
               document.getElementById(oResp["setDisplay"][i]["field"]).style.display = oResp["setDisplay"][i]["value"];
          }
        }
        if (oResp["setDisabled"]) {
          for (i = 0; i < oResp["setDisabled"].length; i++) {
               document.getElementById(oResp["setDisabled"][i]["field"]).disabled = oResp["setDisabled"][i]["value"];
          }
        }
        if (oResp["setClass"]) {
          for (i = 0; i < oResp["setClass"].length; i++) {
               document.getElementById(oResp["setClass"][i]["field"]).className = oResp["setClass"][i]["value"];
          }
        }
        if (oResp["setSrc"]) {
          for (i = 0; i < oResp["setSrc"].length; i++) {
               document.getElementById(oResp["setSrc"][i]["field"]).src = oResp["setSrc"][i]["value"];
          }
        }
        if (oResp["redirInfo"]) {
           scAjaxRedir(oResp);
        }
        if (oResp["htmOutput"]) {
           scAjaxShowDebug(oResp);
        }
        if (!SC_Link_View)
        {
            if (Qsearch_ok)
            {
                scQSInitVal = $("#SC_fast_search_top").val();
                scQSInit = true;
                scQuickSearchInit(false, '');
                $('#SC_fast_search_top').listen();
                scQuickSearchKeyUp('top', null);
                scQSInit = false;
            }
            SC_init_jquery();
            tb_init('a.thickbox, area.thickbox, input.thickbox');
        }
        scAjaxProcOff();
      }
    });
}
