Open new window and change destination URL

Hi,
I’m using this function to open a new window when a button is clicked. I’m wondering if there is a way to open the new window and at the same time change the URL of the source window so that when the new window is closed the source window underneath shows the new URL. TIA (I’m new to Javascript).


function openWindow(url) {
      var availheight=screen.availHeight;
      var availwidth=screen.availWidth;
       winStats='toolbar=no,location=no,directories=no,menubar=no,';
       winStats+='scrollbars=yes,width='+availwidth+',height='+availheight;
       if (navigator.appName.indexOf("Microsoft")>=0) {
          winStats+=',left=0,top=0';
        }else{
          winStats+=',screenX=0,screenY=0';
        }
       floater=window.open(url,"",winStats)
}