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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

function fv_line_fgi_grid_getValue(field, seqRow) {
  seqRow = scSeqNormalize(seqRow);
  if ("p_o_number" == field) {
    return fv_line_fgi_grid_p_o_number_getValue(seqRow);
  }
  if ("dye_lot" == field) {
    return fv_line_fgi_grid_dye_lot_getValue(seqRow);
  }
  if ("invoice" == field) {
    return fv_line_fgi_grid_invoice_getValue(seqRow);
  }
  if ("location" == field) {
    return fv_line_fgi_grid_location_getValue(seqRow);
  }
  if ("style" == field) {
    return fv_line_fgi_grid_style_getValue(seqRow);
  }
  if ("color" == field) {
    return fv_line_fgi_grid_color_getValue(seqRow);
  }
  if ("color_no" == field) {
    return fv_line_fgi_grid_color_no_getValue(seqRow);
  }
  if ("width" == field) {
    return fv_line_fgi_grid_width_getValue(seqRow);
  }
  if ("finish" == field) {
    return fv_line_fgi_grid_finish_getValue(seqRow);
  }
  if ("putup" == field) {
    return fv_line_fgi_grid_putup_getValue(seqRow);
  }
  if ("open" == field) {
    return fv_line_fgi_grid_open_getValue(seqRow);
  }
  if ("amount" == field) {
    return fv_line_fgi_grid_amount_getValue(seqRow);
  }
  if ("sell_at" == field) {
    return fv_line_fgi_grid_sell_at_getValue(seqRow);
  }
  if ("trans" == field) {
    return fv_line_fgi_grid_trans_getValue(seqRow);
  }
}

function fv_line_fgi_grid_setValue(field, newValue, seqRow) {
  seqRow = scSeqNormalize(seqRow);
  if ("p_o_number" == field) {
    fv_line_fgi_grid_p_o_number_setValue(newValue, seqRow);
  }
  if ("dye_lot" == field) {
    fv_line_fgi_grid_dye_lot_setValue(newValue, seqRow);
  }
  if ("invoice" == field) {
    fv_line_fgi_grid_invoice_setValue(newValue, seqRow);
  }
  if ("location" == field) {
    fv_line_fgi_grid_location_setValue(newValue, seqRow);
  }
  if ("style" == field) {
    fv_line_fgi_grid_style_setValue(newValue, seqRow);
  }
  if ("color" == field) {
    fv_line_fgi_grid_color_setValue(newValue, seqRow);
  }
  if ("color_no" == field) {
    fv_line_fgi_grid_color_no_setValue(newValue, seqRow);
  }
  if ("width" == field) {
    fv_line_fgi_grid_width_setValue(newValue, seqRow);
  }
  if ("finish" == field) {
    fv_line_fgi_grid_finish_setValue(newValue, seqRow);
  }
  if ("putup" == field) {
    fv_line_fgi_grid_putup_setValue(newValue, seqRow);
  }
  if ("open" == field) {
    fv_line_fgi_grid_open_setValue(newValue, seqRow);
  }
  if ("amount" == field) {
    fv_line_fgi_grid_amount_setValue(newValue, seqRow);
  }
  if ("sell_at" == field) {
    fv_line_fgi_grid_sell_at_setValue(newValue, seqRow);
  }
  if ("trans" == field) {
    fv_line_fgi_grid_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_fv_line_fgi_grid').src = 'NM_Blank_Page.htm';
        document.getElementById('nmsc_iframe_liga_E_fv_line_fgi_grid').src = 'NM_Blank_Page.htm';
        document.getElementById('nmsc_iframe_liga_D_fv_line_fgi_grid').src = 'NM_Blank_Page.htm';
        document.getElementById('nmsc_iframe_liga_B_fv_line_fgi_grid').src = 'NM_Blank_Page.htm';
        document.getElementById('nmsc_iframe_liga_A_fv_line_fgi_grid').style.height = '0px';
        document.getElementById('nmsc_iframe_liga_E_fv_line_fgi_grid').style.height = '0px';
        document.getElementById('nmsc_iframe_liga_D_fv_line_fgi_grid').style.height = '0px';
        document.getElementById('nmsc_iframe_liga_B_fv_line_fgi_grid').style.height = '0px';
        document.getElementById('nmsc_iframe_liga_A_fv_line_fgi_grid').style.width  = '0px';
        document.getElementById('nmsc_iframe_liga_E_fv_line_fgi_grid').style.width  = '0px';
        document.getElementById('nmsc_iframe_liga_D_fv_line_fgi_grid').style.width  = '0px';
        document.getElementById('nmsc_iframe_liga_B_fv_line_fgi_grid').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();
      }
    });
}
