/***************************************************************************
* 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('2938881,2938877,780508,780492,780491,780466,780465,780463,779824,778623');
	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('2938881,2938877,780508,780492,780491,780466,780465,780463,779824,778623');
	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 && !((1) || (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 = 'Paul R. Adams 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(778623,'60254','','gallery','http://www1.clikpic.com/adams12uk/images/empiremotel.jpg',500,313,'Empire Motel, Page, Arizona','http://www1.clikpic.com/adams12uk/images/empiremotel_thumb.jpg',130, 81,1, 1,'','','','','','');
photos[1] = new photo(779755,'60264','','gallery','http://www1.clikpic.com/adams12uk/images/englishsummer.jpg',500,321,'An English Summer','http://www1.clikpic.com/adams12uk/images/englishsummer_thumb.jpg',130, 83,0, 0,'','','','','','');
photos[2] = new photo(779757,'60265','','gallery','http://www1.clikpic.com/adams12uk/images/momentintime.jpg',500,318,'A Moment in Time','http://www1.clikpic.com/adams12uk/images/momentintime_thumb.jpg',130, 83,0, 0,'','','','','','');
photos[3] = new photo(779758,'60266','','gallery','http://www1.clikpic.com/adams12uk/images/sydneyicons.jpg',500,330,'Sydney Icons','http://www1.clikpic.com/adams12uk/images/sydneyicons_thumb.jpg',130, 86,0, 0,'','','','','','');
photos[4] = new photo(779759,'60270','','gallery','http://www1.clikpic.com/adams12uk/images/original.jpg',410,450,'Original image','http://www1.clikpic.com/adams12uk/images/original_thumb.jpg',130, 143,0, 0,'','','','','','');
photos[5] = new photo(779760,'60270','','gallery','http://www1.clikpic.com/adams12uk/images/restored.jpg',421,450,'Restored Image','http://www1.clikpic.com/adams12uk/images/restored_thumb.jpg',130, 139,0, 0,'','','','','','');
photos[6] = new photo(779811,'60264','','gallery','http://www1.clikpic.com/adams12uk/images/ayresrock.jpg',500,314,'Uluru aka Ayres Rock','http://www1.clikpic.com/adams12uk/images/ayresrock_thumb.jpg',130, 82,0, 0,'','','','','','');
photos[7] = new photo(779824,'60265','','gallery','http://www1.clikpic.com/adams12uk/images/forgotten.jpg',500,332,'Forgotten on the Shelf','http://www1.clikpic.com/adams12uk/images/forgotten_thumb.jpg',130, 86,1, 0,'','','','','','');
photos[8] = new photo(780463,'181633','','gallery','http://www1.clikpic.com/adams12uk/images/millgirl.jpg',500,376,'Modern Girl <br>\r\n(PAGB Gold Medal Winner)','http://www1.clikpic.com/adams12uk/images/millgirl_thumb.jpg',130, 98,1, 0,'','','','','','');
photos[9] = new photo(780464,'60266','','gallery','http://www1.clikpic.com/adams12uk/images/stcwindow.jpg',326,450,'St Christopher Window','http://www1.clikpic.com/adams12uk/images/stcwindow_thumb.jpg',130, 179,0, 0,'','','','','','');
photos[10] = new photo(780465,'181633','','gallery','http://www1.clikpic.com/adams12uk/images/passage.jpg',309,450,'The Passage','http://www1.clikpic.com/adams12uk/images/passage_thumb.jpg',130, 189,1, 0,'','','','','','');
photos[11] = new photo(780466,'181633','','gallery','http://www1.clikpic.com/adams12uk/images/pathtrees.jpg',300,450,'Path Through the Trees<br>\r\n(PAGB Gold Medal Winner)','http://www1.clikpic.com/adams12uk/images/pathtrees_thumb.jpg',130, 195,1, 0,'','','','','','');
photos[12] = new photo(780467,'60254','','gallery','http://www1.clikpic.com/adams12uk/images/bryce.jpg',500,328,'Bryce Canyon, Utah','http://www1.clikpic.com/adams12uk/images/bryce_thumb.jpg',130, 85,0, 0,'','','','','','');
photos[13] = new photo(780468,'60254','','gallery','http://www1.clikpic.com/adams12uk/images/chicago.jpg',500,286,'Chicago','http://www1.clikpic.com/adams12uk/images/chicago_thumb.jpg',130, 74,0, 0,'','','','','','');
photos[14] = new photo(780470,'60264','','gallery','http://www1.clikpic.com/adams12uk/images/grandc.jpg',500,326,'Grand Canyon, South Rim','http://www1.clikpic.com/adams12uk/images/grandc_thumb.jpg',130, 85,0, 0,'','','','','','');
photos[15] = new photo(780474,'60266','','gallery','http://www1.clikpic.com/adams12uk/images/cubacar.jpg',500,336,'Cuban Car','http://www1.clikpic.com/adams12uk/images/cubacar_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[16] = new photo(780476,'60266','','gallery','http://www1.clikpic.com/adams12uk/images/dolltrailer.jpg',500,334,'Trailer Doll','http://www1.clikpic.com/adams12uk/images/dolltrailer_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[17] = new photo(780477,'60265','','gallery','http://www1.clikpic.com/adams12uk/images/radiotea4.jpg',303,450,'Old Fashioned Tea','http://www1.clikpic.com/adams12uk/images/radiotea4_thumb.jpg',130, 193,0, 0,'','','','','','');
photos[18] = new photo(780478,'60265','','gallery','http://www1.clikpic.com/adams12uk/images/redshoecocktail.jpg',317,450,'Red Shoe Cocktail','http://www1.clikpic.com/adams12uk/images/redshoecocktail_thumb.jpg',130, 185,0, 0,'','','','','','');
photos[19] = new photo(780480,'60265','','gallery','http://www1.clikpic.com/adams12uk/images/tini.jpg',302,450,'Martini by the Pool','http://www1.clikpic.com/adams12uk/images/tini_thumb.jpg',130, 194,0, 0,'','','','','','');
photos[20] = new photo(780481,'181638','','gallery','http://www1.clikpic.com/adams12uk/images/portanniesquare.jpg',450,450,'A Sideways look','http://www1.clikpic.com/adams12uk/images/portanniesquare_thumb.jpg',130, 130,0, 0,'','','','','','');
photos[21] = new photo(780482,'60265','','gallery','http://www1.clikpic.com/adams12uk/images/tubafx.jpg',277,450,'Tuba Pattern','http://www1.clikpic.com/adams12uk/images/tubafx_thumb.jpg',130, 211,0, 0,'','','','','','');
photos[22] = new photo(780483,'60266','','gallery','http://www1.clikpic.com/adams12uk/images/thamesidereflection.jpg',500,362,'Thames Reflection','http://www1.clikpic.com/adams12uk/images/thamesidereflection_thumb.jpg',130, 94,0, 0,'','','','','','');
photos[23] = new photo(780485,'60264','','gallery','http://www1.clikpic.com/adams12uk/images/katrine.jpg',500,333,'Loch Katrine','http://www1.clikpic.com/adams12uk/images/katrine_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[24] = new photo(780486,'60254','','gallery','http://www1.clikpic.com/adams12uk/images/centralparkfantasy.jpg',500,333,'Central Park Fantasy','http://www1.clikpic.com/adams12uk/images/centralparkfantasy_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[25] = new photo(780487,'60254','','gallery','http://www1.clikpic.com/adams12uk/images/urbanabstract.jpg',300,450,'Urban Abstract','http://www1.clikpic.com/adams12uk/images/urbanabstract_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[26] = new photo(780488,'60254','','gallery','http://www1.clikpic.com/adams12uk/images/arizgasstation.jpg',500,313,'Deserted Gas station','http://www1.clikpic.com/adams12uk/images/arizgasstation_thumb.jpg',130, 81,0, 0,'','','','','','');
photos[27] = new photo(780489,'60266','','gallery','http://www1.clikpic.com/adams12uk/images/deathonline.jpg',500,375,'Death on the Line (Finalist in the \'Our Lives\' photo comp run by Currys, Daily Telegraph and Olympus)','http://www1.clikpic.com/adams12uk/images/deathonline_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[28] = new photo(780490,'60266','','gallery','http://www1.clikpic.com/adams12uk/images/easterwindow.jpg',313,450,'The Easter Window','http://www1.clikpic.com/adams12uk/images/easterwindow_thumb.jpg',130, 187,0, 0,'','','','','','');
photos[29] = new photo(780491,'181633','','gallery','http://www1.clikpic.com/adams12uk/images/lechatnoir.jpg',500,309,'Le Chat Noir','http://www1.clikpic.com/adams12uk/images/lechatnoir_thumb.jpg',130, 80,1, 0,'','','','','','');
photos[30] = new photo(780492,'60264','','gallery','http://www1.clikpic.com/adams12uk/images/medecinelake.jpg',500,296,'Medicine Lake, Canadian Rockies','http://www1.clikpic.com/adams12uk/images/medecinelake_thumb.jpg',130, 77,1, 0,'','','','','','');
photos[31] = new photo(780495,'60264','','gallery','http://www1.clikpic.com/adams12uk/images/trossachs2ab.jpg',500,307,'The Trossachs, Scotland','http://www1.clikpic.com/adams12uk/images/trossachs2ab_thumb.jpg',130, 80,0, 0,'','','','','','');
photos[32] = new photo(780497,'60270','','gallery','http://www1.clikpic.com/adams12uk/images/oldandnew.jpg',500,375,'Before and After','http://www1.clikpic.com/adams12uk/images/oldandnew_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[33] = new photo(780498,'60266','','gallery','http://www1.clikpic.com/adams12uk/images/rider.jpg',500,328,'21st Century Angel','http://www1.clikpic.com/adams12uk/images/rider_thumb.jpg',130, 85,0, 0,'','','','','','');
photos[34] = new photo(780508,'181638','','gallery','http://www1.clikpic.com/adams12uk/images/hoardingface.jpg',500,337,'Face on the Wall','http://www1.clikpic.com/adams12uk/images/hoardingface_thumb.jpg',130, 88,1, 0,'','','','','','');
photos[35] = new photo(2938877,'181633','','gallery','http://admin.clikpic.com/adams12uk/images/adams-03-dungeness-beach.jpg',500,750,'Dungeness Beach','http://admin.clikpic.com/adams12uk/images/adams-03-dungeness-beach_thumb.jpg',130, 195,1, 0,'','','','','','');
photos[36] = new photo(2938881,'181633','','gallery','http://admin.clikpic.com/adams12uk/images/adams-04-mask-of-learning.jpg',494,768,'Mask of Learning','http://admin.clikpic.com/adams12uk/images/adams-04-mask-of-learning_thumb.jpg',130, 202,1, 0,'','','','','','');
photos[37] = new photo(2938894,'181633','','gallery','http://admin.clikpic.com/adams12uk/images/adams-09-a-modern-couple.jpg',500,670,'A Modern Couple','http://admin.clikpic.com/adams12uk/images/adams-09-a-modern-couple_thumb.jpg',130, 174,0, 0,'','','','','','');
photos[38] = new photo(2938899,'181633','','gallery','http://admin.clikpic.com/adams12uk/images/adams-10-passing-strangers.jpg',500,759,'Passing Strangers','http://admin.clikpic.com/adams12uk/images/adams-10-passing-strangers_thumb.jpg',130, 197,0, 0,'','','','','','');
photos[39] = new photo(2938903,'181633','','gallery','http://admin.clikpic.com/adams12uk/images/adams-12-in-the-shadows.jpg',500,694,'In The Shadows','http://admin.clikpic.com/adams12uk/images/adams-12-in-the-shadows_thumb.jpg',130, 180,0, 0,'','','','','','');
photos[40] = new photo(2938907,'181633','','gallery','http://admin.clikpic.com/adams12uk/images/passing-picasso.jpg',500,677,'Passing Picasso','http://admin.clikpic.com/adams12uk/images/passing-picasso_thumb.jpg',130, 176,0, 0,'','','','','','');
photos[41] = new photo(2938920,'60266','','gallery','http://admin.clikpic.com/adams12uk/images/windmillaltviewoverblur.jpg',500,310,'The Base of the Windmill','http://admin.clikpic.com/adams12uk/images/windmillaltviewoverblur_thumb.jpg',130, 80,0, 0,'','','','','','');
photos[42] = new photo(2938924,'60266','','gallery','http://admin.clikpic.com/adams12uk/images/zhrconcourse.jpg',500,333,'Into the Unknown','http://admin.clikpic.com/adams12uk/images/zhrconcourse_thumb.jpg',130, 86,0, 0,'','','','','','');
photos[43] = new photo(2938931,'60266','','gallery','http://admin.clikpic.com/adams12uk/images/CLOTH-SELLERS-BY-THE-INDIAN-OCEAN-by-Paul-Adams-DPAGB-LDPS.jpg',500,338,'Cloth Sellers by the Ocean','http://admin.clikpic.com/adams12uk/images/CLOTH-SELLERS-BY-THE-INDIAN-OCEAN-by-Paul-Adams-DPAGB-LDPS_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[44] = new photo(2939005,'181638','','gallery','http://admin.clikpic.com/adams12uk/images/adams-05-the-bergmann-look.jpg',500,750,'','http://admin.clikpic.com/adams12uk/images/adams-05-the-bergmann-look_thumb.jpg',130, 195,0, 0,'That Bergmann Look','','','','','');
photos[45] = new photo(2939010,'181638','','gallery','http://admin.clikpic.com/adams12uk/images/adams-06-veiled-mademoiselle.jpg',500,709,'','http://admin.clikpic.com/adams12uk/images/adams-06-veiled-mademoiselle_thumb.jpg',130, 184,0, 0,'Veiled Parisienne','','','','','');
photos[46] = new photo(2939013,'181638','','gallery','http://admin.clikpic.com/adams12uk/images/adams-07-a-black-veil.jpg',500,754,'A Long Black Veil','http://admin.clikpic.com/adams12uk/images/adams-07-a-black-veil_thumb.jpg',130, 196,0, 0,'','','','','','');
photos[47] = new photo(2939015,'181638','','gallery','http://admin.clikpic.com/adams12uk/images/misty-veil-seated-nude.jpg',360,504,'Seated Nude','http://admin.clikpic.com/adams12uk/images/misty-veil-seated-nude_thumb.jpg',130, 182,0, 0,'','','','','','');
photos[48] = new photo(2939024,'181638','','gallery','http://admin.clikpic.com/adams12uk/images/nude-back-02-man-ray.jpg',500,749,'','http://admin.clikpic.com/adams12uk/images/nude-back-02-man-ray_thumb.jpg',130, 194,0, 0,'After Man Ray','','','','','');
photos[49] = new photo(2939029,'181638','','gallery','http://admin.clikpic.com/adams12uk/images/nude-by-window-silhouette-02cropflat2.jpg',283,425,'','http://admin.clikpic.com/adams12uk/images/nude-by-window-silhouette-02cropflat2_thumb.jpg',130, 195,0, 0,'The Model by the Window','','','','','');
photos[50] = new photo(2939034,'181638','','gallery','http://admin.clikpic.com/adams12uk/images/nude-curves-04-crop.jpg',478,737,'Curves','http://admin.clikpic.com/adams12uk/images/nude-curves-04-crop_thumb.jpg',130, 200,0, 0,'','','','','','');
photos[51] = new photo(2939114,'60254','','gallery','http://admin.clikpic.com/adams12uk/images/motel-pima.jpg',500,332,'Motel at Pima','http://admin.clikpic.com/adams12uk/images/motel-pima_thumb.jpg',130, 86,0, 0,'','','','','','');
photos[52] = new photo(2939125,'60254','','gallery','http://admin.clikpic.com/adams12uk/images/intersectionplus.jpg',500,332,'Stretch Intersection Phoenix','http://admin.clikpic.com/adams12uk/images/intersectionplus_thumb.jpg',130, 86,0, 0,'','','','','','');
photos[53] = new photo(2939134,'60254','','gallery','http://admin.clikpic.com/adams12uk/images/car-parking-2-plus.jpg',500,267,'Passing by on Route 66','http://admin.clikpic.com/adams12uk/images/car-parking-2-plus_thumb.jpg',130, 69,0, 0,'','','','','','');
photos[54] = new photo(2939150,'60254','','gallery','http://admin.clikpic.com/adams12uk/images/motell-66a1.jpg',500,366,'Motel on Route 66','http://admin.clikpic.com/adams12uk/images/motell-66a1_thumb.jpg',130, 95,0, 0,'','','','','','');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
galleries = new Array();
galleries[0] = new gallery(60264,'780495,780492,780485,780470,779811,779755','Landscapes','gallery');
galleries[1] = new gallery(181633,'2938907,2938903,2938899,2938894,2938881,2938877,780491,780466,780465,780463','Monochrome','gallery');
galleries[2] = new gallery(60266,'2938931,2938924,2938920,780498,780490,780489,780483,780476,780474,780464','My Favourites','gallery');
galleries[3] = new gallery(60270,'780497,779760,779759','Restoration','gallery');
galleries[4] = new gallery(60265,'780482,780480,780478,780477,779824,779757','Still Life','gallery');
galleries[5] = new gallery(181638,'2939034,2939029,2939024,2939015,2939013,2939010,2939005,780508,780481','That Feminine Look','gallery');
galleries[6] = new gallery(60254,'778623','U.S.A.','gallery');

