﻿function OpenModalUrl(url, title, width, height) {
    $("#modalIframe")
        .attr("src", url)
        .attr("width", width)
        .attr("height", height);

    var modalTitle = $("#modalUrlTitle");
    modalTitle.html(title);
    if (title == null || title == "")
        modalTitle.hide();
    else
        modalTitle.show();

    var containerWidth = (parseInt(width) / 2) - 25;
    $("#btnModalUrlCloseButtonContainer").css({ marginLeft: containerWidth + 'px' });

    var popup = $find("modalUrlPopup");
    popup.show();


    var $popupContainer = $("#" + FindModalUrlContainerClientID());
    $popupContainer.remove();
    $('body').append($popupContainer);

    var $popup = $("#" + FindModalUrlPanelClientID());
    CenterInViewPort($popup);
}
function CloseModalUrl(callback) {
    callback;
    var popup = $find("modalUrlPopup");
    popup.hide();

    $("#modalIframe")
        .attr("src", "about:blank");
}
