var mqAry1=['images/1_03.gif',
'images/2_03.gif',
'images/3_03.gif',
'images/4_03.gif',
'images/5_03.gif'];

function start() {
var i1 = new randImg('randimg1',680,303,3,mqAry1);
setTimeout(function() {replaceImg(i1)},i1.t);
}
window.onload = start;

function randImg(im,w,h,t,ary) {this.t = t*1000; this.m1 = []; this.m2 = []; for (var i=ary.length-1; i>=0; i--) {this.m1[i] = document.createElement('img');this.m1.src = ary[i]; this.m2[i] = ary[i];} this.d = document.getElementById(im); this.m = document.createElement('img'); this.m.width=w; this.m.height=h; this.m.alt = 'random image'; this.m.src = ary[Math.floor(Math.random()*ary.length)]; this.d.appendChild(this.m);} function replaceImg(self) {self.m.src = self.m2[Math.floor(Math.random()*self.m2.length)]; self.d.appendChild(self.m); setTimeout(function() {replaceImg(self)},self.t);}
