/***************************************************************************
* 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('961227,961205,961197,961194,960851,960844,960305,959754,959748,959734,959722,788632,788631,788626,788624,788623,788620,788615,788612,770984,770983,770982,770980,770979,770978,770974,770967,770965,770964,770962,770961,770960,770959,770958,770956,770955,770954,770953,770952,770951,770950,770948,770947,770944,770943,770942,770941,770936');
	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('961227,961205,961197,961194,960851,960844,960305,959754,959748,959734,959722,788632,788631,788626,788624,788623,788620,788615,788612,770984,770983,770982,770980,770979,770978,770974,770967,770965,770964,770962,770961,770960,770959,770958,770956,770955,770954,770953,770952,770951,770950,770948,770947,770944,770943,770942,770941,770936');
	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)) {
		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 + '" border="0">';
						field.value = photos[nextImg].id;
			document.getElementById('imageTitle').innerHTML = 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(770936,'58947','','gallery','http://www1.clikpic.com/daphnecartwright/images/RedNightFalling.jpg',418,282,'Red Night Falling<br>\nAcrylic on Board<br>\n180cm x 122cm','http://www1.clikpic.com/daphnecartwright/images/RedNightFalling_thumb.jpg',130, 88,0, 0,'','','','','','');
photos[1] = new photo(770941,'58947','','gallery','http://www1.clikpic.com/daphnecartwright/images/Impasse2.jpg',585,474,'Impasse 2<br>\nAcrylic on Board<br>\n160cm x 122cm','http://www1.clikpic.com/daphnecartwright/images/Impasse2_thumb.jpg',130, 105,0, 0,'','','','','','');
photos[2] = new photo(770942,'58947','','gallery','http://www1.clikpic.com/daphnecartwright/images/RedNightFalling2.jpg',377,503,'Red Night Falling 2<br>\nAcrylic on Board<br>\n91cm x 122cm<br>\nAlso as Giclee Print','http://www1.clikpic.com/daphnecartwright/images/RedNightFalling2_thumb.jpg',130, 173,0, 0,'','','','','','');
photos[3] = new photo(770954,'58947','','gallery','http://www1.clikpic.com/daphnecartwright/images/DistantHills2.jpg',600,492,'Distant Hills 2<br>\nAcrylic on Board<br>\n160cm x 122cm','http://www1.clikpic.com/daphnecartwright/images/DistantHills2_thumb.jpg',130, 107,0, 0,'','','','','','');
photos[4] = new photo(770943,'58947','','gallery','http://www1.clikpic.com/daphnecartwright/images/RedNightFalling3.jpg',485,389,'Red Night Falling 3<br>\nAcrylic on Board<br>\n160cm x 122cm','http://www1.clikpic.com/daphnecartwright/images/RedNightFalling3_thumb.jpg',130, 104,0, 0,'','','','','','');
photos[5] = new photo(770961,'58947','','gallery','http://www1.clikpic.com/daphnecartwright/images/The Valley.jpg',599,577,'The Valley<br>\nAcrylic on Board<br>\n122cm x 122cm','http://www1.clikpic.com/daphnecartwright/images/The Valley_thumb.jpg',130, 125,0, 0,'','','','','','');
photos[6] = new photo(770947,'58947','','gallery','http://www1.clikpic.com/daphnecartwright/images/StacPollaigh.jpg',490,366,'Stac Pollaigh 1<br>\nMixed media on paper<br>\n55cm x 46cm','http://www1.clikpic.com/daphnecartwright/images/StacPollaigh_thumb.jpg',130, 97,0, 0,'','','','','','');
photos[7] = new photo(959722,'58947','','gallery','http://www1.clikpic.com/daphnecartwright/images/Buttress1.jpg',361,485,'Buttress<br>\nAcrylic on Board<br>\n91cm x 122cm','http://www1.clikpic.com/daphnecartwright/images/Buttress1_thumb.jpg',130, 175,0, 0,'','','','','','');
photos[8] = new photo(770948,'58947','','gallery','http://www1.clikpic.com/daphnecartwright/images/StacPollaigh2.jpg',463,375,'Stac Pollaigh 2<br>\nWatercolour on paper<br>\n55cm x 46cm<br>\nPrivate Collection','http://www1.clikpic.com/daphnecartwright/images/StacPollaigh2_thumb.jpg',130, 105,0, 0,'','','','','','');
photos[9] = new photo(770944,'58947','','gallery','http://www1.clikpic.com/daphnecartwright/images/RedNightFalling4.jpg',593,567,'Red Night Falling 4<br>\nAcrylic on Board<br>\n122cm x 122cm<br>\nPrivate Collection','http://www1.clikpic.com/daphnecartwright/images/RedNightFalling4_thumb.jpg',130, 124,0, 0,'','','','','','');
photos[10] = new photo(770958,'72434','','gallery','http://www1.clikpic.com/daphnecartwright/images/LabyrinthSeries1.jpg',349,450,'Dreaming Pathways Series #3<br>\nWatercolour on handmade paper<br>\n47cm x 63cm','http://www1.clikpic.com/daphnecartwright/images/LabyrinthSeries1_thumb.jpg',130, 168,0, 0,'','','','','','');
photos[11] = new photo(770959,'72434','','gallery','http://www1.clikpic.com/daphnecartwright/images/LabyrinthSeries2.jpg',362,453,'Dreaming Pathways Series #1<br>\nWatercolour on handmade paper<br>\n47cm x 63cm','http://www1.clikpic.com/daphnecartwright/images/LabyrinthSeries2_thumb.jpg',130, 163,0, 0,'','','','','','');
photos[12] = new photo(770960,'72434','','gallery','http://www1.clikpic.com/daphnecartwright/images/LabyrinthSeries3.jpg',387,512,'Dreaming Pathways Series #2<br>\nWatercolour on handmade paper<br>\n47cm x 63cm','http://www1.clikpic.com/daphnecartwright/images/LabyrinthSeries3_thumb.jpg',130, 172,0, 0,'','','','','','');
photos[13] = new photo(959734,'72434','','gallery','http://www1.clikpic.com/daphnecartwright/images/DreamingPathwaysSeries31.jpg',423,600,'Dreaming Pathways #1 <br>\nAcrylic on paper<br>\n76cm x 89cm','http://www1.clikpic.com/daphnecartwright/images/DreamingPathwaysSeries31_thumb.jpg',130, 184,0, 0,'','','','','','');
photos[14] = new photo(770956,'72434','','gallery','http://www1.clikpic.com/daphnecartwright/images/DreamingPathwaysSeries2.jpg',386,500,'Dreaming Pathway #2<br>\nAcrylic on paper<br>\n57cm x 75cm','http://www1.clikpic.com/daphnecartwright/images/DreamingPathwaysSeries2_thumb.jpg',130, 168,0, 0,'','','','','','');
photos[15] = new photo(770955,'72434','','gallery','http://www1.clikpic.com/daphnecartwright/images/DreamingPathwaysSeries1.jpg',400,569,'Dreaming pathway #3 <br>\nAcrylic on paper<br>\n57cm x 75cm','http://www1.clikpic.com/daphnecartwright/images/DreamingPathwaysSeries1_thumb.jpg',130, 185,0, 0,'','','','','','');
photos[16] = new photo(770974,'59702','','gallery','http://www1.clikpic.com/daphnecartwright/images/Spanishseries1.jpg',364,453,'Spanish Series 1<br>\nAcrylic on paper<br>\n47cm x 58cm','http://www1.clikpic.com/daphnecartwright/images/Spanishseries1_thumb.jpg',130, 162,0, 0,'','','','','','');
photos[17] = new photo(959748,'59702','','gallery','http://www1.clikpic.com/daphnecartwright/images/Spanishseries21.jpg',400,561,'Spanish Series 2<br>\nAcrylic on paper<br>\n47cm x 63cm','http://www1.clikpic.com/daphnecartwright/images/Spanishseries21_thumb.jpg',130, 182,0, 0,'','','','','','');
photos[18] = new photo(960844,'59702','','gallery','http://www1.clikpic.com/daphnecartwright/images/Spanish series 3.jpg',438,600,'Spanish Series 3<br>\nAcylic on paper<br>\n80cm x 102cm<br>\nPrivate Collection<br>\nAlso as Giclee Print','http://www1.clikpic.com/daphnecartwright/images/Spanish series 3_thumb.jpg',130, 178,0, 0,'','','','','','');
photos[19] = new photo(959754,'59702','','gallery','http://www1.clikpic.com/daphnecartwright/images/Spanishseries4 1.jpg',371,503,'Spanish Series 4<br>\nAcrylic on paper<br>\n76cm x 89cm','http://www1.clikpic.com/daphnecartwright/images/Spanishseries4 1_thumb.jpg',130, 176,0, 0,'','','','','','');
photos[20] = new photo(788620,'61253','','gallery','http://www1.clikpic.com/daphnecartwright/images/SummerHeatLodeve.jpg',359,508,'Summer Heat Lodeve<br>\nAcrylic on paper<br>\n53cm x 68cm','http://www1.clikpic.com/daphnecartwright/images/SummerHeatLodeve_thumb.jpg',130, 184,0, 0,'','','','','','');
photos[21] = new photo(788623,'61253','','gallery','http://www1.clikpic.com/daphnecartwright/images/SummerHeatLodeve2.jpg',492,378,'Summer Heat Lodeve 2<br>\nAcrylic on paper<br>\n68cm x 53cm<br>\nPrivate Collection','http://www1.clikpic.com/daphnecartwright/images/SummerHeatLodeve2_thumb.jpg',130, 100,0, 0,'','','','','','');
photos[22] = new photo(788624,'61253','','gallery','http://www1.clikpic.com/daphnecartwright/images/SummerHeatStTropez.jpg',516,368,'Summer Heat St Tropeze<br>\nAcrylic on paper<br>\n68cm x 53cm','http://www1.clikpic.com/daphnecartwright/images/SummerHeatStTropez_thumb.jpg',130, 93,0, 0,'','','','','','');
photos[23] = new photo(788626,'61253','','gallery','http://www1.clikpic.com/daphnecartwright/images/SummerHeatStTropez2.jpg',520,390,'Summer Heat St Tropeze 2<br>\nAcrylic on paper<br>\n68cm x 53cm','http://www1.clikpic.com/daphnecartwright/images/SummerHeatStTropez2_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[24] = new photo(961194,'59699','','gallery','http://www1.clikpic.com/daphnecartwright/images/From Under the Blanket Series 1.jpg',518,600,'From Under the Blanket series 1 <br>\nAcrylic on board <br>\n92cm x 122cm','http://www1.clikpic.com/daphnecartwright/images/From Under the Blanket Series 1_thumb.jpg',130, 151,0, 0,'','','','','','');
photos[25] = new photo(961197,'59699','','gallery','http://www1.clikpic.com/daphnecartwright/images/From Under the Blanket Series 2.jpg',517,600,'From Under the Blanket series 2 <br>\nAcrylic on board <br>\n92cm x 122cm','http://www1.clikpic.com/daphnecartwright/images/From Under the Blanket Series 2_thumb.jpg',130, 151,0, 0,'','','','','','');
photos[26] = new photo(770950,'59699','','gallery','http://www1.clikpic.com/daphnecartwright/images/FromUndertheBlanketSeries3.jpg',384,470,'From Under the Blanket series 3<br>\nAcrylic on board<br>\n92cm x 122cm','http://www1.clikpic.com/daphnecartwright/images/FromUndertheBlanketSeries3_thumb.jpg',130, 159,0, 0,'','','','','','');
photos[27] = new photo(770951,'59699','','gallery','http://www1.clikpic.com/daphnecartwright/images/FromUndertheBlanketSeries4.jpg',386,471,'From Under the Blanket series 4<br>\nAcrylic on board<br>\n92cm x 122cm<br>\nAlso as Giclee Print','http://www1.clikpic.com/daphnecartwright/images/FromUndertheBlanketSeries4_thumb.jpg',130, 159,0, 0,'','','','','','');
photos[28] = new photo(961205,'59699','','gallery','http://www1.clikpic.com/daphnecartwright/images/From Under the Blanket Series 5.jpg',517,600,'From Under the Blanket series 5 <br>\nAcrylic on board <br>\n92cm x 122cm','http://www1.clikpic.com/daphnecartwright/images/From Under the Blanket Series 5_thumb.jpg',130, 151,0, 0,'','','','','','');
photos[29] = new photo(770952,'59699','','gallery','http://www1.clikpic.com/daphnecartwright/images/FromUndertheBlanketSeries6.jpg',400,460,'From Under the Blanket Series 6<br>\nAcrylic on board<br>\n92cm x 122cm','http://www1.clikpic.com/daphnecartwright/images/FromUndertheBlanketSeries6_thumb.jpg',130, 150,0, 0,'','','','','','');
photos[30] = new photo(770953,'59699','','gallery','http://www1.clikpic.com/daphnecartwright/images/FromUndertheBlanketSeries7.jpg',384,464,'From Under the Blanket Series 7<br>\nAcrylic on board<br>\n92cm x 122cm<br>\nAlso as Giclee Print','http://www1.clikpic.com/daphnecartwright/images/FromUndertheBlanketSeries7_thumb.jpg',130, 157,0, 0,'','','','','','');
photos[31] = new photo(961227,'59699','','gallery','http://www1.clikpic.com/daphnecartwright/images/From Under the Blanket Series 81.jpg',515,600,'From Under the Blanket series 8 <br>\nAcrylic on board <br>\n92cm x 122cm','http://www1.clikpic.com/daphnecartwright/images/From Under the Blanket Series 81_thumb.jpg',130, 151,0, 0,'','','','','','');
photos[32] = new photo(788631,'61255','','gallery','http://www1.clikpic.com/daphnecartwright/images/Flora.jpg',400,409,'Flora 1<br>\nMixed media on board<br>\n122cm x 122cm','http://www1.clikpic.com/daphnecartwright/images/Flora_thumb.jpg',130, 133,0, 0,'','','','','','');
photos[33] = new photo(788632,'61255','','gallery','http://www1.clikpic.com/daphnecartwright/images/Flora2.jpg',400,415,'Flora 2<br>\nMixed media on board<br>\n122cm x 122cm','http://www1.clikpic.com/daphnecartwright/images/Flora2_thumb.jpg',130, 135,0, 0,'','','','','','');
photos[34] = new photo(960851,'61252','','gallery','http://www1.clikpic.com/daphnecartwright/images/Dancer 3.jpg',513,414,'Dancers Series 1 <br>\nAcrylic on paper <br>\n69cm x 62cm <br>\nAlso as Giclee Print','http://www1.clikpic.com/daphnecartwright/images/Dancer 3_thumb.jpg',130, 105,0, 0,'','','','','','');
photos[35] = new photo(788615,'61252','','gallery','http://www1.clikpic.com/daphnecartwright/images/Dancer2.jpg',367,514,'Dancer Series 2<br>\nAcrylic on paper<br>\n41cm x 53cm<br>\nPrivate Collection<br>\nAlso as Gilcee print','http://www1.clikpic.com/daphnecartwright/images/Dancer2_thumb.jpg',130, 182,0, 0,'','','','','','');
photos[36] = new photo(788612,'61252','','gallery','http://www1.clikpic.com/daphnecartwright/images/Dancer1.jpg',400,598,'Dancer Series 3<br>\nAcrylic on paper<br>\n41cm x 53cm','http://www1.clikpic.com/daphnecartwright/images/Dancer1_thumb.jpg',130, 194,0, 0,'','','','','','');
photos[37] = new photo(770967,'59700','','gallery','http://www1.clikpic.com/daphnecartwright/images/LagoTrasimenoSeries5.jpg',365,485,'Lago Trasemino Series 5','http://www1.clikpic.com/daphnecartwright/images/LagoTrasimenoSeries5_thumb.jpg',130, 173,0, 0,'','','','','','');
photos[38] = new photo(770962,'59700','','gallery','http://www1.clikpic.com/daphnecartwright/images/LagoTrasimenoSeries2.jpg',405,391,'Lago Trasemino #2<br>\nMIxed media collage on paper<br>\n53cm x 53cm<br>\n','http://www1.clikpic.com/daphnecartwright/images/LagoTrasimenoSeries2_thumb.jpg',130, 126,0, 0,'','','','','','');
photos[39] = new photo(770964,'59700','','gallery','http://www1.clikpic.com/daphnecartwright/images/LagoTrasimenoSeries3.jpg',307,481,'Lago Trasemino #3<br>\nMixed media collage on paper<br>\n27cm x 35cm<br>\nPrivate Collection','http://www1.clikpic.com/daphnecartwright/images/LagoTrasimenoSeries3_thumb.jpg',130, 204,0, 0,'','','','','','');
photos[40] = new photo(770965,'59700','','gallery','http://www1.clikpic.com/daphnecartwright/images/LagoTrasimenoSeries4.jpg',217,494,'Lago Trasemino #4<br>\nMixed media collage on paper<br>\n21cm x 36cm','http://www1.clikpic.com/daphnecartwright/images/LagoTrasimenoSeries4_thumb.jpg',130, 296,0, 0,'','','','','','');
photos[41] = new photo(770978,'59703','','gallery','http://www1.clikpic.com/daphnecartwright/images/SmallStoriesseries1.jpg',600,400,'Small Stories #1<br>\nMixed media collage on paper<br>\n57cm x 45cm<br>\n','http://www1.clikpic.com/daphnecartwright/images/SmallStoriesseries1_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[42] = new photo(770979,'59703','','gallery','http://www1.clikpic.com/daphnecartwright/images/SmallStoriesseries3.jpg',600,421,'Small Stories #3<br>\nMixed media collage on paper<br>\n59cm x 48cm','http://www1.clikpic.com/daphnecartwright/images/SmallStoriesseries3_thumb.jpg',130, 91,0, 0,'','','','','','');
photos[43] = new photo(770980,'59703','','gallery','http://www1.clikpic.com/daphnecartwright/images/SmallStoriesseries4.jpg',600,485,'Small Stories #4<br>\nMixed media collage on paper<br>\n52cm x 48cm','http://www1.clikpic.com/daphnecartwright/images/SmallStoriesseries4_thumb.jpg',130, 105,0, 0,'','','','','','');
photos[44] = new photo(960305,'59703','','gallery','http://www1.clikpic.com/daphnecartwright/images/SmallStoriesseries51.jpg',443,570,'Small Stories #5<br>\nMixed media collage on paper<br>\n59cm x 48cm','http://www1.clikpic.com/daphnecartwright/images/SmallStoriesseries51_thumb.jpg',130, 167,0, 0,'','','','','','');
photos[45] = new photo(770982,'59704','','gallery','http://www1.clikpic.com/daphnecartwright/images/VariationMagenta.jpg',418,600,'Variation Magenta<br>\nMixed media collage on paper<br>\n49cm x 59cm<br>\nPrivate Collection','http://www1.clikpic.com/daphnecartwright/images/VariationMagenta_thumb.jpg',130, 187,0, 0,'','','','','','');
photos[46] = new photo(770983,'59704','','gallery','http://www1.clikpic.com/daphnecartwright/images/VariationViolet.jpg',403,600,'Variation Violet<br>\nMixed media collage on paper<br>\n49cm x 59cm<br>\nPrivate Collection','http://www1.clikpic.com/daphnecartwright/images/VariationViolet_thumb.jpg',130, 194,0, 0,'','','','','','');
photos[47] = new photo(770984,'59704','','gallery','http://www1.clikpic.com/daphnecartwright/images/VariationYellow.jpg',419,600,'Variation Yellow<br>\nMixed media collage on paper<br>\n49cm x 59cm<br>\nPrivate Collection','http://www1.clikpic.com/daphnecartwright/images/VariationYellow_thumb.jpg',130, 186,0, 0,'','','','','','');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
galleries = new Array();
galleries[0] = new gallery(58947,'959722,770961,770954,770948,770947,770944,770943,770942,770941,770936','Scottish Series','gallery');
galleries[1] = new gallery(72434,'959734,770960,770959,770958,770956,770955','Peat Bog series','gallery');
galleries[2] = new gallery(59702,'960844,959754,959748,770974','Spanish Series','gallery');
galleries[3] = new gallery(61253,'788626,788624,788623,788620','Summer Heat','gallery');
galleries[4] = new gallery(59699,'961227,961205,961197,961194,770953,770952,770951,770950','From Under the Blanket Series','gallery');
galleries[5] = new gallery(61255,'788632,788631','Flora Series','gallery');
galleries[6] = new gallery(61252,'960851,788615,788612','Dancers','gallery');
galleries[7] = new gallery(59700,'770967,770965,770964,770962','Lago Trasemino Series','gallery');
galleries[8] = new gallery(59703,'960305,770980,770979,770978','Small Stories Series','gallery');
galleries[9] = new gallery(59704,'770984,770983,770982','Colour Variation Series','gallery');

