var theImages = new Array()

theImages[0] = 'images/piatto/piatto0.jpg'
theImages[1] = 'images/piatto/piatto1.jpg'
theImages[2] = 'images/piatto/piatto2.jpg'
theImages[3] = 'images/piatto/piatto3.jpg'
theImages[4] = 'images/piatto/piatto4.jpg'
theImages[5] = 'images/piatto/piatto5.jpg'
theImages[6] = 'images/piatto/piatto6.jpg'
theImages[7] = 'images/piatto/piatto7.jpg'
theImages[8] = 'images/piatto/piatto8.jpg'
theImages[9] = 'images/piatto/piatto9.jpg'
theImages[10] = 'images/piatto/piatto10.jpg'
theImages[11] = 'images/piatto/piatto11.jpg'
theImages[12] = 'images/piatto/piatto12.jpg'
theImages[13] = 'images/piatto/piatto13.jpg'
theImages[14] = 'images/piatto/piatto14.jpg'
theImages[15] = 'images/piatto/piatto15.jpg'
theImages[16] = 'images/piatto/piatto16.jpg'
theImages[17] = 'images/piatto/piatto17.jpg'
theImages[18] = 'images/piatto/piatto18.jpg'
theImages[19] = 'images/piatto/piatto19.jpg'
theImages[20] = 'images/piatto/piatto20.jpg'
theImages[21] = 'images/piatto/piatto21.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]+'">');
}



/*function rnd_image()
	{
   		var now = new Date();
   		var sec_divide = now.getSeconds();
   		rnd_number = Math.floor(sec_divide/3);
   		document.write('<img border="0" src="images/piatto/piatto' + rnd_number +'.jpg" width="322" height="151">');
	}

*/


function apri(nome)
	{
		window.open(nome,'nop','scrollbars=no,resizable=no,title=no,toolbar=no,location=no,menubar=no,status=no,directories=no,width=450,height=500')
	}
function apri_finestra(theURL,winName,features) {
window.open(theURL,winName,features)}
function popup(url,nome,setting)
{
window.open(url,nome,setting)
}