1 function pkg_changed () {
2 var form = document.OrderPkgForm;
3 var discountnum = form.discountnum;
5 if ( form.pkgpart.selectedIndex > 0 ) {
7 var opt = form.pkgpart.options[form.pkgpart.selectedIndex];
8 var date_button = document.getElementById('start_date_button');
9 var date_button_disabled = document.getElementById('start_date_button_disabled');
10 var date_text = document.getElementById('start_date_text');
13 form.submitButton.disabled = false;
15 if ( opt.getAttribute('data-can_discount') == 1 ) {
16 form.discountnum.disabled = false;
17 discountnum_changed(form.discountnum);
19 form.discountnum.disabled = true;
20 discountnum_changed(form.discountnum);
24 form.start_date_text.value = opt.getAttribute('data-start_date');
25 if ( opt.getAttribute('data-can_start_date') == 1 ) {
26 date_text.style.backgroundColor = '#ffffff';
27 date_text.disabled = false;
28 date_button.style.display = '';
29 date_button_disabled.style.display = 'none';
31 date_text.style.backgroundColor = '#dddddd';
32 date_text.disabled = true;
33 date_button.style.display = 'none';
34 date_button_disabled.style.display = '';
38 form.submitButton.disabled = true;
39 if ( discountnum ) { form.discountnum.disabled = true; }
40 discountnum_changed(form.discountnum);
44 function standardize_new_location() {
45 var form = document.OrderPkgForm;
46 var loc = form.locationnum;
47 if (loc.type == 'select-one' && loc.options[loc.selectedIndex].value == -1){
48 standardize_locations();
54 function submit_abort() {
55 document.OrderPkgForm.submitButton.disabled = false;