well, first you're passing in f which is the form object so instead of
oBoxList = document.forms[f].controlName;
you just want
oBoxList = f.controlName;
assuming both select box and button are in the same form.
Then you're missing a closing bracket in the onclick function here :
<input type="button" value="select" onclick="selectall(this.form, select val">
Then this :
onclick="selectall(this.form, select val)
variable name cannot contain spaces, which brings me to this :
the name cannot have a space in it either.