function RndImgs(GalryID){
var Done=''; //stores which indexes are chosen for display
var Min=parseInt(RND[GalryID][1]); //the starting image number
var Max=parseInt(RND[GalryID][2]); //the ending image number
var HowMany=parseInt(RND[GalryID][5]); //how many images to display?
var Indx; //stores some random index
for(var i=0;i<HowMany;i++){ //loop to find out all the indexes
do{
Indx=Math.floor(Math.random()*(Max-Min)); //find some index between 0 and the number of images
}
while(Done.indexOf((Indx+'')+',')>=0) //check if this index is already included in the list
Done=Done+(Indx+'')+','; //include a new index in the list
Indx=Indx+Min; //add the starting image number for the correct image (base is 0)
//print the html
//              tag  alternate text              tooltip                       source = domain + image index + extension               css class
document.write("<img alt=\""+RND[GalryID][6]+"\" title=\""+RND[GalryID][6]+"\" src=\""+RND[GalryID][0]+(Indx + '')+RND[GalryID][3]+"\" class=\""+RND[GalryID][4]+"\" />");}}