you could try a javascript php combo.
a while back i had to get arrays from inside a javascript to php, i ended up doing it with some code i got off the php mailing list.
the thread can be found here:
http://www.programmingforums.org/for...pt-arrays.html
you could probably pass the varibles that you want by using javascript to grab the values from the parent window. Just an idea.