CRM-14576 - Fix issue with select display after a form error occurs.

Also fixed the fact the JavaScript code to hide the selects was repeated 3 times.