Can anyone please help me with this javascript code.. I had a person design it and the problem is that I have to add in the images names when I want to add them into the image rotation. Isn't there a way to say rotate all images in this folder? Instead of image name, image name, etc.??? I would appreciate greatly any help on this.. Below is the persons rotating script that was made for me. I'm really new to this javascript stuff, so please go easy on me.
//<script language="JavaScript">
function LoadImg() {
var n=0;
var a=null;
var imgs = new Array();
/* enter list of image locations below */
var locs = ["img/r_img/img001", "img/r_img/img002", "img/r_img/img003", "img/r_img/img004", "img/r_img/img005", "img/r_img/img006", "img/r_img/img007", "img/r_img/img008", "img/r_img/img009", "img/r_img/img010"];
n = locs.length;
n = Math.floor(Math.random() * n);
document.img1.src=locs[n] + "_01.jpg";
//document.img2.src=locs[n] + "_02.jpg";
}
//<script language="JavaScript">
function LoadImg() {
var n=0;
var a=null;
var imgs = new Array();
/* enter list of image locations below */
var locs = ["img/r_img/img001", "img/r_img/img002", "img/r_img/img003", "img/r_img/img004", "img/r_img/img005", "img/r_img/img006", "img/r_img/img007", "img/r_img/img008", "img/r_img/img009", "img/r_img/img010"];
n = locs.length;
n = Math.floor(Math.random() * n);
document.img1.src=locs[n] + "_01.jpg";
//document.img2.src=locs[n] + "_02.jpg";
}