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_sm_' + iSeqRow).bind('blur', function() { sc_form_doit_sm__onblur(this, iSeqRow) }) .bind('change', function() { sc_form_doit_sm__onchange(this, iSeqRow) }) .bind('focus', function() { sc_form_doit_sm__onfocus(this, iSeqRow) }); $('#id_sc_field_factor_' + iSeqRow).bind('blur', function() { sc_form_doit_factor__onblur(this, iSeqRow) }) .bind('change', function() { sc_form_doit_factor__onchange(this, iSeqRow) }) .bind('focus', function() { sc_form_doit_factor__onfocus(this, iSeqRow) }); $('#id_sc_field_terms_' + iSeqRow).bind('blur', function() { sc_form_doit_terms__onblur(this, iSeqRow) }) .bind('change', function() { sc_form_doit_terms__onchange(this, iSeqRow) }) .bind('focus', function() { sc_form_doit_terms__onfocus(this, iSeqRow) }); $('#id_sc_field_terms2_' + iSeqRow).bind('blur', function() { sc_form_doit_terms2__onblur(this, iSeqRow) }) .bind('change', function() { sc_form_doit_terms2__onchange(this, iSeqRow) }) .bind('focus', function() { sc_form_doit_terms2__onfocus(this, iSeqRow) }); $('#id_sc_field_salesman_' + iSeqRow).bind('blur', function() { sc_form_doit_salesman__onblur(this, iSeqRow) }) .bind('change', function() { sc_form_doit_salesman__onchange(this, iSeqRow) }) .bind('focus', function() { sc_form_doit_salesman__onfocus(this, iSeqRow) }); $('#id_sc_field_our_order_' + iSeqRow).bind('blur', function() { sc_form_doit_our_order__onblur(this, iSeqRow) }) .bind('change', function() { sc_form_doit_our_order__onchange(this, iSeqRow) }) .bind('focus', function() { sc_form_doit_our_order__onfocus(this, iSeqRow) }); $('#id_sc_field_invoice_' + iSeqRow).bind('blur', function() { sc_form_doit_invoice__onblur(this, iSeqRow) }) .bind('change', function() { sc_form_doit_invoice__onchange(this, iSeqRow) }) .bind('focus', function() { sc_form_doit_invoice__onfocus(this, iSeqRow) }); $('#id_sc_field_bl_' + iSeqRow).bind('blur', function() { sc_form_doit_bl__onblur(this, iSeqRow) }) .bind('change', function() { sc_form_doit_bl__onchange(this, iSeqRow) }) .bind('focus', function() { sc_form_doit_bl__onfocus(this, iSeqRow) }); $('#id_sc_field_sdate_' + iSeqRow).bind('blur', function() { sc_form_doit_sdate__onblur(this, iSeqRow) }) .bind('change', function() { sc_form_doit_sdate__onchange(this, iSeqRow) }) .bind('focus', function() { sc_form_doit_sdate__onfocus(this, iSeqRow) }); $('#id_sc_field_p_o_number_' + iSeqRow).bind('blur', function() { sc_form_doit_p_o_number__onblur(this, iSeqRow) }) .bind('change', function() { sc_form_doit_p_o_number__onchange(this, iSeqRow) }) .bind('focus', function() { sc_form_doit_p_o_number__onfocus(this, iSeqRow) }); $('#id_sc_field_lyards_' + iSeqRow).bind('blur', function() { sc_form_doit_lyards__onblur(this, iSeqRow) }) .bind('change', function() { sc_form_doit_lyards__onchange(this, iSeqRow) }) .bind('focus', function() { sc_form_doit_lyards__onfocus(this, iSeqRow) }); $('#id_sc_field_syards_' + iSeqRow).bind('blur', function() { sc_form_doit_syards__onblur(this, iSeqRow) }) .bind('change', function() { sc_form_doit_syards__onchange(this, iSeqRow) }) .bind('focus', function() { sc_form_doit_syards__onfocus(this, iSeqRow) }); $('#id_sc_field_style_' + iSeqRow).bind('blur', function() { sc_form_doit_style__onblur(this, iSeqRow) }) .bind('change', function() { sc_form_doit_style__onchange(this, iSeqRow) }) .bind('focus', function() { sc_form_doit_style__onfocus(this, iSeqRow) }); $('#id_sc_field_color_' + iSeqRow).bind('blur', function() { sc_form_doit_color__onblur(this, iSeqRow) }) .bind('change', function() { sc_form_doit_color__onchange(this, iSeqRow) }) .bind('focus', function() { sc_form_doit_color__onfocus(this, iSeqRow) }); $('#id_sc_field_color_no_' + iSeqRow).bind('blur', function() { sc_form_doit_color_no__onblur(this, iSeqRow) }) .bind('change', function() { sc_form_doit_color_no__onchange(this, iSeqRow) }) .bind('focus', function() { sc_form_doit_color_no__onfocus(this, iSeqRow) }); $('#id_sc_field_width_' + iSeqRow).bind('blur', function() { sc_form_doit_width__onblur(this, iSeqRow) }) .bind('change', function() { sc_form_doit_width__onchange(this, iSeqRow) }) .bind('focus', function() { sc_form_doit_width__onfocus(this, iSeqRow) }); $('#id_sc_field_dye_lot_' + iSeqRow).bind('blur', function() { sc_form_doit_dye_lot__onblur(this, iSeqRow) }) .bind('change', function() { sc_form_doit_dye_lot__onchange(this, iSeqRow) }) .bind('focus', function() { sc_form_doit_dye_lot__onfocus(this, iSeqRow) }); $('#id_sc_field_price_' + iSeqRow).bind('blur', function() { sc_form_doit_price__onblur(this, iSeqRow) }) .bind('change', function() { sc_form_doit_price__onchange(this, iSeqRow) }) .bind('focus', function() { sc_form_doit_price__onfocus(this, iSeqRow) }); $('#id_sc_field_unit_' + iSeqRow).bind('blur', function() { sc_form_doit_unit__onblur(this, iSeqRow) }) .bind('change', function() { sc_form_doit_unit__onchange(this, iSeqRow) }) .bind('focus', function() { sc_form_doit_unit__onfocus(this, iSeqRow) }); $('#id_sc_field_custno_' + iSeqRow).bind('blur', function() { sc_form_doit_custno__onblur(this, iSeqRow) }) .bind('change', function() { sc_form_doit_custno__onchange(this, iSeqRow) }) .bind('focus', function() { sc_form_doit_custno__onfocus(this, iSeqRow) }); $('#id_sc_field_it_' + iSeqRow).bind('blur', function() { sc_form_doit_it__onblur(this, iSeqRow) }) .bind('change', function() { sc_form_doit_it__onchange(this, iSeqRow) }) .bind('focus', function() { sc_form_doit_it__onfocus(this, iSeqRow) }); $('#id_sc_field_smit_' + iSeqRow).bind('blur', function() { sc_form_doit_smit__onblur(this, iSeqRow) }) .bind('change', function() { sc_form_doit_smit__onchange(this, iSeqRow) }) .bind('focus', function() { sc_form_doit_smit__onfocus(this, iSeqRow) }); $('#id_sc_field_desc_' + iSeqRow).bind('blur', function() { sc_form_doit_desc__onblur(this, iSeqRow) }) .bind('change', function() { sc_form_doit_desc__onchange(this, iSeqRow) }) .bind('focus', function() { sc_form_doit_desc__onfocus(this, iSeqRow) }); $('#id_sc_field_approx_' + iSeqRow).bind('blur', function() { sc_form_doit_approx__onblur(this, iSeqRow) }) .bind('change', function() { sc_form_doit_approx__onchange(this, iSeqRow) }) .bind('focus', function() { sc_form_doit_approx__onfocus(this, iSeqRow) }); $('#id_sc_field_status_' + iSeqRow).bind('blur', function() { sc_form_doit_status__onblur(this, iSeqRow) }) .bind('change', function() { sc_form_doit_status__onchange(this, iSeqRow) }) .bind('focus', function() { sc_form_doit_status__onfocus(this, iSeqRow) }); $('#id_sc_field_bilsep_' + iSeqRow).bind('blur', function() { sc_form_doit_bilsep__onblur(this, iSeqRow) }) .bind('change', function() { sc_form_doit_bilsep__onchange(this, iSeqRow) }) .bind('focus', function() { sc_form_doit_bilsep__onfocus(this, iSeqRow) }); $('#id_sc_field_dday_' + iSeqRow).bind('blur', function() { sc_form_doit_dday__onblur(this, iSeqRow) }) .bind('change', function() { sc_form_doit_dday__onchange(this, iSeqRow) }) .bind('focus', function() { sc_form_doit_dday__onfocus(this, iSeqRow) }); $('#id_sc_field_pcount_' + iSeqRow).bind('blur', function() { sc_form_doit_pcount__onblur(this, iSeqRow) }) .bind('change', function() { sc_form_doit_pcount__onchange(this, iSeqRow) }) .bind('focus', function() { sc_form_doit_pcount__onfocus(this, iSeqRow) }); } // scJQEventsAdd function sc_form_doit_sm__onblur(oThis, iSeqRow) { do_ajax_form_doit_validate_sm_(iSeqRow); scCssBlur(oThis, iSeqRow); } function sc_form_doit_sm__onchange(oThis, iSeqRow) { nm_check_insert(iSeqRow); } function sc_form_doit_sm__onfocus(oThis, iSeqRow) { scCssFocus(oThis, iSeqRow); } function sc_form_doit_factor__onblur(oThis, iSeqRow) { do_ajax_form_doit_validate_factor_(iSeqRow); scCssBlur(oThis, iSeqRow); } function sc_form_doit_factor__onchange(oThis, iSeqRow) { nm_check_insert(iSeqRow); } function sc_form_doit_factor__onfocus(oThis, iSeqRow) { scCssFocus(oThis, iSeqRow); } function sc_form_doit_terms__onblur(oThis, iSeqRow) { do_ajax_form_doit_validate_terms_(iSeqRow); scCssBlur(oThis, iSeqRow); } function sc_form_doit_terms__onchange(oThis, iSeqRow) { nm_check_insert(iSeqRow); } function sc_form_doit_terms__onfocus(oThis, iSeqRow) { scCssFocus(oThis, iSeqRow); } function sc_form_doit_terms2__onblur(oThis, iSeqRow) { do_ajax_form_doit_validate_terms2_(iSeqRow); scCssBlur(oThis, iSeqRow); } function sc_form_doit_terms2__onchange(oThis, iSeqRow) { nm_check_insert(iSeqRow); } function sc_form_doit_terms2__onfocus(oThis, iSeqRow) { scCssFocus(oThis, iSeqRow); } function sc_form_doit_salesman__onblur(oThis, iSeqRow) { do_ajax_form_doit_validate_salesman_(iSeqRow); scCssBlur(oThis, iSeqRow); } function sc_form_doit_salesman__onchange(oThis, iSeqRow) { nm_check_insert(iSeqRow); } function sc_form_doit_salesman__onfocus(oThis, iSeqRow) { scCssFocus(oThis, iSeqRow); } function sc_form_doit_our_order__onblur(oThis, iSeqRow) { do_ajax_form_doit_validate_our_order_(iSeqRow); scCssBlur(oThis, iSeqRow); } function sc_form_doit_our_order__onchange(oThis, iSeqRow) { nm_check_insert(iSeqRow); } function sc_form_doit_our_order__onfocus(oThis, iSeqRow) { scCssFocus(oThis, iSeqRow); } function sc_form_doit_invoice__onblur(oThis, iSeqRow) { do_ajax_form_doit_validate_invoice_(iSeqRow); scCssBlur(oThis, iSeqRow); } function sc_form_doit_invoice__onchange(oThis, iSeqRow) { nm_check_insert(iSeqRow); } function sc_form_doit_invoice__onfocus(oThis, iSeqRow) { scCssFocus(oThis, iSeqRow); } function sc_form_doit_bl__onblur(oThis, iSeqRow) { do_ajax_form_doit_validate_bl_(iSeqRow); scCssBlur(oThis, iSeqRow); } function sc_form_doit_bl__onchange(oThis, iSeqRow) { nm_check_insert(iSeqRow); } function sc_form_doit_bl__onfocus(oThis, iSeqRow) { scCssFocus(oThis, iSeqRow); } function sc_form_doit_sdate__onblur(oThis, iSeqRow) { do_ajax_form_doit_validate_sdate_(iSeqRow); scCssBlur(oThis, iSeqRow); } function sc_form_doit_sdate__onchange(oThis, iSeqRow) { nm_check_insert(iSeqRow); } function sc_form_doit_sdate__onfocus(oThis, iSeqRow) { scCssFocus(oThis, iSeqRow); } function sc_form_doit_p_o_number__onblur(oThis, iSeqRow) { do_ajax_form_doit_validate_p_o_number_(iSeqRow); scCssBlur(oThis, iSeqRow); } function sc_form_doit_p_o_number__onchange(oThis, iSeqRow) { nm_check_insert(iSeqRow); } function sc_form_doit_p_o_number__onfocus(oThis, iSeqRow) { scCssFocus(oThis, iSeqRow); } function sc_form_doit_lyards__onblur(oThis, iSeqRow) { do_ajax_form_doit_validate_lyards_(iSeqRow); scCssBlur(oThis, iSeqRow); } function sc_form_doit_lyards__onchange(oThis, iSeqRow) { nm_check_insert(iSeqRow); } function sc_form_doit_lyards__onfocus(oThis, iSeqRow) { scCssFocus(oThis, iSeqRow); } function sc_form_doit_syards__onblur(oThis, iSeqRow) { do_ajax_form_doit_validate_syards_(iSeqRow); scCssBlur(oThis, iSeqRow); } function sc_form_doit_syards__onchange(oThis, iSeqRow) { nm_check_insert(iSeqRow); } function sc_form_doit_syards__onfocus(oThis, iSeqRow) { scCssFocus(oThis, iSeqRow); } function sc_form_doit_style__onblur(oThis, iSeqRow) { do_ajax_form_doit_validate_style_(iSeqRow); scCssBlur(oThis, iSeqRow); } function sc_form_doit_style__onchange(oThis, iSeqRow) { nm_check_insert(iSeqRow); } function sc_form_doit_style__onfocus(oThis, iSeqRow) { scCssFocus(oThis, iSeqRow); } function sc_form_doit_color__onblur(oThis, iSeqRow) { do_ajax_form_doit_validate_color_(iSeqRow); scCssBlur(oThis, iSeqRow); } function sc_form_doit_color__onchange(oThis, iSeqRow) { nm_check_insert(iSeqRow); } function sc_form_doit_color__onfocus(oThis, iSeqRow) { scCssFocus(oThis, iSeqRow); } function sc_form_doit_color_no__onblur(oThis, iSeqRow) { do_ajax_form_doit_validate_color_no_(iSeqRow); scCssBlur(oThis, iSeqRow); } function sc_form_doit_color_no__onchange(oThis, iSeqRow) { nm_check_insert(iSeqRow); } function sc_form_doit_color_no__onfocus(oThis, iSeqRow) { scCssFocus(oThis, iSeqRow); } function sc_form_doit_width__onblur(oThis, iSeqRow) { do_ajax_form_doit_validate_width_(iSeqRow); scCssBlur(oThis, iSeqRow); } function sc_form_doit_width__onchange(oThis, iSeqRow) { nm_check_insert(iSeqRow); } function sc_form_doit_width__onfocus(oThis, iSeqRow) { scCssFocus(oThis, iSeqRow); } function sc_form_doit_dye_lot__onblur(oThis, iSeqRow) { do_ajax_form_doit_validate_dye_lot_(iSeqRow); scCssBlur(oThis, iSeqRow); } function sc_form_doit_dye_lot__onchange(oThis, iSeqRow) { nm_check_insert(iSeqRow); } function sc_form_doit_dye_lot__onfocus(oThis, iSeqRow) { scCssFocus(oThis, iSeqRow); } function sc_form_doit_price__onblur(oThis, iSeqRow) { do_ajax_form_doit_validate_price_(iSeqRow); scCssBlur(oThis, iSeqRow); } function sc_form_doit_price__onchange(oThis, iSeqRow) { nm_check_insert(iSeqRow); } function sc_form_doit_price__onfocus(oThis, iSeqRow) { scCssFocus(oThis, iSeqRow); } function sc_form_doit_unit__onblur(oThis, iSeqRow) { do_ajax_form_doit_validate_unit_(iSeqRow); scCssBlur(oThis, iSeqRow); } function sc_form_doit_unit__onchange(oThis, iSeqRow) { nm_check_insert(iSeqRow); } function sc_form_doit_unit__onfocus(oThis, iSeqRow) { scCssFocus(oThis, iSeqRow); } function sc_form_doit_custno__onblur(oThis, iSeqRow) { do_ajax_form_doit_validate_custno_(iSeqRow); scCssBlur(oThis, iSeqRow); } function sc_form_doit_custno__onchange(oThis, iSeqRow) { nm_check_insert(iSeqRow); } function sc_form_doit_custno__onfocus(oThis, iSeqRow) { scCssFocus(oThis, iSeqRow); } function sc_form_doit_it__onblur(oThis, iSeqRow) { do_ajax_form_doit_validate_it_(iSeqRow); scCssBlur(oThis, iSeqRow); } function sc_form_doit_it__onchange(oThis, iSeqRow) { nm_check_insert(iSeqRow); } function sc_form_doit_it__onfocus(oThis, iSeqRow) { scCssFocus(oThis, iSeqRow); } function sc_form_doit_smit__onblur(oThis, iSeqRow) { do_ajax_form_doit_validate_smit_(iSeqRow); scCssBlur(oThis, iSeqRow); } function sc_form_doit_smit__onchange(oThis, iSeqRow) { nm_check_insert(iSeqRow); } function sc_form_doit_smit__onfocus(oThis, iSeqRow) { scCssFocus(oThis, iSeqRow); } function sc_form_doit_desc__onblur(oThis, iSeqRow) { do_ajax_form_doit_validate_desc_(iSeqRow); scCssBlur(oThis, iSeqRow); } function sc_form_doit_desc__onchange(oThis, iSeqRow) { nm_check_insert(iSeqRow); } function sc_form_doit_desc__onfocus(oThis, iSeqRow) { scCssFocus(oThis, iSeqRow); } function sc_form_doit_approx__onblur(oThis, iSeqRow) { do_ajax_form_doit_validate_approx_(iSeqRow); scCssBlur(oThis, iSeqRow); } function sc_form_doit_approx__onchange(oThis, iSeqRow) { nm_check_insert(iSeqRow); } function sc_form_doit_approx__onfocus(oThis, iSeqRow) { scCssFocus(oThis, iSeqRow); } function sc_form_doit_status__onblur(oThis, iSeqRow) { do_ajax_form_doit_validate_status_(iSeqRow); scCssBlur(oThis, iSeqRow); } function sc_form_doit_status__onchange(oThis, iSeqRow) { nm_check_insert(iSeqRow); } function sc_form_doit_status__onfocus(oThis, iSeqRow) { scCssFocus(oThis, iSeqRow); } function sc_form_doit_bilsep__onblur(oThis, iSeqRow) { do_ajax_form_doit_validate_bilsep_(iSeqRow); scCssBlur(oThis, iSeqRow); } function sc_form_doit_bilsep__onchange(oThis, iSeqRow) { nm_check_insert(iSeqRow); } function sc_form_doit_bilsep__onfocus(oThis, iSeqRow) { scCssFocus(oThis, iSeqRow); } function sc_form_doit_dday__onblur(oThis, iSeqRow) { do_ajax_form_doit_validate_dday_(iSeqRow); scCssBlur(oThis, iSeqRow); } function sc_form_doit_dday__onchange(oThis, iSeqRow) { nm_check_insert(iSeqRow); } function sc_form_doit_dday__onfocus(oThis, iSeqRow) { scCssFocus(oThis, iSeqRow); } function sc_form_doit_pcount__onblur(oThis, iSeqRow) { do_ajax_form_doit_validate_pcount_(iSeqRow); scCssBlur(oThis, iSeqRow); } function sc_form_doit_pcount__onchange(oThis, iSeqRow) { nm_check_insert(iSeqRow); } function sc_form_doit_pcount__onfocus(oThis, iSeqRow) { scCssFocus(oThis, iSeqRow); } var sc_jq_calendar_value = {}; function scJQCalendarAdd(iSeqRow) { $("#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: ['