/***************************************************************************
* 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('2964472');
	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('2964472');
	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 = 'clairelou 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>clairelou </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(3457535,'211360','','gallery','http://www1.clikpic.com/clairelou/images/along-the-coast-1-030.jpg',500,335,'hadyn','http://www1.clikpic.com/clairelou/images/along-the-coast-1-030_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[1] = new photo(3457555,'211360','','gallery','http://www1.clikpic.com/clairelou/images/smiley-girls-Bryngarw-250.jpg',500,335,'leah and hollie','http://www1.clikpic.com/clairelou/images/smiley-girls-Bryngarw-250_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[2] = new photo(3457556,'211360','','gallery','http://www1.clikpic.com/clairelou/images/tree-huggers-at-Bryngarw-17.jpg',500,335,'peek a boo','http://www1.clikpic.com/clairelou/images/tree-huggers-at-Bryngarw-17_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[3] = new photo(3457564,'211360','','gallery','http://www1.clikpic.com/clairelou/images/along-the-coast-1-036-copy.jpg',500,335,'haydn','http://www1.clikpic.com/clairelou/images/along-the-coast-1-036-copy_thumb.jpg',130, 87,0, 1,'','','','','','');
photos[4] = new photo(3457577,'211360','','gallery','http://www1.clikpic.com/clairelou/images/my-girl-Bryngarw-304.jpg',500,335,'leah','http://www1.clikpic.com/clairelou/images/my-girl-Bryngarw-304_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[5] = new photo(3457581,'211360','','gallery','http://www1.clikpic.com/clairelou/images/nosey-girls-Bryngarw-266.jpg',500,747,'best friends','http://www1.clikpic.com/clairelou/images/nosey-girls-Bryngarw-266_thumb.jpg',130, 194,0, 0,'','','','','','');
photos[6] = new photo(3457584,'211360','','gallery','http://www1.clikpic.com/clairelou/images/holly-leaning-on-piller-par.jpg',500,747,'hollie','http://www1.clikpic.com/clairelou/images/holly-leaning-on-piller-par_thumb.jpg',130, 194,0, 0,'','','','','','');
photos[7] = new photo(3457598,'211360','','gallery','http://www1.clikpic.com/clairelou/images/hold-my-bike-!-16.jpg',500,335,'hadyn 2','http://www1.clikpic.com/clairelou/images/hold-my-bike-!-16_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[8] = new photo(3457600,'211360','','gallery','http://www1.clikpic.com/clairelou/images/hydan-walking-up-the-path-c.jpg',500,747,'up the path','http://www1.clikpic.com/clairelou/images/hydan-walking-up-the-path-c_thumb.jpg',130, 194,0, 0,'','','','','','');
photos[9] = new photo(3457601,'211360','','gallery','http://www1.clikpic.com/clairelou/images/lost-the-way-008-copy.jpg',500,335,'smile','http://www1.clikpic.com/clairelou/images/lost-the-way-008-copy_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[10] = new photo(3457603,'211360','','gallery','http://www1.clikpic.com/clairelou/images/yehaa-148.jpg',500,747,'shy boy','http://www1.clikpic.com/clairelou/images/yehaa-148_thumb.jpg',130, 194,0, 0,'','','','','','');
photos[11] = new photo(3457605,'211360','','gallery','http://www1.clikpic.com/clairelou/images/hold-my-bike-!-161.jpg',500,335,'hold on','http://www1.clikpic.com/clairelou/images/hold-my-bike-!-161_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[12] = new photo(3457607,'211360','','gallery','http://www1.clikpic.com/clairelou/images/skeaky-137-B&W-cropped.jpg',500,335,'sweet eyes','http://www1.clikpic.com/clairelou/images/skeaky-137-B&W-cropped_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[13] = new photo(3491260,'211360','','gallery','http://www1.clikpic.com/clairelou/images/camping-in-yorkshire,bourgh.jpg',500,747,'sophie','http://www1.clikpic.com/clairelou/images/camping-in-yorkshire,bourgh_thumb.jpg',130, 194,0, 0,'','','','','','');
photos[14] = new photo(3491263,'211360','','gallery','http://www1.clikpic.com/clairelou/images/sophie-thro-the-field-of-wh.jpg',500,747,'spring walk','http://www1.clikpic.com/clairelou/images/sophie-thro-the-field-of-wh_thumb.jpg',130, 194,0, 0,'','','','','','');
photos[15] = new photo(3491265,'211360','','gallery','http://www1.clikpic.com/clairelou/images/sophie-through-feild---shro.jpg',500,747,'that summer feeling','http://www1.clikpic.com/clairelou/images/sophie-through-feild---shro_thumb.jpg',130, 194,0, 0,'','','','','','');
photos[16] = new photo(1969754,'118708','','gallery','http://www1.clikpic.com/clairelou/images/hedra WM&SG.JPG',500,747,'last days','http://www1.clikpic.com/clairelou/images/hedra WM&SG_thumb.JPG',130, 194,0, 0,'','','','','','');
photos[17] = new photo(1969612,'118708','','gallery','http://www1.clikpic.com/clairelou/images/fading WM&SG.JPG',500,747,'fallen','http://www1.clikpic.com/clairelou/images/fading WM&SG_thumb.JPG',130, 194,0, 0,'','','','','','');
photos[18] = new photo(1969751,'118708','','gallery','http://www1.clikpic.com/clairelou/images/hedra 2 WM&SG.JPG',500,747,'hydrangea fade','http://www1.clikpic.com/clairelou/images/hedra 2 WM&SG_thumb.JPG',130, 194,0, 1,'','','','','','');
photos[19] = new photo(1969672,'118708','','gallery','http://www1.clikpic.com/clairelou/images/the-white-daff.jpg',500,500,'whisper','http://www1.clikpic.com/clairelou/images/the-white-daff_thumb.jpg',130, 130,0, 0,'','','','','','');
photos[20] = new photo(2074461,'118708','','gallery','http://www1.clikpic.com/clairelou/images/beauty-drop.jpg',500,500,'golden wings','http://www1.clikpic.com/clairelou/images/beauty-drop_thumb.jpg',130, 130,0, 0,'','','','','','');
photos[21] = new photo(2074465,'118708','','gallery','http://www1.clikpic.com/clairelou/images/beauty-drop-2.jpg',500,500,'sweet','http://www1.clikpic.com/clairelou/images/beauty-drop-2_thumb.jpg',130, 130,0, 0,'','','','','','');
photos[22] = new photo(1869625,'118708','','gallery','http://www1.clikpic.com/clairelou/images/RED SEDUMS copy WM&SG.JPG',500,747,'simply red','http://www1.clikpic.com/clairelou/images/RED SEDUMS copy WM&SG_thumb.JPG',130, 194,0, 0,'','','','','','');
photos[23] = new photo(1869619,'118708','','gallery','http://www1.clikpic.com/clairelou/images/DRIED-SEDUM-WM&SG.jpg',500,747,'sedums','http://www1.clikpic.com/clairelou/images/DRIED-SEDUM-WM&SG_thumb.jpg',130, 194,0, 0,'','','','','','');
photos[24] = new photo(1869632,'118708','','gallery','http://www1.clikpic.com/clairelou/images/seeds of sedum WM&SG.JPG',500,747,'seeds of sedum','http://www1.clikpic.com/clairelou/images/seeds of sedum WM&SG_thumb.JPG',130, 194,0, 0,'','','','','','');
photos[25] = new photo(2100805,'118708','','gallery','http://www1.clikpic.com/clairelou/images/lilly 1 (waterdroplet) WM&SG.JPG',500,747,'lily white','http://www1.clikpic.com/clairelou/images/lilly 1 (waterdroplet) WM&SG_thumb.JPG',130, 194,0, 0,'','','','','','');
photos[26] = new photo(2100823,'118708','','gallery','http://www1.clikpic.com/clairelou/images/lilly 2 (corner).JPG',500,747,'silent dream','http://www1.clikpic.com/clairelou/images/lilly 2 (corner)_thumb.JPG',130, 194,0, 0,'','','','','','');
photos[27] = new photo(2945249,'118708','','gallery','http://www1.clikpic.com/clairelou/images/seed-pod-066.jpg',500,747,'simplicity','http://www1.clikpic.com/clairelou/images/seed-pod-066_thumb.jpg',130, 194,0, 0,'','','','','','');
photos[28] = new photo(2074485,'138613','','gallery','http://www1.clikpic.com/clairelou/images/the suit sgd&WM.jpg',500,500,'','http://www1.clikpic.com/clairelou/images/the suit sgd&WM_thumb.jpg',130, 130,0, 0,'','','','','','');
photos[29] = new photo(2074473,'138613','','gallery','http://www1.clikpic.com/clairelou/images/collar suit sgd&WM.JPG',500,500,'','http://www1.clikpic.com/clairelou/images/collar suit sgd&WM_thumb.JPG',130, 130,0, 1,'','','','','','');
photos[30] = new photo(2074482,'138613','','gallery','http://www1.clikpic.com/clairelou/images/sleeve suit sgd&WM.JPG',500,500,'','http://www1.clikpic.com/clairelou/images/sleeve suit sgd&WM_thumb.JPG',130, 130,0, 0,'','','','','','');
photos[31] = new photo(2944301,'138613','','gallery','http://www1.clikpic.com/clairelou/images/armchair-copy-W&S.jpg',500,334,'','http://www1.clikpic.com/clairelou/images/armchair-copy-W&S_thumb.jpg',130, 86,0, 0,'','','','','','');
photos[32] = new photo(2944855,'138613','','gallery','http://www1.clikpic.com/clairelou/images/chair-and-cushion-copy-copy.jpg',500,334,'','http://www1.clikpic.com/clairelou/images/chair-and-cushion-copy-copy_thumb.jpg',130, 86,0, 0,'','','','','','');
photos[33] = new photo(2944844,'138613','','gallery','http://www1.clikpic.com/clairelou/images/the-rocking-chair-copy-copy.jpg',500,334,'','http://www1.clikpic.com/clairelou/images/the-rocking-chair-copy-copy_thumb.jpg',130, 86,0, 0,'','','','','','');
photos[34] = new photo(2900059,'118706','','gallery','http://www1.clikpic.com/clairelou/images/along-the-coast-158-S.jpg',500,746,'southerdown heritage coast','http://www1.clikpic.com/clairelou/images/along-the-coast-158-S_thumb.jpg',129, 193,0, 0,'','','','','','');
photos[35] = new photo(2368583,'118706','','gallery','http://www1.clikpic.com/clairelou/images/seaside rag 0049 S&WM 72pp.jpg',500,747,'burry holms','http://www1.clikpic.com/clairelou/images/seaside rag 0049 S&WM 72pp_thumb.jpg',130, 194,0, 0,'','','','Llangennith','','');
photos[36] = new photo(1869869,'118706','','gallery','http://www1.clikpic.com/clairelou/images/boat houseb+w WM&SG.JPG',500,856,'mumbles boathouse','http://www1.clikpic.com/clairelou/images/boat houseb+w WM&SG_thumb.JPG',130, 223,0, 0,'','','','mumbles swansea','','');
photos[37] = new photo(2966183,'118706','','gallery','http://www1.clikpic.com/clairelou/images/early-morning-at-dunraven-b.jpg',500,747,'','http://www1.clikpic.com/clairelou/images/early-morning-at-dunraven-b_thumb.jpg',130, 194,0, 0,'','','','','','');
photos[38] = new photo(2966202,'118706','','gallery','http://www1.clikpic.com/clairelou/images/crashing-the-waves-S&W.jpg',500,335,'','http://www1.clikpic.com/clairelou/images/crashing-the-waves-S&W_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[39] = new photo(2966247,'118706','','gallery','http://www1.clikpic.com/clairelou/images/the-long-stone-W&S.jpg',500,747,'','http://www1.clikpic.com/clairelou/images/the-long-stone-W&S_thumb.jpg',130, 194,0, 0,'','','','dunraven bay','','');
photos[40] = new photo(1869707,'118706','','gallery','http://www1.clikpic.com/clairelou/images/aberaeron 030 b&w WM.jpg',500,747,'waiting for sail','http://www1.clikpic.com/clairelou/images/aberaeron 030 b&w WM_thumb.jpg',130, 194,0, 1,'','','','','','');
photos[41] = new photo(1869951,'118706','','gallery','http://www1.clikpic.com/clairelou/images/aberaeron-shelter-copy9.jpg',500,747,'the shelter','http://www1.clikpic.com/clairelou/images/aberaeron-shelter-copy9_thumb.jpg',130, 194,0, 0,'','','','aberaeron','','');
photos[42] = new photo(2899815,'118706','','gallery','http://www1.clikpic.com/clairelou/images/along-the-coast-1-140-brigh.jpg',500,746,'dunraven bay','http://www1.clikpic.com/clairelou/images/along-the-coast-1-140-brigh_thumb.jpg',129, 193,0, 0,'dunraven bay on the heritage coast','','','','','');
photos[43] = new photo(1869945,'118706','','gallery','http://www1.clikpic.com/clairelou/images/aberaeron 105sunset WM&SG.JPG',500,747,'hazy beach','http://www1.clikpic.com/clairelou/images/aberaeron 105sunset WM&SG_thumb.JPG',130, 194,0, 0,'','','','aberaeron','','');
photos[44] = new photo(2900616,'118706','','gallery','http://www1.clikpic.com/clairelou/images/along-the-coast-1-177.jpg',500,746,'tide in','http://www1.clikpic.com/clairelou/images/along-the-coast-1-177_thumb.jpg',129, 193,0, 0,'','','','','','');
photos[45] = new photo(1870113,'118706','','gallery','http://www1.clikpic.com/clairelou/images/abersweyth beach WM.jpg',500,747,'aberystwyth','http://www1.clikpic.com/clairelou/images/abersweyth beach WM_thumb.jpg',130, 194,0, 0,'','','','aberystwyth','','');
photos[46] = new photo(1869873,'118706','','gallery','http://www1.clikpic.com/clairelou/images/mumble lighthouse.jpg',500,375,'mumbles lighthouse','http://www1.clikpic.com/clairelou/images/mumble lighthouse_thumb.jpg',130, 98,0, 0,'','','','mumbles swansea','','');
photos[47] = new photo(1870128,'118706','','gallery','http://www1.clikpic.com/clairelou/images/nash point lighthouse WM.JPG',500,747,'nash point lighthouse','http://www1.clikpic.com/clairelou/images/nash point lighthouse WM_thumb.JPG',130, 194,0, 0,'','','','nash point','','');
photos[48] = new photo(1869953,'118706','','gallery','http://www1.clikpic.com/clairelou/images/limey-pebbles-W&S.jpg',500,335,'','http://www1.clikpic.com/clairelou/images/limey-pebbles-W&S_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[49] = new photo(1766433,'118705','','gallery','http://www1.clikpic.com/clairelou/images/botanica tree and house-Edit copy.jpg',500,281,'pricipilty house','http://www1.clikpic.com/clairelou/images/botanica tree and house-Edit copy_thumb.jpg',130, 73,0, 0,'taken in the botanica garden of wales','','','','','');
photos[50] = new photo(2900697,'118705','','gallery','http://www1.clikpic.com/clairelou/images/the-secret-passage-S&W.jpg',500,746,'the secret passage','http://www1.clikpic.com/clairelou/images/the-secret-passage-S&W_thumb.jpg',129, 193,0, 1,'bryngarw pack','','','','','');
photos[51] = new photo(2899745,'118705','','gallery','http://www1.clikpic.com/clairelou/images/a-walk-down-the-coast--092-.jpg',499,334,'the way to southerdown','http://www1.clikpic.com/clairelou/images/a-walk-down-the-coast--092-_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[52] = new photo(2368747,'118705','','gallery','http://www1.clikpic.com/clairelou/images/Llangennith greens 0004 part2 W&S 72pp.JPG',500,747,'breeze','http://www1.clikpic.com/clairelou/images/Llangennith greens 0004 part2 W&S 72pp_thumb.JPG',130, 194,0, 0,'','','','','','');
photos[53] = new photo(2687233,'118705','','gallery','http://www1.clikpic.com/clairelou/images/field-of-dreams-WM&SG.jpg',500,747,'feild of dreams','http://www1.clikpic.com/clairelou/images/field-of-dreams-WM&SG_thumb.jpg',130, 194,0, 0,'','','','','','');
photos[54] = new photo(2368579,'118705','','gallery','http://www1.clikpic.com/clairelou/images/in coming storm Llangennith 0022 S&WM.JPG',500,335,'in coming storm Llangennith','http://www1.clikpic.com/clairelou/images/in coming storm Llangennith 0022 S&WM_thumb.JPG',130, 87,0, 0,'','','','Llangennith','','');
photos[55] = new photo(2368585,'118705','','gallery','http://www1.clikpic.com/clairelou/images/the mill hill tree signed&wm001.jpg',500,747,'priory hill','http://www1.clikpic.com/clairelou/images/the mill hill tree signed&wm001_thumb.jpg',130, 194,0, 0,'','','','brecon','','');
photos[56] = new photo(2945515,'118705','','gallery','http://www1.clikpic.com/clairelou/images/llangiener-common-08.10.08-.jpg',500,747,'','http://www1.clikpic.com/clairelou/images/llangiener-common-08_thumb.10.08-.jpg',130, 194,0, 0,'','','','','','');
photos[57] = new photo(1969872,'118705','','gallery','http://www1.clikpic.com/clairelou/images/0144 copy BW sgdWM001.jpg',500,335,'Blown away','http://www1.clikpic.com/clairelou/images/0144 copy BW sgdWM001_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[58] = new photo(2368733,'118705','','gallery','http://www1.clikpic.com/clairelou/images/road to Llangennith beach W&S 72pp.JPG',500,747,'road to Llangennith beach','http://www1.clikpic.com/clairelou/images/road to Llangennith beach W&S 72pp_thumb.JPG',130, 194,0, 0,'','','','Llangennith','','');
photos[59] = new photo(1869778,'118705','','gallery','http://www1.clikpic.com/clairelou/images/cadair idis2.jpg',500,222,'autumn lake','http://www1.clikpic.com/clairelou/images/cadair idis2_thumb.jpg',130, 58,0, 0,'','','','cadair idris','','');
photos[60] = new photo(2945582,'118705','','gallery','http://www1.clikpic.com/clairelou/images/three-trees.jpg',500,334,'','http://www1.clikpic.com/clairelou/images/three-trees_thumb.jpg',130, 86,0, 0,'','','','','','');
photos[61] = new photo(1869858,'118705','','gallery','http://www1.clikpic.com/clairelou/images/cadair idis lake.jpeg',500,306,'cadair idris','http://www1.clikpic.com/clairelou/images/cadair idis lake_thumb.jpeg',130, 80,0, 0,'','','','','','');
photos[62] = new photo(2687244,'118705','','gallery','http://www1.clikpic.com/clairelou/images/wind-swept.jpg',500,335,'wind swept','http://www1.clikpic.com/clairelou/images/wind-swept_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[63] = new photo(1969941,'118705','','gallery','http://www1.clikpic.com/clairelou/images/Bwlch 087 B&W WM001.jpg',500,335,'over the bwlch','http://www1.clikpic.com/clairelou/images/Bwlch 087 B&W WM001_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[64] = new photo(2964633,'118705','','gallery','http://www1.clikpic.com/clairelou/images/castle in the country b&w.JPG',500,747,'','http://www1.clikpic.com/clairelou/images/castle in the country b&w_thumb.JPG',130, 194,0, 0,'','','','','','');
photos[65] = new photo(2964730,'118705','','gallery','http://www1.clikpic.com/clairelou/images/along the countryside.jpg',428,640,'','http://www1.clikpic.com/clairelou/images/along the countryside_thumb.jpg',130, 194,0, 0,'','','','','','');
photos[66] = new photo(1870198,'125667','','gallery','http://www1.clikpic.com/clairelou/images/wood toned marked.jpg',500,399,'','http://www1.clikpic.com/clairelou/images/wood toned marked_thumb.jpg',130, 104,0, 0,'','','','cardiff bay','','');
photos[67] = new photo(1870199,'125667','','gallery','http://www1.clikpic.com/clairelou/images/wow look at that mushroom!.jpg',500,392,'','http://www1.clikpic.com/clairelou/images/wow look at that mushroom!_thumb.jpg',130, 102,0, 0,'','','','cardiff bay','','');
photos[68] = new photo(1870201,'125667','','gallery','http://www1.clikpic.com/clairelou/images/woody lines marked.jpg',500,625,'','http://www1.clikpic.com/clairelou/images/woody lines marked_thumb.jpg',130, 163,0, 1,'','','','cardiff bay','','');
photos[69] = new photo(1870206,'125667','','gallery','http://www1.clikpic.com/clairelou/images/walk on by.jpg',500,399,'walk on by','http://www1.clikpic.com/clairelou/images/walk on by_thumb.jpg',130, 104,0, 0,'','','','cardiff bay','','');
photos[70] = new photo(1870208,'125667','','gallery','http://www1.clikpic.com/clairelou/images/reading in peace WM.jpg',500,629,'reading in peace','http://www1.clikpic.com/clairelou/images/reading in peace WM_thumb.jpg',130, 164,0, 0,'','','','cardiff bay','','');
photos[71] = new photo(1969777,'138621','','gallery','http://www1.clikpic.com/clairelou/images/0014 sweet local horse WM&SG001.jpg',500,747,'honey','http://www1.clikpic.com/clairelou/images/0014 sweet local horse WM&SG001_thumb.jpg',130, 194,0, 0,'','','','','','');
photos[72] = new photo(2101168,'138621','','gallery','http://www1.clikpic.com/clairelou/images/009 chain WM&SG001.jpg',500,747,'chain','http://www1.clikpic.com/clairelou/images/009 chain WM&SG001_thumb.jpg',130, 194,0, 0,'','','','','','');
photos[73] = new photo(2964472,'181894','','gallery','http://www1.clikpic.com/clairelou/images/in-the-darkness-W&S.jpg',500,375,'','http://www1.clikpic.com/clairelou/images/in-the-darkness-W&S_thumb.jpg',130, 98,1, 1,'','','','','','');
photos[74] = new photo(2945067,'181894','','gallery','http://www1.clikpic.com/clairelou/images/peacock-feather-2-72-ppi2.jpg',500,299,'','http://www1.clikpic.com/clairelou/images/peacock-feather-2-72-ppi2_thumb.jpg',130, 77,0, 0,'','','','','','');
photos[75] = new photo(2964503,'181894','','gallery','http://www1.clikpic.com/clairelou/images/17-07-2008-17;15;58-copy.jpg',500,688,'','http://www1.clikpic.com/clairelou/images/17-07-2008-17;15;58-copy_thumb.jpg',130, 179,0, 0,'','','','','','');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
galleries = new Array();
galleries[0] = new gallery(211360,'3457564','portraits','gallery');
galleries[1] = new gallery(118708,'1969751','botanic','gallery');
galleries[2] = new gallery(138613,'2074473','fine art ','gallery');
galleries[3] = new gallery(118706,'1869707','Wales Sea Scape','gallery');
galleries[4] = new gallery(118705,'2900697','nature beauty','gallery');
galleries[5] = new gallery(125667,'1870201','Architectural','gallery');
galleries[6] = new gallery(138621,'2101168,1969777','agricultural','gallery');
galleries[7] = new gallery(181894,'2964472','Miscellanious','gallery');

