/***************************************************************************
* Create a photo object                                                    *
***************************************************************************/
function photo(id, galleries_id, photo_ref, section_code, src, width, height, caption, thumbnail, thumbnail_width, thumbnail_height, home, gallery, description, takendate, photographer, location, item_price, purchase_instruction) {
	this.id = id;
	this.galleries_id = galleries_id;
	this.photo_ref = photo_ref;
	this.section_code = section_code;
	this.src = src;
	this.width = width;
	this.height = height;
	this.caption = caption;
	this.thumbnail = thumbnail;
	this.thumbnail_width = thumbnail_width;
	this.thumbnail_height = thumbnail_height;
	this.home = home;
	this.gallery = gallery;
	this.description = description;
	this.takendate = takendate;
	this.photographer = photographer;
	this.location = location;
	this.item_price = item_price;
	this.purchase_instruction = purchase_instruction;
}
/***************************************************************************
* Create a gallery object                                                  *
***************************************************************************/

function gallery(id,featured_images,title,section_code) {
	this.id = id;
	this.featured_images = featured_images;
	this.title = title;
	this.section_code = section_code;}

/***************************************************************************
* Select a random value from a comma separated list                        *
***************************************************************************/
function randomListVal(list) {
	arrayVals = list.split(',');
	pos = Math.round(Math.random() * (arrayVals.length - 1));
	debug('Returning ' + arrayVals[pos] + ' as random image');
	return arrayVals[pos];
}

/***************************************************************************
* img = reference to image object in which to show image                   *
***************************************************************************/
function showHomeImage(img) {

	imageID = randomListVal('3284587,3276802,3275469');
	for (j = 0; j < photos.length; j++) {
		if (photos[j].id == imageID) {
			if (!basic) {
			img.src = photos[j].src;
			img.width = photos[j].width;
			img.height = photos[j].height;
			}
			else {
				newImage = new Image(photos[j].width,photos[j].height);
				newImage.src = photos[j].src;
				document.images[img.name] = newImage;
				debug(newImage.src);
			}
			break;
		}
	}
}

/***************************************************************************
* Show a random image on home page from featured images                    *
***************************************************************************/
function showHomeImageInline() {
	
	imageID = randomListVal('3284587,3276802,3275469');
	for (j = 0; j < photos.length; j++) {
		if (photos[j].id == imageID) {
			if ('gallery' != '') {
						if (photos[j].galleries_id != '') {
						document.write('<a href="' + photos[j].section_code + '_' + photos[j].galleries_id + '.html">');
						}
						else {
						document.write('<a href="gallery.html">');
						}
			}
			document.write('<img src="' + photos[j].src + '" width="' + photos[j].width + '" height="' + photos[j].height + '" class="mainhomepageimage" id="mainSample" name="mainSample" alt="' + photos[j].caption  + '" border="0">');
			if ('gallery' != '') {
				document.write('</a>');
			}
			break;
		}
	}
	
}

/***************************************************************************
* Show the next image in a gallery.  field = hidden field containing       *
* image_id                                                                 *
*  img = reference to image object in which to show image                  *
***************************************************************************/
function next(field,img) {

	debug('IN next');
	imageID = field.value;
	
	for (j = 0; j < photos.length; j++) {
		if (photos[j].id == imageID) {
			break;
		}
	}
	debug('image is ' + j);
	nextImg = -1;
	k= j + 1;
	while (nextImg < 0) {
		for (; k < photos.length; k++) {
			debug('testing image ' + k + ': gallery = ' + photos[k].galleries_id + '(existing: ' + photos[j].galleries_id + ')');
			if (photos[k].galleries_id == photos[j].galleries_id) {
				nextImg = k;
				debug('setting  nextImg = ' + k);
				break;
			}
		}
		if (nextImg == -1) {
			k = 0;
		}
	}
	if (nextImg != -1) {
		updateImage(nextImg, field,img);
	}


}


/***************************************************************************
* Set a new image on the gallery detail page given its array position      *
***************************************************************************/
function updateImage (nextImg, field,img) {
	debug('Updating image');
	if (!basic && !((0) || (0))) {
		debug('In updateImage');
		debug('setting  img src = ' + photos[nextImg].src);
		
					
			document.getElementById('imagePhoto').innerHTML = '<img class="mainphoto" src="' + photos[nextImg].src + ' " id="mainPic" name="mainPic" width="' + photos[nextImg].width + '" height="' + photos[nextImg].height + '" alt="' + photos[nextImg].caption + '">';
						field.value = photos[nextImg].id;
			document.getElementById('imageTitle').innerHTML = photos[nextImg].caption;
									document.title = 'Thomas Lea Photography: ' + photos[nextImg].caption;
										/* apply 'blank' classname to element where */			if ( photos[nextImg].caption == '') {
				document.getElementById('imageTitle').style.className = 'blank';
			}
			else {
				document.getElementById('imageTitle').style.className = 'normal';
			}
						temp = '';
			if (photos[nextImg].description != '') {
				temp = temp +  '<p id="imageDescription">' + photos[nextImg].description + '</p>';
			}
						if (photos[nextImg].photo_ref != '') {
				temp = temp + '<p class="imageinfo" id="imageRef"><strong>Ref: </strong>' + photos[nextImg].photo_ref + '</p>';
			}
						if (photos[nextImg].takendate != '') {
				debug('Resetting taken date');
				temp = temp + '<p class="imageinfo" id="imageDate"><strong>Date: </strong>' + photos[nextImg].takendate + '</p>';
			}
			
			if (photos[nextImg].location != '') {
				debug('Resetting location');
				temp = temp + '<p class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  photos[nextImg].location + '</p>';
			}
			
			if (photos[nextImg].photographer != '') {
				debug('Resetting photographer');
				temp = temp + '<p class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + photos[nextImg].photographer + '</p>';
			}
			if (temp != '') {				temp = temp + '<div class="spacer"></div>';			}					if (temp == '') {
			document.getElementById('imageDetails').style.display = 'none';
		}
		else {
			document.getElementById('imageDetails').style.display = 'block';
		}
		document.getElementById('imageDetails').innerHTML =temp;	
		
	}
	else {
		debug('Redirecting to id ' + photos[nextImg].id);
		window.location = 'photo_' + photos[nextImg].id + '.html';
	}
}

/***************************************************************************
* Show the previous image for a gallery. field = hidden field containing   *
* image_id                                                                 *
*  img = reference to image object in which to show image                  *
***************************************************************************/
function previous(field,img) {


	imageID = field.value;
	for (j = 0; j < photos.length; j++) {
		if (photos[j].id == imageID) {
			break;
		}
	}
	debug('image is ' + j);
	nextImg = -1;
	k = j -1;
	while (nextImg < 0) {
		for (; k >= 0; k--) {
			if (photos[k].galleries_id == photos[j].galleries_id) {
				nextImg = k;
				break;
			}
		}
		if (nextImg == -1) {
			k = photos.length -1;
		}
	}
	if (nextImg != -1) {
		updateImage(nextImg, field,img);	
	}
}

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.
        *
* Gallery_id = id of gallery to choose                                     *
* 
 img = reference to html image                                       *
* in which to show image                                                   *
***************************************************************************/
function showGalleryImage(gallery_id, img) {
	debug('Gallery = ' + gallery_id);
	for (i = 0; i < galleries.length; i++) {
		if (galleries[i].id == gallery_id) {
			imageID = randomListVal(galleries[i].featured_images);
				for (j = 0; j < photos.length; j++) {
					if (photos[j].id == imageID) {
						
						img.src = photos[j].thumbnail;
						img.width = photos[j].thumbnail_width;
						img.height = photos[j].thumbnail_height;
						
						break;
					}
				}
			break;
		}
	} 
	}

/***************************************************************************
* If we have dynamic HTML                                                  *
*  replace the galleries link with a list that                             *
* doesn't include the current gallery                                      *
***************************************************************************/
function showGalleries(gallery_id) {
	debug('Showing links for gallery ' + gallery_id);
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
			debug('Testing gallery ' + galleries[i].id);
			
			if (galleries[i].id != gallery_id) {
				debug('Adding link');
				if (temp != '') {
					temp = temp + ' | ';
				}
				temp = temp + '<a href="gallery_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
			}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}
/***************************************************************************
* Create the array of Photo objects                                        *
***************************************************************************/
photos = new Array();
photos[0] = new photo(3275395,'199720','','gallery','http://www3.clikpic.com/willlea/images/4449 on bridge color editJPG.jpg',397,600,'SP\'s #4449 crossing the San Francisco Bay','http://www3.clikpic.com/willlea/images/4449 on bridge color editJPG_thumb.jpg',130, 196,0, 1,'','','','','','');
photos[1] = new photo(3276202,'199541','','gallery','http://www3.clikpic.com/willlea/images/market people 11JPG.jpg',400,594,'','http://www3.clikpic.com/willlea/images/market people 11JPG_thumb.jpg',130, 193,0, 1,'','','','','','');
photos[2] = new photo(3474683,'212516','','gallery','http://www3.clikpic.com/willlea/images/Sam and Girl Friend web.jpg',396,600,'','http://www3.clikpic.com/willlea/images/Sam and Girl Friend web_thumb.jpg',130, 197,0, 0,'Hollandale, Mississippi','','','','','');
photos[3] = new photo(3276207,'199541','','gallery','http://www3.clikpic.com/willlea/images/market people 04JPG.jpg',400,600,'','http://www3.clikpic.com/willlea/images/market people 04JPG_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[4] = new photo(3275420,'199720','','gallery','http://www3.clikpic.com/willlea/images/pushing pipeJPG.jpg',399,600,'Pushing pipe on an oil rig in Texas','http://www3.clikpic.com/willlea/images/pushing pipeJPG_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[5] = new photo(3276208,'199541','','gallery','http://www3.clikpic.com/willlea/images/market people 06JPG.jpg',400,595,'','http://www3.clikpic.com/willlea/images/market people 06JPG_thumb.jpg',130, 193,0, 0,'','','','','','');
photos[6] = new photo(3276262,'199718','','gallery','http://www3.clikpic.com/willlea/images/black man and blond boy tl78 16-16a clean cropJPG.jpg',400,600,'','http://www3.clikpic.com/willlea/images/black man and blond boy tl78 16-16a clean cropJPG_thumb.jpg',130, 195,0, 1,'Buddies at the corner of Powell & Market','','','','','');
photos[7] = new photo(3474684,'212516','','gallery','http://www3.clikpic.com/willlea/images/Quittman web.jpg',400,600,'','http://www3.clikpic.com/willlea/images/Quittman web_thumb.jpg',130, 195,0, 1,'East Texas','','','','','');
photos[8] = new photo(3276265,'199718','','gallery','http://www3.clikpic.com/willlea/images/black santa tl51 5a editJPG.jpg',400,600,'','http://www3.clikpic.com/willlea/images/black santa tl51 5a editJPG_thumb.jpg',130, 195,0, 0,'Man in a Santa suit.  Powell Street.','','','','','');
photos[9] = new photo(3276266,'199718','','gallery','http://www3.clikpic.com/willlea/images/bruce conner tl880 16 cropJPG.jpg',400,600,'','http://www3.clikpic.com/willlea/images/bruce conner tl880 16 cropJPG_thumb.jpg',130, 195,0, 0,'Artist Bruce Conner.','','','','','');
photos[10] = new photo(3276267,'199718','','gallery','http://www3.clikpic.com/willlea/images/castr faggots are fantastic tl171 23 editJPG.jpg',400,600,'','http://www3.clikpic.com/willlea/images/castr faggots are fantastic tl171 23 editJPG_thumb.jpg',130, 195,0, 0,'Castro Street Fair.','','','','','');
photos[11] = new photo(3276209,'199541','','gallery','http://www3.clikpic.com/willlea/images/market people 12JPG.jpg',400,600,'','http://www3.clikpic.com/willlea/images/market people 12JPG_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[12] = new photo(3276283,'199718','','gallery','http://www3.clikpic.com/willlea/images/entering woolworth tl275 35 testJPG.jpg',400,600,'','http://www3.clikpic.com/willlea/images/entering woolworth tl275 35 testJPG_thumb.jpg',130, 195,0, 0,'Bag ladies at Woolworth.','','','','','');
photos[13] = new photo(3276290,'199718','','gallery','http://www3.clikpic.com/willlea/images/funky drummer man tl275 11 clean aJPG.jpg',396,600,'','http://www3.clikpic.com/willlea/images/funky drummer man tl275 11 clean aJPG_thumb.jpg',130, 197,0, 0,'Self-described \"Funky Drummer Man\".','','','','','');
photos[14] = new photo(3276295,'199718','','gallery','http://www3.clikpic.com/willlea/images/girl guitar powell market tl275 5 cleanJPG.jpg',400,600,'','http://www3.clikpic.com/willlea/images/girl guitar powell market tl275 5 cleanJPG_thumb.jpg',130, 195,0, 0,'Street singer at the cable car turnaround.','','','','','');
photos[15] = new photo(3276563,'199718','','gallery','http://www3.clikpic.com/willlea/images/grant st fair dancer tl138 24a-25 editJPG1.jpg',397,600,'','http://www3.clikpic.com/willlea/images/grant st fair dancer tl138 24a-25 editJPG1_thumb.jpg',130, 196,0, 0,'Street performers on upper Grant Ave.','','','','','');
photos[16] = new photo(3275400,'199720','','gallery','http://www3.clikpic.com/willlea/images/apl in dry dock bJPG.jpg',395,600,'An APL container ship under construction','http://www3.clikpic.com/willlea/images/apl in dry dock bJPG_thumb.jpg',130, 197,0, 0,'','','','','','');
photos[17] = new photo(3276210,'199541','','gallery','http://www3.clikpic.com/willlea/images/market people 08JPG.jpg',400,595,'','http://www3.clikpic.com/willlea/images/market people 08JPG_thumb.jpg',130, 193,0, 0,'','','','','','');
photos[18] = new photo(3474686,'212516','','gallery','http://www3.clikpic.com/willlea/images/Mena Mary web.jpg',400,598,'','http://www3.clikpic.com/willlea/images/Mena Mary web_thumb.jpg',130, 194,0, 0,'Mena, Arkansas','','','','','');
photos[19] = new photo(3276312,'199718','','gallery','http://www3.clikpic.com/willlea/images/jagganath man reading tl160 33JPG.jpg',400,600,'','http://www3.clikpic.com/willlea/images/jagganath man reading tl160 33JPG_thumb.jpg',130, 195,0, 0,'Man reading at Jagganath Cart Festival (Hare Krishna).','','','','','');
photos[20] = new photo(3276323,'199718','','gallery','http://www3.clikpic.com/willlea/images/lia belli tl1052 25a editJPG.jpg',400,600,'','http://www3.clikpic.com/willlea/images/lia belli tl1052 25a editJPG_thumb.jpg',130, 195,0, 0,'Lia Belli.  At the time married to attorney Melvin Belli.','','','','','');
photos[21] = new photo(3276332,'199718','','gallery','http://www3.clikpic.com/willlea/images/mayor moscone tl765 12JPG.jpg',400,600,'','http://www3.clikpic.com/willlea/images/mayor moscone tl765 12JPG_thumb.jpg',130, 195,0, 0,'San Francisco Mayor George Moscone with his favorite lunch, petrale at the North Beach Restaurant.','','','','','');
photos[22] = new photo(3276547,'199718','','gallery','http://www3.clikpic.com/willlea/images/older guitar player powell st tl231 17JPG1.jpg',400,600,'','http://www3.clikpic.com/willlea/images/older guitar player powell st tl231 17JPG1_thumb.jpg',130, 195,0, 0,'Singing for a little change.  Powell Street.','','','','','');
photos[23] = new photo(3276212,'199541','','gallery','http://www3.clikpic.com/willlea/images/market people 09JPG.jpg',400,600,'','http://www3.clikpic.com/willlea/images/market people 09JPG_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[24] = new photo(3276338,'199718','','gallery','http://www3.clikpic.com/willlea/images/sacramento st fair dancing tl50 16a edit aJPG.jpg',400,600,'','http://www3.clikpic.com/willlea/images/sacramento st fair dancing tl50 16a edit aJPG_thumb.jpg',130, 195,0, 0,'Sacramento Street Fair.','','','','','');
photos[25] = new photo(3276347,'199718','','gallery','http://www3.clikpic.com/willlea/images/starship couple tl135 37 editJPG.jpg',399,600,'','http://www3.clikpic.com/willlea/images/starship couple tl135 37 editJPG_thumb.jpg',130, 195,0, 0,'Concert in Golden Gate Park.','','','','','');
photos[26] = new photo(3276213,'199541','','gallery','http://www3.clikpic.com/willlea/images/market people 05JPG.jpg',400,591,'','http://www3.clikpic.com/willlea/images/market people 05JPG_thumb.jpg',130, 192,0, 0,'','','','','','');
photos[27] = new photo(3276370,'199718','','gallery','http://www3.clikpic.com/willlea/images/waiting for the n judah tl427 4JPG.jpg',400,600,'','http://www3.clikpic.com/willlea/images/waiting for the n judah tl427 4JPG_thumb.jpg',130, 195,0, 0,'Waiting for the N-Judah streetcar.','','','','','');
photos[28] = new photo(3288978,'199720','','gallery','http://www3.clikpic.com/willlea/images/embarcadero center cropJPG.jpg',410,600,'Embarcadero Center.   San Francisco','http://www3.clikpic.com/willlea/images/embarcadero center cropJPG_thumb.jpg',130, 190,0, 0,'','','','','','');
photos[29] = new photo(3474688,'212516','','gallery','http://www3.clikpic.com/willlea/images/Mt View Seth web.jpg',422,600,'','http://www3.clikpic.com/willlea/images/Mt View Seth web_thumb.jpg',130, 185,0, 0,'Mountain View, Arkansas','','','','','');
photos[30] = new photo(3276366,'199718','','gallery','http://www3.clikpic.com/willlea/images/street artist arrest in van tl127 19-19a editJPG.jpg',397,600,'','http://www3.clikpic.com/willlea/images/street artist arrest in van tl127 19-19a editJPG_thumb.jpg',130, 196,0, 0,'Arrest of street artist.','','','','','');
photos[31] = new photo(3276275,'199718','','gallery','http://www3.clikpic.com/willlea/images/castro lesbian topless tl169 27a cropJPG.jpg',600,400,'','http://www3.clikpic.com/willlea/images/castro lesbian topless tl169 27a cropJPG_thumb.jpg',130, 87,0, 0,'Sisters looking for support at the Castro Street Fair.','','','','','');
photos[32] = new photo(3276280,'199718','','gallery','http://www3.clikpic.com/willlea/images/castro umbrella man tl172 10JPG.jpg',600,393,'','http://www3.clikpic.com/willlea/images/castro umbrella man tl172 10JPG_thumb.jpg',130, 85,0, 0,'Umbrella act.  Castro Street Fair.','','','','','');
photos[33] = new photo(3276305,'199718','','gallery','http://www3.clikpic.com/willlea/images/jagganath crowd tl163 11a-12 editJPG.jpg',600,400,'','http://www3.clikpic.com/willlea/images/jagganath crowd tl163 11a-12 editJPG_thumb.jpg',130, 87,0, 0,'Crowd at the Jagganath Cart Festival.','','','','','');
photos[34] = new photo(3276215,'199541','','gallery','http://www3.clikpic.com/willlea/images/market people 03JPG.jpg',400,595,'','http://www3.clikpic.com/willlea/images/market people 03JPG_thumb.jpg',130, 193,0, 0,'','','','','','');
photos[35] = new photo(3276602,'199718','','gallery','http://www3.clikpic.com/willlea/images/starship crowd sunglasses tl132 28a-29 editJPG1.jpg',600,400,'','http://www3.clikpic.com/willlea/images/starship crowd sunglasses tl132 28a-29 editJPG1_thumb.jpg',130, 87,0, 0,'Crowd at a Jefferson Starship concert.','','','','','');
photos[36] = new photo(3276337,'199718','','gallery','http://www3.clikpic.com/willlea/images/party pacific heights tl483 32JPG.jpg',600,400,'','http://www3.clikpic.com/willlea/images/party pacific heights tl483 32JPG_thumb.jpg',130, 87,0, 0,'Dinner at Susan\'s.  Pacific Heights.','','','','','');
photos[37] = new photo(3276559,'199718','','gallery','http://www3.clikpic.com/willlea/images/jagganath sequin dress tl160 25 cropJPG1.jpg',368,600,'','http://www3.clikpic.com/willlea/images/jagganath sequin dress tl160 25 cropJPG1_thumb.jpg',130, 212,0, 0,'Dressed for a festival.  Golden Gate Park','','','','','');
photos[38] = new photo(3276216,'199541','','gallery','http://www3.clikpic.com/willlea/images/market people 10JPG.jpg',400,600,'','http://www3.clikpic.com/willlea/images/market people 10JPG_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[39] = new photo(3288982,'199720','','gallery','http://www3.clikpic.com/willlea/images/working  at a pc cropJPG.jpg',600,411,'Teamwork on the PC','http://www3.clikpic.com/willlea/images/working  at a pc cropJPG_thumb.jpg',130, 89,0, 0,'','','','','','');
photos[40] = new photo(3474694,'212516','','gallery','http://www3.clikpic.com/willlea/images/Bunch web.jpg',573,600,'','http://www3.clikpic.com/willlea/images/Bunch web_thumb.jpg',130, 136,0, 0,'Kingston, Arkansas','','','','','');
photos[41] = new photo(3272551,'199541','','gallery','http://www3.clikpic.com/willlea/images/market people 01JPG.jpg',400,600,'','http://www3.clikpic.com/willlea/images/market people 01JPG_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[42] = new photo(3289006,'199720','','gallery','http://www3.clikpic.com/willlea/images/ship under golden gate cropJPG.jpg',600,411,'Container ship under the Golden Gate Bridge','http://www3.clikpic.com/willlea/images/ship under golden gate cropJPG_thumb.jpg',130, 89,0, 0,'','','','','','');
photos[43] = new photo(3474698,'212516','','gallery','http://www3.clikpic.com/willlea/images/Sam Chatman web.jpg',600,400,'','http://www3.clikpic.com/willlea/images/Sam Chatman web_thumb.jpg',130, 87,0, 0,'Hollandale, Mississippi','','','','','');
photos[44] = new photo(3289011,'199720','','gallery','http://www3.clikpic.com/willlea/images/oil tank farm cropJPG.jpg',600,411,'Oil tank farm.  Quebec,  Canada','http://www3.clikpic.com/willlea/images/oil tank farm cropJPG_thumb.jpg',130, 89,0, 0,'','','','','','');
photos[45] = new photo(3292472,'199720','','gallery','http://www3.clikpic.com/willlea/images/don chappellet crop adjustJPG.jpg',600,411,'Chappellett Vineyards.  Napa Valley','http://www3.clikpic.com/willlea/images/don chappellet crop adjustJPG_thumb.jpg',130, 89,0, 0,'','','','','','');
photos[46] = new photo(3474702,'212516','','gallery','http://www3.clikpic.com/willlea/images/Steam Tractor web.jpg',600,400,'','http://www3.clikpic.com/willlea/images/Steam Tractor web_thumb.jpg',130, 87,0, 0,'Madison County, Arkansas','','','','','');
photos[47] = new photo(3474705,'212516','','gallery','http://www3.clikpic.com/willlea/images/New Orleans Funeral.jpg',600,391,'','http://www3.clikpic.com/willlea/images/New Orleans Funeral_thumb.jpg',130, 85,0, 0,'New Orleans','','','','','');
photos[48] = new photo(3474708,'212516','','gallery','http://www3.clikpic.com/willlea/images/New Years Eve web.jpg',600,477,'','http://www3.clikpic.com/willlea/images/New Years Eve web_thumb.jpg',130, 103,0, 0,'Mountain View, Arkansas','','','','','');
photos[49] = new photo(3275436,'199719','','gallery','http://www3.clikpic.com/willlea/images/hulah inside cropJPG.jpg',600,413,'','http://www3.clikpic.com/willlea/images/hulah inside cropJPG_thumb.jpg',130, 89,0, 1,'Inside the station.  Hulah, Oklahoma','','','','','');
photos[50] = new photo(3275442,'199719','','gallery','http://www3.clikpic.com/willlea/images/green hose yellow bowl aJPG.jpg',600,411,'','http://www3.clikpic.com/willlea/images/green hose yellow bowl aJPG_thumb.jpg',130, 89,0, 0,'Bartlesville, Oklahoma','','','','','');
photos[51] = new photo(3275466,'199719','','gallery','http://www3.clikpic.com/willlea/images/bville kmart carts aJPG.jpg',600,413,'','http://www3.clikpic.com/willlea/images/bville kmart carts aJPG_thumb.jpg',130, 89,0, 0,'Bartlesville, Oklahoma','','','','','');
photos[52] = new photo(3275469,'199719','','gallery','http://www3.clikpic.com/willlea/images/club schmitz allen aJPG.jpg',600,413,'','http://www3.clikpic.com/willlea/images/club schmitz allen aJPG_thumb.jpg',130, 89,1, 0,'Dallas, Texas','','','','','');
photos[53] = new photo(3275475,'199719','','gallery','http://www3.clikpic.com/willlea/images/after valentines dayJPG.jpg',600,399,'','http://www3.clikpic.com/willlea/images/after valentines dayJPG_thumb.jpg',130, 86,0, 0,'San Francisco','','','','','');
photos[54] = new photo(3276799,'199719','','gallery','http://www3.clikpic.com/willlea/images/jim at table a1JPG.jpg',600,406,'','http://www3.clikpic.com/willlea/images/jim at table a1JPG_thumb.jpg',130, 88,0, 0,'Bartlesville, Oklahoma','','','','','');
photos[55] = new photo(3284601,'199719','','gallery','http://www3.clikpic.com/willlea/images/windmill and linesJPG.jpg',600,412,'','http://www3.clikpic.com/willlea/images/windmill and linesJPG_thumb.jpg',130, 89,0, 0,'Lubbock County.  Texas','','','','','');
photos[56] = new photo(3276638,'199719','','gallery','http://www3.clikpic.com/willlea/images/Lucky 13 2530A1JPG.jpg',600,400,'','http://www3.clikpic.com/willlea/images/Lucky 13 2530A1JPG_thumb.jpg',130, 87,0, 0,'Boise, Idaho','','','','','');
photos[57] = new photo(3297763,'199719','','gallery','http://www3.clikpic.com/willlea/images/lubbock garage a1JPG.jpg',600,414,'','http://www3.clikpic.com/willlea/images/lubbock garage a1JPG_thumb.jpg',130, 90,0, 0,'Lubbock, Texas','','','','','');
photos[58] = new photo(3276810,'199719','','gallery','http://www3.clikpic.com/willlea/images/Luxembourg chair 01_edited-1AJPG crop.jpg',600,410,'','http://www3.clikpic.com/willlea/images/Luxembourg chair 01_edited-1AJPG crop_thumb.jpg',130, 89,0, 0,'Paris','','','','','');
photos[59] = new photo(3280102,'199719','','gallery','http://www3.clikpic.com/willlea/images/Carols back stairsJPG.jpg',600,402,'','http://www3.clikpic.com/willlea/images/Carols back stairsJPG_thumb.jpg',130, 87,0, 0,'San Francisco','','','','','');
photos[60] = new photo(3276803,'199719','','gallery','http://www3.clikpic.com/willlea/images/IMG_1421AJPG.jpg',600,400,'','http://www3.clikpic.com/willlea/images/IMG_1421AJPG_thumb.jpg',130, 87,0, 0,'Boise, Idaho','','','','','');
photos[61] = new photo(3297781,'199719','','gallery','http://www3.clikpic.com/willlea/images/yellow blanket aJPG.jpg',600,400,'','http://www3.clikpic.com/willlea/images/yellow blanket aJPG_thumb.jpg',130, 87,0, 0,'Bartlesville,  Oklahoma','','','','','');
photos[62] = new photo(3276802,'199719','','gallery','http://www3.clikpic.com/willlea/images/IMG_1521AJPG.jpg',600,450,'','http://www3.clikpic.com/willlea/images/IMG_1521AJPG_thumb.jpg',130, 98,1, 0,'Boise, Idaho','','','','','');
photos[63] = new photo(3297765,'199719','','gallery','http://www3.clikpic.com/willlea/images/mary lea rice aJPG.jpg',398,600,'','http://www3.clikpic.com/willlea/images/mary lea rice aJPG_thumb.jpg',130, 196,0, 0,'Mena, Arkansas','','','','','');
photos[64] = new photo(3297766,'199719','','gallery','http://www3.clikpic.com/willlea/images/kitty in black aJPG.jpg',400,600,'','http://www3.clikpic.com/willlea/images/kitty in black aJPG_thumb.jpg',130, 195,0, 0,'San Francisco','','','','','');
photos[65] = new photo(3284582,'200291','','gallery','http://www3.clikpic.com/willlea/images/img_5123 aJPG.jpg',600,400,'','http://www3.clikpic.com/willlea/images/img_5123 aJPG_thumb.jpg',130, 87,0, 0,'Sawyer Glacier.  Tracy Arm.   Alaska','','','','','');
photos[66] = new photo(3284584,'200291','','gallery','http://www3.clikpic.com/willlea/images/img_5041JPG.jpg',600,400,'','http://www3.clikpic.com/willlea/images/img_5041JPG_thumb.jpg',130, 87,0, 1,'Moon over the Olympic Peninsula.  Washington','','','','','');
photos[67] = new photo(3284587,'200291','','gallery','http://www3.clikpic.com/willlea/images/img_1625JPG.jpg',600,400,'','http://www3.clikpic.com/willlea/images/img_1625JPG_thumb.jpg',130, 87,1, 0,'Logan Canyon.  Utah','','','','','');
photos[68] = new photo(3284589,'200291','','gallery','http://www3.clikpic.com/willlea/images/img_5958aJPG.jpg',600,400,'','http://www3.clikpic.com/willlea/images/img_5958aJPG_thumb.jpg',130, 87,0, 0,'Logan Canyon.  Utah','','','','','');
photos[69] = new photo(3276801,'200291','','gallery','http://www3.clikpic.com/willlea/images/IMG_1854JPG.jpg',600,400,'','http://www3.clikpic.com/willlea/images/IMG_1854JPG_thumb.jpg',130, 87,0, 0,'Canyon County.  Idaho','','','','','');
photos[70] = new photo(3284592,'200291','','gallery','http://www3.clikpic.com/willlea/images/img_1594 horizonalJPG.jpg',600,300,'','http://www3.clikpic.com/willlea/images/img_1594 horizonalJPG_thumb.jpg',130, 65,0, 0,'Logan Canyon.  Utah','','','','','');
photos[71] = new photo(3284593,'200291','','gallery','http://www3.clikpic.com/willlea/images/arches valley 1528a horizonalJPG.jpg',600,300,'','http://www3.clikpic.com/willlea/images/arches valley 1528a horizonalJPG_thumb.jpg',130, 65,0, 0,'Valley view.  Arches National Park','','','','','');
photos[72] = new photo(3284594,'200291','','gallery','http://www3.clikpic.com/willlea/images/canyonlands horiz 1551JPG.jpg',600,300,'','http://www3.clikpic.com/willlea/images/canyonlands horiz 1551JPG_thumb.jpg',130, 65,0, 0,'Green River overlook.  Canyonlands National Park','','','','','');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
galleries = new Array();
galleries[0] = new gallery(199720,'3275395','BUSINESS & INDUSTRY','gallery');
galleries[1] = new gallery(199541,'3276202','Market People','gallery');
galleries[2] = new gallery(199718,'3276262','San Francisco in the 70s','gallery');
galleries[3] = new gallery(212516,'3474684','The South','gallery');
galleries[4] = new gallery(199540,'3474684,3276262,3276202','DOCUMENTARY','gallery');
galleries[5] = new gallery(199719,'3275436','FINE ART','gallery');
galleries[6] = new gallery(200291,'3284584','LANDSCAPE','gallery');

