I'm really unsure about this, heh. I want to create a javascript function that will change the url of an image link. This is what I tried (which I'm sure is totally wrong):
HTML Code:
document.images['myimagename'].onClick = "location.href = '" + address + "'";
where address is a parameter passed into my function and myimagename is the name of my image.

Thanks in advance.