function authChange() { auth_list = document.getElementById('authority'); centre_list = document.getElementById('centre'); selected_auth = auth_list.options[auth_list.selectedIndex].value; centre_list_sel = centre[selected_auth]; id_list_sel = id[selected_auth]; centre_list.length = 0; //Clears the list centre_list.disabled = 0; for (i=0; i < centre_list_sel.length; i++) { centre_list.options[i] = new Option(centre_list_sel[i], id_list_sel[i]); } } function pickSchool(id) { authChange(); auth_list = document.getElementById('authority'); selected_auth = auth_list.options[auth_list.selectedIndex].value; centre_list = document.getElementById('centre'); for (i=0; i