
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_salesman' + iSeqRow).bind('blur', function() { sc_data_smen_form_salesman_onblur(this, iSeqRow) })
                                      .bind('focus', function() { sc_data_smen_form_salesman_onfocus(this, iSeqRow) });
  $('#id_sc_field_name' + iSeqRow).bind('blur', function() { sc_data_smen_form_name_onblur(this, iSeqRow) })
                                  .bind('focus', function() { sc_data_smen_form_name_onfocus(this, iSeqRow) });
  $('#id_sc_field_yearsalary' + iSeqRow).bind('blur', function() { sc_data_smen_form_yearsalary_onblur(this, iSeqRow) })
                                        .bind('focus', function() { sc_data_smen_form_yearsalary_onfocus(this, iSeqRow) });
  $('#id_sc_field_commission' + iSeqRow).bind('blur', function() { sc_data_smen_form_commission_onblur(this, iSeqRow) })
                                        .bind('focus', function() { sc_data_smen_form_commission_onfocus(this, iSeqRow) });
  $('#id_sc_field_id2' + iSeqRow).bind('blur', function() { sc_data_smen_form_id2_onblur(this, iSeqRow) })
                                 .bind('focus', function() { sc_data_smen_form_id2_onfocus(this, iSeqRow) });
} // scJQEventsAdd

function sc_data_smen_form_salesman_onblur(oThis, iSeqRow) {
  do_ajax_data_smen_form_validate_salesman();
  scCssBlur(oThis);
}

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

function sc_data_smen_form_name_onblur(oThis, iSeqRow) {
  do_ajax_data_smen_form_validate_name();
  scCssBlur(oThis);
}

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

function sc_data_smen_form_yearsalary_onblur(oThis, iSeqRow) {
  do_ajax_data_smen_form_validate_yearsalary();
  scCssBlur(oThis);
}

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

function sc_data_smen_form_commission_onblur(oThis, iSeqRow) {
  do_ajax_data_smen_form_validate_commission();
  scCssBlur(oThis);
}

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

function sc_data_smen_form_id2_onblur(oThis, iSeqRow) {
  do_ajax_data_smen_form_validate_id2();
  scCssBlur(oThis);
}

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

function scJQUploadAdd(iSeqRow) {
} // scJQUploadAdd


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

