//whsimages.js
//JavaScript to randomly select an image when the page loads.
//Images are stored in the images/mainphotos directory and named main1, main2, etc...
//Image file names must not skip numbers and the number of files should be entered as
// var numGraphics = #.

var numGraphics = 10;	// <=== Adjust the number of image files here

function randomPic() {
  var r = Math.random();
  r = Math.floor(numGraphics * r) + 1;
  var theTag = '<img src="images/mainphotos/main' + r + '.jpg" width="500" height="280" alt="Welcome to Winton Health Services">';
  document.write(theTag);
}