var mqAry1=[
'images/library/1.jpg',
'images/library/2.jpg',
'images/library/3.jpg',
'images/library/4.jpg',
'images/library/5.jpg',
'images/library/6.jpg',
'images/library/7.jpg',
'images/library/8.jpg',
'images/library/9.jpg',
'images/library/10.jpg',
'images/library/11.jpg',
'images/library/12.jpg',
'images/library/13.jpg',
'images/library/14.jpg',
'images/library/15.jpg',
'images/library/16.jpg',
'images/library/17.jpg',
'images/library/18.jpg',
'images/library/19.jpg',
'images/library/20.jpg',
'images/library/21.jpg',
'images/library/22.jpg',
'images/library/23.jpg',
'images/library/24.jpg'];

function start() {
var i1 = new randImg('randimg1',170,128,4,mqAry1);
var i2 = new randImg('randimg2',170,128,10,mqAry1);
//setTimeout(function() {replaceImg(i1)},i1.t);
setTimeout(function() {replaceImg(i2)},i2.t);
}
window.onload = start;

// Random Image Script
// copyright 9th September 2008 by Stephen Chapman
// http://javascript.about.com
// permission to use this Javascript on your web page is granted
// provided that all of the code below in this script (including these
// comments) is used without any alteration
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);}

