// (C) 2003 by CodeLifter.com
// Free for all users, but leave in this header.

var Title = new Array();
var Author = new Array(); 
var Review = new Array(); 
var Reviewer = new Array();
var Picture = new Array();

// BOOKS /////////////////////////////////

//book one
Title[1]  = "An Apple A Day";
Author[1]  = "Joe Schwarcz";
Review[1]  = "A sensible, rational overview of the natural chemistry of what we eat.";
Reviewer[1]  = "BBC Focus (February 2010)";

//book two
Title[2]  = "Classical Music";
Author[2]  = "Julian Johnson";
Review[2]  = "Entirely fresh and highly engaging.";
Reviewer[2]  = "Classic FM - The Magazine (January 2010)";

//book three
Title[3]  = "An Act of Free Choice";
Author[3]  = "Pieter Drooglever";
Review[3]  = "A book for those who want to know about the weight of the weak in the events of the modern world.";
Reviewer[3]  = "Inside Indonesia (January 2010)";

//book four
Title[4]  = "Growing Up bin Laden";
Author[4]  = "Jean Sasson";
Review[4]  = "Fascinating.";
Reviewer[4]  = "Catholic Herald (January 2010)";

//book five
Title[5]  = "Climate Wars";
Author[5]  = "Gwynne Dyer";
Review[5]  = "Terrifying is just one of the words to leap off the page.";
Reviewer[5]  = "The Bookseller (October 2009)";

//book six
Title[6]  = "The Enlightenment Qu'ran";
Author[6]  = "Ziad Elmarsafy";
Review[6]  = "An intelligent book, superbly precise and both meticulously and generously documented.";
Reviewer[6]  = "The Muslim World Book Review (February 2010)";


// =====================================
// Do not edit anything below this line!
// =====================================

for(var j=0;j<Title.length;j++){
	Picture[j] = '';
}

// Set the slideshow speed (in milliseconds)
var SlideShowSpeed = 3000;

// Set the duration of crossfade (in seconds)
var CrossFadeDuration = 2;


var showHot = false;      

var tss;
var iss;
var jss = 0;
var pss = Picture.length-1;

var preLoad = new Array();
for (iss = 1; iss < pss+1; iss++){
preLoad[iss] = new Image();
preLoad[iss].src = Picture[iss];}

function control(how){
if (showHot){
if (how=="H") jss = 1;
if (how=="F") jss = jss + 1;
if (how=="B") jss = jss - 1;
if (jss > (pss)) jss=1;
if (jss < 1) jss = pss;
if (document.all){
document.images.PictureBox.style.filter="blendTrans(duration=2)";
document.images.PictureBox.style.filter="blendTrans(duration=CrossFadeDuration)";
document.images.PictureBox.filters.blendTrans.Apply();}

if (document.getElementById) {
	document.getElementById("TitleBox").innerHTML= Title[jss];
	document.getElementById("AuthorBox").innerHTML= Author[jss];
	document.getElementById("ReviewBox").innerHTML= Review[jss];
	document.getElementById("ReviewerBox").innerHTML= Reviewer[jss];
}

if (document.all) document.images.PictureBox.filters.blendTrans.Play();
}}

function initReviews(){
	if (showHot){
		if (document.all){
			document.images.PictureBox.style.filter="blendTrans(duration=2)";
			document.images.PictureBox.style.filter="blendTrans(duration=CrossFadeDuration)";
			document.images.PictureBox.filters.blendTrans.Apply();
		}
		
		if (document.getElementById) {
			
			start =  ( Math.round((Math.random()*(pss-1))+1) )
			jss = start;

			document.getElementById("TitleBox").innerHTML= Title[start];
			document.getElementById("AuthorBox").innerHTML= Author[start];
			document.getElementById("ReviewBox").innerHTML= Review[start];
			document.getElementById("ReviewerBox").innerHTML= Reviewer[start];
		}

		if (document.all) document.images.PictureBox.filters.blendTrans.Play();
	}
}
