numberOfPortfolioItems = 13;
numberOfMischiefItems = 7;
numberOfForSaleItems = 6;


var clientArray = [];
clientArray[201] = "Warner Bros";
clientArray[202] = "Saturn car company";
clientArray[203] = "Atlanta Opera";
clientArray[204] = "LCI";
clientArray[205] = "Sleeping Bear Press";
clientArray[206] = "Scholastic Publishing";
clientArray[207] = "Sleeping Bear Press";
clientArray[208] = "Meredith Publishing";
clientArray[209] = "Sleeping Bear Press";
clientArray[210] = "Sleeping Bear Press";
clientArray[211] = "Meredith Publishing";
clientArray[212] = "Unpublished";
clientArray[213] = "Sleeping Bear Press";




var descriptionArray = [];

descriptionArray[201] = "<b>Art Director:</b> Tom Gundred / <br /> 30 Sixty Design  <br /> <i>Special thanks to Fred Bode and all his work on the sketches</i><br /> <br /> Creation of 40+ full-color paintings <br />for the merchandising of the movie, <b><i>Harry Potter & the Scorerer's Stone</i></b>";

descriptionArray[202] = "<b>Agency:</B> Hal Riney";

descriptionArray[203] = "<br /> Concept for opera AIDA";

descriptionArray[204] = "<br /> Illustration series for ads for <br /> sports marketing";

descriptionArray[205] = "<b>Art Director:</b> Heather Hughes <br /> <br /> From <b><i>P is for Peach, A Georgia Alphabet</i></b>, art for <i>O is for Okefenokee Swamp</i>";

descriptionArray[206] = "<br /> Cover for <b><i>Cyrano de Bergerac</i></b>";

descriptionArray[207] = "<B>Art Director:</B> Jennifer Lundahl <br /> <br /> From <b><i>T is for Touchdown, a Football Alphabet</i></b>, art for <i>H is for Huddle</i>";

descriptionArray[208] = "<br /> Editorial art for article discussing the family budget";

descriptionArray[209] = "<B>Art Director:</B> Jennifer Lundahl <br /> <br /> From <b><i>Cosmo's Moon</i></b>";

descriptionArray[210] = "<B>Art Director:</B> Melinda Trombley <br /> <br /> From <b><i>Peck of Peaches, A Georgia Numbers Book</i></b>, art for <i>8 sea turtles</i>";

descriptionArray[211] = "<br /> Editorial art for article discussing investment during economically troubled times";

descriptionArray[212] = "<br /> <b><i>Catatonic</i></b>";

descriptionArray[213] = "<B>Art Director:</B> Jennifer Lundahl <br /> <br /> <b><i>T is for Touchdown, A Football Alphabet</i></b>, art for <i>S is for Super bowl</i>";

descriptionArray[401] = "<b><i>T is for Touchdown, a football Alphabet</i></b> <br /> 48 pages <br /> <br /> <a href=http://www.amazon.com/gp/product/1585363375?ie=UTF8&tag=markbraughtst-20&linkCode=as2&camp=1789&creative=9325&creativeASIN=1585363375> Buy the book at Amazon.com</a><br /><br /><a href=7.html>Click here to see and buy <br /><b><i>T is for Touchdown</i></b> merchandise.</a>";

descriptionArray[402] = "<b><i>Cosmo's Moon</i></b> <br /> 48 pages hardcover <br /> <br /> <a href=http://www.amazon.com/gp/product/1585361232?ie=UTF8&tag=markbraughtst-20&linkCode=as2&camp=1789&creative=9325&creativeASIN=1585361232> Buy the book at Amazon.com</a><br /><br /><a href=8.html>Click here to see and buy <br /><b><i>Cosmo's Moon</i></b> merchandise.</a>";

descriptionArray[403] = "<b><i>Orange & Magnolia</i></b> <br /> 24 x 20 lithograph <br /> hand-signed <br />  unframed print  <br /> <br /> $50.00 + shipping <br /> <i>volume discounts available, please call or email for prices </i><br /> <br /> <a href=mailto:markbraught@markbraught.com?subject=Purchase_request_from_a_MarkBraught.com_user> Click here to order</a>";

descriptionArray[404] = "<b><i>A Peck of Peaches, A Georgia Number Book</i></b> <br /> 48 pages hardcover <br /> <br /> <a href=http://www.amazon.com/gp/product/1585361771?ie=UTF8&tag=markbraughtst-20&linkCode=as2&camp=1789&creative=9325&creativeASIN=1585361771> Buy the book at Amazon.com</a>";

descriptionArray[405] = "<b><i>P is for Peach, a Georgia Alphabet</i></b> <br /> 48 pages hardcover <br /> <br /> <a href=http://www.amazon.com/gp/product/1585360465?ie=UTF8&tag=markbraughtst-20&linkCode=as2&camp=1789&creative=9325&creativeASIN=1585360465> Buy the book at Amazon.com</a>";

descriptionArray[406] = "<b><i>J is for Jump Shot, a Basketball Alphabet Book</i></b> <br /> 48 pages hardcover <br /> <br /> <a href=http://www.amazon.com/gp/product/1585362298?ie=UTF8&tag=markbraughtst-20&linkCode=as2&camp=1789&creative=9325&creativeASIN=1585362298> Buy the book at Amazon.com</a>";








function thumbClicked(whichOne) {
	document.getElementById('largeImage').style.background = "url(images/large/" + whichOne + ".jpg)";
	clearThumbUnderlines();		
	document.getElementById('thumb' + whichOne).style.borderBottom = "3px solid black";
	currentPosition = whichOne;
	document.getElementById('description').innerHTML = descriptionArray[currentPosition];
	document.getElementById('client').innerHTML = clientArray[currentPosition];
	}
	
function thumbRollOver(whichOne) {
	if (currentPosition != whichOne) {
		document.getElementById('thumb' + whichOne).style.borderBottom = "3px solid #aeb4ac";
	}
	}
	
function thumbRollOut(whichOne) {
	if (currentPosition != whichOne) {
		document.getElementById('thumb' + whichOne).style.borderBottom = "3px solid white";
	}
	}





function next() {
	currentPosition++;
	if (currentPosition == numberOfPortfolioItems) {
		currentPosition = 201;
		}
	if (currentPosition == numberOfMischiefItems) {
		currentPosition = 301;
		}
	if (currentPosition == numberOfForSaleItems) {
		currentPosition = 401;
		}
	clearThumbUnderlines();
	thumbClicked(currentPosition);
	}

function back() {
	currentPosition--;
	if (currentPosition == 200) {
		currentPosition = numberOfPortfolioItems - 1;
		}
	if (currentPosition == 300) {
		currentPosition = numberOfMischiefItems - 1;
		}
	if (currentPosition == 400) {
		currentPosition = numberOfForSaleItems - 1;
		}
	clearThumbUnderlines();
	thumbClicked(currentPosition);
	}
	






// CLEARS THE UNDERLINES FROM ALL THUMBS

function clearThumbUnderlines() {
	if (currentPosition < 250) {
		for (i=201; i<=217; i++) {
			document.getElementById('thumb' + i).style.borderBottom = "3px solid white";
			};
		}
	else if (currentPosition > 399) {
		for (i=401; i<=417; i++) {
			document.getElementById('thumb' + i).style.borderBottom = "3px solid white";
			};
		}
	else {
		for (i=301; i<=317; i++) {
			document.getElementById('thumb' + i).style.borderBottom = "3px solid white";
			};
		}
		
		}
	
	
	
	
	
// ON LOAD STUFF	
	
	

function drawPortfolioThumbs() {
	currentPosition = 201;
	numberOfPortfolioItems = numberOfPortfolioItems + 201;
	for (i=numberOfPortfolioItems; i<=217; i++) {
		document.getElementById('thumb' + i).style.visibility = "hidden";
	}
}

function drawMischiefThumbs() {
	currentPosition = 301;
	numberOfMischiefItems = numberOfMischiefItems + 301;
	for (i=numberOfMischiefItems; i<=317; i++) {
		document.getElementById('thumb' + i).style.visibility = "hidden";
	}
}

function drawForSaleThumbs() {
	currentPosition = 401;
	numberOfForSaleItems = numberOfForSaleItems + 401;
	for (i=numberOfForSaleItems; i<=417; i++) {
		document.getElementById('thumb' + i).style.visibility = "hidden";
	}
}



	
	
	
// GENERIC IMAGE SWITCHEROO	
	
	
function imageChange(changeThis,toWhat) {
	document.getElementById(changeThis).src = toWhat;
	}
