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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

function line_dyeorder_grid_getValue(field, seqRow) {
  seqRow = scSeqNormalize(seqRow);
  if ("p_o_number" == field) {
    return line_dyeorder_grid_p_o_number_getValue(seqRow);
  }
  if ("dye_order" == field) {
    return line_dyeorder_grid_dye_order_getValue(seqRow);
  }
  if ("date" == field) {
    return line_dyeorder_grid_date_getValue(seqRow);
  }
  if ("dyer" == field) {
    return line_dyeorder_grid_dyer_getValue(seqRow);
  }
  if ("gs" == field) {
    return line_dyeorder_grid_gs_getValue(seqRow);
  }
  if ("fs" == field) {
    return line_dyeorder_grid_fs_getValue(seqRow);
  }
  if ("color" == field) {
    return line_dyeorder_grid_color_getValue(seqRow);
  }
  if ("color_numb" == field) {
    return line_dyeorder_grid_color_numb_getValue(seqRow);
  }
  if ("frame" == field) {
    return line_dyeorder_grid_frame_getValue(seqRow);
  }
  if ("finish" == field) {
    return line_dyeorder_grid_finish_getValue(seqRow);
  }
  if ("finish_no" == field) {
    return line_dyeorder_grid_finish_no_getValue(seqRow);
  }
  if ("req_gr_yld" == field) {
    return line_dyeorder_grid_req_gr_yld_getValue(seqRow);
  }
  if ("price_lb_d" == field) {
    return line_dyeorder_grid_price_lb_d_getValue(seqRow);
  }
  if ("cost_lb_d" == field) {
    return line_dyeorder_grid_cost_lb_d_getValue(seqRow);
  }
  if ("gr_lbs_o" == field) {
    return line_dyeorder_grid_gr_lbs_o_getValue(seqRow);
  }
  if ("gr_yield" == field) {
    return line_dyeorder_grid_gr_yield_getValue(seqRow);
  }
  if ("yards_recd" == field) {
    return line_dyeorder_grid_yards_recd_getValue(seqRow);
  }
  if ("cost_lb_g" == field) {
    return line_dyeorder_grid_cost_lb_g_getValue(seqRow);
  }
  if ("cost_yd_t" == field) {
    return line_dyeorder_grid_cost_yd_t_getValue(seqRow);
  }
}

function line_dyeorder_grid_setValue(field, newValue, seqRow) {
  seqRow = scSeqNormalize(seqRow);
  if ("p_o_number" == field) {
    line_dyeorder_grid_p_o_number_setValue(newValue, seqRow);
  }
  if ("dye_order" == field) {
    line_dyeorder_grid_dye_order_setValue(newValue, seqRow);
  }
  if ("date" == field) {
    line_dyeorder_grid_date_setValue(newValue, seqRow);
  }
  if ("dyer" == field) {
    line_dyeorder_grid_dyer_setValue(newValue, seqRow);
  }
  if ("gs" == field) {
    line_dyeorder_grid_gs_setValue(newValue, seqRow);
  }
  if ("fs" == field) {
    line_dyeorder_grid_fs_setValue(newValue, seqRow);
  }
  if ("color" == field) {
    line_dyeorder_grid_color_setValue(newValue, seqRow);
  }
  if ("color_numb" == field) {
    line_dyeorder_grid_color_numb_setValue(newValue, seqRow);
  }
  if ("frame" == field) {
    line_dyeorder_grid_frame_setValue(newValue, seqRow);
  }
  if ("finish" == field) {
    line_dyeorder_grid_finish_setValue(newValue, seqRow);
  }
  if ("finish_no" == field) {
    line_dyeorder_grid_finish_no_setValue(newValue, seqRow);
  }
  if ("req_gr_yld" == field) {
    line_dyeorder_grid_req_gr_yld_setValue(newValue, seqRow);
  }
  if ("price_lb_d" == field) {
    line_dyeorder_grid_price_lb_d_setValue(newValue, seqRow);
  }
  if ("cost_lb_d" == field) {
    line_dyeorder_grid_cost_lb_d_setValue(newValue, seqRow);
  }
  if ("gr_lbs_o" == field) {
    line_dyeorder_grid_gr_lbs_o_setValue(newValue, seqRow);
  }
  if ("gr_yield" == field) {
    line_dyeorder_grid_gr_yield_setValue(newValue, seqRow);
  }
  if ("yards_recd" == field) {
    line_dyeorder_grid_yards_recd_setValue(newValue, seqRow);
  }
  if ("cost_lb_g" == field) {
    line_dyeorder_grid_cost_lb_g_setValue(newValue, seqRow);
  }
  if ("cost_yd_t" == field) {
    line_dyeorder_grid_cost_yd_t_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_line_dyeorder_grid').src = 'NM_Blank_Page.htm';
        document.getElementById('nmsc_iframe_liga_E_line_dyeorder_grid').src = 'NM_Blank_Page.htm';
        document.getElementById('nmsc_iframe_liga_D_line_dyeorder_grid').src = 'NM_Blank_Page.htm';
        document.getElementById('nmsc_iframe_liga_B_line_dyeorder_grid').src = 'NM_Blank_Page.htm';
        document.getElementById('nmsc_iframe_liga_A_line_dyeorder_grid').style.height = '0px';
        document.getElementById('nmsc_iframe_liga_E_line_dyeorder_grid').style.height = '0px';
        document.getElementById('nmsc_iframe_liga_D_line_dyeorder_grid').style.height = '0px';
        document.getElementById('nmsc_iframe_liga_B_line_dyeorder_grid').style.height = '0px';
        document.getElementById('nmsc_iframe_liga_A_line_dyeorder_grid').style.width  = '0px';
        document.getElementById('nmsc_iframe_liga_E_line_dyeorder_grid').style.width  = '0px';
        document.getElementById('nmsc_iframe_liga_D_line_dyeorder_grid').style.width  = '0px';
        document.getElementById('nmsc_iframe_liga_B_line_dyeorder_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();
      }
    });
}
