function test_t_q_a(the_id, id_type) {
 var q = document.getElementById('q_' + the_id + '_' + id_type);
 var a = document.getElementById('a_' + the_id + '_' + id_type);
 var t = document.getElementById('t_' + the_id + '_' + id_type);
 var ft = document.getElementById('ft_' + the_id + '_' + id_type);
 var d = document.getElementById('d_' + the_id + '_' + id_type);
 var ti = document.getElementById('ti_' + the_id + '_' + id_type);
// var e = document.getElementById('e_' + the_id + '_' + id_type);
 if ((t.value == 'PROGRAM' || t.value == 'SPECIAL' || t.value == 'RACE') && isBlank(d.value)) {alert('Description is required (Athlete\'s Name)'); return false}
 if ((t.value == 'EVENT') && isBlank(d.value)) {alert('Description is required (Person\'s Name)'); return false}
 if (t.value == 'RACE' && ti.selectedIndex == 0) {alert('A race must be selected'); return false}
 if (t.value == 'EVENT' && ti.selectedIndex == 0) {alert('An event must be selected'); return false}
 if (ft.value == 'CC' && isBlank(d.value)) {alert('Description is required'); return false}
 if (isBlank(q.value) || ! int_in_range(q, 1, 999)) {alert('Error in Quantity'); return false}
 if (isBlank(a.value) || ! isNumeric(a.value)) {alert('Error in Price'); return false}
 return true
}

