Hey. I have a website in which an cirtin image is refreshed automaticaly through the script below. What I need is a modified version of this script in which the script will show (and not refresh if possible) and different image between cirtin hours on the day (10pm-8am est). Thanks for any help.
Included Script:
<script language="JavaScript" type="text/javascript">
var refreshrate=30; //SECONDS BETWEEN REFRESH
var image="path/to/image"; //IMAGE NAME
var imgheight=240; //IMAGE HEIGHT
var imgwidth=320; //IMAGE WIDTH
function refresh(){
document.images["pic"].src=image+"?"+new Date();
setTimeout('refresh()', refreshrate*1000);}
document.write('<IMG SRC="'+image+'" ALT="Alternate Text" NAME="pic" ID="pic" WIDTH="'+imgwidth+'" HEIGHT="'+imgheight+'" STYLE="border: 1px solid Black;">');
if(document.images)window.onload=refresh;
</script>
Included Script:
<script language="JavaScript" type="text/javascript">
var refreshrate=30; //SECONDS BETWEEN REFRESH
var image="path/to/image"; //IMAGE NAME
var imgheight=240; //IMAGE HEIGHT
var imgwidth=320; //IMAGE WIDTH
function refresh(){
document.images["pic"].src=image+"?"+new Date();
setTimeout('refresh()', refreshrate*1000);}
document.write('<IMG SRC="'+image+'" ALT="Alternate Text" NAME="pic" ID="pic" WIDTH="'+imgwidth+'" HEIGHT="'+imgheight+'" STYLE="border: 1px solid Black;">');
if(document.images)window.onload=refresh;
</script>