
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_p_o_number_' + iSeqRow).bind('blur', function() { sc_dye_grpcs_edit_grid_p_o_number__onblur(this, iSeqRow) })
                                         .bind('change', function() { sc_dye_grpcs_edit_grid_p_o_number__onchange(this, iSeqRow) })
                                         .bind('focus', function() { sc_dye_grpcs_edit_grid_p_o_number__onfocus(this, iSeqRow) });
  $('#id_sc_field_style_' + iSeqRow).bind('blur', function() { sc_dye_grpcs_edit_grid_style__onblur(this, iSeqRow) })
                                    .bind('change', function() { sc_dye_grpcs_edit_grid_style__onchange(this, iSeqRow) })
                                    .bind('focus', function() { sc_dye_grpcs_edit_grid_style__onfocus(this, iSeqRow) });
  $('#id_sc_field_invoice_' + iSeqRow).bind('blur', function() { sc_dye_grpcs_edit_grid_invoice__onblur(this, iSeqRow) })
                                      .bind('change', function() { sc_dye_grpcs_edit_grid_invoice__onchange(this, iSeqRow) })
                                      .bind('focus', function() { sc_dye_grpcs_edit_grid_invoice__onfocus(this, iSeqRow) });
  $('#id_sc_field_case_' + iSeqRow).bind('blur', function() { sc_dye_grpcs_edit_grid_case__onblur(this, iSeqRow) })
                                   .bind('change', function() { sc_dye_grpcs_edit_grid_case__onchange(this, iSeqRow) })
                                   .bind('focus', function() { sc_dye_grpcs_edit_grid_case__onfocus(this, iSeqRow) });
  $('#id_sc_field_piece_' + iSeqRow).bind('blur', function() { sc_dye_grpcs_edit_grid_piece__onblur(this, iSeqRow) })
                                    .bind('change', function() { sc_dye_grpcs_edit_grid_piece__onchange(this, iSeqRow) })
                                    .bind('focus', function() { sc_dye_grpcs_edit_grid_piece__onfocus(this, iSeqRow) });
  $('#id_sc_field_racks_' + iSeqRow).bind('blur', function() { sc_dye_grpcs_edit_grid_racks__onblur(this, iSeqRow) })
                                    .bind('change', function() { sc_dye_grpcs_edit_grid_racks__onchange(this, iSeqRow) })
                                    .bind('focus', function() { sc_dye_grpcs_edit_grid_racks__onfocus(this, iSeqRow) });
  $('#id_sc_field_lbs_recd_' + iSeqRow).bind('blur', function() { sc_dye_grpcs_edit_grid_lbs_recd__onblur(this, iSeqRow) })
                                       .bind('change', function() { sc_dye_grpcs_edit_grid_lbs_recd__onchange(this, iSeqRow) })
                                       .bind('focus', function() { sc_dye_grpcs_edit_grid_lbs_recd__onfocus(this, iSeqRow) });
  $('#id_sc_field_lbs_used_' + iSeqRow).bind('blur', function() { sc_dye_grpcs_edit_grid_lbs_used__onblur(this, iSeqRow) })
                                       .bind('change', function() { sc_dye_grpcs_edit_grid_lbs_used__onchange(this, iSeqRow) })
                                       .bind('focus', function() { sc_dye_grpcs_edit_grid_lbs_used__onfocus(this, iSeqRow) });
  $('#id_sc_field_lbs_open_' + iSeqRow).bind('blur', function() { sc_dye_grpcs_edit_grid_lbs_open__onblur(this, iSeqRow) })
                                       .bind('change', function() { sc_dye_grpcs_edit_grid_lbs_open__onchange(this, iSeqRow) })
                                       .bind('focus', function() { sc_dye_grpcs_edit_grid_lbs_open__onfocus(this, iSeqRow) });
  $('#id_sc_field_dye_order_' + iSeqRow).bind('blur', function() { sc_dye_grpcs_edit_grid_dye_order__onblur(this, iSeqRow) })
                                        .bind('change', function() { sc_dye_grpcs_edit_grid_dye_order__onchange(this, iSeqRow) })
                                        .bind('focus', function() { sc_dye_grpcs_edit_grid_dye_order__onfocus(this, iSeqRow) });
  $('#id_sc_field_cost_lb_g_' + iSeqRow).bind('blur', function() { sc_dye_grpcs_edit_grid_cost_lb_g__onblur(this, iSeqRow) })
                                        .bind('change', function() { sc_dye_grpcs_edit_grid_cost_lb_g__onchange(this, iSeqRow) })
                                        .bind('focus', function() { sc_dye_grpcs_edit_grid_cost_lb_g__onfocus(this, iSeqRow) });
  $('#id_sc_field_total_cost_' + iSeqRow).bind('blur', function() { sc_dye_grpcs_edit_grid_total_cost__onblur(this, iSeqRow) })
                                         .bind('change', function() { sc_dye_grpcs_edit_grid_total_cost__onchange(this, iSeqRow) })
                                         .bind('focus', function() { sc_dye_grpcs_edit_grid_total_cost__onfocus(this, iSeqRow) });
  $('#id_sc_field_adate_' + iSeqRow).bind('blur', function() { sc_dye_grpcs_edit_grid_adate__onblur(this, iSeqRow) })
                                    .bind('change', function() { sc_dye_grpcs_edit_grid_adate__onchange(this, iSeqRow) })
                                    .bind('focus', function() { sc_dye_grpcs_edit_grid_adate__onfocus(this, iSeqRow) });
  $('#id_sc_field_edate_' + iSeqRow).bind('blur', function() { sc_dye_grpcs_edit_grid_edate__onblur(this, iSeqRow) })
                                    .bind('change', function() { sc_dye_grpcs_edit_grid_edate__onchange(this, iSeqRow) })
                                    .bind('focus', function() { sc_dye_grpcs_edit_grid_edate__onfocus(this, iSeqRow) });
  $('#id_sc_field_ddate_' + iSeqRow).bind('blur', function() { sc_dye_grpcs_edit_grid_ddate__onblur(this, iSeqRow) })
                                    .bind('change', function() { sc_dye_grpcs_edit_grid_ddate__onchange(this, iSeqRow) })
                                    .bind('focus', function() { sc_dye_grpcs_edit_grid_ddate__onfocus(this, iSeqRow) });
  $('#id_sc_field_shipto_' + iSeqRow).bind('blur', function() { sc_dye_grpcs_edit_grid_shipto__onblur(this, iSeqRow) })
                                     .bind('change', function() { sc_dye_grpcs_edit_grid_shipto__onchange(this, iSeqRow) })
                                     .bind('focus', function() { sc_dye_grpcs_edit_grid_shipto__onfocus(this, iSeqRow) });
  $('#id_sc_field_sdate_' + iSeqRow).bind('blur', function() { sc_dye_grpcs_edit_grid_sdate__onblur(this, iSeqRow) })
                                    .bind('change', function() { sc_dye_grpcs_edit_grid_sdate__onchange(this, iSeqRow) })
                                    .bind('focus', function() { sc_dye_grpcs_edit_grid_sdate__onfocus(this, iSeqRow) });
  $('#id_sc_field_ac_' + iSeqRow).bind('blur', function() { sc_dye_grpcs_edit_grid_ac__onblur(this, iSeqRow) })
                                 .bind('change', function() { sc_dye_grpcs_edit_grid_ac__onchange(this, iSeqRow) })
                                 .bind('focus', function() { sc_dye_grpcs_edit_grid_ac__onfocus(this, iSeqRow) });
  $('#id_sc_field_defects_' + iSeqRow).bind('blur', function() { sc_dye_grpcs_edit_grid_defects__onblur(this, iSeqRow) })
                                      .bind('change', function() { sc_dye_grpcs_edit_grid_defects__onchange(this, iSeqRow) })
                                      .bind('focus', function() { sc_dye_grpcs_edit_grid_defects__onfocus(this, iSeqRow) });
  $('#id_sc_field_rpd_' + iSeqRow).bind('blur', function() { sc_dye_grpcs_edit_grid_rpd__onblur(this, iSeqRow) })
                                  .bind('change', function() { sc_dye_grpcs_edit_grid_rpd__onchange(this, iSeqRow) })
                                  .bind('focus', function() { sc_dye_grpcs_edit_grid_rpd__onfocus(this, iSeqRow) });
  $('#id_sc_field_id2_' + iSeqRow).bind('blur', function() { sc_dye_grpcs_edit_grid_id2__onblur(this, iSeqRow) })
                                  .bind('change', function() { sc_dye_grpcs_edit_grid_id2__onchange(this, iSeqRow) })
                                  .bind('focus', function() { sc_dye_grpcs_edit_grid_id2__onfocus(this, iSeqRow) });
} // scJQEventsAdd

function sc_dye_grpcs_edit_grid_p_o_number__onblur(oThis, iSeqRow) {
  do_ajax_dye_grpcs_edit_grid_validate_p_o_number_(iSeqRow);
  scCssBlur(oThis, iSeqRow);
}

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

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

function sc_dye_grpcs_edit_grid_style__onblur(oThis, iSeqRow) {
  do_ajax_dye_grpcs_edit_grid_validate_style_(iSeqRow);
  scCssBlur(oThis, iSeqRow);
}

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

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

function sc_dye_grpcs_edit_grid_invoice__onblur(oThis, iSeqRow) {
  do_ajax_dye_grpcs_edit_grid_validate_invoice_(iSeqRow);
  scCssBlur(oThis, iSeqRow);
}

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

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

function sc_dye_grpcs_edit_grid_case__onblur(oThis, iSeqRow) {
  do_ajax_dye_grpcs_edit_grid_validate_case_(iSeqRow);
  scCssBlur(oThis, iSeqRow);
}

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

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

function sc_dye_grpcs_edit_grid_piece__onblur(oThis, iSeqRow) {
  do_ajax_dye_grpcs_edit_grid_validate_piece_(iSeqRow);
  scCssBlur(oThis, iSeqRow);
}

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

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

function sc_dye_grpcs_edit_grid_racks__onblur(oThis, iSeqRow) {
  do_ajax_dye_grpcs_edit_grid_validate_racks_(iSeqRow);
  scCssBlur(oThis, iSeqRow);
}

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

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

function sc_dye_grpcs_edit_grid_lbs_recd__onblur(oThis, iSeqRow) {
  do_ajax_dye_grpcs_edit_grid_validate_lbs_recd_(iSeqRow);
  scCssBlur(oThis, iSeqRow);
}

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

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

function sc_dye_grpcs_edit_grid_lbs_used__onblur(oThis, iSeqRow) {
  do_ajax_dye_grpcs_edit_grid_validate_lbs_used_(iSeqRow);
  scCssBlur(oThis, iSeqRow);
}

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

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

function sc_dye_grpcs_edit_grid_lbs_open__onblur(oThis, iSeqRow) {
  do_ajax_dye_grpcs_edit_grid_validate_lbs_open_(iSeqRow);
  scCssBlur(oThis, iSeqRow);
}

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

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

function sc_dye_grpcs_edit_grid_dye_order__onblur(oThis, iSeqRow) {
  do_ajax_dye_grpcs_edit_grid_validate_dye_order_(iSeqRow);
  scCssBlur(oThis, iSeqRow);
}

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

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

function sc_dye_grpcs_edit_grid_cost_lb_g__onblur(oThis, iSeqRow) {
  do_ajax_dye_grpcs_edit_grid_validate_cost_lb_g_(iSeqRow);
  scCssBlur(oThis, iSeqRow);
}

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

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

function sc_dye_grpcs_edit_grid_total_cost__onblur(oThis, iSeqRow) {
  do_ajax_dye_grpcs_edit_grid_validate_total_cost_(iSeqRow);
  scCssBlur(oThis, iSeqRow);
}

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

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

function sc_dye_grpcs_edit_grid_adate__onblur(oThis, iSeqRow) {
  do_ajax_dye_grpcs_edit_grid_validate_adate_(iSeqRow);
  scCssBlur(oThis, iSeqRow);
}

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

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

function sc_dye_grpcs_edit_grid_edate__onblur(oThis, iSeqRow) {
  do_ajax_dye_grpcs_edit_grid_validate_edate_(iSeqRow);
  scCssBlur(oThis, iSeqRow);
}

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

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

function sc_dye_grpcs_edit_grid_ddate__onblur(oThis, iSeqRow) {
  do_ajax_dye_grpcs_edit_grid_validate_ddate_(iSeqRow);
  scCssBlur(oThis, iSeqRow);
}

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

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

function sc_dye_grpcs_edit_grid_shipto__onblur(oThis, iSeqRow) {
  do_ajax_dye_grpcs_edit_grid_validate_shipto_(iSeqRow);
  scCssBlur(oThis, iSeqRow);
}

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

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

function sc_dye_grpcs_edit_grid_sdate__onblur(oThis, iSeqRow) {
  do_ajax_dye_grpcs_edit_grid_validate_sdate_(iSeqRow);
  scCssBlur(oThis, iSeqRow);
}

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

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

function sc_dye_grpcs_edit_grid_ac__onblur(oThis, iSeqRow) {
  do_ajax_dye_grpcs_edit_grid_validate_ac_(iSeqRow);
  scCssBlur(oThis, iSeqRow);
}

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

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

function sc_dye_grpcs_edit_grid_defects__onblur(oThis, iSeqRow) {
  do_ajax_dye_grpcs_edit_grid_validate_defects_(iSeqRow);
  scCssBlur(oThis, iSeqRow);
}

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

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

function sc_dye_grpcs_edit_grid_rpd__onblur(oThis, iSeqRow) {
  do_ajax_dye_grpcs_edit_grid_validate_rpd_(iSeqRow);
  scCssBlur(oThis, iSeqRow);
}

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

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

function sc_dye_grpcs_edit_grid_id2__onblur(oThis, iSeqRow) {
  do_ajax_dye_grpcs_edit_grid_validate_id2_(iSeqRow);
  scCssBlur(oThis, iSeqRow);
}

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

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

var sc_jq_calendar_value = {};

function scJQCalendarAdd(iSeqRow) {
  $("#id_sc_field_adate_" + iSeqRow).datepicker({
    beforeShow: function(input, inst) {
      var $oField = $(this),
          aParts  = $oField.val().split(" "),
          sTime   = "";
      sc_jq_calendar_value["#id_sc_field_adate_" + 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['adate_']['date_format']) . "", "" . $_SESSION['scriptcase']['reg_conf']['date_sep'] . ""); ?>",
    showOtherMonths: true,
    showOn: "button",
    buttonImage: "<?php echo $this->jqueryIconFile('calendar'); ?>",
    buttonImageOnly: true
  });

  $("#id_sc_field_edate_" + iSeqRow).datepicker({
    beforeShow: function(input, inst) {
      var $oField = $(this),
          aParts  = $oField.val().split(" "),
          sTime   = "";
      sc_jq_calendar_value["#id_sc_field_edate_" + 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['edate_']['date_format']) . "", "" . $_SESSION['scriptcase']['reg_conf']['date_sep'] . ""); ?>",
    showOtherMonths: true,
    showOn: "button",
    buttonImage: "<?php echo $this->jqueryIconFile('calendar'); ?>",
    buttonImageOnly: true
  });

  $("#id_sc_field_ddate_" + iSeqRow).datepicker({
    beforeShow: function(input, inst) {
      var $oField = $(this),
          aParts  = $oField.val().split(" "),
          sTime   = "";
      sc_jq_calendar_value["#id_sc_field_ddate_" + 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['ddate_']['date_format']) . "", "" . $_SESSION['scriptcase']['reg_conf']['date_sep'] . ""); ?>",
    showOtherMonths: true,
    showOn: "button",
    buttonImage: "<?php echo $this->jqueryIconFile('calendar'); ?>",
    buttonImageOnly: true
  });

  $("#id_sc_field_sdate_" + iSeqRow).datepicker({
    beforeShow: function(input, inst) {
      var $oField = $(this),
          aParts  = $oField.val().split(" "),
          sTime   = "";
      sc_jq_calendar_value["#id_sc_field_sdate_" + 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['sdate_']['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

