title: Javascript pop-up window -updated
body: <p>I copied this code from "<code>www.hotscripts.com</code>", <code>http://www.advancebydesign.com/itemdetails.php?item=15</code>. What it does it just displays a simple window in the middle of the screen.</p>
  
  <p>3 very simple steps are required:</p>
  
  <p>1) create a button <code>&lt;input type="button" onclick='Javascript:my_box.Show();' value="Show Popup Box"&gt;</code></p>
  
  <p>2)include this into head <code>&lt;script language="Javascript" type="text/Javascript" src="jscpopupbox.js"&gt;&lt;/script&gt;</code></p>
  
  <p>3) and also this added to the head:</p>
  
  <pre><code>my_box = new jscPopupBox();
  my_box.width = 400;
  my_box.height = 450;
  
  content_html = "&lt;div style=\"padding:0;height:30px;margin:0;border:none;";
  content_html+= "background-color:#CCF;clear:both;\"&gt;&lt;input type=\"button\" ";
  content_html+= "style=\"float:right;height:26px;width:26px;\" value=\"X\" ";
  content_html+= "onclick='my_box.Hide();'&gt;&lt;/div&gt;\n";
  
  content_html+= "&lt;iframe src=\"../license.txt\" width=\"100%\" style=\"";
  content_html+= "border:none;padding:0;margin:0;\" height=\"420px\"&gt;&lt;/iframe&gt;";
  
  my_box.html = content_html;
  </code></pre>
  
  <p>What I dont get is why the windows on my website appear on the upper left corner, instead in the middle. I haven't touched the source code, and when I try it on a plain HTML page it seems to work. Is my CSS interfering?</p>
  
  <p>I removed all the CSS from my website, and eventually I found out that the problem was not it, but this <code>&lt;!DOCTYPE HTML&gt;</code> on top of the page. What does this has to do with the javascript section? Isn't the declaration part that tells the browser what page it is reading? anyway, when i delete it everything work fine. (btw my page includes HTML5 Video.)</p>