title: Change the background color and text color with a timer with Javascript
body: <p>I'm trying to change both the background and text color of a table and all its cells with a timer.  I have the script below just before the end  tag.  The background is the only thing that changes.  The id of the table is 'titleTable'. Thanks</p>
  
  
  
  <pre><code>&lt;script language="Javascript"&gt;
  &lt;!-- Begin
  titleTable.bgColor='#FFFFFF';
  setInterval("Timer()", 500);
  x=1;
  function Timer() {
      set=1;
      if(x==0 &amp;&amp; set==1) {
          titleTable.bgColor='#000000';
          titleTable.style.color='#FFFFFF';
          x=1;
          set=0;
      }
      if(x==1 &amp;&amp; set==1) {
          titleTable.bgColor='#FFFFFF';
          titleTable.style.color='#000000';
          x=0;
          set=0;
      }
  }
  // End --&gt;
  &lt;/script&gt;
  </code></pre>