Replace onclick, onmouseover and onmouseout with extern javascript
===

I want to replace my onclick, onmouseover and onmouseout attributes, which are now inline in my html, by something extern in javascript.

html:

    <div onclick:"myfunctiononclick()"></div>
    <div onmouseover:"myfunctionmouseover()"></div>
    <div onmouseout:"myfunctionmouseout()"></div>

javascript:

    function myfunctiononclick(){something};
    function myfunctiononmouseover(){something};
    function myfunctiononmouseout(){something};

Why I want to do this? Because chrome doesn't allow inline javascript in extensions.

Thanks

BTW, please don't use jQuery, so I know what's going on.