title: How to position a dialog box to the centre of a window
body: <p>Can anyone please tell me how to position a box to the centre of the window using JQuery. I will paste the code below :-</p>
  
  <pre>
      
  
      $("#address_book").click(function (e)
        {
            .........
  
           ShowDialog(false);
           e.preventDefault();
          ........
        });
  
      function ShowDialog(modal){
  
      ....  
        $("#overlay").show();
  
        $("#dialog").fadeIn(300);
  
        if (modal)
        {
  
           $("#overlay").unbind("click");
        }
        else
        {
           $("#overlay").click(function (e)
           {
              HideDialog();
           });
        }
       }
      
  </pre>
  
  <p>I want the dialog box to the centre of the window. Can anyone please tell me how to do this</p>