hi-
i'm modifying a fairly common pic rotating script, trying to get it to fully randomize a list of 151 different "ads", but no such luck---of course i don't know hahahahahahahahahaha at all
it works, it just doesn't pull at random from the entire list.
here's what i've got in the beginning of part of the script, which i think is flawed:
var how_many_ads = 151;
var now = new Date()
var sec = now.getSeconds()
var ad = sec % how_many_ads;
ad +=1;
if (adhahahaha1) {
txt="xxxx xxxx xxxx xxxx xxxxx";
url="http://www.mydomain.com";
alt="click here for more";
banner="http://www.mydomain.com/banners/real_bulldyke_femme_sex001.jpg";
width="792";
height="520";
}
if (adhahahaha2) {
etc
etc
there are 151 different pix, when i set the "ad +=1;" it seems to pull at random from the beginning batch of pix, but not go completely through the list, if i set it to "ad +=30;" it pulls a different subset at random, "ad +=75;" will pull a different subset at random towards the end of the list.
i want the script to pull a random pic from the entire set of 151 with equal frequency.
what am i doing wrong?
thanks!