Thank you OldMan, but I made a mistake (surely not only one): I cannot use IDs for reference. And yes, I need to use a frameset. PHP won’t work in this case.
I have a fullscreen slideshow (10 Pics) and 3 (rating-)buttons A, B, C on frame[0] and a function for each of them
var clicksA = 0;
var...