// JavaScript Document

var imagebook = new Array();
imagebook[0] = "images/poetry_book_120.jpg";
imagebook[1] = "images/hernan_cd_jazz_120.jpg";
imagebook[2] = "images/alvin_book_120.jpg";
imagebook[3] = "images/jaye_spirit_life_120.jpg";
imagebook[4] = "images/jaye_spirit_love_120.jpg";

var textbook = new Array();
textbook[0] = "<em>Poetic Spirits of the Valley</em>-an anthology representing 25 years of poetic history in the Fraser Valley....<a href='shop.html'>more info</a>"
textbook[1] = "<em>Trilogia En Cuatro</em> Three passionate Latin poets, (including PPS member Hern&aacute;n Bravo) and one brilliant jazz musician create a magical moment captured on cd...<a href='shop.html'>more info</a>"
textbook[2] = "<em>I Am the Poem</em> by Alvin G. Ens. &quot;I have spent a career in teaching students to dig deeply into the writing and reading pf poetry. In <em>I Am the Poem </em>I give you my inmost thoughts and emotions, often expressed best in poetry.&quot;...<a href='shop.html'>more info</a>"
textbook[3] = "<em>Spirit Of Life</em> by Jaye Low is filled with images of light and nature and presents an intimate journal of a person exploring the mysteries of our existence...<a href='shop.html'>more info</a>"
textbook[4] = "<em>Spirit of Love</em> by Jaye Low is her second book of poetry and continues her honest and moving exploration of the human heart and spirit...<a href='shop.html'>more info</a>"

	document.write('<div class="items" width="140">' + '<img src=' + imagebook[0] + ' style="border:1px solid #CC9966;" />' + '<p class="right">' + textbook[0] + '</p></div>');
//change new Array to however many # of books there are; also must change i<(# of books plus 1) 5 lines down and # times random# 7 lines down, j < 15 --the 15 might increase if many books
			
			var rand = new Array(1,2,3,4);
			var randnum = new Array();
			var j;
			var k;
			for (i=1; i<5; i++) {
				for (j=1; j<15; j++){
					j =  Math.floor(4 * Math.random());
					k = j;
					if (rand[k]== 0) {
						continue;	
					}
					else {	break;}	}	
						randnum[i] = rand[k];	
						rand[k] = 0;
		 		if (i>3) {continue;}
	document.write ('<div class="items" width="140">' +  '<img src=' + imagebook[randnum[i]] + ' style="border:1px solid #CC9966;" />' + '<p class="right">' + textbook[randnum[i]] + '</p></div>');
	
}
