1 function pkg_changed () {
2 var form = document.OrderPkgForm;
3 var discountnum = form.discountnum;
5 if ( form.pkgpart.selectedIndex > 0 ) {
7 form.submitButton.disabled = false;
9 if ( form.pkgpart.options[form.pkgpart.selectedIndex].getAttribute('data-can_discount') == 1 ) {
10 form.discountnum.disabled = false;
11 discountnum_changed(form.discountnum);
13 form.discountnum.disabled = true;
14 discountnum_changed(form.discountnum);
18 if ( form.pkgpart.options[form.pkgpart.selectedIndex].getAttribute('data-can_start_date') == 1 ) {
19 form.start_date_text.disabled = false;
20 form.start_date.style.backgroundColor = '#ffffff';
21 form.start_date_button.style.display = '';
23 form.start_date_text.disabled = true;
24 form.start_date.style.backgroundColor = '#dddddd';
25 form.start_date_button.style.display = 'none';
29 form.submitButton.disabled = true;
30 if ( discountnum ) { form.discountnum.disabled = true; }
31 discountnum_changed(form.discountnum);
35 function standardize_new_location() {
36 var form = document.OrderPkgForm;
37 var loc = form.locationnum;
38 if (loc.type == 'select-one' && loc.options[loc.selectedIndex].value == -1){
39 standardize_locations();
45 function submit_abort() {
46 document.OrderPkgForm.submitButton.disabled = false;