/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Anonymous | http://musikimiz.googlepages.comLicensed under: Creative Commons License
 */

function pixTimeChange() {
  var t=new Date();
  var h = t.getHours();
  var r1="newimages/jocks/KS.gif";
  var r2="newimages/jocks/dan.gif";
  var r3="newimages/jocks/paesan.gif";
  var r4="newimages/jocks/jeff.gif";
  var r5="newimages/jocks/dan.gif";
  var el=document.getElementById('myimage');

  // See the time below. Note: The time is in 24 hour format.
  // In the example here, "7" = 7 AM; "17" =5PM.
  if (h>=6 && h<10)
el.src = r1;
else if (h>=10 && h<15)//this is whatever criteria you want
el.src = r2;
else if (h>=15 && h<19)
el.src = r3;
else if (h>=19 && h<24)
el.src = r4;
else if (h>=24 && h<3)
el.src = r5;
else if (h>=3 && h<6)
el.src = r4;
}

// Multiple onload function created by: Simon Willison
// http://simonwillison.net/2004/May/26/addLoadEvent/
function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}

addLoadEvent(function() {
  pixTimeChange();
});
