Urgent help! how to control scene and frame

hi. i got a problemo here, i have some scenes, and from the main scene, it can go to any other scene based on user click. but when it goes to other scene, how can i know wht is the current frame number and scene that i am going from?

eg:
current scene: scene1
current frame: frame 10

jump to
new scene : scene 4
new frame: frame 1

assumes that i dont know the current number and current frame number.
but i need to go back to scene 1, frame 10, after a short while. so how should i do that?

thanks