// Main Photo Galleries
//---------------------

var myMainGalleryTitles=new Array();
myMainGalleryTitles[0]="Recent Work";
myMainGalleryTitles[1]="Personal Favorites";
myMainGalleryTitles[2]="Southern California";
myMainGalleryTitles[3]="The Sierra Nevada";
myMainGalleryTitles[4]="Sand and Stones";
myMainGalleryTitles[5]="Singles";

var myMainGalleryPages=new Array();
myMainGalleryPages[0]="recent";
myMainGalleryPages[1]="favorites";
myMainGalleryPages[2]="southcal";
myMainGalleryPages[3]="sierras";
myMainGalleryPages[4]="sandandstones";
myMainGalleryPages[5]="singles";

var myMainGalleryThumbs=new Array();
myMainGalleryThumbs[0]="5d2_10843small";
myMainGalleryThumbs[1]="5d2_7830small";
myMainGalleryThumbs[2]="5d2_7613small";
myMainGalleryThumbs[3]="5d2_4197small";
myMainGalleryThumbs[4]="35_SandStones2small";
myMainGalleryThumbs[5]="20d_1665small";

// Recent Photos
//--------------

var RecentGalleryTitles=new Array();
RecentGalleryTitles[0]="Swami's Sunset";
RecentGalleryTitles[1]="Burning Horizon";
RecentGalleryTitles[2]="Mystic Coast";
RecentGalleryTitles[3]="Bioluminescent";
RecentGalleryTitles[4]="Palisades Afterglow";
RecentGalleryTitles[5]="Lower Dusy Morning";
RecentGalleryTitles[6]="Lower Dusy Evening";
RecentGalleryTitles[7]="Pine at Long Lake";
RecentGalleryTitles[8]="Potholes in Surf";


var RecentGalleryPages =new Array();
RecentGalleryPages[0]= "5d2_10843";
RecentGalleryPages[1]= "5d2_10163";
RecentGalleryPages[2]= "5d2_10152";
RecentGalleryPages[3]= "5d2_10116";
RecentGalleryPages[4]= "5d2_9923";
RecentGalleryPages[5]= "5d2_9764";
RecentGalleryPages[6]= "5d2_9694";
RecentGalleryPages[7]= "5d2_9673";
RecentGalleryPages[8]= "5d2_7830";


numimages = RecentGalleryPages.length;
var RecentGalleryThumbs=new Array();
for (i=0;i<=numimages-1;i++)
{
	RecentGalleryThumbs[i] = RecentGalleryPages[i]+"small";	
}

// Sierra Nevada Photos
//---------------------

var SierraGalleryTitles=new Array();
SierraGalleryTitles[0]="Illuminated Island";
SierraGalleryTitles[1]="Gem";
SierraGalleryTitles[9]="Junipers";
SierraGalleryTitles[3]="Lake's Edge";
SierraGalleryTitles[2]="Upper Young Lake";
SierraGalleryTitles[5]="Dogwoods";
SierraGalleryTitles[11]="Backlight";
SierraGalleryTitles[4]="Cook's Meadow";
SierraGalleryTitles[8]="Palisades Afterglow";
SierraGalleryTitles[7]="Lower Dusy Morning";
SierraGalleryTitles[10]="Lower Dusy Evening";
SierraGalleryTitles[6]="Pine at Long Lake";

var SierraGalleryPages = new Array();
SierraGalleryPages[0]="5d2_4197";
SierraGalleryPages[1]="5d2_4613";
SierraGalleryPages[9]="20d_0272";
SierraGalleryPages[3]="5d2_4127";
SierraGalleryPages[2]="5d2_4005";
SierraGalleryPages[5]="5d2_0631";
SierraGalleryPages[11]="5d2_0596";
SierraGalleryPages[4]="5d2_0577";
SierraGalleryPages[8]="5d2_9923";
SierraGalleryPages[7]= "5d2_9764";
SierraGalleryPages[10]= "5d2_9694";
SierraGalleryPages[6]= "5d2_9673";

numimages = SierraGalleryPages.length;
var SierraGalleryThumbs = new Array();
for (i=0;i<=numimages-1;i++)
{
	SierraGalleryThumbs[i] = SierraGalleryPages[i]+"small";	
}

// Sand and Stones Portfolio
//--------------------------
var SandStonesGalleryTitles=new Array();
SandStonesGalleryTitles[0]="Evening Textures";
SandStonesGalleryTitles[1]="Golden Glow";
SandStonesGalleryTitles[2]="Diffused Light";
SandStonesGalleryTitles[3]="Twilight Blues";
SandStonesGalleryTitles[4]="Reflections of Red";
SandStonesGalleryTitles[5]="Brilliant Reflection";
SandStonesGalleryTitles[6]="Last Light";

var SandStonesGalleryPages = new Array();
SandStonesGalleryPages[0]="35_SandStones2";
SandStonesGalleryPages[1]="35_SandStones7";
SandStonesGalleryPages[2]="35_SandStones6";
SandStonesGalleryPages[3]="35_SandStones5";
SandStonesGalleryPages[4]="35_SandStones4";
SandStonesGalleryPages[5]="35_SandStones3";
SandStonesGalleryPages[6]="35_SandStones";

numimages = SandStonesGalleryPages.length;
var SandStonesGalleryThumbs = new Array();
for (i=0;i<=numimages-1;i++)
{
	SandStonesGalleryThumbs[i] = SandStonesGalleryPages[i]+"small";	
}

// Singles
//--------

var SinglesGalleryTitles= new Array();
SinglesGalleryTitles[0]="Blue Morning";
SinglesGalleryTitles[1]="Sunrise from the Summit";
SinglesGalleryTitles[2]="Rainforest Waterfalls";
SinglesGalleryTitles[3]="Columbia River Gorge";
SinglesGalleryTitles[4]="Portuguese Beach";
SinglesGalleryTitles[5]="The Dallas Divide";
SinglesGalleryTitles[6]="Cottonwood Reflections";
SinglesGalleryTitles[7]="Cabin in Fall";
SinglesGalleryTitles[8]="Rural Road";
SinglesGalleryTitles[9]="Koki Beach";
SinglesGalleryTitles[10]="Kalalau Valley";

var SinglesGalleryPages = new Array();
SinglesGalleryPages[0]="35_RubyBeach"; 
SinglesGalleryPages[1]="35_Haleakala"; 
SinglesGalleryPages[2]="20d_1665"; 
SinglesGalleryPages[3]="20d_1635"; 
SinglesGalleryPages[4]="20d_1531"; 
SinglesGalleryPages[5]="20d_0561"; 
SinglesGalleryPages[6]="20d_0516"; 
SinglesGalleryPages[7]="20d_0505"; 
SinglesGalleryPages[8]="20d_0152"; 
SinglesGalleryPages[9]="20d_0031";
SinglesGalleryPages[10]="5d2_7350";

numimages = SinglesGalleryPages.length;
var SinglesGalleryThumbs = new Array();
for (i=0;i<=numimages-1;i++)
{
	SinglesGalleryThumbs[i] = SinglesGalleryPages[i]+"small";	
}

// Favorite Images
//----------------

var FavoriteGalleryTitles=new Array();
FavoriteGalleryTitles[0]="Oaks and Shadows";
FavoriteGalleryTitles[1]="Approaching Storm";
FavoriteGalleryTitles[2]="Illuminated Island";
FavoriteGalleryTitles[3]="Gem";
FavoriteGalleryTitles[4]="Sunset Streaks";
FavoriteGalleryTitles[5]="Cook's Meadow";
FavoriteGalleryTitles[6]="Potholes in Surf";
FavoriteGalleryTitles[7]="Hospitals Reef";
FavoriteGalleryTitles[8]="Brilliant Reflection";

var FavoriteGalleryPages = new Array();
FavoriteGalleryPages[0]="35_OaksShadows";  
FavoriteGalleryPages[1]="5d2_7613";
FavoriteGalleryPages[2]="5d2_4197";
FavoriteGalleryPages[3]="5d2_4613";
FavoriteGalleryPages[4]="5d2_5073";
FavoriteGalleryPages[5]="5d2_0577";
FavoriteGalleryPages[6]="5d2_7830";
FavoriteGalleryPages[7]="20d_2534";
FavoriteGalleryPages[8]="35_SandStones3";

numimages = FavoriteGalleryPages.length;
var FavoriteGalleryThumbs = new Array();
for (i=0;i<=numimages-1;i++)
{
	FavoriteGalleryThumbs[i] = FavoriteGalleryPages[i]+"small";	
}

// Southern California Images
//---------------------------
var SoCalGalleryTitles=new Array();
SoCalGalleryTitles[0]="Sunset Reflections";       
SoCalGalleryTitles[11]="Clearing Storm";
SoCalGalleryTitles[2]="Evening Surf";
SoCalGalleryTitles[6]="Hospitals Reef";
SoCalGalleryTitles[4]="Potholes in Surf";
SoCalGalleryTitles[15]="Approaching Storm";
SoCalGalleryTitles[3]="Reflections";
SoCalGalleryTitles[8]="Sunset Streaks";
SoCalGalleryTitles[18]="Rocks at Sunset";
SoCalGalleryTitles[10]="Sunset Wave";
SoCalGalleryTitles[1]="Wave and Sunlight";
SoCalGalleryTitles[16]="The End";
SoCalGalleryTitles[13]="End of October";
SoCalGalleryTitles[14]="Broken Hill II";
SoCalGalleryTitles[5]="Broken Hill I";
SoCalGalleryTitles[12]="Sunset Surf";
SoCalGalleryTitles[7]="Burned Forest";
SoCalGalleryTitles[9]="North Algodones Dunes";
SoCalGalleryTitles[17]="Ocean Rain";

var SoCalGalleryPages =  new Array();
SoCalGalleryPages[0]="35_SunsetRefl";
SoCalGalleryPages[11]="35_ClearingStorm";
SoCalGalleryPages[2]="20d_3261";
SoCalGalleryPages[6]="20d_2534";
SoCalGalleryPages[4]="5d2_7830";
SoCalGalleryPages[15]="5d2_7613";
SoCalGalleryPages[3]="5d2_6401";
SoCalGalleryPages[8]="5d2_5073";
SoCalGalleryPages[18]="5d2_4797";
SoCalGalleryPages[10]="5d2_3823";
SoCalGalleryPages[1]="5d2_3596";
SoCalGalleryPages[16]="5d2_1865";
SoCalGalleryPages[13]="5d2_1460";
SoCalGalleryPages[14]="5d2_0788";
SoCalGalleryPages[5]="5d2_0763";
SoCalGalleryPages[12]="5d2_0685";
SoCalGalleryPages[7]="5d2_0243";
SoCalGalleryPages[9]="5d2_0080";
SoCalGalleryPages[17]="5d2_7592";

numimages = SoCalGalleryPages.length;
var SoCalGalleryThumbs = new Array();
for (i=0;i<=numimages-1;i++)
{
	SoCalGalleryThumbs[i] = SoCalGalleryPages[i]+"small";	
}


// Write the top of each html page
//--------------------------------

function header()
{
	document.write('<table class=\"topofpage\" width=\"100%\">');
	document.write('<tr>');
	document.write('<td><img src=\"myname.png\" alt=\"William Scott Lawson\" /></td></tr><tr>');
	document.write('<td><a href=\"http://www.williamscottlawson.com/index.html\"> Images </a> &nbsp;|&nbsp; ');
	//document.write('<a href=\"http://www.williamscottlawson.com/videos.html\"> Videos </a> &nbsp;|&nbsp; ');
	//document.write('<a href=\"http://www.williamscottlawson.com/prints.html\"> Prints </a> &nbsp;|&nbsp; ');
	document.write('<a href=\"http://www.williamscottlawson.com/about.html\"> About </a> &nbsp;|&nbsp; ');
	document.write('<a href=\"http://williamscottlawson.wordpress.com/\"> Blog </a>');
	document.write('</td>');
	document.write('</tr>');
	document.write('</table><br />');
}

// write the bottom of each html page
//-----------------------------------

function footer()
{
	document.write('<table class=\"bottomofpage\" width=\"100%\">');
	document.write('<tr>');
	document.write('<td>');
	document.write('&#169; William Scott Lawson. All Rights Reserved.</td>');
	document.write('</tr>');
	document.write('</table>');
}

// function for making an image gallery
//-------------------------------------

function imagegalleries(myImageGalleryTitles,myImageGalleryPages,myImageGalleryThumbs,level)
{
	var numImageGalleries = myImageGalleryTitles.length;
	var numThumbsPerRow = 3;
	var counter = 0;
	var i=0;
	document.write('<table class=\"maingallery\">');
	for (i=0;i<=numImageGalleries-1;i++)
	{
		counter = counter + 1;
		if ( counter == 1 )
		{
			document.write('<tr>');
		}	

		htmlfile = myImageGalleryPages[i]+".html";
		imgfile  = myImageGalleryThumbs[i]+".jpg";
		document.write('<td>');
		if ( level == 0 )
		{
			document.write('<a href=\"');
		}
		if ( level == 1 )
		{
			document.write('<a href=\"html_images/');
		}
		document.write(htmlfile);
		document.write('\">');
		document.write('<img class=\"thumb\" src=\"jpegs_small/');
		document.write(imgfile);
		document.write('\" alt=\" ');
		document.write(myImageGalleryTitles[i]);
		document.write('\" /></a><br />');
		document.write(myImageGalleryTitles[i]);
		document.write('</td>');

		if ( counter == numThumbsPerRow )
		{
			counter = 0;
		}

		if ( counter == numThumbsPerRow || i == numImageGalleries-1 )
		{
			document.write('</tr>');
		}		
	
	}
	document.write('</table>');
}	

// function for displaying a single image
//---------------------------------------

function singleimage(myFileId)
{
	var ImageTitle = " ";
	var ImageDesc = " ";

	switch(myFileId)
	{
		case("35_Haleakala"):
		  ImageTitle ="Sunrise from the Summit, Haleakala";
		  ImageDesc  ="Above the clouds at the highest point on Maui.";
		  break;
		case("35_OaksShadows"):
		  ImageTitle ="Oaks and Shadows, Sonoma County, California";
		  ImageDesc  ="A winter afternoon at Sonoma Valley Regional Park.";
		  break;
		case("35_RubyBeach"):
		  ImageTitle ="Blue Morning, Ruby Beach, Olympic Peninsula";
		  ImageDesc  ="A calm morning at one of the nicest beaches I've ever seen.  Note to self: You need to get back to this place!";
		  break;
		case("35_SunsetRefl"):
		  ImageTitle ="Sunset Reflections, Imperial Beach, California";
		  ImageDesc  ="An El Nino sunset sky reflects in wet sand at low tide.  The Coronado Islands are visible on the horizon.";
		  break;
		case("20d_0031"):
		  ImageTitle = "Sunrise at Koki Beach, Maui";
		  ImageDesc  ="A beautiful sunrise at a spectacular beach near Hana, Maui.";
		  break;
		case("20d_0152"):
		  ImageTitle = "Santa Rosa Creek Road, Cambria, California";
		  ImageDesc  ="One of my favorite roads during one my favorite times of the year.";
		  break;
		case("20d_0272"):
		  ImageTitle = "Junipers and Granite Wall, Yosemite";
		  ImageDesc  ="These Junipers growing near Tenaya Lake catch my eye every time I visit the Yosemite high country.";
		  break;
		case("20d_0505"):
		  ImageTitle = "Cabin in Fall";
		  ImageDesc  ="Fall colors surround a nice little cabin along County Road 7 near Ridgway, Colorado.  I made this photograph from underneath the tailgate of my rental SUV during a light rain.";
		  break;
		case("20d_0516"):
		  ImageTitle = "Cottonwood Reflections, Cimarron River, Colorado";
		  ImageDesc  ="Cottonwoods in full sunlight reflect in a shaded section of the Cimarron River.";
		  break;
		case("20d_1531"):
		  ImageTitle = "Portuguese Beach, Sonoma County, California";
		  ImageDesc  ="I made more than 30 exposures of this scene trying to get the perfect water action.";
		  break;
		case("20d_1635"):
		  ImageTitle = "Spring View, Columbia River Gorge";
		  ImageDesc  ="";
		  break;
		case("20d_1665"):
		  ImageTitle = "Waterfalls, Columbia River Gorge";
		  ImageDesc  ="";
		  break;
		case("20d_2534"):
		  ImageTitle = "Sunset at Hospitals Reef, La Jolla, California";
		  ImageDesc  ="";
		  break;
		case("20d_3261"):
		  ImageTitle = "Evening Surf, La Jolla, California";
		  ImageDesc  ="Shortly after sunset, a 5 second exposure of the surf gave a silky look to these often photographed potholes.";
		  break;
		case("5d2_0080"):
		  ImageTitle = "North Algodones Dunes";
		  ImageDesc  ="These rarely visited dunes offer a stark contrast to the popular OHV area on the other side of Highway 78.";
		  break;
		case("5d2_0243"):
		  ImageTitle = "Burned Forest in Fog, Palomar Mountain";
		  ImageDesc  ="Dense fog adds to the atmosphere of this burned forest on Palomar Mountain.";
		  break;
		case("5d2_0577"):
		  ImageTitle = "Elm Tree in Cook's Meadow, Yosemite Valley";
		  ImageDesc  ="Morning light on Cook's Meadow as the sun rises over Half Dome."; 
		  break;
		case("5d2_0596"):
		  ImageTitle = "Backlight, Yosemite Valley";
		  ImageDesc  ="There are spectacular views everywhere in Yosemite Valley... even the parking lots.";
		  break;
		case("5d2_0631"):
		  ImageTitle = "Dogwoods over the Merced River, Yosemite Valley";
		  ImageDesc  = "An exposure of just under 1 second was used to blur the Merced River, allowing the blooming dogwoods to stand out.  The river is reflecting the sunlit cliffs near Bridalveil Falls.";
		  break;
		case("5d2_0685"):
		  ImageTitle = "Sunset Surf, La Jolla";
		  ImageDesc  ="Scenes like this one of the surf rushing over a rock are very dynamic.  Shots taken a second apart can look completely different.  Getting an interesting image is mostly a result of luck and persistance."; 
		  break;
		case("5d2_0763"):
		  ImageTitle = "Sunset at Broken Hill, Torrey Pines State Reserve";
		  ImageDesc  ="Late afternoon light catches Broken Hill during some unusual June weather."; 
		  break;
		case("5d2_0788"):
		  ImageTitle = "Sunset at Broken Hill, Torrey Pines State Reserve";
		  ImageDesc  ="Late afternoon light and some beautiful clouds at Broken Hill."; 
		  break;
		case("5d2_1460"):
		  ImageTitle = "End of October, Laguna Mountain Recreation Area";
		  ImageDesc  ="San Diego County isn't known for it's fall color, and it took some perfect condtions for them to look the way they do here.  The sun looked like a giant red ball as it was setting through the haze over San Diego.  This provided some exceptionally warm backlight on these trees, while the evergreens on the other side of the valley were in shade.";
		  break;
		case("5d2_4005"):
		  ImageTitle = "Reflections, Upper Young Lake, Yosemite";
		  ImageDesc  ="Clouds reflect in Upper Young Lake shortly before sunset.  This image was made on the first evening of a 2 night backpacking trip in July 2010.";  
		  break;
		case("5d2_4127"):
		  ImageTitle = "Lake's Edge, Upper Young Lake, Yosemite";
 		  ImageDesc  ="A small tree and mountain reflections in Upper Young Lake.  This image was made on the second night of a 2 night backpacking trip in July 2010.";  
		  break;
		case("5d2_4197"):
		  ImageTitle = "Illuminated Island, Upper Young Lake, Yosemite";
		  ImageDesc  ="Morning light catches a small island in Upper Young Lake.  This image was made on the final morning of a 2 night backpacking trip in July 2010.";  
		  break;
		case("5d2_4613"):
		  ImageTitle = "Gem Lakes, Little Lakes Valley";
		  ImageDesc  ="Direct sunlight brings out the spectacular color of these lakes.  This image was made on a quick backpacking trip in September 2010.";
		  break;
		case("5d2_5073"):
		  ImageTitle = "Sunset Streaks, Torrey Pines State Beach";
		  ImageDesc  ="A 2 second exposure was used to capture the incoming surf as streaks, complimenting the similarly shaped clouds.";
		  break;
		case("5d2_5426"):
		  ImageTitle = "Torrey Pines State Beach";
		  ImageDesc  ="";
		  break;
		case("5d2_6401"):
		  ImageTitle = "Cliff and Sky Reflections, Torrey Pines State Beach";
		  ImageDesc  ="A small stream between a tidepool and the ocean reflects the clear blue sky and the cliffs at Torrey Pines State Beach in San Diego.";
		  break;
		case("5d2_7350"):
		  ImageTitle = "Kalalau Valley Overlook, Kauai";
		  ImageDesc  ="I'm usually not a fan of overlooks, but this is an exception to the rule.";
		  break;
		case("5d2_7613"):
		  ImageTitle = "Approaching Storm, Torrey Pines State Beach";
		  ImageDesc  = "A rare, and very welcome sight along the San Diego coast."; 
		  break;
		case("5d2_7830"):
		  ImageTitle ="Potholes in Surf, La Jolla, California";
		  ImageDesc  ="At the right tide height these potholes sit just above the surf.";
		  break;
		case("5d2_9673"):
		  ImageTitle ="Pine at Long Lake";
		  ImageDesc  =""; 
		  break;
		case("5d2_9694"):
		  ImageTitle ="Evening Light, Lower Dusy Basin";
		  ImageDesc  ="";
		  break;
		case("5d2_9764"):
		  ImageTitle ="Cool Morning, Lower Dusy Basin";
		  ImageDesc  ="The surrounding mountains catch the day's first light while Lower Dusy Basin is still covered in frost after a cool night.";
		  break;
		case("5d2_9923"):
		  ImageTitle ="Afterglow, Upper Dusy Basin";
		  ImageDesc  ="Well after sunset, a long exposure reveals the Palisades glowing in the last light of the day.";
		  break;
		case("5d2_10116"):
		  ImageTitle ="Bioluminescent Tide, Torrey Pines State Beach";
		  ImageDesc  ="";
		  break;
		case("5d2_10152"):
		  ImageTitle ="Mystic Coast, Torrey Pines State Beach";
		  ImageDesc  ="";
		  break;
		case("5d2_10163"):
		  ImageTitle ="Burning Horizon, Torrey Pines State Beach";
		  ImageDesc  ="";
		  break;
		case("5d2_10843"):
		  ImageTitle ="Swami's Sunset, Encinitas, California";
		  ImageDesc  ="";
		  break;
	}

	imgfile  = myFileId+".jpg";
	document.write('<table class=\"singleimage\">');
	document.write('<tr>');
	document.write('<td onClick=\"history.go(-1)\">');
	document.write('<img class=\"big\" src=\"../jpegs_big/');
	document.write(imgfile);
	document.write('\" alt=\" ');
	document.write(myFileId);
 	document.write('\" /></td></tr></table>');

	document.write('<p class=\"imagetitle\">');
	document.write(ImageTitle);
	document.write('</p>');
	document.write('<p class=\"imagedesc\">');
	document.write(ImageDesc);
	document.write('</p>');
}

