If you put the id on the select element you can do:
```java-script
if (select.selectedIndex == -1)
	window.filter[2] = "All"
else
	window.filter[2] = select.options[select.selectedIndex].value
```
and remove the need for the loop.