I was working with a client over the last few days on building a Project Workspace site template.  We were nearly finished and had to make a couple last edits to a web part when we hit the JavaScript error.  When expanding the details of the error it was similar to:

line: 2135 Char: 4 Error: ‘style.display’ is null or not an object code: 0

This error was keeping us from adding web parts and modifying current web parts (we could still delete web parts, but only by using http://url/default.aspx?contents=1 to get to our web part maintenance page).

I did some researching and thanks to this thread, I found this solution:

1)  Place page in edit mode 2)  Edit the content of the content editor web part by selecting the ‘modify web part’ drop down menu 3)  Select the Rich Text Editor and copy the text if you do not want to lose it. 4)  Select Source Editor button, this opens the HTML source code for the CE Web Part 5)  Remove the source code.  Our source code had a conflicting ID. 6)  Update CE web part and make sure source code does not have auto generated code, or just add a new content editor web part.

The thread varies on what web parts people had on the page, in our case, we only had one content editor web part and then several list web parts.  Once we removed our single content editor web part, everything worked beautifully.