Hi guys
I was wondering if you could help me with this. I've been trying to use this code but...

Code:
<script type="text/javascript"><!--
var imlocation = "images/";
 function ImageArray (n) {
   this.length = n;
   for (var i =1; i <= n; i++) {
     this[i] = ' '
   }
 }
image = new ImageArray(7);
image[0] = 'sunday.gif';
image[1] = 'monday.gif';
image[2] = 'tuesday.gif';
image[3] = 'wednesday.gif';
image[4] = 'thursday.gif';
image[5] = 'friday.gif';
image[6] = 'saturday.gif';
var currentdate = new Date();
var imagenumber = currentdate.getDay();
document.write('<img src="' + imlocation + image[imagenumber] + '">');
//--></script>
... this seems to be working only with those seven days exactly. I need an array of four picture that would change after four days, not seven pictures-seven days. I tried this

image = new ImageArray(4);
image[0] = '01.gif';
image[1] = '02.gif';
image[2] = '03.gif';
image[3] = '04.gif';
but just making it short doesn't do it. Please, help me, I'm not good with this stuff and I would really appreciate any hint.