
function scJQGeneralAdd() {
  $('input:text.sc-js-input').listen();
  $('input:password.sc-js-input').listen();
  $('textarea.sc-js-input').listen();

} // scJQGeneralAdd

function scFocusField(sField) {
  var $oField = $('#id_sc_field_' + sField);

  if (0 == $oField.length) {
    $oField = $('input[name=' + sField + ']');
  }

  if (0 == $oField.length && document.F1.elements[sField]) {
    $oField = $(document.F1.elements[sField]);
  }

  if (0 < $oField.length && 0 < $oField[0].offsetHeight && 0 < $oField[0].offsetWidth && !$oField[0].disabled) {
    $oField[0].focus();
  }
} // scFocusField

function scJQEventsAdd(iSeqRow) {
  $('#id_sc_field_gs_' + iSeqRow).bind('blur', function() { sc_greige_fingreige_edit_grid_gs__onblur(this, iSeqRow) })
                                 .bind('change', function() { sc_greige_fingreige_edit_grid_gs__onchange(this, iSeqRow) })
                                 .bind('focus', function() { sc_greige_fingreige_edit_grid_gs__onfocus(this, iSeqRow) });
  $('#id_sc_field_fs_' + iSeqRow).bind('blur', function() { sc_greige_fingreige_edit_grid_fs__onblur(this, iSeqRow) })
                                 .bind('change', function() { sc_greige_fingreige_edit_grid_fs__onchange(this, iSeqRow) })
                                 .bind('focus', function() { sc_greige_fingreige_edit_grid_fs__onfocus(this, iSeqRow) });
} // scJQEventsAdd

function sc_greige_fingreige_edit_grid_gs__onblur(oThis, iSeqRow) {
  do_ajax_greige_fingreige_edit_grid_validate_gs_(iSeqRow);
  scCssBlur(oThis, iSeqRow);
}

function sc_greige_fingreige_edit_grid_gs__onchange(oThis, iSeqRow) {
  nm_check_insert(iSeqRow);
}

function sc_greige_fingreige_edit_grid_gs__onfocus(oThis, iSeqRow) {
  scCssFocus(oThis, iSeqRow);
}

function sc_greige_fingreige_edit_grid_fs__onblur(oThis, iSeqRow) {
  do_ajax_greige_fingreige_edit_grid_validate_fs_(iSeqRow);
  scCssBlur(oThis, iSeqRow);
}

function sc_greige_fingreige_edit_grid_fs__onchange(oThis, iSeqRow) {
  nm_check_insert(iSeqRow);
}

function sc_greige_fingreige_edit_grid_fs__onfocus(oThis, iSeqRow) {
  scCssFocus(oThis, iSeqRow);
}

function scJQUploadAdd(iSeqRow) {
} // scJQUploadAdd


function scJQElementsAdd(iLine) {
  scJQEventsAdd(iLine);
  scJQUploadAdd(iLine);
} // scJQElementsAdd

