function popup(src,h,w) {
  if (!h)
    h = 300;
  if (!w)
    w = 450;
  win = window.open(src,"","top=20,left=20,height=" + h + ",width=" + w + ",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes")
}

function popupLB(target,w,h) {
    var w0 = (w || 600), h0 = ( h || 400 );

    if (!document.getElementById("popupIframe")) {
        jQuery("body").append("<iframe id=popupIframe style='display: none; width: 100%; height: " + h0 + "px'></iframe>")
    }
    jQuery("#popupIframe").attr("src", target);
    jQuery("#popupIframe").modal({
        close: true,
        overlayClose: true,
        overlayCss: {
            backgroundColor: "gray"
        },
        containerCss: {
            backgroundColor: "white",
            width: 700
        },
        onShow: function () {
            if (w || h) {
                jQuery("#simplemodal-container").css("width", w0 + "px").css("height", h0 + "px");
                jQuery.modal.setPosition();
            }
        }
    });
}

