grab the onClick event and validate if it's some specific element, i.e. an image?
As far as I know, onclick is the only way to intercept such an event, so you'll have to do it this way.
What do you want to achieve with this ?
If you want to execute the onclick without coding it in your element, you could try document.theElement.onclick="";
Not sure if it works but I guess so. Is this what you're looking for?
Separating content, behaviour and style is a good way to build pages. However, you need to connect the elements to their behaviours. So keep on using the onHandler attributes, but put your script in a separate file (handlers.js, for example). This way you have separated behaviour from content, AND you can simply use the same scripts in different pages.
I hope it helped.
Can't you set the handlers in your script like i said earlier somehow?