title: Image not flashing
body: <p>I have a PHP script that displays an image(according to the current time) and I want it to flash the image so I tried adding a script to do so but its some what not working. Please have a look. I would be thankful for your help. Thanks in advance.</p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  &lt;title&gt;Untitled Document&lt;/title&gt;
  
  &lt;/head&gt;
  
  &lt;body onload="startit();"&gt;
  &lt;?php
  $hour = date('H', time()); // Returns the hours of the server time, from 0 to 23.
  
  switch ($hour) {
  case '0':
  $img = '0.jpg';
  break;
  case '1':
  $img = '0.jpg';
  break;
  // ... and so on...
  default:
  $img = '1.jpg';
  }
  
  ?&gt;
  
  &lt;img src="&lt;?php echo $img; ?&gt;" id="mydiv" /&gt;
  &lt;script language=javascript&gt;
  /*This script written by Chris Stahl*/
  /*It may be used and modified by */
  /*webmaster's for private use.      */
  function startit() {
  window.setInterval("changecolor()",100);
  }
  
  function changecolor() {
  var rndred=Math.floor(256*Math.random());
  var rndgreen=Math.floor(256*Math.random());
  var rndblue=Math.floor(256*Math.random());
  var colorarray=[rndred, rndgreen, rndblue];
  var hexcolor="#";
  for(i=0;i&lt;3;i++) {
   hexcolor=hexcolor +""+ converttohex(Math.floor(colorarray[i]/16));
   hexcolor=hexcolor +""+ converttohex(colorarray[i]%16);
  }
  document.getElementById("mydiv").style.color=hexcolor;
  }
  function converttohex(num) {
  switch (num) {
  case 10: return "A";
  case 11: return "B";
  case 12: return "C";
  case 13: return "D";
  case 14: return "E";
  case 15: return "F";
  default: return num;
  }
  }
  &lt;/script&gt;
  
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>