var theImages = new Array() 
var theImages2 = new Array() 

theImages[0] = 'zufall/zufall1.jpg'
theImages[1] = 'zufall/zufall2.jpg'
theImages[2] = 'zufall/zufall2.jpg'
theImages[3] = 'zufall/zufall3.jpg'
theImages[4] = 'zufall/zufall3.jpg'
theImages[5] = 'zufall/zufall4.jpg'
theImages[6] = 'zufall/zufall1.jpg'
theImages[7] = 'zufall/zufall1.jpg'

theImages2[0] = 'zufall2/zufall1.jpg'
theImages2[1] = 'zufall2/zufall2.jpg'
theImages2[2] = 'zufall2/zufall3.jpg'
theImages2[3] = 'zufall2/zufall4.jpg'
theImages2[4] = 'zufall2/zufall1.jpg'
theImages2[5] = 'zufall2/zufall2.jpg'
theImages2[6] = 'zufall2/zufall3.jpg'
theImages2[7] = 'zufall2/zufall4.jpg'


var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages[i]
}

var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
document.write('<img src="'+theImages[whichImage]+'">');
}


var whichImage = Math.round(Math.random()*(p-1));
function showImage2(){
document.write('<img src="'+theImages2[whichImage]+'">');
}
