- what.form.address1.value = '';
- what.form.address2.value = '';
- what.form.city.value = '';
- what.form.zip.value = '';
+ function location_enable(what) {
+% for (grep { $_ ne 'location_number' } @location_fields, 'city_select') {
+ what.form.<%$_%>.disabled = false;
+ var ftype = what.form.<%$_%>.tagName;
+ if( ftype != 'SELECT') what.form.<%$_%>.style.backgroundColor = '#ffffff';
+% }
+ if(what.form.enter_censustract) {
+ what.form.enter_censustract.disabled = false;
+ }
+% if ( $opt{'alt_format'} ) {
+ if ( what.form.location_type &&
+ what.form.location_type.options[what.form.location_type.selectedIndex].value ) {
+ what.form.location_number.disabled = false;
+ what.form.location_number.style.backgroundColor = '#ffffff';
+ }
+% }
+ }
+
+ function locationnum_changed(what) {
+ var locationnum = what.options[what.selectedIndex].value;
+ if ( locationnum == -2 ) { //(not required)
+ location_disable(what);
+ return;
+ }
+ if ( locationnum == -1 ) { //Add new location
+ location_clear(what);