Jsf component ids are not getting modified in javascript.

I am facing a problem in the below code. what exactly it shows is a multiselectcheck drop down box where it can be extended or collapsed if any click event on it. An atrribute of an component ,i.e stlye.disply value getting set in java script funtion of onclick when click event is done. but it could not retaining the page.