// JavaScript Document
// Takes a pathNum integer and a numImgs integer (pathNum would be the array index of the path you want and 
// numImgs is the total number of images in the path

function RotateImage(pathNum, numImgs){
// 0 based array of the possible image paths
var imgPathArray = ['/images/random/buildings/', '/images/random/city-scenes/'];
var imgDesc = ['building', 'city scene'];
                
var max = numImgs; // number of images (1 based)
var imgNo = Math.floor(max * Math.random() + 1);

              
document.write('<img src=\"' + imgPathArray[pathNum] + imgNo.toString() + '.jpg\" alt=\"' + imgDesc[pathNum] + '\" title=\"' + imgDesc[pathNum] + '\">');
}