Getting the image selected in nifty imageSelect

I have a nifty xml file with this extract:
[java]
<control id=“image-select” name=“imageSelect” width=“126px” imageWidth=“80px” imageHeight=“80px” imageList=“Interface/world_materials/hull.png,Interface/world_materials/grass.jpg” >
<interact onClick=“image(selected image)”/> <-- here
</control>
[/java]

i want the interact onClick bit to return the selected image from the image list. How can i do this?
Thanks in advance!