var max=3; // the number of images to be rotated
var thisImx=1; // initially image 1
var imx=new MakeImxArray(max); // create an array of images

function MakeImxArray(n)
	{
	this.length=n;
	for (var i=1; i<=n;i++)
		{
		this[i]="";
		}
	return this;
	}
	
// images to be rotated below
		
imx[1]='<img src="../randch/pic1.jpg" width="797" height="136" alt="" border="0">';

imx[2]='<img src="../randch/pic2.jpg" width="797" height="136" alt="" border="0">';

imx[3]='<img src="../randch/pic3.jpg" width="797" height="136" alt="" border="0">';


// the random number function returns a number 1 to max
function rand(n)
	{
	rnum=Math.floor(n*Math.random())+1
	return rnum;
	}
		

// the function that is called from the body script
function setImx()
	{
	thisImx=rand(max);
	}		
