var newwindow = '';
/**
 * This will popup a window and bring it to the front if it has already been
 * popped before.
 * @param {string} url of window
 * @param {string} name of window
 */
function byte_popitup(url, name) {
    if (!newwindow.closed && newwindow.location) {
        newwindow.location.href = url;
    }
    else {
        newwindow=window.open(url, name, 'menubar=no,toolbar=no,location=no,resizable=yes,scrollbars=yes,status=no,width=800,height=600');
        if (!newwindow.opener) newwindow.opener = self;
    }
    if (window.focus) {newwindow.focus()}
    return false;
}


function byte_popitup_toolbars(url, name) {
    if (!newwindow.closed && newwindow.location) {
        newwindow.location.href = url;
    }
    else {
        newwindow=window.open(url, name, 'menubar=yes,toolbar=yes,location=yes,resizable=yes,scrollbars=yes,status=no,width=550,height=450');
        if (!newwindow.opener) newwindow.opener = self;
    }
    if (window.focus) {newwindow.focus()}
    return false;
}

