OK, in the function fadeshow(theimages, fadewidth, fadeheight, borderwidth, delay, pause, displayorder) replace:
Code:
if (typeof displayorder!="undefined")
theimages.sort(function() {return 0.5 - Math.random();}) //thanks to Mike (aka Mwinter) :)
this.theimages=theimages
this.imageborder=parseInt(borderwidth)
this.postimages=new Array() //preload images
for (p=0;p<theimages.length;p++){
with:
Code:
if (displayorder && displayorder == 'R')
theimages.sort(function() {return 0.5 - Math.random();}) //thanks to Mike (aka Mwinter) :)
else if (displayorder && displayorder == 'Rs'){
displayorder = Math.floor(Math.random() * theimages.length);
theimages = theimages.slice(displayorder).concat(theimages.slice(0, displayorder));
}
this.theimages=theimages
this.imageborder=parseInt(borderwidth)
this.postimages=new Array() //preload images
for (var p=0;p<theimages.length;p++){
Now, in your on page call, you may still use the original syntax for for random or non - random order, but if you do:
Code:
new fadeshow(fadeimages2, 140, 225, 0, 3000, 0, "Rs")
It will give you a random start point.
Bookmarks