/***************************************************************************
* 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('2361691,2361686,2361656,1726895,1726877,970616,968455,968453,853726,701879,701870,701854,701851,701833,701820,701808');
	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('2361691,2361686,2361656,1726895,1726877,970616,968455,968453,853726,701879,701870,701854,701851,701833,701820,701808');
	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;
			document.title = 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>Copyright © </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(712388,'','','','http://www1.clikpic.com/ghawkins/images/garyCrop2WEB2.jpg',100,236,'','http://www1.clikpic.com/ghawkins/images/garyCrop2WEB2_thumb.jpg',130, 307,0, 0,'','','','','','');
photos[1] = new photo(2361625,'53917','','gallery','http://admin.clikpic.com/ghawkins/images/1168-Poppies-3-600.jpg',500,250,'Poppies','http://admin.clikpic.com/ghawkins/images/1168-Poppies-3-600_thumb.jpg',130, 65,0, 0,'','','','','','');
photos[2] = new photo(2361656,'53917','','gallery','http://admin.clikpic.com/ghawkins/images/Vartry-Edit2-600.jpg',500,313,'Varty Pumphouse','http://admin.clikpic.com/ghawkins/images/Vartry-Edit2-600_thumb.jpg',130, 81,1, 1,'','','Gary Hawkins','Vartry Reservoir, Co Wicklow, Ireland','','');
photos[3] = new photo(2361666,'53917','','gallery','http://admin.clikpic.com/ghawkins/images/IMG_1186-Edit2-600.jpg',500,250,'Enchanted Forest','http://admin.clikpic.com/ghawkins/images/IMG_1186-Edit2-600_thumb.jpg',130, 65,0, 0,'','','Gary Hawkins','Devils Glen, Co Wicklow, Ireland','','');
photos[4] = new photo(2361671,'53917','','gallery','http://admin.clikpic.com/ghawkins/images/IMG_0428-edit2-600.jpg',500,333,'Greystone Sunrise','http://admin.clikpic.com/ghawkins/images/IMG_0428-edit2-600_thumb.jpg',130, 87,0, 0,'','','Gary Hawkins','Greytones, Co Wicklow, Ireland','','');
photos[5] = new photo(2361686,'53917','','gallery','http://admin.clikpic.com/ghawkins/images/St-Helens-Bay1-600.jpg',500,333,'St Helens Bay Sunrise','http://admin.clikpic.com/ghawkins/images/St-Helens-Bay1-600_thumb.jpg',130, 87,1, 0,'','','Gary Hawkins','St Helens Bay, Co Wexford, Ireland','','');
photos[6] = new photo(2361691,'53917','','gallery','http://admin.clikpic.com/ghawkins/images/St-Helens-Bay2-600.jpg',500,250,'The Silver Sea','http://admin.clikpic.com/ghawkins/images/St-Helens-Bay2-600_thumb.jpg',130, 65,1, 0,'','','Gary Hawkins','St Helens Bay, Co Wexford, Ireland','','');
photos[7] = new photo(853731,'53917','','gallery','http://www1.clikpic.com/ghawkins/images/Lochtay-pan3-signedWEB600.jpg',500,203,'Early Morning, Lough Tay','http://www1.clikpic.com/ghawkins/images/Lochtay-pan3-signedWEB600_thumb.jpg',130, 53,0, 0,'Lough Tay is in the Wicklow hills, on the way up the Sally Gap. The area has plenty of good hill walking and is also a stop-off point for the Wicklow our coaches on their day-trips from Dublin.  The grassy area to the right of the lake is the Guinness family estate. Not a bad place to live I am sure you’ll agree.<br />\r\n<br />\r\nThis image is a panoramic, stitching two normal photographs together. It was taken on an extremely cold November morning.','','Gary Hawkins','Lough Tay, Co Wicklow. Ireland','','');
photos[8] = new photo(970619,'53917','','gallery','http://www1.clikpic.com/ghawkins/images/pan3WEB.jpg',500,168,'Connemara Reflections','http://www1.clikpic.com/ghawkins/images/pan3WEB_thumb.jpg',130, 44,0, 0,'','','Gary Hawkins','Connemara, Ireland','','');
photos[9] = new photo(1726905,'53917','','gallery','http://www1.clikpic.com/ghawkins/images/Grassy Sunrise Signed600.jpg',500,200,'Grassy Sunsrise','http://www1.clikpic.com/ghawkins/images/Grassy Sunrise Signed600_thumb.jpg',130, 52,0, 1,'','','Gary Hawkins','Greystones Co Wicklow, Ireland','','');
photos[10] = new photo(701833,'53917','','gallery','http://www1.clikpic.com/ghawkins/images/Glen-1WEB.jpg',500,333,'Upper Lake, Glendalough','http://www1.clikpic.com/ghawkins/images/Glen-1WEB_thumb.jpg',130, 87,1, 1,'Glendalough is one of Wicklow\'s premier sites of interest, attracting both tourists and day-trippers from Dublin. There are 2 lakes, a monastic village, and fantastic walking to suit both strollers, and serious hikers.<br />\r\nIt can get busy during weekends, but early morning or during the week in winter and you will have the place to yourself.<br />\r\n<br />\r\nThis photograph was taken early on an October morning, before the daytrippers arrived.<br />\r\n<br />\r\nThis shot was a finalist in the RTE Autumn Photograhic Competition 2005.','','Gary Hawkins','Glendalough, Co Wicklow, Ireland','','');
photos[11] = new photo(968453,'53917','','gallery','http://www1.clikpic.com/ghawkins/images/Ross sunset1 copyWEB.jpg',500,333,'Rossbeigh Sunset','http://www1.clikpic.com/ghawkins/images/Ross sunset1 copyWEB_thumb.jpg',130, 87,1, 1,'','','Gary Hawkins','Rossbeigh, Co Kerry,Ireland','','');
photos[12] = new photo(970616,'53917','','gallery','http://www1.clikpic.com/ghawkins/images/149_4984-1WEB.jpg',500,333,'Twelve Pins, Sunrise','http://www1.clikpic.com/ghawkins/images/149_4984-1WEB_thumb.jpg',130, 87,1, 1,'','','Gary Hawkins','Connemara, Ireland','','');
photos[13] = new photo(1409279,'53917','','gallery','http://www1.clikpic.com/ghawkins/images/Greystones Rocks-2-600.jpg',500,274,'Greystones Rocks','http://www1.clikpic.com/ghawkins/images/Greystones Rocks-2-600_thumb.jpg',130, 71,0, 0,'','','Gary Hawkins','Greystones, Co Wicklow, Ireland','','');
photos[14] = new photo(701812,'53917','','gallery','http://www1.clikpic.com/ghawkins/images/Above-Torc 2x1-600.jpg',500,248,'Above Torc','http://www1.clikpic.com/ghawkins/images/Above-Torc 2x1-600_thumb.jpg',130, 64,0, 0,'Torc waterfall in Killarney National Park is most definitely on the tourist trail. Many a holiday photograph has been taken here.  I have personally found that due to the scale of the waterfall and the surroundings, it is hard to do the main fall justice. Instead, I generally head up the steep path which brings you out above Torc. When this levels off the stream that feeds Torc has plenty to keep me busy.<br />\r\n<br />\r\nI currently have 2 images taken in the area above Torc on the site. This one was taken on an October morning a few years ago.','','Gary Hawkins','Killarney, Co Kerry, Ireland','','');
photos[15] = new photo(701858,'53917','','gallery','http://www1.clikpic.com/ghawkins/images/bray_head-2x1-signedWEB600.jpg',500,252,'Bray Head','http://www1.clikpic.com/ghawkins/images/bray_head-2x1-signedWEB600_thumb.jpg',130, 66,0, 1,'','','Gary Hawkins','Bray Head, Greystones, Co Wicklow','','');
photos[16] = new photo(853726,'53917','','gallery','http://www1.clikpic.com/ghawkins/images/Grey stones@GreystonesWEB.jpg',421,400,'Greystones Sunrise','http://www1.clikpic.com/ghawkins/images/Grey stones@GreystonesWEB_thumb.jpg',130, 124,1, 1,'There are 2 beaches in Greystones. The north beach which is mainly pebbles and the south beach is a long stretch of sand. There is a few hundred yards or rocky outcrop dividing the two. The rocks are deep grey which is where Greystones gets its name from. <br />\r\n<br />\r\nIf you catch the tide right the ‘bit in the middle’ offers some great photographic opportunities. This particular shot was taken on an early Saturday morning in March soon after sunrise.','','Gary Hawkins','Greystones, Co Wicklow, Ireland','','');
photos[17] = new photo(859174,'53917','','gallery','http://www1.clikpic.com/ghawkins/images/Pebble beachWEB.jpg',444,400,'Dawn at Pebble beach','http://www1.clikpic.com/ghawkins/images/Pebble beachWEB_thumb.jpg',130, 117,0, 0,'','','Gary Hawkins','North Beach, Greystones, Co Wicklow, Ireland','','');
photos[18] = new photo(968455,'53917','','gallery','http://www1.clikpic.com/ghawkins/images/Manin-bay-sq-500.jpg',400,400,'Mannin Bay','http://www1.clikpic.com/ghawkins/images/Manin-bay-sq-500_thumb.jpg',130, 130,1, 0,'','','Gary Hawkins','Mannin Bay, Connemara, Ireland','','');
photos[19] = new photo(701808,'53917','','gallery','http://www1.clikpic.com/ghawkins/images/Above Torc 2 6x4WEB.jpg',266,400,'Nature\'s Health Spa','http://www1.clikpic.com/ghawkins/images/Above Torc 2 6x4WEB_thumb.jpg',130, 195,1, 1,'Torc waterfall in Killarney national park is most definitely on the tourist trail. Many a holiday photograph has been taken here.  I have personally found that due to the scale of the waterfall and the surroundings, it is hard to do the main fall justice. I generally head up the steep path which brings you out above Torc. When this levels off the stream that feeds Torc has plenty to keep me busy.<br />\r\n<br />\r\nI currently have 2 images taken in the area above Torc on the site. This one was taken on Christmas Eve last year.','','Gary Hawkins','Killarney, Co Kerry, Ireland','','');
photos[20] = new photo(701820,'53917','','gallery','http://www1.clikpic.com/ghawkins/images/canobieWEB.jpg',333,500,'Lake Canobie','http://www1.clikpic.com/ghawkins/images/canobieWEB_thumb.jpg',130, 195,1, 1,'','','Gary Hawkins','Salem, New Hampshire, USA','','');
photos[21] = new photo(1726877,'53917','','gallery','http://www1.clikpic.com/ghawkins/images/Greystones Sunrise signed-600.jpg',267,400,'Greystones Sunrise','http://www1.clikpic.com/ghawkins/images/Greystones Sunrise signed-600_thumb.jpg',130, 195,1, 1,'','','Gary Hawkins','Greystones, Co Wicklow, Ireland','','');
photos[22] = new photo(859169,'53917','','gallery','http://www1.clikpic.com/ghawkins/images/Greystones harbour-600.jpg',500,328,'Greystones Harbour','http://www1.clikpic.com/ghawkins/images/Greystones harbour-600_thumb.jpg',130, 85,0, 0,'The harbour area in Greystones is soon to fall into the hands of \'the developers\'. Whlst I am not completely against progress, it is currently a lovely small fishing harbour, a little decrepid, but pleasent. I am glad that I managed to get a good shot of it before construction takes over.','','Gary Hawkins','Greystones, Co Wicklow, Ireland','','');
photos[23] = new photo(1034680,'53917','','gallery','http://www1.clikpic.com/ghawkins/images/Killiney-BayWEB.jpg',500,333,'Killiney Bay','http://www1.clikpic.com/ghawkins/images/Killiney-BayWEB_thumb.jpg',130, 87,0, 0,'Overlooking Bray and Killiney bay from the little sugarloaf.','','Gary Hawkins','Bray & Killiney Bay, Co Wicklow, Ireland','','');
photos[24] = new photo(1726878,'53917','','gallery','http://www1.clikpic.com/ghawkins/images/Greystones Sunrise-2-signed600.jpg',500,333,'Another Greystones Sunrise','http://www1.clikpic.com/ghawkins/images/Greystones Sunrise-2-signed600_thumb.jpg',130, 87,0, 0,'','','Gary Hawkins','Greystones Co Wicklow, Ireland','','');
photos[25] = new photo(713286,'53917','','gallery','http://www1.clikpic.com/ghawkins/images/KillarneyLake-WEB2.jpg',500,345,'Middle Lake - Killarney','http://www1.clikpic.com/ghawkins/images/KillarneyLake-WEB2_thumb.jpg',130, 90,0, 0,'','','Gary Hawkins','Killarney, Co Kerry','','');
photos[26] = new photo(701828,'53917','','gallery','http://www1.clikpic.com/ghawkins/images/Glen2-12x10-2-signedWEB600.jpg',480,400,'Lower Lake, Glendalough','http://www1.clikpic.com/ghawkins/images/Glen2-12x10-2-signedWEB600_thumb.jpg',130, 108,0, 0,'Glendalough is one of Wicklow\'s premier sites of interest, attracting both tourists and day-trippers from Dublin. There are 2 lakes, a monastic village, and fantastic walking to suit both strollers, and serious hikers.<br />\r\nIt can get busy during weekends, but go during the week and you will have the place to yourself.<br />\r\n<br />\r\nThis photograph was taken early on an October morning, before the daytrippers arrived.','','Gary Hawkins','Glendalough, Co Wicklow, Ireland','','');
photos[27] = new photo(1726895,'53917','','gallery','http://www1.clikpic.com/ghawkins/images/Rock-Fall-8x10-signed600.jpg',500,400,'Texture in Landscape','http://www1.clikpic.com/ghawkins/images/Rock-Fall-8x10-signed600_thumb.jpg',130, 104,1, 1,'','','Gary Hawkins','Torc River, Killarney National Park, Ireland','','');
photos[28] = new photo(701862,'53917','','gallery','http://www1.clikpic.com/ghawkins/images/Old Kenmare -WEB.jpg',500,414,'Old Kenmare Road II','http://www1.clikpic.com/ghawkins/images/Old Kenmare -WEB_thumb.jpg',130, 108,0, 0,'','','','Killarney, Co Kerry, Ireland','','');
photos[29] = new photo(1034683,'53917','','gallery','http://www1.clikpic.com/ghawkins/images/158_5881-panWEB.jpg',500,200,'Sugarloaf, Evening Sun','http://www1.clikpic.com/ghawkins/images/158_5881-panWEB_thumb.jpg',130, 52,0, 0,'Sugarloaf Mountain, from the little sugarloaf on a pleasant summer evening.','','Gary Hawkins','Kilmacanogue, Co Wicklow, Ireland','','');
photos[30] = new photo(970614,'53917','','gallery','http://www1.clikpic.com/ghawkins/images/149_4952-PanWEB.jpg',500,200,'Moonset, Clifden Quays','http://www1.clikpic.com/ghawkins/images/149_4952-PanWEB_thumb.jpg',130, 52,0, 0,'','','Gary Hawkins','Clifden, Connemara, Ireland','','');
photos[31] = new photo(1122575,'53924','','gallery','http://www1.clikpic.com/ghawkins/images/120_2065-crop3WEB600.jpg',500,200,'Castelluccio in light and shade','http://www1.clikpic.com/ghawkins/images/120_2065-crop3WEB600_thumb.jpg',130, 52,0, 1,'Castellucio is a hilltop town overlooking a massive plateau high up in the Mount Sibillini National park in Umbria. The plateau where I am standing to take the photo is famous for it\'s springtime wild flowers which apparently carpet the place in April-May each year. I would love to get back there for this at some stage. <br />\r\n<br />\r\nI took this shot in late September during a \'cold snap\' and you can see glimpses of the mountains through the cloud that had been dusted with snow the night before.','','Gary Hawkins','Castelluccio, Umbria, Italy','','');
photos[32] = new photo(1268484,'53924','','gallery','http://www1.clikpic.com/ghawkins/images/Arno Sunset3-600.jpg',500,200,'Arno Sunset','http://www1.clikpic.com/ghawkins/images/Arno Sunset3-600_thumb.jpg',130, 52,0, 0,'This shot was taken from the roof of our hotel in Florence on the first night of our honeymoon.<br />\r\nWe arrived on train from Naples and headed up to the hotel roof garden in need of glass of wine... and were treated to a most amazing view and sunset.','','Gary Hawkins','Florence, Italy','','');
photos[33] = new photo(712559,'53924','','gallery','http://www1.clikpic.com/ghawkins/images/5terre001.jpg',500,163,'Sunset, Cinque-Terre','http://www1.clikpic.com/ghawkins/images/5terre001_thumb.jpg',130, 42,0, 0,'The cinque terre, is an area of 5 villages on the rocky vinyards of the Ligurian costline in Northeren Italy. Due to location, the area has developed ecologically with a focus on local self-sufficiency. To this day the villages are traffic free. The villages are linked by footpaths and a local train line.<br />\r\n<br />\r\nThis photograph was taken from Manarola looking toward Corniglia an a summer\'s evening.','','Gary Hawkins','Cinque-Terre, Liguriua, Italy','','');
photos[34] = new photo(701854,'53924','','gallery','http://www1.clikpic.com/ghawkins/images/Manarola-WEB.jpg',500,333,'Manarola','http://www1.clikpic.com/ghawkins/images/Manarola-WEB_thumb.jpg',130, 87,1, 1,'Manarola is one of the Cinque-Terre, 5 villages on the rocky vinyards of the Ligurian costline in Northern Italy. <br />\r\n<br />\r\nThis photograph was taken as darkness fell on a summer evening - just before retiring for a pasta and a glass of local wine.','','Gary Hawkins','Cinque Terre, Liguria, Italy','','');
photos[35] = new photo(701886,'53924','','gallery','http://www1.clikpic.com/ghawkins/images/ToolonWEB.jpg',500,333,'Toolonlahti','http://www1.clikpic.com/ghawkins/images/ToolonWEB_thumb.jpg',130, 87,0, 0,'Toolon lahti, is a lake in central Helsinki - used for lesiurely walks in summer and winter alike when it freezes over.','','Gary Hawkins','Helsinki, Finland','','');
photos[36] = new photo(701879,'53924','','gallery','http://www1.clikpic.com/ghawkins/images/StPeters Square-colour-WEB.jpg',500,489,'Seeing the light in St-Peter\'s','http://www1.clikpic.com/ghawkins/images/StPeters Square-colour-WEB_thumb.jpg',130, 127,1, 1,'','','Gary Hawkins','St Peter\'s Basilica, Rome, Italy','','');
photos[37] = new photo(701870,'53924','','gallery','http://www1.clikpic.com/ghawkins/images/Orsay-2WEB.jpg',432,500,'D\'Orsay Clock','http://www1.clikpic.com/ghawkins/images/Orsay-2WEB_thumb.jpg',130, 150,1, 0,'','','Gary Hawkins','Paris, France','','');
photos[38] = new photo(701823,'53924','','gallery','http://www1.clikpic.com/ghawkins/images/chenenceau-WEB.jpg',399,500,'Chenonceaux','http://www1.clikpic.com/ghawkins/images/chenenceau-WEB_thumb.jpg',130, 163,0, 1,'Chenonceax is one of the many chateaux of the Loire Valley.','','Gary Hawkins','Loire Valley, France','','');
photos[39] = new photo(701826,'53924','','gallery','http://www1.clikpic.com/ghawkins/images/Frenchdoor-WEB.jpg',391,500,'French door','http://www1.clikpic.com/ghawkins/images/Frenchdoor-WEB_thumb.jpg',130, 166,0, 0,'','','Gary Hawkins','Bergerac, France','','');
photos[40] = new photo(701835,'53924','','gallery','http://www1.clikpic.com/ghawkins/images/Helsinki-Harbour1-WEB.jpg',500,417,'Helsinki Sunrise','http://www1.clikpic.com/ghawkins/images/Helsinki-Harbour1-WEB_thumb.jpg',130, 108,0, 0,'I was lucky enough to work in Helsinki for 9 months in 2003. The harbour is the focal point of the city with large passenger ferries arriving and departing from the rest of the Nordic region. It was interesting to see the transition in harbour-life from the lively midsummer atmosphere to the bleak feeling in the frozen winter months. An added bonus was that sunrise happens really late in the winter months, which makes a pleasant change from the early sunrises further south in Europe.<br />\r\n<br />\r\nThe two images on the site of the harbour were taken on a cold November morning.','','Gary Hawkins','Helsinki Harbour, Finland','','');
photos[41] = new photo(701838,'53924','','gallery','http://www1.clikpic.com/ghawkins/images/Helsinki-Harbour 2-WEB.jpg',500,333,'Helsinki Sunrise II','http://www1.clikpic.com/ghawkins/images/Helsinki-Harbour 2-WEB_thumb.jpg',130, 87,0, 0,'I was lucky enough to work in Helsinki for 9 months in 2003. The harbour is the focal point of the city with large passenger ferries arriving and departing from the rest of the Nordic region. It was interesting to see the transition in harbour-life from the lively midsummer atmosphere to the bleak feeling in the frozen winter months. An added bonus was that sunrise happens really late in the winter months, which makes a pleasant change from the early sunrises further south in Europe.<br />\r\n<br />\r\nThe two images on the site of the harbour were taken on a cold November morning.','','Gary Hawkins','Helsinki Harbour, Finland','','');
photos[42] = new photo(701816,'53925','','gallery','http://www1.clikpic.com/ghawkins/images/Beecatcher- WEB.jpg',396,500,'Bee Eater','http://www1.clikpic.com/ghawkins/images/Beecatcher- WEB_thumb.jpg',130, 164,0, 0,'Blue Cheeked Bee eater','','Gary Hawkins','Amboseli, Kenya','','');
photos[43] = new photo(1122650,'53925','','gallery','http://www1.clikpic.com/ghawkins/images/Kenyan-bird-signedWEB500.jpg',266,400,'Lilac Breasted Roller','http://www1.clikpic.com/ghawkins/images/Kenyan-bird-signedWEB500_thumb.jpg',130, 195,0, 0,'A colourful bird from safari in Kenya','','Gary Hawkins','Amboseli National Park, Kenya','','');
photos[44] = new photo(1034674,'53925','','gallery','http://www1.clikpic.com/ghawkins/images/158_5868WEB2.jpg',267,400,'Allium','http://www1.clikpic.com/ghawkins/images/158_5868WEB2_thumb.jpg',130, 195,0, 1,'','','Gary Hawkins','St Stephens Green, Dublin, Ireland','','');
photos[45] = new photo(701851,'53925','','gallery','http://www1.clikpic.com/ghawkins/images/Lavender-WEB.jpg',417,500,'Lavender','http://www1.clikpic.com/ghawkins/images/Lavender-WEB_thumb.jpg',130, 156,1, 1,'','','Gary Hawkins','My garden, Co Wicklow, Ireland','','');
photos[46] = new photo(701814,'53925','','gallery','http://www1.clikpic.com/ghawkins/images/Admiral-WEB.jpg',500,333,'Red Admiral on Rudbeckia','http://www1.clikpic.com/ghawkins/images/Admiral-WEB_thumb.jpg',130, 87,0, 0,'','','Gary Hawkins','My garden - Co Wicklow, Ireland','','');
photos[47] = new photo(701874,'53925','','gallery','http://www1.clikpic.com/ghawkins/images/Roaar-WEB.jpg',500,400,'Roaaar!','http://www1.clikpic.com/ghawkins/images/Roaar-WEB_thumb.jpg',130, 104,0, 1,'','','Gary Hawkins','Masai Mara, Kenya','','');
photos[48] = new photo(1034671,'53925','','gallery','http://www1.clikpic.com/ghawkins/images/DaisyWEB.jpg',500,333,'Daisy','http://www1.clikpic.com/ghawkins/images/DaisyWEB_thumb.jpg',130, 87,0, 1,'','','Gary Hawkins','St Stephens Green, Dublin','','');
photos[49] = new photo(712560,'53925','','gallery','http://www1.clikpic.com/ghawkins/images/lizard001.jpg',500,333,'Lizard','http://www1.clikpic.com/ghawkins/images/lizard001_thumb.jpg',130, 87,0, 0,'','','Gary Hawkins','Lake Nakuru, Kenya','','');
photos[50] = new photo(701817,'53925','','gallery','http://www1.clikpic.com/ghawkins/images/IMG_0008-3WEB600.jpg',500,375,'Rosa - \'Ice Cream\'','http://www1.clikpic.com/ghawkins/images/IMG_0008-3WEB600_thumb.jpg',130, 98,0, 0,'','','Gary Hawkins','Delgany, Co Wicklow, Ireland','','');
photos[51] = new photo(1034692,'53925','','gallery','http://www1.clikpic.com/ghawkins/images/Flamingo-lakeWEB.jpg',500,179,'The Pink Lake','http://www1.clikpic.com/ghawkins/images/Flamingo-lakeWEB_thumb.jpg',130, 47,0, 0,'Flamingo\'s in Lake Nakuru','','Gary Hawkins','Lake Nakuru, Kenya','','');
photos[52] = new photo(1409306,'53925','','gallery','http://www1.clikpic.com/ghawkins/images/French Lav-crop-600.jpg',160,400,'French Lavender','http://www1.clikpic.com/ghawkins/images/French Lav-crop-600_thumb.jpg',130, 325,0, 0,'','','Gary Hawkins','Co Wicklow, Ireland','','');
photos[53] = new photo(701847,'53926','','gallery','http://www1.clikpic.com/ghawkins/images/Katajannokka-WEB.jpg',500,505,'Katajannokka','http://www1.clikpic.com/ghawkins/images/Katajannokka-WEB_thumb.jpg',130, 131,0, 0,'','','Gary Hawkins','Helsinki, Finland','','');
photos[54] = new photo(701881,'53926','','gallery','http://www1.clikpic.com/ghawkins/images/StPeters Square-WEB.jpg',500,500,'Seeing the light in St Peters','http://www1.clikpic.com/ghawkins/images/StPeters Square-WEB_thumb.jpg',130, 130,0, 1,'You can see the colour version of this in the Travel & Architecture Gallery.','','','St Peter\'s Basillica, Rome, Italy','','');
photos[55] = new photo(701882,'53926','','gallery','http://www1.clikpic.com/ghawkins/images/surfers-WEB.jpg',500,454,'Surfers','http://www1.clikpic.com/ghawkins/images/surfers-WEB_thumb.jpg',130, 118,0, 0,'','','Gary Hawkins','Portugal','','');
photos[56] = new photo(701883,'53926','','gallery','http://www1.clikpic.com/ghawkins/images/Tolon bw-WEB.jpg',500,333,'Toolon Lahti','http://www1.clikpic.com/ghawkins/images/Tolon bw-WEB_thumb.jpg',130, 87,0, 1,'','','Gary Hawkins','Helsinki, Finland','','');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
galleries = new Array();
galleries[0] = new gallery(53917,'2361656,1726905,1726895,1726877,970616,968453,853726,701858,701833,701820,701808','Landscapes','gallery');
galleries[1] = new gallery(53924,'1122575,701879,701854,701823','Travel & Architecture','gallery');
galleries[2] = new gallery(53925,'1034674,1034671,701874,701851','Flora & Fauna','gallery');
galleries[3] = new gallery(53926,'701883,701881','Black & White','gallery');

