// JavaScript Document

function changePage(currentPage, newPage, newPicture)
{
	var currPageDiv = findObj(currentPage);
	var newPageDiv = findObj(newPage);
	
	currPageDiv.style.visibility = "hidden";
	newPageDiv.style.visibility = "visible";	
	
	changePicture(newPicture);
}

function changePicture(titleText)
{
	var img = findObj("Painting");
	var zoom = findObj("Zoom");
	var zoomV = findObj("ZoomV");	
	var title = findObj("Title");
	var desc = findObj("Description");
	var details = findObj("Details");
	var hMatt = findObj("HorizontalMatt");
	var vMatt = findObj("VerticalMatt");
	var descText, detailsText, sizeText;

	switch(titleText)
	{
		// Apples
		case 'Apples-In-Shadows':
			descText = "Shadows and light create some great shapes in this painting. Who knew apples could be so intriguing!";
			detailsText = "Arches Cold Pressed Paper";
			sizeText = '30" x 22"';
			hMatt.style.visibility = "visible";
			vMatt.style.visibility = "hidden";			
			break;
			
		case 'Red-Delicious':
			descText = "I really love the way this one turned out. I want to grab this red ruby and take a big bite. This is a solid, meaty, beast of an apple.";
			detailsText = "Arches Cold Pressed Paper";
			sizeText = '9" x 10.5"';
			hMatt.style.visibility = "hidden";
			vMatt.style.visibility = "visible";			
			break;
						
		case 'Surrounded':
			descText = "I like the composition in this painting.";
			detailsText = "Arches Rough Paper";
			sizeText = '9" x 7"';
			hMatt.style.visibility = "visible";
			vMatt.style.visibility = "hidden";			
			break;				
			
		// Still Life
		case 'Bowl-of-Cherries':
			descText = "One of the reflections inside of the bowl is Dorcas Moulton, my watercolor instructor who took the picture this painting is based on.";
			detailsText = "Arches Cold Pressed Paper";
			sizeText = '10" x 14"';
			hMatt.style.visibility = "visible";
			vMatt.style.visibility = "hidden";			
			break;
			
		case 'Cup-with-Flower':
			descText = "A birthday card I painted for a friend. The flower in the cup is from a coffee plant.";
			detailsText = "Arches Cold Pressed Paper";
			sizeText = '5" x 7"';
			hMatt.style.visibility = "hidden";
			vMatt.style.visibility = "visible";			
			break;
						
		case 'Globe':
			descText = "As it turns out, the earth is round, as seen here in this painting.";
			detailsText = "Arches Rough Paper";
			sizeText = '10" x 14"';
			hMatt.style.visibility = "hidden";
			vMatt.style.visibility = "visible";			
			break;	
			
		case 'Peach-and-Wine':
			descText = "Based on an exercise we did in <a href='http://www.jimdewitt.com'>Jim DeWitt's</a> art class, I did this painting over again at home. It's my first painting that uses both watercolor and gouache. I think I like how this one turned out.";
			detailsText = "Arches Rough Paper";
			sizeText = '10" x 14"';
			hMatt.style.visibility = "hidden";
			vMatt.style.visibility = "visible";			
			break;				
			
		// Flowers, Fruit & Leaves
		case 'Black-Berries':
			descText = "Joanne and I were walking in a state park on Long Island and I saw these black-purpleish looking berries. We didn't eat any.";
			detailsText = "Arches Cold Pressed Paper";
			sizeText = '10" x 14"';
			hMatt.style.visibility = "hidden";
			vMatt.style.visibility = "visible";
			break;
			
		case 'Fall-Leafs':
			descText = "This painting was a free-for-all! I started throwing and splattering color everywhere and then, when it was dry, I went back in and painted the dark blue to create the shapes of the leaves.";
			detailsText = "Arches Cold Pressed Paper";
			sizeText = '10" x 14"';
			hMatt.style.visibility = "visible";
			vMatt.style.visibility = "hidden";
			break;			
			
		case 'Oranges':
			descText = "I worked hard trying to make the oranges in the center really pop out of the painting.";
			detailsText = "Arches Cold Pressed Paper";
			sizeText = '10" x 14"';
			hMatt.style.visibility = "visible";
			vMatt.style.visibility = "hidden";
			break;			
			
		case 'Close-Up-of-Purple-Flower':
			descText = "This is a birthday card I painted for my Grandmother. I'm not sure if she knew I painted it though, but hopefully it made her smile.";
			detailsText = "Arches Cold Pressed Paper";
			sizeText = '5" x 7"';
			hMatt.style.visibility = "visible";
			vMatt.style.visibility = "hidden";
			break;			
			
		case 'Vinca':
			descText = "Close-ups of flowers are beautiful, portraying in some way the elegance of our loving creator.";
			detailsText = "Arches Cold Pressed Paper";
			sizeText = '6" x 6"';
			hMatt.style.visibility = "hidden";
			vMatt.style.visibility = "visible";
			break;
			
		case 'Poinsetta-with-Ornament':
			descText = "I did this painting for a raffle at The Creek's (my church) Christmas party. To me it revelas that only God brings true meaning to my own traditions, to the holidays we all celebrate.";
			detailsText = "Arches Cold Pressed Paper";
			sizeText = '5" x 7"';
			hMatt.style.visibility = "hidden";
			vMatt.style.visibility = "visible";
			break;
			
		case 'Oak-Leaf':
			descText = "I picked up this oak leaf when I went hiking last year. I finished the drawing right away but did not decide to make it into a watercolor painting until recently.";
			detailsText = "Arches Cold Pressed Paper";
			sizeText = '5" x 7"';
			hMatt.style.visibility = "visible";
			vMatt.style.visibility = "hidden";
			break;
			
		case 'Dahlia':
			descText = "This is a painting I did on location in Dorcas Moulton's garden. The magenta dahlia was amazingly bright against her house.";
			detailsText = "Arches Cold Pressed Paper";
			sizeText = '12" x 16"';
			hMatt.style.visibility = "visible";
			vMatt.style.visibility = "hidden";
			break;

		case 'Waterlilly':
			descText = "The truth is in the shadows.";
			detailsText = "Arches Cold Pressed Paper";
			sizeText = '22" x 30"';
			hMatt.style.visibility = "visible";
			vMatt.style.visibility = "hidden";
			break;
			
		// Landscapes
		case 'Harvesting-Gourds':
			descText = "Based on the Sargent study that I did (see the previous painting), I tried to use the same color palette and similar, loose style (the water) for this painting. It was a lot of fun.";
			detailsText = "Arches Cold Pressed Paper";
			sizeText = '9" x 12"';
			hMatt.style.visibility = "visible";
			vMatt.style.visibility = "hidden";			
			break;										
			
		case 'Red-Lighthouse':
			descText = "I wanted to try my hand at a lighthouse painting and saw this one in a photograph. After taking some liberties with some of the details, I created a landscape around it. Even though the lighthouse seems to be the focus, it's the sky that really jumps out at me.";
			detailsText = "Arches Cold Pressed Paper";
			sizeText = '12" x 16"';
			hMatt.style.visibility = "visible";
			vMatt.style.visibility = "hidden";			
			break;
			
		case 'Trees-and-Shadows':
			descText = "Wow … this painting took me over 2 years to complete (not all at once).";
			detailsText = "Arches Cold Pressed Paper";
			sizeText = '10" x 14"';
			hMatt.style.visibility = "visible";
			vMatt.style.visibility = "hidden";
			break;			
			
		case 'Waterfall':
			descText = "For what it's worth, I really dig the rocks in this painting.";
			detailsText = "Arches Cold Pressed Paper";
			sizeText = '10" x 14"';
			hMatt.style.visibility = "hidden";
			vMatt.style.visibility = "visible";
			break;			
			
		case 'Briones':
			descText = "This is my first work on Fredrix Watercolor Canvas. Who would have thought … watercolor on canvas! I've only painted once on it, but so far I like it.";
			detailsText = "Fredrix Watercolor Canvas";
			sizeText = '9" x 12"';
			hMatt.style.visibility = "visible";
			vMatt.style.visibility = "hidden";
			break;			
			
		case 'Grand-Canyon':
			descText = "Trying to paint the rocks on the canyon walls were impossible! In the end, the painting has a certain mood that I like.";
			detailsText = "Arches Cold Pressed Paper";
			sizeText = '10" x 14"';
			hMatt.style.visibility = "hidden";
			vMatt.style.visibility = "visible";
			break;
			
		case 'Indiana-Fall':
			descText = "My only painting so far made up almost entirely of big dots or globs of watercolor paint.";
			detailsText = "Arches Cold Pressed Paper";
			sizeText = '10" x 14"';
			hMatt.style.visibility = "visible";
			vMatt.style.visibility = "hidden";
			break;
		
		// Skies
		case 'Home-Sweet-Sunset':
			descText = "On the way home from work this sunset over the San Francisco Bay inspired me.";
			detailsText = "Arches Cold Pressed Paper";
			sizeText = '9" x 12"';
			hMatt.style.visibility = "visible";
			vMatt.style.visibility = "hidden";
			break;			
			
		case 'Sunset-60':
			descText = "A birthday card for Wayne Hofer's 60th. When I think of Wayne I'm impressed by all that God has done for him, just as I am always in awe of what God does in the skies.";
			detailsText = "Arches Cold Pressed Paper";
			sizeText = '5" x 7"';
			hMatt.style.visibility = "visible";
			vMatt.style.visibility = "hidden";
			break;			
			
		case 'Big-Sky-1':
			descText = "Hopefully the beginning of paintings to honor the maker of the skies.";
			detailsText = "Fredrix Watercolor Canvas";
			sizeText = '6" x 16"';
			hMatt.style.visibility = "visible";
			vMatt.style.visibility = "hidden";
			break;			
			
		case 'San-Juan-Island':
			descText = "Inspired from a trip to San Juan Island, I wanted to capture the majesty of the sky and the contrast of the land and sea.";
			detailsText = "Arches Cold Pressed Paper";
			sizeText = '22" x 30"';
			hMatt.style.visibility = "visible";
			vMatt.style.visibility = "hidden";
			break;
			
		case 'Rev-4-8':
			descText = "Day and night they never stopped saying, ''Holy, holy, holy is the Lord God Almighty, who was, and is, and is to come.''";
			detailsText = "Arches Cold Pressed Paper";
			sizeText = '4" x 10"';
			hMatt.style.visibility = "visible";
			vMatt.style.visibility = "hidden";
			break;

		case 'Red-Sunset':
			descText = "I love the time of night when the sun starts to go down and the trees turn black with shadow.";
			detailsText = "Arches Cold Pressed Paper";
			sizeText = '9" x 12"';
			hMatt.style.visibility = "visible";
			vMatt.style.visibility = "hidden";
			break;		
			
		// Studies
		case 'Shiny-Pot-with-Fabric':
			descText = "This was an exercise from <a href='http://www.jimdewitt.com'>Jim DeWitt's</a> class in value: light, medium, and dark. I painted what I saw and wouldn't you know it, it actually looks like a shiny pot!";
			detailsText = "Arches Cold Pressed Paper";
			sizeText = '9" x 12"';
			hMatt.style.visibility = "visible";
			vMatt.style.visibility = "hidden";			
			break;				
			
		case 'Landscape-in-Black-and-White':
			descText = "Delicate leaves, atmosphere ... what more could you ask for.  :-)";
			detailsText = "Arches Cold Pressed Paper";
			sizeText = '10" x 14"';
			hMatt.style.visibility = "visible";
			vMatt.style.visibility = "hidden";
			break;				
			
		case 'Gourd-Study':
			descText = "This is a study of a master's work: <a href='http://www.jssgallery.org/'>John Singer Sargent</a>. In a class I'm taking, I cropped Sargent's <a href='http://www.jssgallery.org/Paintings/10245.html'>'Gourds'</a> painting and did this work. Take a look at the <a href='images/paintings/large/Gourd-Study-Test-Paper.jpg'>test paper</a> I used to match the colors of the original.";
			detailsText = "Arches Rough Paper";
			sizeText = '9" x 12"';
			hMatt.style.visibility = "visible";
			vMatt.style.visibility = "hidden";
			break;							
	}

	// Setup painting and details
	img.src = "images/paintings/standard/" + titleText + ".jpg";
	zoomV.href = zoom.href = "images/paintings/large/" + titleText + ".jpg";
	title.innerHTML = replaceCharacters(titleText,'-',' ');
	desc.innerHTML = descText;
	details.innerHTML = '<br />' + detailsText + '<br />' + sizeText + '<br />';
}