
var popupWindow;
var oxygenWin;
var iridiumWin;

function newWindow(URL) {
    windowName = "elementForm";
    
    width = 500;
    height = 540;
    scrolling = 0;
    
    var topX = (window.screen.width / 2) - ( width / 2);
    var topY = (window.screen.height / 2) - ( height / 2);
    
    popupWindow=window.open(URL, windowName, 'width=' + width + ',height=' + height + ',location=no,resizable=yes,scrollbars=' + scrolling + ',screenX=' + topX + ',screenY=' + topY);
    // If the browser supports the focus() method place focus on the
    if (window.focus) { popupWindow.focus() }
    // If the Oxygen popup is visible then close it
    if(oxygenWin){ oxygenWin.close(); }
}
function oxygenPopup(URL) {
    windowName = "oxygenForm";
    
    width = 500;
    height = 530;
    scrolling = 0;
    
    var topX = (window.screen.width / 2) - ( width / 2);
    var topY = (window.screen.height / 2) - ( height / 2);
    
    oxygenWin=window.open(URL, windowName, 'width=' + width + ',height=' + height + ',location=no,resizable=yes,scrollbars=' + scrolling + ',screenX=' + topX + ',screenY=' + topY);
    //If the browser supports the focus() method place focus on the new
    if (window.focus) { oxygenWin.focus(); }
    // If the popupWindow is visible then close it
    if (popupWindow) { popupWindow.close(); }
}
function iridiumPopup(URL) {
    windowName = "iridiumForm";
    
    width = 500;
    height = 530;
    scrolling = 0;
    
    var topX = (window.screen.width / 2) - ( width / 2);
    var topY = (window.screen.height / 2) - ( height / 2);
    
    iridiumWin=window.open(URL, windowName, 'width=' + width + ',height=' + height + ',location=no,resizable=yes,scrollbars=' + scrolling + ',screenX=' + topX + ',screenY=' + topY);
    //If the browser supports the focus() method place focus on the new
    if (window.focus) { iridiumWin.focus(); }
    // If the popupWindow is visible then close it
    if (popupWindow) { popupWindow.close(); }
    // If the Oxygen popup is visible then close it
    if(oxygenWin){ oxygenWin.close(); }
}
