This really belongs in the "Scripts, 3rd Party Apps, and Programming" sub-forum, but since one of the questions here is "is this supported?", the answer is "yes". A better answer would be "yes, but you should pretend it isn't".
There is at least one huge problem with doing mouseover effects this way, and that is latency. When you are working on your local machine, it takes almost no time at all for the browser to get a file from your local hard drive. Now you're taking it to the web, where it's going to take at least a few milliseconds to send a request to the server. That request may spend some time in a queue, waiting for other requests to be completed (yours is not the only web site on your server; you're sharing with thousands of other people). Finally, after some time has elapsed, the server
may send the new image source file — assuming that the request has not timed out.
In the meantime, your JavaScript on the web page is synchronous. That means, essentially, that nothing else on the page can happen until the JS runs. Even though all you're doing is touching the DOM to change the
src attribute of the image tag,
that takes time to happen. And that means that the mouseout event might not be caught and handled if it happens during the time that the mmouseover event code is changing the DOM (the memory structure that represents your HTML in the browser). So the image can wind up "flipping" on you and getting stuck on the mouseover source.
Using JavaScript and the mouse events for image rollovers has been considered
very bad practice since around 2003 or so (when Netscape Navigator 4.whatever was finally dead and buried). We've been using CSS to handle hover state since then. That fixes the "stuck in the wrong state" problem, but it doesn't fix the latency problem by itself; you can still wind up with an element that doesn't react quickly enough to what's happening in the UI, especially on a page the user has never visited before. CSS sprites can solve that problem. That essentially puts all of the images you want to use into a single image file, then shifts that image around so that only the part you want to use is visible through the "window" that your HTML element produces. There is an excellent article/tutorial at CSS-Tricks.com:
http://css-tricks.com/css-sprites/
That leaves one other major niggle: the <img> tag is for
content images, not for buttons. If you want an element on the page to "do stuff", then you should be using an element that is designed to "do stuff", like a <button>, an <input> or a link (<a>). Again, the CSS-Tricks.com tutorial can walk you through part of that, and don't forget that you can always ask questions here (in the correct forum, of course) to ask what is best to use in a given circumstance, and how best to code it.