Replace:
Code:
var randomizeimage="yes" //randomize dislay order of images? "yes" or "no"
function shuffleit(){
return Math.floor((Math.random()*fadeimages.length-1))
}
if (randomizeimage=="yes")
fadeimages.sort(shuffleit)
with:
Code:
var randomizeimage="yes" //randomize display order of images? "yes" or "no"
function random(n) {
return Math.floor((Math.random() % 1) * n);
}
Array.prototype.shuffle = function() {var i = this.length;
while(i--) {this.swap(i, random(i + 1));}
};
Array.prototype.swap = function(x, y) {
var t = this[x]; this[x] = this[y]; this[y] = t;
};
if (randomizeimage=="yes")
fadeimages.shuffle()
Bookmarks