var jBeginTime,jEndTime; function jBegin(){ now=new Date(); jBeginTime=now.getTime(); } function jEnd(){ now=new Date(); jEndTime=now.getTime(); } function genImage(start,end) { this.length = end-start+1 for (var i=start ; i<=end ; i++) { this[i] = new Image() } return this }