
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) {
    switch ($oField[0].name) {
      case 'id2':
      case 'p_o_number':
      case 'fin_no':
      case 'status':
      case 'date':
      case 'dyer':
      case 'desc1':
      case 'desc2':
      case 'gs':
      case 'knitter':
      case 'ggd':
      case 'fs':
      case 'greige_wi':
      case 'put_up':
      case 'price_lb_d':
      case 'spec1':
      case 'spec2':
      case 'spec3':
      case 'color':
      case 'color_numb':
      case 'finish':
      case 'finish_no':
      case 'frame':
      case 'fwidth':
      case 'panels':
      case 'cpi':
      case 'wpi':
      case 'req_fin_wt':
      case 'req_gr_yld':
      case 'cost_lb_d':
      case 'dye_cost':
      case 'gr_lbs_o':
      case 'gr_lbs_d':
      case 'gr_lbs_op':
      case 'fin_lbs':
      case 'work_loss':
      case 'cost_lb_g':
      case 'est_yards':
      case 'yards_recd':
      case 'cost_lb_t':
      case 'gr_yield':
      case 'cost_yd_t':
      case 'gr_value':
        sc_exib_ocult_pag('line_dyeorder_grid_form0');
        break;
      case 'sld':
      case 'she':
      case 'ld1':
      case 'ld2':
      case 'he1':
      case 'he2':
        sc_exib_ocult_pag('line_dyeorder_grid_form1');
        break;
      case 'grpcs':
        sc_exib_ocult_pag('line_dyeorder_grid_form2');
        break;
      case 'sc_field_0':
        sc_exib_ocult_pag('line_dyeorder_grid_form3');
        break;
      case 'receivers':
        sc_exib_ocult_pag('line_dyeorder_grid_form4');
        break;
      case 'grpcsadd':
        sc_exib_ocult_pag('line_dyeorder_grid_form5');
        break;
    }
  }

  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_p_o_number' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_p_o_number_onblur(this, iSeqRow) })
                                        .bind('focus', function() { sc_line_dyeorder_grid_p_o_number_onfocus(this, iSeqRow) });
  $('#id_sc_field_date' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_date_onblur(this, iSeqRow) })
                                  .bind('focus', function() { sc_line_dyeorder_grid_date_onfocus(this, iSeqRow) });
  $('#id_sc_field_dyer' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_dyer_onblur(this, iSeqRow) })
                                  .bind('focus', function() { sc_line_dyeorder_grid_dyer_onfocus(this, iSeqRow) });
  $('#id_sc_field_color' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_color_onblur(this, iSeqRow) })
                                   .bind('focus', function() { sc_line_dyeorder_grid_color_onfocus(this, iSeqRow) });
  $('#id_sc_field_color_numb' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_color_numb_onblur(this, iSeqRow) })
                                        .bind('focus', function() { sc_line_dyeorder_grid_color_numb_onfocus(this, iSeqRow) });
  $('#id_sc_field_finish' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_finish_onblur(this, iSeqRow) })
                                    .bind('focus', function() { sc_line_dyeorder_grid_finish_onfocus(this, iSeqRow) });
  $('#id_sc_field_finish_no' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_finish_no_onblur(this, iSeqRow) })
                                       .bind('focus', function() { sc_line_dyeorder_grid_finish_no_onfocus(this, iSeqRow) });
  $('#id_sc_field_frame' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_frame_onblur(this, iSeqRow) })
                                   .bind('focus', function() { sc_line_dyeorder_grid_frame_onfocus(this, iSeqRow) });
  $('#id_sc_field_fwidth' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_fwidth_onblur(this, iSeqRow) })
                                    .bind('focus', function() { sc_line_dyeorder_grid_fwidth_onfocus(this, iSeqRow) });
  $('#id_sc_field_panels' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_panels_onblur(this, iSeqRow) })
                                    .bind('focus', function() { sc_line_dyeorder_grid_panels_onfocus(this, iSeqRow) });
  $('#id_sc_field_cpi' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_cpi_onblur(this, iSeqRow) })
                                 .bind('focus', function() { sc_line_dyeorder_grid_cpi_onfocus(this, iSeqRow) });
  $('#id_sc_field_wpi' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_wpi_onblur(this, iSeqRow) })
                                 .bind('focus', function() { sc_line_dyeorder_grid_wpi_onfocus(this, iSeqRow) });
  $('#id_sc_field_gs' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_gs_onblur(this, iSeqRow) })
                                .bind('focus', function() { sc_line_dyeorder_grid_gs_onfocus(this, iSeqRow) });
  $('#id_sc_field_fs' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_fs_onblur(this, iSeqRow) })
                                .bind('focus', function() { sc_line_dyeorder_grid_fs_onfocus(this, iSeqRow) });
  $('#id_sc_field_greige_wi' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_greige_wi_onblur(this, iSeqRow) })
                                       .bind('focus', function() { sc_line_dyeorder_grid_greige_wi_onfocus(this, iSeqRow) });
  $('#id_sc_field_req_fin_wt' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_req_fin_wt_onblur(this, iSeqRow) })
                                        .bind('focus', function() { sc_line_dyeorder_grid_req_fin_wt_onfocus(this, iSeqRow) });
  $('#id_sc_field_req_gr_yld' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_req_gr_yld_onblur(this, iSeqRow) })
                                        .bind('focus', function() { sc_line_dyeorder_grid_req_gr_yld_onfocus(this, iSeqRow) });
  $('#id_sc_field_put_up' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_put_up_onblur(this, iSeqRow) })
                                    .bind('focus', function() { sc_line_dyeorder_grid_put_up_onfocus(this, iSeqRow) });
  $('#id_sc_field_spec1' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_spec1_onblur(this, iSeqRow) })
                                   .bind('focus', function() { sc_line_dyeorder_grid_spec1_onfocus(this, iSeqRow) });
  $('#id_sc_field_spec2' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_spec2_onblur(this, iSeqRow) })
                                   .bind('focus', function() { sc_line_dyeorder_grid_spec2_onfocus(this, iSeqRow) });
  $('#id_sc_field_spec3' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_spec3_onblur(this, iSeqRow) })
                                   .bind('focus', function() { sc_line_dyeorder_grid_spec3_onfocus(this, iSeqRow) });
  $('#id_sc_field_sld' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_sld_onblur(this, iSeqRow) })
                                 .bind('focus', function() { sc_line_dyeorder_grid_sld_onfocus(this, iSeqRow) });
  $('#id_sc_field_she' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_she_onblur(this, iSeqRow) })
                                 .bind('focus', function() { sc_line_dyeorder_grid_she_onfocus(this, iSeqRow) });
  $('#id_sc_field_ld1' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_ld1_onblur(this, iSeqRow) })
                                 .bind('focus', function() { sc_line_dyeorder_grid_ld1_onfocus(this, iSeqRow) });
  $('#id_sc_field_ld2' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_ld2_onblur(this, iSeqRow) })
                                 .bind('focus', function() { sc_line_dyeorder_grid_ld2_onfocus(this, iSeqRow) });
  $('#id_sc_field_he1' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_he1_onblur(this, iSeqRow) })
                                 .bind('focus', function() { sc_line_dyeorder_grid_he1_onfocus(this, iSeqRow) });
  $('#id_sc_field_he2' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_he2_onblur(this, iSeqRow) })
                                 .bind('focus', function() { sc_line_dyeorder_grid_he2_onfocus(this, iSeqRow) });
  $('#id_sc_field_knitter' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_knitter_onblur(this, iSeqRow) })
                                     .bind('focus', function() { sc_line_dyeorder_grid_knitter_onfocus(this, iSeqRow) });
  $('#id_sc_field_desc1' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_desc1_onblur(this, iSeqRow) })
                                   .bind('focus', function() { sc_line_dyeorder_grid_desc1_onfocus(this, iSeqRow) });
  $('#id_sc_field_desc2' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_desc2_onblur(this, iSeqRow) })
                                   .bind('focus', function() { sc_line_dyeorder_grid_desc2_onfocus(this, iSeqRow) });
  $('#id_sc_field_ggd' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_ggd_onblur(this, iSeqRow) })
                                 .bind('focus', function() { sc_line_dyeorder_grid_ggd_onfocus(this, iSeqRow) });
  $('#id_sc_field_price_lb_d' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_price_lb_d_onblur(this, iSeqRow) })
                                        .bind('focus', function() { sc_line_dyeorder_grid_price_lb_d_onfocus(this, iSeqRow) });
  $('#id_sc_field_cost_lb_d' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_cost_lb_d_onblur(this, iSeqRow) })
                                       .bind('focus', function() { sc_line_dyeorder_grid_cost_lb_d_onfocus(this, iSeqRow) });
  $('#id_sc_field_dye_cost' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_dye_cost_onblur(this, iSeqRow) })
                                      .bind('focus', function() { sc_line_dyeorder_grid_dye_cost_onfocus(this, iSeqRow) });
  $('#id_sc_field_gr_lbs_o' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_gr_lbs_o_onblur(this, iSeqRow) })
                                      .bind('focus', function() { sc_line_dyeorder_grid_gr_lbs_o_onfocus(this, iSeqRow) });
  $('#id_sc_field_gr_lbs_d' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_gr_lbs_d_onblur(this, iSeqRow) })
                                      .bind('focus', function() { sc_line_dyeorder_grid_gr_lbs_d_onfocus(this, iSeqRow) });
  $('#id_sc_field_gr_lbs_op' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_gr_lbs_op_onblur(this, iSeqRow) })
                                       .bind('focus', function() { sc_line_dyeorder_grid_gr_lbs_op_onfocus(this, iSeqRow) });
  $('#id_sc_field_fin_lbs' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_fin_lbs_onblur(this, iSeqRow) })
                                     .bind('focus', function() { sc_line_dyeorder_grid_fin_lbs_onfocus(this, iSeqRow) });
  $('#id_sc_field_work_loss' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_work_loss_onblur(this, iSeqRow) })
                                       .bind('focus', function() { sc_line_dyeorder_grid_work_loss_onfocus(this, iSeqRow) });
  $('#id_sc_field_cost_lb_g' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_cost_lb_g_onblur(this, iSeqRow) })
                                       .bind('focus', function() { sc_line_dyeorder_grid_cost_lb_g_onfocus(this, iSeqRow) });
  $('#id_sc_field_est_yards' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_est_yards_onblur(this, iSeqRow) })
                                       .bind('focus', function() { sc_line_dyeorder_grid_est_yards_onfocus(this, iSeqRow) });
  $('#id_sc_field_yards_recd' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_yards_recd_onblur(this, iSeqRow) })
                                        .bind('focus', function() { sc_line_dyeorder_grid_yards_recd_onfocus(this, iSeqRow) });
  $('#id_sc_field_cost_lb_t' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_cost_lb_t_onblur(this, iSeqRow) })
                                       .bind('focus', function() { sc_line_dyeorder_grid_cost_lb_t_onfocus(this, iSeqRow) });
  $('#id_sc_field_gr_yield' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_gr_yield_onblur(this, iSeqRow) })
                                      .bind('focus', function() { sc_line_dyeorder_grid_gr_yield_onfocus(this, iSeqRow) });
  $('#id_sc_field_cost_yd_t' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_cost_yd_t_onblur(this, iSeqRow) })
                                       .bind('focus', function() { sc_line_dyeorder_grid_cost_yd_t_onfocus(this, iSeqRow) });
  $('#id_sc_field_gr_value' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_gr_value_onblur(this, iSeqRow) })
                                      .bind('focus', function() { sc_line_dyeorder_grid_gr_value_onfocus(this, iSeqRow) });
  $('#id_sc_field_status' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_status_onblur(this, iSeqRow) })
                                    .bind('focus', function() { sc_line_dyeorder_grid_status_onfocus(this, iSeqRow) });
  $('#id_sc_field_fin_no' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_fin_no_onblur(this, iSeqRow) })
                                    .bind('focus', function() { sc_line_dyeorder_grid_fin_no_onfocus(this, iSeqRow) });
  $('#id_sc_field_id2' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_id2_onblur(this, iSeqRow) })
                                 .bind('focus', function() { sc_line_dyeorder_grid_id2_onfocus(this, iSeqRow) });
  $('#id_sc_field_sc_field_0' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_sc_field_0_onblur(this, iSeqRow) })
                                        .bind('focus', function() { sc_line_dyeorder_grid_sc_field_0_onfocus(this, iSeqRow) });
  $('#id_sc_field_grpcs' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_grpcs_onblur(this, iSeqRow) })
                                   .bind('focus', function() { sc_line_dyeorder_grid_grpcs_onfocus(this, iSeqRow) });
  $('#id_sc_field_receivers' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_receivers_onblur(this, iSeqRow) })
                                       .bind('focus', function() { sc_line_dyeorder_grid_receivers_onfocus(this, iSeqRow) });
  $('#id_sc_field_grpcsadd' + iSeqRow).bind('blur', function() { sc_line_dyeorder_grid_grpcsadd_onblur(this, iSeqRow) })
                                      .bind('focus', function() { sc_line_dyeorder_grid_grpcsadd_onfocus(this, iSeqRow) });
} // scJQEventsAdd

function sc_line_dyeorder_grid_p_o_number_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_p_o_number();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_date_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_date();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_dyer_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_dyer();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_color_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_color();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_color_numb_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_color_numb();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_finish_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_finish();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_finish_no_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_finish_no();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_frame_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_frame();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_fwidth_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_fwidth();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_panels_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_panels();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_cpi_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_cpi();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_wpi_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_wpi();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_gs_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_gs();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_fs_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_fs();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_greige_wi_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_greige_wi();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_req_fin_wt_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_req_fin_wt();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_req_gr_yld_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_req_gr_yld();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_put_up_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_put_up();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_spec1_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_spec1();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_spec2_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_spec2();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_spec3_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_spec3();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_sld_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_sld();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_she_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_she();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_ld1_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_ld1();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_ld2_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_ld2();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_he1_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_he1();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_he2_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_he2();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_knitter_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_knitter();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_desc1_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_desc1();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_desc2_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_desc2();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_ggd_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_ggd();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_price_lb_d_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_price_lb_d();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_cost_lb_d_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_cost_lb_d();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_dye_cost_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_dye_cost();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_gr_lbs_o_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_gr_lbs_o();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_gr_lbs_d_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_gr_lbs_d();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_gr_lbs_op_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_gr_lbs_op();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_fin_lbs_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_fin_lbs();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_work_loss_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_work_loss();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_cost_lb_g_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_cost_lb_g();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_est_yards_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_est_yards();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_yards_recd_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_yards_recd();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_cost_lb_t_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_cost_lb_t();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_gr_yield_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_gr_yield();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_cost_yd_t_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_cost_yd_t();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_gr_value_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_gr_value();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_status_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_status();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_fin_no_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_fin_no();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_id2_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_id2();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_sc_field_0_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_sc_field_0();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_grpcs_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_grpcs();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_receivers_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_receivers();
  scCssBlur(oThis);
}

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

function sc_line_dyeorder_grid_grpcsadd_onblur(oThis, iSeqRow) {
  do_ajax_line_dyeorder_grid_validate_grpcsadd();
  scCssBlur(oThis);
}

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

var sc_jq_calendar_value = {};

function scJQCalendarAdd(iSeqRow) {
  $("#id_sc_field_date" + iSeqRow).datepicker({
    beforeShow: function(input, inst) {
      var $oField = $(this),
          aParts  = $oField.val().split(" "),
          sTime   = "";
      sc_jq_calendar_value["#id_sc_field_date" + iSeqRow] = $oField.val();
    },
    onClose: function(dateText, inst) {
    },
    showWeek: true,
    numberOfMonths: 1,
    changeMonth: true,
    changeYear: true,
    yearRange: 'c-5:c+5',
    dayNames: ['<?php        echo html_entity_decode($this->Ini->Nm_lang['lang_days_sund']);        ?>','<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_mond']);        ?>','<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_tued']);        ?>','<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_wend']);        ?>','<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_thud']);        ?>','<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_frid']);        ?>','<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_satd']);        ?>'],
    dayNamesMin: ['<?php     echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_sund']); ?>','<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_mond']); ?>','<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_tued']); ?>','<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_wend']); ?>','<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_thud']); ?>','<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_frid']); ?>','<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_satd']); ?>'],
    monthNamesShort: ['<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_janu']);   ?>','<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_febr']);   ?>','<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_marc']);   ?>','<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_apri']);   ?>','<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_mayy']);   ?>','<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_june']);   ?>','<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_july']);   ?>','<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_augu']); ?>','<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_sept']); ?>','<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_octo']); ?>','<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_nove']); ?>','<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_dece']); ?>'],
    weekHeader: "<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_days_sem']); ?>",
    firstDay: <?php echo $this->jqueryCalendarWeekInit("" . $_SESSION['scriptcase']['reg_conf']['date_week_ini'] . ""); ?>,
    dateFormat: "<?php echo $this->jqueryCalendarDtFormat("" . str_replace(array('/', 'aaaa', $_SESSION['scriptcase']['reg_conf']['date_sep']), array('', 'yyyy', ''), $this->field_config['date']['date_format']) . "", "" . $_SESSION['scriptcase']['reg_conf']['date_sep'] . ""); ?>",
    showOtherMonths: true,
    showOn: "button",
    buttonImage: "<?php echo $this->jqueryIconFile('calendar'); ?>",
    buttonImageOnly: true
  });

  $("#id_sc_field_ggd" + iSeqRow).datepicker({
    beforeShow: function(input, inst) {
      var $oField = $(this),
          aParts  = $oField.val().split(" "),
          sTime   = "";
      sc_jq_calendar_value["#id_sc_field_ggd" + iSeqRow] = $oField.val();
    },
    onClose: function(dateText, inst) {
    },
    showWeek: true,
    numberOfMonths: 1,
    changeMonth: true,
    changeYear: true,
    yearRange: 'c-5:c+5',
    dayNames: ['<?php        echo html_entity_decode($this->Ini->Nm_lang['lang_days_sund']);        ?>','<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_mond']);        ?>','<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_tued']);        ?>','<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_wend']);        ?>','<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_thud']);        ?>','<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_frid']);        ?>','<?php echo html_entity_decode($this->Ini->Nm_lang['lang_days_satd']);        ?>'],
    dayNamesMin: ['<?php     echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_sund']); ?>','<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_mond']); ?>','<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_tued']); ?>','<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_wend']); ?>','<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_thud']); ?>','<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_frid']); ?>','<?php echo html_entity_decode($this->Ini->Nm_lang['lang_substr_days_satd']); ?>'],
    monthNamesShort: ['<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_janu']);   ?>','<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_febr']);   ?>','<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_marc']);   ?>','<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_apri']);   ?>','<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_mayy']);   ?>','<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_june']);   ?>','<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_july']);   ?>','<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_augu']); ?>','<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_sept']); ?>','<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_octo']); ?>','<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_nove']); ?>','<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_mnth_dece']); ?>'],
    weekHeader: "<?php echo html_entity_decode($this->Ini->Nm_lang['lang_shrt_days_sem']); ?>",
    firstDay: <?php echo $this->jqueryCalendarWeekInit("" . $_SESSION['scriptcase']['reg_conf']['date_week_ini'] . ""); ?>,
    dateFormat: "<?php echo $this->jqueryCalendarDtFormat("" . str_replace(array('/', 'aaaa', $_SESSION['scriptcase']['reg_conf']['date_sep']), array('', 'yyyy', ''), $this->field_config['ggd']['date_format']) . "", "" . $_SESSION['scriptcase']['reg_conf']['date_sep'] . ""); ?>",
    showOtherMonths: true,
    showOn: "button",
    buttonImage: "<?php echo $this->jqueryIconFile('calendar'); ?>",
    buttonImageOnly: true
  });

} // scJQCalendarAdd

function scJQUploadAdd(iSeqRow) {
} // scJQUploadAdd


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

