﻿function HomeLargePhoto(){
	fPickImageReturn = pickImage();
	// print picture title and caption
	document.write('<a href="current_exhibition.htm"><IMG ID="HOMEIMG" SRC="');
	document.write(fPickImageReturn[0]);
	document.write('" border="0"></a>');
	document.write('</p>');
	document.write('<p ID="HOMECAPTION" style="color: #262626; font-family: Arial; font-size: 11px;">');
	document.write('');
	document.write(fPickImageReturn[1]);
	setTimeout("swapHomeImage()",fPickImageReturn[2]);
}

function swapHomeImage() {
	fPickImageReturn = pickImage();
	
	document.getElementById("HOMEIMG").src = fPickImageReturn[0];
	document.getElementById("HOMECAPTION").innerHTML = fPickImageReturn[1];
	
	setTimeout("swapHomeImage()", fPickImageReturn[2]);
}

function pickImage() {	

	var fPickImageReturn = new Array();
	fPickImageReturn[0] = "";
	fPickImageReturn[1] = "";

	// declare variables
	var lgpic=new Array;
	var caption=new Array;
	var idx;
	// picture list
	lgpic[0] = "http://www.loyno.edu/dibollgallery/photos/loyola-university-new-orleans-image-SGCI-artist-Connors.jpg";
	caption[0]= "Southern Graphics Council International Juried Membership Show <a href='current_exhibition.htm'>more</a>";
	/**
	lgpic[0] = "rotator/ba-student-work.jpg";
	caption[0]= "2011 BFA-BA-Graphic Design Senior Shows - March 31 - May 15, 2011 <a href='current_exhibition.htm'>more</a>";
	lgpic[1] = "rotator/bfa-garcia.jpg";
	caption[1]= "2011 BFA-BA-Graphic Design Senior Shows - March 31 - May 15, 2011 <a href='current_exhibition.htm'>more</a>";
	lgpic[2] = "rotator/bfa-roberts.jpg";
	caption[2]= "2011 BFA-BA-Graphic Design Senior Shows - March 31 - May 15, 2011 <a href='current_exhibition.htm'>more</a>";
	lgpic[3] = "rotator/bfa-snitkin.jpg";
	caption[3]= "2011 BFA-BA-Graphic Design Senior Shows - March 31 - May 15, 2011 <a href='current_exhibition.htm'>more</a>";
	lgpic[4] = "rotator/bfa-torres.jpg";
	caption[4]= "2011 BFA-BA-Graphic Design Senior Shows - March 31 - May 15, 2011 <a href='current_exhibition.htm'>more</a>";
	lgpic[5] = "rotator/graphic-jamama.jpg";
	caption[5]= "2011 BFA-BA-Graphic Design Senior Shows - March 31 - May 15, 2011 <a href='current_exhibition.htm'>more</a>";
	lgpic[6] = "rotator/graphic-quiet-extinguisher.jpg";
	caption[6]= "2011 BFA-BA-Graphic Design Senior Shows - March 31 - May 15, 2011 <a href='current_exhibition.htm'>more</a>";
	lgpic[7] = "rotator/graphic-woods.jpg";
	caption[7]= "2011 BFA-BA-Graphic Design Senior Shows - March 31 - May 15, 2011 <a href='current_exhibition.htm'>more</a>";
	/**lgpic[5] = "rotator/tom-strider-3.jpg";
	caption[5]= "'COUPLES,' by Carol Leake and 'WONDERLAND,' by Tom Strider <a href='current_exhibition.htm'>more</a>";
	
	/**
	lgpic[0] = "rotator/bag-lady-baquet.jpg";
	caption[0]= "In the Blink of an Eye: a retrospective by photographer Harold Baquet - Opening Feb. 3 <a href='current_exhibition.htm'>more</a>";
	lgpic[1] = "rotator/grandfather-baquet.jpg";
	caption[1]= "In the Blink of an Eye: a retrospective by photographer Harold Baquet - Opening Feb. 3 <a href='current_exhibition.htm'>more</a>";
	lgpic[2] = "rotator/pepin-nicholas-baquet.jpg";
	caption[2]= "In the Blink of an Eye: a retrospective by photographer Harold Baquet - Opening Feb. 3 <a href='current_exhibition.htm'>more</a>";
	lgpic[3] = "rotator/sr-rose-baquet.jpg";
	caption[3]= "In the Blink of an Eye: a retrospective by photographer Harold Baquet - Opening Feb. 3 <a href='current_exhibition.htm'>more</a>";
	lgpic[4] = "rotator/wonder-baquet.jpg";
	caption[4]= "In the Blink of an Eye: a retrospective by photographer Harold Baquet - Opening Feb. 3 <a href='current_exhibition.htm'>more</a>";
	/**lgpic[5] = "rotator/tom-strider-3.jpg";
	caption[5]= "'COUPLES,' by Carol Leake and 'WONDERLAND,' by Tom Strider <a href='current_exhibition.htm'>more</a>";
	*/
// caption list
	// find random picture
	idx = Math.round(Math.random() * 150 * caption.length) % caption.length;
		
	fPickImageReturn[0] = lgpic[idx];
	fPickImageReturn[1] = caption[idx];
	fPickImageReturn[2] = caption[idx].length * 50;
	
	return fPickImageReturn	;
}
