Well, there are lots of ways to do this. And you've made it more complex than needed. Why do you need to pass two arguments???
I'd probably opt for this:
Code:
<body>
<img src="two.jpg" onmouseover="this.src='one.jpg';" onmouseout="this.src='two.jpg';"/>
...
<img src="two.jpg" onmouseover="this.src='one.jpg';" onmouseout="this.src='two.jpg';"/>
...
<img src="two.jpg" onmouseover="this.src='one.jpg';" onmouseout="this.src='two.jpg';"/>
</body>
Why make it harder than that?