title: Load youtube video based on current time?
body: <p>I have a webpage based slideshow (index.php), and would like to have a another page (commercial.php) interrupt it every 10 minutes or so, then go back to index.php once the commercial.php page has been up for X minutes.</p>
  
  <p>I'm thinking the way to do it would have the javascript say "if current minutes is divisible by 10, load commercial.php. When commercial.php timer ends, load index.php". I just don't know how to put that into code... :(</p>
  
  <p>Below is a test page I've created just to get the code working, then will move it to the real webpage...</p>
  
  <pre><code>&lt;body&gt;
  
    &lt;div id="time"&gt;&lt;/div&gt;
    &lt;div class="frame" style="border:1px solid red;width:100%;height:90%;"&gt;&lt;/div&gt;
  
    &lt;script&gt;
      function time() {
      $("#time").text(new Date().getHours() + ":" + new Date().getMinutes() + ":" + new Date().getSeconds());
      }
      setInterval(time, 1000);
      time();
  
      //IF STATEMENT TO LOAD VIDEO IN DIV.FRAME?
  
    &lt;/script&gt;
  
  &lt;/body&gt;
  </code></pre>
  
  <p>Any help would be greatly appreciate.
  Thank you!</p>