Not only google but also some users dont like them for simple reasons like they give lots of errors, take time ect. And if the script is a bit sofisticated than god save the page from getting crashed in some browsers too
Earlier people used to use JS for menubars and navigation bars but cos of the cons and
SEO stuff everyone is now totally dedicated towards using CSS.