I actually made an error by inserting var . Those lines of code are separared by , , so the leading var covers everything up to heightOffset = 10; .

For lines of more than a few characters, I would personally choose to make separate statements each starting with var and ending in ; . In fact that's what I did to test out the changes. I remembered to replace the ; with a , but I forgot to remove var in my reply.

This is a rather odd formulation in that the href's "http:www.mysite.nl/news" will be interpreted by the server (onclick) via HTTP, while its hash string "#news" will be interpreted by javascript (onmouseover). Odd but sort of clever and it's possible that this is what your compatriot, Mr Van Damme, had in mind.

The constraint (as I'm sure you can see) is that the href can't have an independent hash string of its own.