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
 * @param {int} width Defaults to 550
 * @param {int} height Defaults to 450
 */
function byte_popitup(url, name, width, height) {

	if (width == undefined) {
		width = 550;
	}

	if (height == undefined) {
		height = 450
	}

    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='+ width +',height='+ height);
        if (!newwindow.opener) newwindow.opener = self;
    }
    if (window.focus) {newwindow.focus()}
    return false;
}
