I want to make an image as link, such that when I click on the image a javascript function is called. The whole code is written in javascript.
I try this byt it files:

aaa=document.createElement('a');
        aaa.href="#";
        aaa.innerHTML="<img src="downArrow.gif">";
        aaa.onclick=function()
        {
            moreInfo(this);
        }

here I want when I click "doenArrow.gif" image the function moreInfo() should be called.

put this

<img src="downArrow.gif">

in

<a href...></a>

and then use onclick function.....