/*
 Wrapper functions for the windows library.
*/

// Opens please wait overlay.
function windowShowPleaseWait(message, width, height) {
	Dialog.info(message, {className: "nwl", width:width, height:height, showProgress: true});
}

function windowOpenContentWindow(titleText, contentText, width, height) {
	var win = new Window({className: "nwl", title: titleText,
                          top:70, left:100, width:width, height:height, maximizable:false,
                          showEffectOptions: {duration:1.5}})
    win.getContent().innerHTML = contentText;
    win.showCenter(false);
    win.refresh();
}

function windowOpenUrl(url, titleText, width, height) {
        var win = new Window({className: "nwl", title: titleText,
                              top:70, left:100, width:width, height:height, maximizable:false,
                              url: url, showEffectOptions: {duration:1.5}})
        win.showCenter(true);
        win.refresh();
}

function windowClosePleaseWait() {
	Dialog.closeInfo();
}