Back Button Script

hey people.............
when you use flash detection,
there is an initial page the holds the detection then,
sub-directories that hold the flash content.
there is a problem at that point.
the back button will only go back once, obviously, which
then takes you right back to the sub-directories.
i need a script that loads information into history.
that way, while the flash content is loading, a history
script can also be loaded into history, and
fix my back button.
any help all would be most appriciated.
thank you