<!--TIME OF DAY FLASH OBJECT--> <!-- This part can go in the head of the html file --> <script language="JavaScript" type="text/javascript"> <!-- Copyright 2008, Sandeep Gangadharan --> <!-- For more free scripts go to http://sivamdesign.com/scripts/ --> <!-- function sivamtime() { now=new Date(); hour=now.getHours(); var morning = "file-1.swf"; // change name of flash files here to suit your needs var noon = "file-2.swf"; var afternoon = "file-3.swf"; var evening = "file-4.swf"; var def = "altSWF.swf"; if (hour >= 7 && hour < 12) { document.write("<object type='application/x-shockwave-flash' data='" + morning + "' width='600' height='200'><param name='movie' value='" + morning + "' /><param name='quality' value='high' /></object>") } if (hour == 12) { document.write("<object type='application/x-shockwave-flash' data='" + noon + "' width='600' height='200'><param name='movie' value='" + noon + "' /><param name='quality' value='high' /></object>") } if (hour > 12 && hour < 17) { document.write("<object type='application/x-shockwave-flash' data='" + afternoon + "' width='600' height='200'><param name='movie' value='" + afternoon + "' /><param name='quality' value='high' /></object>") } if (hour >= 17 && hour < 22) { document.write("<object type='application/x-shockwave-flash' data='" + evening + "' width='600' height='200'><param name='movie' value='" + evening + "' /><param name='quality' value='high' /></object>") } else { document.write("<object type='application/x-shockwave-flash' data='" + def + "' width='600' height='200'><param name='movie' value='" + def + "' /><param name='quality' value='high' /></object>") } } sivamtime(); // --> </script>