Need Ibox to increment data field b4 opening image

Hi All

Please look at this webpage:

I’m ok with php and can cut an paste javascript, the script for each frame is held in a data base. I want to record how often each frame is selected for viewing in Ibox, my design problem is that I don’t know how to increment the ‘views’ field on the data base. Do I need an onclick event in the frame’s html? What will the code look like in javascript or better can you point me to an existing tutorial?

Thanks

Nick