Ok, here is a revised version of the script for 2 buttons.
PHP Code:
import mx.utils.Delegate;
myTW mx.managers.PopUpManager.createPopUp (_rootmx.containers.Windowfalse, {closeButton:truetitle:"This is the title"_x:270_y:40color:16711680contentPath:"images/a1.jpg"});
myTW.visible false;
sizerPop = new Object ();
sizerPop.handleEvent = function (img)
{
    if (
img.type == "complete")
    {
        
myTW.setSize (myTW.content._widthmyTW.content._height 25);
    }
};
myTW.addEventListener ("complete"sizerPop);
but.onPress = function ()
{
    
myTW.visible true;
    
myTW.contentPath "images/a1.jpg";
};
but2.onPress = function ()
{
    
myTW.visible true;
    
myTW.contentPath "images/BMW_milk_ad.jpg";
};
var 
closeWindow:Object = new Object ();
closeWindow.click Delegate.create (thiscw);
function 
cw (evt)
{
    
evt.target.visible false;
}
myTW.addEventListener ("click"closeWindow); 
When the movie loads you create a window but make it invisible. Then you can press any button to load another image and it will be resized. You can place the window wherever you want. The closebutton only makes it invisible. So the window is always present.