// (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]  = "The Gendarme";
Author[1]  = "Mark Mustian";
Review[1]  = "Touching and important...an exploration of memory and forgiveness that shouldn't be missed";
Reviewer[1]  = "Bookbag";

//book two
Title[2]  = "You Kant Make it Up!";
Author[2]  = "Gary Hayden";
Review[2]  = "Great for anyone who wants a starting point for delving into philosophy";
Reviewer[2]  = "Bookbag";

//book three
Title[3]  = "Sorry, I'm British!"
Author[3]  = "Ben Crystal, Adam Russ and Ed McLachlan";
Review[3]  = "Clever, witty and unequivocally entertaining";
Reviewer[3]  = "Daily Express";

//book four
Title[4]  = "A Cupboard Full of Coats";
Author[4]  = "Yvvette Edwards";
Review[4]  = "Potent…a painfully believable world.";
Reviewer[4]  = "Metro";

//book five
Title[5]  = "My Beautiful Genome";
Author[5]  = "Lone Frank";
Review[5]  = "A must-read";
Reviewer[5]  = "Bionews";


// =====================================
// 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();
	}
}

