var theImagesHard = new Array();
theImagesHard[0] = 'images/rotate/hard/1.jpg';
theImagesHard[1] = 'images/rotate/hard/2.jpg';
theImagesHard[2] = 'images/rotate/hard/3.jpg';
theImagesHard[3] = 'images/rotate/hard/4.jpg';
var j = 0;
var p = theImagesHard.length;
var preBufferHard = new Array();
for (i = 0; i < p; i++){
preBufferHard[i] = new Image();
preBufferHard[i].src = theImagesHard[i];
}

var theImagesOS = new Array();
theImagesOS[0] = 'images/rotate/os/1.jpg';
theImagesOS[1] = 'images/rotate/os/2.jpg';
theImagesOS[2] = 'images/rotate/os/3.jpg';
var j = 0;
var p = theImagesOS.length;
var preBufferOS = new Array();
for (i = 0; i < p; i++){
preBufferOS[i] = new Image();
preBufferOS[i].src = theImagesOS[i];
}

var theImagesSoft = new Array();
theImagesSoft[0] = 'images/rotate/soft/1.jpg';
theImagesSoft[1] = 'images/rotate/soft/2.jpg';
theImagesSoft[2] = 'images/rotate/soft/3.jpg';
theImagesSoft[3] = 'images/rotate/soft/4.jpg';
var j = 0;
var p = theImagesSoft.length;
var preBufferSoft = new Array();
for (i = 0; i < p; i++){
preBufferSoft[i] = new Image();
preBufferSoft[i].src = theImagesSoft[i];
}

var whichImageHard = Math.round(Math.random()*(p-1));
var whichImageOS = Math.round(Math.random()*(p-1));
var whichImageSoft = Math.round(Math.random()*(p-1));

function showImageHard(){
document.write('<href="'+theImagesHard[whichImageHard]+'"><img src="'+theImagesHard[whichImageHard]+'" width="145" height="40">');
}
function showImageOS(){
document.write('<href="'+theImagesOS[whichImageOS]+'"><img src="'+theImagesOS[whichImageOS]+'" width="145" height="40">');
}
function showImageSoft(){
document.write('<href="'+theImagesSoft[whichImageSoft]+'"><img src="'+theImagesSoft[whichImageSoft]+'" width="145" height="40">');
}
