allora il codice che uso era questo:
codice:
this[0] = 4;
this[1] = "<a href=\"http://www.link.it\"><img src=\"img\\ciotole_2.gif\" width=600 height=50 border=1 alt=\"Primo banner\"></a>";
this[2] = "<a href=\"http://www.link.it\"><img src=\"img\\ciotole_3.gif\" width=600 height=50 border=1 alt=\"Secondo banner\"></a>";
this[3] = "<a href=\"http://www.link.it\"><img src=\"img\\ciotole_4.gif\" width=600 height=50 border=1 alt=\"Terzo banner\"></a>";
this[4] = "<a href=\"http://www.link.it\"><img src=\"img\\ciotole_5.gif\" width=600 height=50 border=1 alt=\"Quarto banner\"></a>";
}
function popUpBanner(list)
{
var today = new Date();
var choiceInstance = new choices();
var Banner = choiceInstance[(today.getSeconds() % choiceInstance[0]) + 1];
}
function grabBanner()
{
var today = new Date();
var choiceInstance = new choices();
var Banner = choiceInstance[(today.getSeconds() % choiceInstance[0]) + 1];
return Banner;
}
document.writeln(grabBanner());
abbastanza semplice ma da quello che ho capito devo cr5earne uno con il Math.random