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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

function greige_greigepo_grid_getValue(field, seqRow) {
  seqRow = scSeqNormalize(seqRow);
  if ("status" == field) {
    return greige_greigepo_grid_status_getValue(seqRow);
  }
  if ("ac" == field) {
    return greige_greigepo_grid_ac_getValue(seqRow);
  }
  if ("id2" == field) {
    return greige_greigepo_grid_id2_getValue(seqRow);
  }
  if ("p_o_number" == field) {
    return greige_greigepo_grid_p_o_number_getValue(seqRow);
  }
  if ("date" == field) {
    return greige_greigepo_grid_date_getValue(seqRow);
  }
  if ("mill" == field) {
    return greige_greigepo_grid_mill_getValue(seqRow);
  }
  if ("ship_to" == field) {
    return greige_greigepo_grid_ship_to_getValue(seqRow);
  }
  if ("new_style" == field) {
    return greige_greigepo_grid_new_style_getValue(seqRow);
  }
  if ("top_p_o_" == field) {
    return greige_greigepo_grid_top_p_o__getValue(seqRow);
  }
  if ("top_lbs" == field) {
    return greige_greigepo_grid_top_lbs_getValue(seqRow);
  }
  if ("top_ship" == field) {
    return greige_greigepo_grid_top_ship_getValue(seqRow);
  }
  if ("top_cost" == field) {
    return greige_greigepo_grid_top_cost_getValue(seqRow);
  }
  if ("bot_p_o_" == field) {
    return greige_greigepo_grid_bot_p_o__getValue(seqRow);
  }
  if ("bot_lbs" == field) {
    return greige_greigepo_grid_bot_lbs_getValue(seqRow);
  }
  if ("bot_ship" == field) {
    return greige_greigepo_grid_bot_ship_getValue(seqRow);
  }
  if ("bot_cost" == field) {
    return greige_greigepo_grid_bot_cost_getValue(seqRow);
  }
  if ("lbs_ordere" == field) {
    return greige_greigepo_grid_lbs_ordere_getValue(seqRow);
  }
  if ("lbs" == field) {
    return greige_greigepo_grid_lbs_getValue(seqRow);
  }
  if ("lbs_open" == field) {
    return greige_greigepo_grid_lbs_open_getValue(seqRow);
  }
  if ("lbs_dyed" == field) {
    return greige_greigepo_grid_lbs_dyed_getValue(seqRow);
  }
  if ("adjustment" == field) {
    return greige_greigepo_grid_adjustment_getValue(seqRow);
  }
  if ("inventory" == field) {
    return greige_greigepo_grid_inventory_getValue(seqRow);
  }
  if ("pinv" == field) {
    return greige_greigepo_grid_pinv_getValue(seqRow);
  }
  if ("knit_price" == field) {
    return greige_greigepo_grid_knit_price_getValue(seqRow);
  }
  if ("cost_lb_k" == field) {
    return greige_greigepo_grid_cost_lb_k_getValue(seqRow);
  }
  if ("cost_lb_y" == field) {
    return greige_greigepo_grid_cost_lb_y_getValue(seqRow);
  }
  if ("cost_lb" == field) {
    return greige_greigepo_grid_cost_lb_getValue(seqRow);
  }
  if ("roll_size" == field) {
    return greige_greigepo_grid_roll_size_getValue(seqRow);
  }
  if ("spec" == field) {
    return greige_greigepo_grid_spec_getValue(seqRow);
  }
  if ("mach" == field) {
    return greige_greigepo_grid_mach_getValue(seqRow);
  }
  if ("lbs_rack" == field) {
    return greige_greigepo_grid_lbs_rack_getValue(seqRow);
  }
}

function greige_greigepo_grid_setValue(field, newValue, seqRow) {
  seqRow = scSeqNormalize(seqRow);
  if ("status" == field) {
    greige_greigepo_grid_status_setValue(newValue, seqRow);
  }
  if ("ac" == field) {
    greige_greigepo_grid_ac_setValue(newValue, seqRow);
  }
  if ("id2" == field) {
    greige_greigepo_grid_id2_setValue(newValue, seqRow);
  }
  if ("p_o_number" == field) {
    greige_greigepo_grid_p_o_number_setValue(newValue, seqRow);
  }
  if ("date" == field) {
    greige_greigepo_grid_date_setValue(newValue, seqRow);
  }
  if ("mill" == field) {
    greige_greigepo_grid_mill_setValue(newValue, seqRow);
  }
  if ("ship_to" == field) {
    greige_greigepo_grid_ship_to_setValue(newValue, seqRow);
  }
  if ("new_style" == field) {
    greige_greigepo_grid_new_style_setValue(newValue, seqRow);
  }
  if ("top_p_o_" == field) {
    greige_greigepo_grid_top_p_o__setValue(newValue, seqRow);
  }
  if ("top_lbs" == field) {
    greige_greigepo_grid_top_lbs_setValue(newValue, seqRow);
  }
  if ("top_ship" == field) {
    greige_greigepo_grid_top_ship_setValue(newValue, seqRow);
  }
  if ("top_cost" == field) {
    greige_greigepo_grid_top_cost_setValue(newValue, seqRow);
  }
  if ("bot_p_o_" == field) {
    greige_greigepo_grid_bot_p_o__setValue(newValue, seqRow);
  }
  if ("bot_lbs" == field) {
    greige_greigepo_grid_bot_lbs_setValue(newValue, seqRow);
  }
  if ("bot_ship" == field) {
    greige_greigepo_grid_bot_ship_setValue(newValue, seqRow);
  }
  if ("bot_cost" == field) {
    greige_greigepo_grid_bot_cost_setValue(newValue, seqRow);
  }
  if ("lbs_ordere" == field) {
    greige_greigepo_grid_lbs_ordere_setValue(newValue, seqRow);
  }
  if ("lbs" == field) {
    greige_greigepo_grid_lbs_setValue(newValue, seqRow);
  }
  if ("lbs_open" == field) {
    greige_greigepo_grid_lbs_open_setValue(newValue, seqRow);
  }
  if ("lbs_dyed" == field) {
    greige_greigepo_grid_lbs_dyed_setValue(newValue, seqRow);
  }
  if ("adjustment" == field) {
    greige_greigepo_grid_adjustment_setValue(newValue, seqRow);
  }
  if ("inventory" == field) {
    greige_greigepo_grid_inventory_setValue(newValue, seqRow);
  }
  if ("pinv" == field) {
    greige_greigepo_grid_pinv_setValue(newValue, seqRow);
  }
  if ("knit_price" == field) {
    greige_greigepo_grid_knit_price_setValue(newValue, seqRow);
  }
  if ("cost_lb_k" == field) {
    greige_greigepo_grid_cost_lb_k_setValue(newValue, seqRow);
  }
  if ("cost_lb_y" == field) {
    greige_greigepo_grid_cost_lb_y_setValue(newValue, seqRow);
  }
  if ("cost_lb" == field) {
    greige_greigepo_grid_cost_lb_setValue(newValue, seqRow);
  }
  if ("roll_size" == field) {
    greige_greigepo_grid_roll_size_setValue(newValue, seqRow);
  }
  if ("spec" == field) {
    greige_greigepo_grid_spec_setValue(newValue, seqRow);
  }
  if ("mach" == field) {
    greige_greigepo_grid_mach_setValue(newValue, seqRow);
  }
  if ("lbs_rack" == field) {
    greige_greigepo_grid_lbs_rack_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_greige_greigepo_grid').src = 'NM_Blank_Page.htm';
        document.getElementById('nmsc_iframe_liga_E_greige_greigepo_grid').src = 'NM_Blank_Page.htm';
        document.getElementById('nmsc_iframe_liga_D_greige_greigepo_grid').src = 'NM_Blank_Page.htm';
        document.getElementById('nmsc_iframe_liga_B_greige_greigepo_grid').src = 'NM_Blank_Page.htm';
        document.getElementById('nmsc_iframe_liga_A_greige_greigepo_grid').style.height = '0px';
        document.getElementById('nmsc_iframe_liga_E_greige_greigepo_grid').style.height = '0px';
        document.getElementById('nmsc_iframe_liga_D_greige_greigepo_grid').style.height = '0px';
        document.getElementById('nmsc_iframe_liga_B_greige_greigepo_grid').style.height = '0px';
        document.getElementById('nmsc_iframe_liga_A_greige_greigepo_grid').style.width  = '0px';
        document.getElementById('nmsc_iframe_liga_E_greige_greigepo_grid').style.width  = '0px';
        document.getElementById('nmsc_iframe_liga_D_greige_greigepo_grid').style.width  = '0px';
        document.getElementById('nmsc_iframe_liga_B_greige_greigepo_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();
      }
    });
}
