
function launch(newURL, newName, newFeatures, orgName) {
  var remote = open(newURL, newName, newFeatures);
  if (remote.opener == null)
    remote.opener = window;
  remote.opener.name = orgName;
  return remote;
}

function launchRemote(target,x,y) {
  myRemote = launch(target,
                    "site",
                    "height="+y+",width="+x+",alwaysLowered=0,alwaysRaised=0,channelmode=0,dependent=0,directories=0,fullscreen=0,hotkeys=1,location=0,menubar=0,resizable=0,scrollbars=1,status=0,titlebar=1,toolbar=0,z-lock=0",
                    "mainWindow");
}


function launch2(newURL, newName, varData, newFeatures, orgName) {
  var remote = open(newURL + '?' + varData, newName, newFeatures);
  if (remote.opener == null)
    remote.opener = window;
  remote.opener.name = orgName;
  return remote;
}

function launchRemote2(target,x,y,varData) {
  myRemote = launch2(target,
                    "site",varData,
                    "height="+y+",width="+x+",alwaysLowered=0,alwaysRaised=0,channelmode=0,dependent=0,directories=0,fullscreen=0,hotkeys=1,location=0,menubar=0,resizable=0,scrollbars=1,status=0,titlebar=1,toolbar=0,z-lock=0",
                    "mainWindow");
}

