function selectOtherNames(){selectElements(document.getElementById("id_otherNames"))}function selectDepts(){selectElements(document.getElementById("id_departments"))}function selectKeywords(){selectElements(document.getElementById("id_keywords"))}function selectSubjects(){selectElements(document.getElementById("id_subjects"))}function selectElements(B){for(var A=0;A<B.length;A++){B[A].selected=true}}function alertUser(){if(confirm("Any unsaved changes will be lost. Are you sure?")){window.location="Workspace.action"}}function addToList(A,C){var B=document.getElementById(A).value;if(trim(B)!=""){addOption(document.getElementById(A),document.getElementById(C));if(A=="id_otherNames_input"){Element.show(document.getElementById("otherNameList"))}else{if(A=="id_dept_input"){Element.show(document.getElementById("departmentList"))}}}}function showHidePopulatedOptions(){var A=document.getElementById("id_otherNames").options.length;var B=document.getElementById("id_departments").options.length;if(A>0){Element.show(document.getElementById("otherNameList"))}else{Element.hide(document.getElementById("otherNameList"))}if(B>0){Element.show(document.getElementById("departmentList"))}else{Element.hide(document.getElementById("departmentList"))}}function selectAll(){selectOtherNames();selectDepts();document.forms.regForm.submit()}function resetAll(){document.forms.regForm.action="ResetRegistration.action";document.forms.regForm.submit()}function selectAllSelfRegForm(){document.forms.selfRegForm.submit()}function gotoDeleteResearcher(B,C,A){document.getElementById("userId").value=B;document.getElementById("privateProfile").value=C;document.getElementById("locked").value=A;document.forms.DeleteResearcher.submit()}function alertDeclinedUser(){if(confirm("This will cancel your ResearcherId\nregistration. Are you sure?")){document.forms.EULADeclineForm.submit()}};
