var max=1; // the number of banners to be rotated
var thisBanner=1; // initially banner 1
var banner=new MakeBannerArray(max); // create an array of banners

function MakeBannerArray(n)
	{
	this.length=n;
	for (var i=1; i<=n;i++)
		{
		this[i]="";
		}
	return this;
	}
	
// then populate the array with the banner links and file path	
		
banner[1]='<a href="http://www.knightdalechamber.com/advertising.htm"><img src="images/banners/companylogo_banner_02.gif" width="250" height="80" border="0" alt="Put your company logo here"><\/a>';

// 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 setBanner()
	{
	thisBanner=rand(max);
	}		
