Sostituisci questa parte:
Codice:
var cur=Math.round(6*Math.random())
if (cur<=1)
backgr=backgr1
else if (cur<=4)
backgr=backgr2
else
backgr=backgr3
document.write('<body background="'+backgr+'" bgcolor="#f0f0f0">')
con
Codice PHP:
var cur=Math.round(5*Math.random())
switch(cur) {
case 1:
backgr = backgr1;
break;
case 2:
backgr = backgr2;
break;
case 3:
backgr = backgr3;
break;
case 4:
backgr = backgr4;
break;
case 5:
backgr = backgr5;
break;
}
document.write('<body background="'+backgr+'" bgcolor="#f0f0f0">');