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 popupWindow(url) {
	popWindow(url,'yes','yes',800,480)
}
function popWindow(url,sb,rz,w,h) {
	if (typeof(myRemote) != "undefined") myRemote.close();
	myRemote = launch(url
                ,"pop_window"
                ,"toolbar=no,status=no,menubar=no,scrollbars=" + sb + ",resizable=" + rz + ",width=" + w + ",height=" + h
                ,"parent_opener");
}

