You are not setting the selected parameter.
Option has the following 4 parameters, you are not setting the last one
new Option([text], [value], [defaultSelected], [selected])
See a working example here http://jsfiddle.net/casperskovgaard/KggNu/
Your code should be changed to some thing like this:
YAHOO.util.Dom.get('id_pwid').options[i+1] = new Option(pwTitle, pwId, false, (pwId == pwid_sel));