var theImages = new Array()

//Random-loading images
theImages[0] = 'vimag/1.jpg' // replace with names of images
theImages[1] = 'vimag/2.jpg' // replace with names of images
theImages[2] = 'vimag/3.jpg' // replace with names of images
theImages[3] = 'vimag/4.jpg' // replace with names of images
theImages[4] = 'vimag/5.jpg' // replace with names of images
theImages[5] = 'vimag/6.jpg' // replace with names of images
theImages[6] = 'vimag/7.jpg' // replace with names of images
theImages[7] = 'vimag/8.jpg' // replace with names of images
theImages[8] = 'vimag/9.jpg' // replace with names of images
theImages[9] = 'vimag/10.jpg' // replace with names of images
theImages[10] = 'vimag/11.jpg' // replace with names of images
theImages[11] = 'vimag/2.bmp' // replace with names of images
theImages[12] = 'vimag/3.bmp' // replace with names of images
theImages[13] = 'vimag/4.bmp' // replace with names of images
theImages[14] = 'vimag/5.bmp' // replace with names of images
theImages[15] = 'vimag/6.bmp' // replace with names of images
theImages[16] = 'vimag/7.bmp' // replace with names of images
theImages[17] = 'vimag/8.bmp' // replace with names of images
theImages[18] = 'vimag/9.bmp' // replace with names of images

function showImage(){
	alert(whichImage + "  - 1");
document.write('<img src="'+theImages[whichImage]+'" border=0><br/><input id="userres" type="text" name="userres" /><br/><input id="imvt" type="hidden" name="imvt" readonly="readonly" value="'+whichImage+'" />');
}

function showImageCon(){
	
	

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));
var whichImage =0;
for(i=0; i<10*p ; i++)
{
whichImage = Math.floor(Math.random()*(p));
}
	
	var imgStr='';
	//alert(whichImage + "  - 2");
	imgStr = '<img src="'+theImages[whichImage]+'" border=0><br/><input id="userres" type="text" name="userres" /><br/><input id="imvt" type="hidden" value="'+whichImage+'" name="imvt" />';
	return imgStr;
}
