Object variable in script block

I have a search popup window that opens when the user enters some search criteria on the main window in our application. I need to access some funtions on the popup from the main window. I am unable to do so since the variable which holds the object returned by ‘window.open’ is cleared every time the main window refreshes although the pop up is still open. How do I get the object in the main window to remain available to me for later use?
Below is the JavaScript present in the main window:
var leftPanelLookup;
function fnSecSearch(url)
{

leftPanelLookup = window.open(url, “Left Panel”);
leftPanelLookup.focus();
}

function mainShowPopup()
{

leftPanelLookup.focus();
}