I think this should work with sel being the select:
Code:
for(var i = 0; i < sel.options.length; ++i) {
  sel.options[i].selected = true;
}
But it's only a guess.