It's getting kinda Complicated!

iI have a database with information, that includes imageALT tags etc and image location. I have a navigation driven by javaScript. where by when clicked, directs to a something like index.asp?ID=1, 2 ,3 and so on.

Except I cannot get the rollover image set to the mouse overstate when clicked. Is there a method in which I can maybe add the something into the database where true or false could come into it.

Or perhaps when ID= number, then set mouseout to a particular image. This would be good if anyone could point me in the right direction.