function ShowModalWindow(url, width, height, isScrollable, showStatusbar, isResizable) 
{
    var posX = (screen.width - width) / 2;
    var posY = (screen.height - height) / 2;
    
    var features = "";

    if (window.showModalDialog) 
    {
        features = "dialogWidth:" + width + "px;";
        features += "dialogHeight:" + height + "px;";
        features += "scroll:" + isScrollable + ";";
        features += "status:" + showStatusbar + ";";
        features += "resizable:" + isResizable;
    
        window.showModalDialog(url,'PopUp',features);
    } 
    else 
    {
        features = "width=" + width + ",";
        features += "height=" + height + ",";
        features += "left=" + posX +",";
        features += "top=" + posY +",";
        features += "toolbar=no, menubar=no, directories=no,";
        features += "status=" + showStatusbar + ",";
        features += "scrollbars=" + isScrollable + ",";
        features += "resizable=" + isResizable + ",";
        features += "modal=yes";
        
        window.open(url,'PopUp',features);
    }
}

function ShowWindow(url, width, height, isScrollable, showStatusbar, isResizable) 
{
    var posX = (screen.width - width) / 2;
    var posY = (screen.height - height) / 2;
    
    var features = "";

    features = "width=" + width + ",";
    features += "height=" + height + ",";
    features += "left=" + posX +",";
    features += "top=" + posY +",";
    features += "toolbar=no, menubar=no, directories=no,";
    features += "status=" + showStatusbar + ",";
    features += "scrollbars=" + isScrollable + ",";
    features += "resizable=" + isResizable + ",";
    features += "modal=yes";
        
    window.open(url,'PopUp',features);
} 