title: Open window 1 then close open window 2 then close
body: <p>Ok i have this script it opens desired page then closes at desired amount of time.
  How do i make it redirect to something rather than google.com when closing</p>
  
  <pre><code>    &lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta charset=utf-8 /&gt;
  &lt;title&gt;Test Page&lt;/title&gt;
  &lt;style&gt;
  body {
  font-family: sans-serif;
  }
  &lt;/style&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;p&gt;&lt;a href="#" id="target"&gt;Start Earning Points&lt;/a&gt;; You will will &lt;b&gt;1&lt;/b&gt; point per &lt;b&gt;1&lt;/b&gt; view.&lt;/p&gt;
  &lt;script&gt;
  (function() {
  document.getElementById("target").onclick = function() {
  var wnd = window.open("http://google.com");
  setTimeout(function() {
  wnd.close();
  }, 15000);
  return false;
  };
  })();
  &lt;/script&gt;
  &lt;script src="/js/render/edit.js"&gt;&lt;/script&gt;
  &lt;script&gt;var _gaq=[['_setAccount','UA-1656750-13'],['_trackPageview']];(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.src='//www.google-analytics.com/ga.js';s.parentNode.insertBefore(g,s)})(document,'script')&lt;/script&gt;&lt;/body&gt;
  &lt;/html&gt;
  </code></pre>