Popup and variables

Hí everybody!
I don´t know how to do this but I guess it´s possible. I would like to open a popup window from flash and send an action to it. I explain it better. I have a movie with 25 thumb. When you click on the thumbs a popup window should open displaying the respective picture in big dimensions. The popup window is simply a photo gallery were you can look at the big picture with two normal next and prev buttons.
It´s possible to send a variable that loads the choosen pictures into the popup window? Somenthing like: if you click on the thumb1 the popup window open and load the pict1big into a movieclip, if you click on the thumb2 the pict2big is loaded … etc…
At the moment if you click on any thumb the popup opens dislaying the picture number one - always…
Here is the code I use to load the thumbs and launch the popup from the main site

for (var i = 1; i<=26; i++) {
	loadMovie("http://site.com/pict/thumbs/"+i+".jpg", tumbs["t" + i]);
	tumbs["t" + i].id = i;
	getURL("javascript:NewWindow=window.open('http://www.site.com/popup/popup.html','newWin','width=561,height=784,left=100,top=50,toolbar=No,location=No,scrollbars=No,status=No,resizable=No,fullscreen=No');  NewWindow.focus();void(0);");

It´s necessary to use php? I really have no idea… please help!