As far as I know, the only event handlers for a SELECT are onfocus, onblur, onclick and onchange. Onchange fires when the selected item changes, but not if it was already selected and is just clicked. There are no event handlers for OPTION.
Can you not just use a button to submit the form to another php script, and use the value of $class in there, to decide what action to take?
Otherwise, as Jack says, you need to use Javascript to decide which window to open.