Cool&Awesome 7 Junior Poster in Training

Hi everybody!

I am calling the functions below from html anchor tags, for the purpose of opening/closing a popup window. Now, when i refresh or change the page, i can't close the window anymore (except manually). I understood there is some reference to the popup that gets lost when you surf away /refresh page, but is there a way around this?

If it's not much code i'd highly appreciate seeing it applied on this example - i tried many things already but none worked.

Thanks for your time.

function popuponclick(popup)
{
my_window = window.open("muzix/player.htm", popup, "width=350,height=150");  
}

function closepopup()
{
	my_window.close();

}