function setColore(cod)
{
	if (cod==2 || cod==9 || cod==1)
		return "dark";
	else
		return "light";
}

for (i = 0; i < p; i++)
{
   preBuffer[i] = new Image();
   preBuffer[i].src = theImages[i];
}
var	whichImage;
var contatore;
var dim="";
function showImage(conta)
{
	document.write('<body background="'+percorso+theImages[conta]+'" class=hdr>');
}
function setEnv()
{
	whichImage = Math.round(Math.random()*(p-1));
	contatore = whichImage;
	dim="";
	if (contatore=="0")
		dim="100%";
	else
		dim="916";
	return contatore;

}
function getFrame()
{
	var cc= setEnv();
	document.write('<IFRAME src="head.htm" width="'+dim+'" height="200" scrolling="no" frameborder="0" name="frame"></IFRAME>');

	return cc;
}