var theMotos = new Array()
theMotos[0] = 'images/2.jpg'
theMotos[1] = 'images/2.jpg'
theMotos[2] = 'images/3.jpg'
theMotos[3] = 'images/4.jpg'
theMotos[4] = 'images/5.jpg'
theMotos[5] = 'images/6.jpg'
theMotos[6] = 'images/7.jpg'
theMotos[7] = 'images/8.jpg'
theMotos[8] = 'images/9.jpg'
theMotos[9] = 'images/10.jpg'
theMotos[10] = 'images/11.jpg'
theMotos[11] = 'images/12.jpg'
theMotos[12] = 'images/13.jpg'
theMotos[13] = 'images/14.jpg'
theMotos[14] = 'images/15.jpg'
theMotos[15] = 'images/16.jpg'
theMotos[16] = 'images/17.jpg'
theMotos[17] = 'images/18.jpg'
theMotos[18] = 'images/19.jpg'
theMotos[19] = 'images/20.jpg'
theMotos[20] = 'images/21.jpg'
theMotos[21] = 'images/22.jpg'
theMotos[22] = 'images/23.jpg'
theMotos[23] = 'images/24.jpg'

var j = 0
var p = theMotos.length;

var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theMotos[i]
}

var whichMoto = Math.round(Math.random()*(p-1));
function lol(){
document.write('<img src="'+theMotos[whichMoto]+'">');
}
