title: Control over popup windows using setTimeout
body: <p>I'm making a website for my girlfriend as a holiday gift. We both love art, code and music so yeah! 
  I'm trying to make a website which has just one button/link and after it is clicked, the website starts playing music, opening and closing popup windows with some gifs and stuff as the music goes on. The problem is, i'm having a hard time applying a delay on my first popup window, it closes automatically but even after reading and trying code from other questions in this topic, I couldn't get the delay of the opening of the popup  to work right. Also, I couldn't get to place the popups in a specific position in the screen :(( this is what I have:</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta charset="UTF-8"&gt;
  &lt;title&gt; pop ups &lt;/title&gt;
  &lt;script&gt;
  
  var theURL = 'http://49.media.tumblr.com/tumblr_m3f88eRfVg1qcy0o0o1_500.gif';
  var width  = 420;
  var height = 315;
  
  function popWindow() {
  newWindow = window.open(theURL,'newWindow','toolbar=no,menubar=no,resizable=no,scrollbars=no,status=no,location=no,width='+width+',height='+height);
  
  
  setTimeout(function() {
  newWindow.close();
  }, 3000)
  } ;
  
  &lt;/script&gt;
  
  &lt;/head&gt;
  
  &lt;body&gt;
  
      &lt;p&gt;&lt;a href="javascript:popWindow()"&gt; temporalmente &lt;/a&gt;      &lt;/p&gt;
  
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>