// JavaScript Document


/* place a reference to these variables in the head section of the html page
var maxnumber = 11 // this is the number of sub folders available for this view
var maxpics = 5; // this is the number of 
var g_root ='/graphics/homepage/general/' // this is the root foler for the graphic
var ext ='jpg' // this is the extension to use for the picname
var imgname // this is the seed pic name thus pic can then be described as pic1 and pic2 etc or img1 img2
*/

var subfolder= Math.floor(Math.random()*maxnumber)
var vpic =0;



function isEven(num) {
  return !(num % 2);
}


if (maxnumber > 1000) {

if (isEven(subfolder))
{
subfolder=2
}
else
{
subfolder=1}
}

if (subfolder==0)
{
subfolder=maxnumber;
}


function drawimagerail()
{
	
	
for (vpic =0 ; vpic <maxpics; vpic++)
	{
	document.write('<img src="'+g_root+subfolder+'/'+imgname+(vpic+1)+'.'+ext+'"/>')
	}
	
}