﻿function OpenPopup(url, id, height, width) {
    window.open(url, id, "height=" + height + ",width=" + width + ",resizable=0");
}

function OpenScrollablePopup(url, id, height, width) {
    window.open(url, id, "height=" + height + ",width=" + width + ",resizable=0, scrollbars=1");
}

var m_confirmResult = false;
//<summary>
// Show the jquery confirm dialog window.
// The defined elementID will refer to an existing HTML element on the page
// which will get placed into the body of the alert message
//</summary>
function ShowConfirmDialogWithElement(itemClicked, title, elementID, okButtonText) {
    if (m_confirmResult) { return true; };
    var clickedObj = $(itemClicked);

    if (okButtonText == '') {
        jResetOkButtonText();
    }
    else {
        jSetOkButtonText(okButtonText);
    }

    jConfirmWithElement(title, elementID, function (r) {
        m_confirmResult = r;
        if (r) {
            clickedObj.click();
        }
    });

    return m_confirmResult;
}

