title: resize popup window based on content width and height
body: <p>I've an html page with varying size. Based on the conditions i hide some contents.
  How can i get the width and height of the body with javascript, so that i can resize the window size dynamically based on the amount of contents of the page. 
  Thanks...</p>