In your JavaScript you should use the document.getElementById('id') method to get a reference to the image tag that you want to work with. You can change the element's src property to change the image via JavaScript.
The tricky part is knowing how to retrieve the "id" for the image element.
If your image is an ASP.NET Image control then the "id" that you want to supply to the document.getElementById() method is the image control's ClientID property.
If your image is a pure HTML <img> tag then you supply the id that you gave this image to the getElementById method.
It is probably better to work with the ASP.NET Image control rather than use the HTML <img> tag because ASP.NET will assign unique IDs to the elements, making your HTML valid. Also, if you use the ASP.NET Image control you can access it in your C# or VB.NET server side code....
Anyways, check out this quick article on
How to use JavaScript in ASP.NET.
-Frinny