﻿function OpenModalDialog(strUrl, strFeatures, params) {
    if (strFeatures == '')
        strFeatures = "dialogWidth:200px;dialogLeft:200px;";

    strFeatures += "resizable=no;" +
        "help:no;maximize:yes;minimize:yes;scrollbars:yes;dialogHeight:150px;dialogTop:60px";
    //alert(params);

    //    if(params!=null && params!='')
    //    {
    //        if(document.getElementById("ParamsHiddenField")!=null)
    //            document.getElementById("ParamsHiddenField").value = params
    //        strUrl+="?"+params;
    //    }
    //alert(strUrl);
    var r = window.showModalDialog(strUrl, '', strFeatures);
    //alert(r);
    //var c;
    if (r != null && r != '') {
        //alert( document.getElementById(params));

        if (document.getElementById(params) != null &&
            document.getElementById(params).click != null)
            document.getElementById(params).click();
        else
            window.location.reload();
    }
}


function OpenModalDialogWithHeight(strUrl, strFeatures, params) {
    if (strFeatures == '')
        strFeatures = "dialogWidth:200px;dialogLeft:200px;dialogHeight:150px;dialogTop:60px";

    strFeatures += "resizable=no;" +
        "help:no;maximize:yes;minimize:yes;scrollbars:yes;";
    //alert(params);

    //    if(params!=null && params!='')
    //    {
    //        if(document.getElementById("ParamsHiddenField")!=null)
    //            document.getElementById("ParamsHiddenField").value = params
    //        strUrl+="?"+params;
    //    }
    //alert(strUrl);
    var r = window.showModalDialog(strUrl, '', strFeatures);
    //alert(r);
    //var c;
    if (r != null && r != '') {
        //alert( document.getElementById(params));

        if (document.getElementById(params) != null &&
            document.getElementById(params).click != null)
            document.getElementById(params).click();
        else
            window.location.reload();
    }
}
