Thanks for replying -
I don't think getElementsByClassName is the problem though, because if I comment out the line I pointed out in my original post, where the function (clicked()) gets assigned to the onclick event, there are no javascript errors anymore. Besides The getElementsByClassName...