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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

function line_asst_grid_getValue(field, seqRow) {
  seqRow = scSeqNormalize(seqRow);
  if ("assortment" == field) {
    return line_asst_grid_assortment_getValue(seqRow);
  }
  if ("our_order" == field) {
    return line_asst_grid_our_order_getValue(seqRow);
  }
  if ("date" == field) {
    return line_asst_grid_date_getValue(seqRow);
  }
  if ("bcode" == field) {
    return line_asst_grid_bcode_getValue(seqRow);
  }
  if ("style" == field) {
    return line_asst_grid_style_getValue(seqRow);
  }
  if ("color" == field) {
    return line_asst_grid_color_getValue(seqRow);
  }
  if ("color_no" == field) {
    return line_asst_grid_color_no_getValue(seqRow);
  }
  if ("width" == field) {
    return line_asst_grid_width_getValue(seqRow);
  }
  if ("yards" == field) {
    return line_asst_grid_yards_getValue(seqRow);
  }
  if ("shipped" == field) {
    return line_asst_grid_shipped_getValue(seqRow);
  }
  if ("open" == field) {
    return line_asst_grid_open_getValue(seqRow);
  }
  if ("ryards" == field) {
    return line_asst_grid_ryards_getValue(seqRow);
  }
  if ("yid" == field) {
    return line_asst_grid_yid_getValue(seqRow);
  }
  if ("fgi" == field) {
    return line_asst_grid_fgi_getValue(seqRow);
  }
  if ("short" == field) {
    return line_asst_grid_short_getValue(seqRow);
  }
  if ("lin_sq" == field) {
    return line_asst_grid_lin_sq_getValue(seqRow);
  }
  if ("delivery" == field) {
    return line_asst_grid_delivery_getValue(seqRow);
  }
  if ("c_o_number" == field) {
    return line_asst_grid_c_o_number_getValue(seqRow);
  }
  if ("price" == field) {
    return line_asst_grid_price_getValue(seqRow);
  }
  if ("amount" == field) {
    return line_asst_grid_amount_getValue(seqRow);
  }
  if ("stat" == field) {
    return line_asst_grid_stat_getValue(seqRow);
  }
}

function line_asst_grid_setValue(field, newValue, seqRow) {
  seqRow = scSeqNormalize(seqRow);
  if ("assortment" == field) {
    line_asst_grid_assortment_setValue(newValue, seqRow);
  }
  if ("our_order" == field) {
    line_asst_grid_our_order_setValue(newValue, seqRow);
  }
  if ("date" == field) {
    line_asst_grid_date_setValue(newValue, seqRow);
  }
  if ("bcode" == field) {
    line_asst_grid_bcode_setValue(newValue, seqRow);
  }
  if ("style" == field) {
    line_asst_grid_style_setValue(newValue, seqRow);
  }
  if ("color" == field) {
    line_asst_grid_color_setValue(newValue, seqRow);
  }
  if ("color_no" == field) {
    line_asst_grid_color_no_setValue(newValue, seqRow);
  }
  if ("width" == field) {
    line_asst_grid_width_setValue(newValue, seqRow);
  }
  if ("yards" == field) {
    line_asst_grid_yards_setValue(newValue, seqRow);
  }
  if ("shipped" == field) {
    line_asst_grid_shipped_setValue(newValue, seqRow);
  }
  if ("open" == field) {
    line_asst_grid_open_setValue(newValue, seqRow);
  }
  if ("ryards" == field) {
    line_asst_grid_ryards_setValue(newValue, seqRow);
  }
  if ("yid" == field) {
    line_asst_grid_yid_setValue(newValue, seqRow);
  }
  if ("fgi" == field) {
    line_asst_grid_fgi_setValue(newValue, seqRow);
  }
  if ("short" == field) {
    line_asst_grid_short_setValue(newValue, seqRow);
  }
  if ("lin_sq" == field) {
    line_asst_grid_lin_sq_setValue(newValue, seqRow);
  }
  if ("delivery" == field) {
    line_asst_grid_delivery_setValue(newValue, seqRow);
  }
  if ("c_o_number" == field) {
    line_asst_grid_c_o_number_setValue(newValue, seqRow);
  }
  if ("price" == field) {
    line_asst_grid_price_setValue(newValue, seqRow);
  }
  if ("amount" == field) {
    line_asst_grid_amount_setValue(newValue, seqRow);
  }
  if ("stat" == field) {
    line_asst_grid_stat_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);
        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();
      }
    });
}
