//The following is used to rotate the pics
posterArray = new array(10);
var image;
var width;
var height;
var alt;
var link;
var pic;

function choosePic()
{
var how_many_pics = 8;
pic = Math.floor(Math.random()*how_many_pics);


pic +=1;

if (pic==1)
{
	image="http://images.allposters.com/images/152/matrix2_neo_a.jpg";
	width="70";	
	height="115";
	alt="The Matrix Reloaded - Neo";
	link="http://affiliates.allposters.com/link/redirect.asp?aid=393916&item=379120";
}
if (pic==2)
{
	image="http://images.allposters.com/images/152/matrix2_persephone_a.jpg";
	width="77";	
	height="115";
	alt="The Matrix Reloaded - Persephone";
	link="http://affiliates.allposters.com/link/redirect.asp?aid=393916&item=379124";
}
if (pic==3)
{
	image="http://images.allposters.com/images/152/3705matrix_a.jpg";
	width="77";	
	height="115";
	alt="The Matrix Reloaded";
	link="http://affiliates.allposters.com/link/redirect.asp?aid=393916&item=386732";
}
if (pic==4)
{
	image="http://images.allposters.com/images/152/matrix2_morpheus_a.jpg";
	width="77";	
	height="115";
	alt="The Matrix Reloaded - Morpheus";
	link="http://affiliates.allposters.com/link/redirect.asp?aid=393916&item=379123";
}
if (pic==5)
{
	image="http://images.allposters.com/images/152/matrix2_twins_a.jpg";
	width="81";	
	height="115";
	alt="The Matrix Reloaded - Twins";
	link="http://affiliates.allposters.com/link/redirect.asp?aid=393916&item=379126";
}
if (pic==6)
{
	image="http://images.allposters.com/images/152/matrix2_trinity_a.jpg";
	width="70";	
	height="115";
	alt="The Matrix Reloaded - Trinity";
	link="http://affiliates.allposters.com/link/redirect.asp?aid=393916&item=379121";
}
if (pic==7)
{
	image="http://images.allposters.com/images/152/matrix2_smith_a.jpg";
	width="70";	
	height="115";
	alt="The Matrix Reloaded - Agent Smith";
	link="http://affiliates.allposters.com/link/redirect.asp?aid=393916&item=379125";
}
if (pic==8)
{
	image="http://images.allposters.com/images/152/matrix2_niobe_a.jpg";
	width="69";	
	height="115";
	alt="The Matrix Reloaded - Niobe";
	link="http://affiliates.allposters.com/link/redirect.asp?aid=393916&item=379122";
}

}



function getPoster(num)
{

	choosePic();
	for (j=0;j<num;j++)
	{

		while(pic==posterArray[j])
		{
			
			choosePic();
			j=0;

		}
	
	}
	posterArray[num]=pic;



	//End image rotation

	document.write("<a href=\""+ link + "\" target=\"_top\">");
	document.write("<img id=\"poster"+ num +"\" src=\"" + image + "\" width=\"" + width + "\" height=\"" + height + "\" alt=\"" + alt + "\" border=\"0\" />");
	document.write("</a><span =\"font-size: 1pt; font-family: verdana, helvetica,arial;\"><br />" + alt + "<br />");
	document.write("<a href=\""+ link + "\" target=\"_top\">Buy This Poster At AllPosters.com</a></span><br /><br />");

}

function getXPosters(x)
{
	for(i=0;i<x;i++)
	{
		getPoster(i);
	}
}

function array(n) { 
	this.length = n; 
	for (i = 1; i <= n; i++)
	{
		this[i] = 0;
	}
	return this;
}