﻿
/** Simple wrapper around the window.open function. This will
 *  produce a non-resizable window without decorations or toolbars
 *  of a certain size.
 */
function openDialogWindow(url, windowName, height, width) {

    window.open(url, windowName, "scrollbars=1,resizable=0,height=" + height + ",width=" + width);
}

/** Closes the current window and reloads the contents of the parent
 *  window at the same time.
 */
function closeAndRefreshParent() {

    window.close();
    
    if (window.opener != null) {
        window.opener.location = window.opener.location;
    }
}