// Rotating banner ad
// Edited by YZ - July 2003

var max=6; // the number of banners to be rotated
//var thisBanner=1; // If required, initial first banner 
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="diagrams.php" target="_self"><img src="Top_OBA1.jpg" width="320" border="0" alt="Origami By Al"><\/a>';

banner[2]='<a href="diagrams.php" target="_self"><img src="Top_OBA2.jpg" width="320" border="0" alt="Origami By Al"><\/a>';

banner[3]='<a href="diagrams.php" target="_self"><img src="Top_OBA3.jpg" width="320" border="0" alt="Origami By Al"><\/a>';

banner[4]='<a href="diagrams.php" target="_self"><img src="Top_OBA4.jpg" width="320" border="0" alt="Origami By Al"><\/a>';

banner[5]='<a href="diagrams.php" target="_self"><img src="Top_OBA5.jpg" width="320" border="0" alt="Origami By Al"><\/a>';

banner[6]='<a href="diagrams.php" target="_self"><img src="Top_OBA6.jpg" width="320" border="0" alt="Origami By Al"><\/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);
	}		
	