rusher,
<img id="myImage" src ="style/images/img1.jpg">
<script>
var image = document.getElementById("myImage");
image.addEventListener("click", function(){
if (image.getAttribute("src") == "style/images/img1.jpg"){
image.src = "style/images/img2.jpg"}
else{
image.src = "style/images/img1.jpg"}
});
</script>