/***************************************************************************
* 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('3748684,3748640,3745732,3745731,3745598,3744547,3744342,3744335,3744330,3744324,3744322,3744310,3744189,3743383,3743358,3713826,3713808,3713794,3713787,3713781,3713745,3713548,3638907,3638899,3638892,3638887,3638877,3638871');
	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('3748684,3748640,3745732,3745731,3745598,3744547,3744342,3744335,3744330,3744324,3744322,3744310,3744189,3743383,3743358,3713826,3713808,3713794,3713787,3713781,3713745,3713548,3638907,3638899,3638892,3638887,3638877,3638871');
	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) || (1))) {
		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 = 'Capture This Productions: ' + 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(3748684,'222453','','gallery','http://admin2.clikpic.com/ballyearl/images/Davies_Cottage.jpg',500,333,'\"Davies Cottage\"','http://admin2.clikpic.com/ballyearl/images/Davies_Cottage_thumb.jpg',130, 87,1, 0,'A rare sight in Ireland. A thatched cottage by the sea at Islandmagee Co Antrim. this cottage is still lived in and has its own private beach. The setting is a rare preservation of Irish lifestyle of a past generation. Look out for more images of this lovely spot as the lighting enables us to capture them.','18/04/09','Fred Robinson','Islandmagee Co Antrim',45.00,'18 x 12 Lustre  finish');
photos[1] = new photo(3713548,'222453','','gallery','http://admin2.clikpic.com/ballyearl/images/Antrim_Hills_11.jpg',500,333,'Antrim Hills Co Antrim','http://admin2.clikpic.com/ballyearl/images/Antrim_Hills_11_thumb.jpg',130, 87,1, 0,'Cloudy day on the Antrim hills.<br>\r\nLook out for sunrise coming soon.','11/04/09','Fred Robinson','View point on the Antrim Hills',45.00,'12 x 18 Lustre finish ');
photos[2] = new photo(3713745,'222453','','gallery','http://admin2.clikpic.com/ballyearl/images/Glenoe.jpg',333,500,'Glenoe waterfall','http://admin2.clikpic.com/ballyearl/images/Glenoe_thumb.jpg',130, 195,1, 0,'Antrim Hills & Glens<br>\r\nA really beautiful print. Only fully appreciated when mounted and framed. <br>\r\nThis waterfall is not easy to photograph due to lighting difficulties and waterfall volume, as these aspects will have a profound effect upon the image captured.','11/04/09','Fred Robinson','Glenoe',60.00,'12 x 18 Lustre finish \"Limited edition\"');
photos[3] = new photo(3713781,'222453','','gallery','http://admin2.clikpic.com/ballyearl/images/Antrim_Hills_21.jpg',500,333,'Glens of Antrim','http://admin2.clikpic.com/ballyearl/images/Antrim_Hills_21_thumb.jpg',130, 87,1, 0,'View of the Glens & hills of Antrim','11/04/09','Fred Robinson','',45.00,'12 x 18 Lustre finish ');
photos[4] = new photo(3713787,'222453','','gallery','http://admin2.clikpic.com/ballyearl/images/Antrim_Hills_3123.jpg',500,333,'Antrim Hills','http://admin2.clikpic.com/ballyearl/images/Antrim_Hills_3123_thumb.jpg',130, 87,1, 0,'View of the Glens of Antrim','11/04/09','fred Robinson','Co Antrim',45.00,'12 x 18 Lustre finish \"Limited edition\"');
photos[5] = new photo(3713794,'222453','','gallery','http://admin2.clikpic.com/ballyearl/images/Cottage_BW.jpg',500,333,'Deserted Cottage in The Antrim Glens','http://admin2.clikpic.com/ballyearl/images/Cottage_BW_thumb.jpg',130, 87,1, 0,'Glens of Antrim','11/04/09','fred Robinson','Glens of Antrim',45.00,'12 x 18 Lustre finish \"Limited edition\"');
photos[6] = new photo(3713808,'222453','','gallery','http://admin2.clikpic.com/ballyearl/images/Antrim_Hills_4.jpg',400,600,'Antrim Hills','http://admin2.clikpic.com/ballyearl/images/Antrim_Hills_4_thumb.jpg',130, 195,1, 0,'Cloudy over the Antrim Hills','11/04/09','fred Robinson','Co Antrim',60.00,'12 x 18 Lustre finish \"Limited edition\"');
photos[7] = new photo(3713826,'222453','','gallery','http://admin2.clikpic.com/ballyearl/images/Cottage_12.jpg',500,333,'Deserted Cottage in the Antrim Glens','http://admin2.clikpic.com/ballyearl/images/Cottage_12_thumb.jpg',130, 87,1, 0,'Deserted Cottage in the Glens of Antrim','11/04/09','fred Robinson','Co Antrim',50.00,'12 x 18 Lustre finish ');
photos[8] = new photo(3743358,'222453','','gallery','http://admin2.clikpic.com/ballyearl/images/Loughneigh1.jpg',500,333,'Sunset Lough Neigh','http://admin2.clikpic.com/ballyearl/images/Loughneigh1_thumb.jpg',130, 87,1, 0,'Sunset at Lough Neigh Co Antrim','11/04/09','Fred Robinson','Antrim Town',30.00,'18 x 12 Lustre finish');
photos[9] = new photo(3745731,'228549','','gallery','http://admin2.clikpic.com/ballyearl/images/River.jpg',500,333,'Tollymore River Mournes Co Down','http://admin2.clikpic.com/ballyearl/images/River_thumb.jpg',130, 87,1, 1,'Tollymore River Mournes Co Down','11/04/09','Fred Robinson','',60.00,'18 x 12 Lustre  finish');
photos[10] = new photo(3745732,'228549','','gallery','http://admin2.clikpic.com/ballyearl/images/Tree__river.jpg',500,333,'The Folly Bridge Tollymore forest Co Down','http://admin2.clikpic.com/ballyearl/images/Tree__river_thumb.jpg',130, 87,1, 1,'The Folly Bridge Tollymore forest Co Down','11/04/09','Fred Robinson','',60.00,'18 x 12 Lustre  finish');
photos[11] = new photo(3744189,'166988','','gallery','http://admin2.clikpic.com/ballyearl/images/Castle21.jpg',500,333,'Kilchurn Castle loch Awe Scotland','http://admin2.clikpic.com/ballyearl/images/Castle21_thumb.jpg',130, 87,1, 0,'Kilchurn Castle loch Awe Scotland','10/10/08','Fred Robinson','',45.00,'18 x 12 Lustre finish');
photos[12] = new photo(3744310,'166988','','gallery','http://admin2.clikpic.com/ballyearl/images/castle3.jpg',400,600,'Kilchurn Castle loch Awe Scotland','http://admin2.clikpic.com/ballyearl/images/castle3_thumb.jpg',130, 195,1, 0,'Kilchurn Castle loch Awe Scotland','10/10/08','Fred Robinson','',45.00,'18 x 12 Lustre finish');
photos[13] = new photo(3744324,'166988','','gallery','http://admin2.clikpic.com/ballyearl/images/falls_of_Dochart.jpg',400,600,'Falls of Dochart Scotland','http://admin2.clikpic.com/ballyearl/images/falls_of_Dochart_thumb.jpg',130, 195,1, 0,'Falls of Dochart Scotland','10/10/08','Fred Robinson','',45.00,'12 x 18 Lustre finish ');
photos[14] = new photo(3744330,'166988','','gallery','http://admin2.clikpic.com/ballyearl/images/Falls_of_Dochart2.jpg',400,600,'Falls of Dochart Scotland','http://admin2.clikpic.com/ballyearl/images/Falls_of_Dochart2_thumb.jpg',130, 195,1, 0,'Falls of Dochart Scotland','10/10/08','Fred Robinson','',45.00,'18 x 12 Lustre finish');
photos[15] = new photo(3744335,'166988','','gallery','http://admin2.clikpic.com/ballyearl/images/Falls_of_Dochart_3.jpg',500,333,'Falls of Dochart Scotland','http://admin2.clikpic.com/ballyearl/images/Falls_of_Dochart_3_thumb.jpg',130, 87,1, 0,'Falls of Dochart Scotland','10/10/08','Fred Robinson','',60.00,'18 x 12 Lustre finish');
photos[16] = new photo(3744342,'166988','','gallery','http://admin2.clikpic.com/ballyearl/images/trees2.jpg',500,333,'Early on Almond Glenn A9 Scotland','http://admin2.clikpic.com/ballyearl/images/trees2_thumb.jpg',130, 87,1, 0,'Almond Glenn Outside Pitlochry Scotland','10/10/08','Fred Robinson','',45.00,'18 x 12 Lustre  finish');
photos[17] = new photo(3744547,'166988','','gallery','http://admin2.clikpic.com/ballyearl/images/High_land_cow__cottage1.jpg',500,223,'Highland Cow & Cottage Mull scotland','http://admin2.clikpic.com/ballyearl/images/High_land_cow__cottage1_thumb.jpg',130, 58,1, 0,'Highland Cow & Cottage Mull scotland','10/10/08','Fred Robinson','',30.00,'18 x 8 Lustre Finish');
photos[18] = new photo(3745598,'166988','','gallery','http://admin2.clikpic.com/ballyearl/images/Cottage1.jpg',500,163,'Cottage at Mull Scotland','http://admin2.clikpic.com/ballyearl/images/Cottage1_thumb.jpg',130, 42,1, 0,'Cottage at Mull Scotland','10/10/08','Fred Robinson','',30.00,'18 x 6 Luste finish');
photos[19] = new photo(2633598,'166869','Grasse  001','gallery','http://admin2.clikpic.com/ballyearl/images/Restaurant.jpg',400,600,'Street Cafe Grasse','http://admin2.clikpic.com/ballyearl/images/Restaurant_thumb.jpg',130, 195,0, 0,'Old town Grasse street cafe','08/08/08','Fred Robinson','Grasse South of France',35.00,'Size 12 x 18 Gloss or lustre finish. ');
photos[20] = new photo(3743383,'166988','','gallery','http://admin2.clikpic.com/ballyearl/images/trees1.jpg',400,600,'Tree on the island of Mull','http://admin2.clikpic.com/ballyearl/images/trees1_thumb.jpg',130, 195,1, 1,'Arched tree on the island of Mull','11/04/08','Fred Robinson','Mull Scotland',40.00,'12 x 18 Lustre finish ');
photos[21] = new photo(3748640,'222453','','gallery','http://admin2.clikpic.com/ballyearl/images/sunset.jpg',500,333,'Sunset Lough Neigh Antrim','http://admin2.clikpic.com/ballyearl/images/sunset_thumb.jpg',130, 87,1, 0,'Sunset Lough Neigh Antrim','11/04/08','Fred Robinson','Antrim Town',40.00,'18 x 12  Lustre finish');
photos[22] = new photo(3744322,'166988','','gallery','http://admin2.clikpic.com/ballyearl/images/castle4.jpg',500,333,'Kilchurn Castle loch Awe Scotland','http://admin2.clikpic.com/ballyearl/images/castle4_thumb.jpg',130, 87,1, 0,'Kilchurn Castle loch Awe Scotland','10/04/08','Fred Robinson','',45.00,'18 x 12 Lustre Finish');
photos[23] = new photo(2636199,'166988','Mull 001','gallery','http://admin2.clikpic.com/ballyearl/images/Boats2.jpg',500,333,'Forsaken Boats Mull','http://admin2.clikpic.com/ballyearl/images/Boats2_thumb.jpg',130, 87,0, 1,'Disused fishing boats Mull','','Fred Robinson','Island of Mull Scotland',30.00,'Size 12 x 18 Gloss or lustre finish. ');
photos[24] = new photo(2636224,'166988','Mull 002','gallery','http://admin2.clikpic.com/ballyearl/images/LH21.jpg',500,333,'Lighthouse at Mull','http://admin2.clikpic.com/ballyearl/images/LH21_thumb.jpg',130, 87,0, 1,'Lighthouse Mull Scotland','','Fred Robinson','Island of Mull Scotland',30.00,'Size 12 x 18 Gloss or lustre finish. ');
photos[25] = new photo(2656104,'166988','Scotland  001','gallery','http://admin2.clikpic.com/ballyearl/images/Castle2.jpg',500,333,'Kilchurn Castle loch Awe Scotland','http://admin2.clikpic.com/ballyearl/images/Castle2_thumb.jpg',130, 87,0, 0,'Kilchurn Castle loch Awe Scotland','','Fred Robinson','',35.00,'Size 12 x 18 Gloss or Lustre');
photos[26] = new photo(3638871,'222452','','gallery','http://admin2.clikpic.com/ballyearl/images/Arcade.jpg',400,600,'Arcade','http://admin2.clikpic.com/ballyearl/images/Arcade_thumb.jpg',130, 195,1, 0,'','','fred Robinson','Prague',50.00,'12\" x 18\" Lustre or Glossy');
photos[27] = new photo(3638877,'222452','','gallery','http://admin2.clikpic.com/ballyearl/images/Artist.jpg',500,500,'An artist at work on the famous Charles bridge Prague','http://admin2.clikpic.com/ballyearl/images/Artist_thumb.jpg',130, 130,1, 0,'','','Fred Robinson','Charles bridge Prague',40.00,'12\" x 12\" Lustre or Glossy Print');
photos[28] = new photo(3638887,'222452','','gallery','http://admin2.clikpic.com/ballyearl/images/Bus.jpg',400,600,'Tram in old city Prague','http://admin2.clikpic.com/ballyearl/images/Bus_thumb.jpg',130, 195,1, 0,'Old tram in old city','','Fred Robinson','Prague old city',35.00,'12\" x 18\" Luster or gloss print');
photos[29] = new photo(3638892,'222452','','gallery','http://admin2.clikpic.com/ballyearl/images/Cafe2.jpg',400,600,'Cafe at night in old city Prague','http://admin2.clikpic.com/ballyearl/images/Cafe2_thumb.jpg',130, 195,1, 0,'Cafe in old city Prague','','Fred Robinson','Prague old city',35.00,'12\" x 18\" Luster or gloss print');
photos[30] = new photo(3638899,'222452','','gallery','http://admin2.clikpic.com/ballyearl/images/lane.jpg',400,600,'Narrow laneway leading away from old city centre Prague','http://admin2.clikpic.com/ballyearl/images/lane_thumb.jpg',130, 195,1, 0,'Old city Prague','','Fred Robinson','',35.00,'12\" x 18\" Luster or gloss print');
photos[31] = new photo(3638907,'222452','','gallery','http://admin2.clikpic.com/ballyearl/images/S1.jpg',400,600,'Deserted street in old city Prague','http://admin2.clikpic.com/ballyearl/images/S1_thumb.jpg',130, 195,1, 0,'A very rare sight in old city Prague<br>\r\n\" A deserted street.\" ( Very early in the morning.)','','Fred Robinson','Prague',35.00,'12\" x 18\" Luster or gloss print');
photos[32] = new photo(2633222,'166368','Nice 001','gallery','http://admin2.clikpic.com/ballyearl/images/dog walk1.jpg',400,600,'Dog walk in old town','http://admin2.clikpic.com/ballyearl/images/dog walk1_thumb.jpg',130, 195,0, 1,'Walking dog in old town Nice','07/08/08','Fred Robinson','Old town Nice France',35.00,'Size 12 x 18 Gloss or Lustre');
photos[33] = new photo(2622574,'166822','Vence 006','gallery','http://admin2.clikpic.com/ballyearl/images/Arch2.jpg',400,600,'Archway in old town Vence France','http://admin2.clikpic.com/ballyearl/images/Arch2_thumb.jpg',130, 195,0, 0,'Archway in old town Vence France','08/08/08','Fred Robinson','Vence France',35.00,'Size 12x18 Gloss or Lustre Finish Lovely Print');
photos[34] = new photo(2622600,'166822','Vence 009','gallery','http://admin2.clikpic.com/ballyearl/images/cart.jpg',400,600,'Old cart in old town','http://admin2.clikpic.com/ballyearl/images/cart_thumb.jpg',130, 195,0, 0,'Old cart in old town Vence','08/08/08','Fred Robinson','Vence France',35.00,'size 12x18 Gloss or Lustre finish');
photos[35] = new photo(2622703,'166822','Vence 008','gallery','http://admin2.clikpic.com/ballyearl/images/chairs.jpg',400,600,'Place to rest','http://admin2.clikpic.com/ballyearl/images/chairs_thumb.jpg',130, 195,0, 0,'Wrought iron table & chairs.','08/08/08','Fred Robinson','Old town of Vence. France',35.00,'12 x 18 Gloss or Luster finish');
photos[36] = new photo(2622719,'166822','','gallery','http://admin2.clikpic.com/ballyearl/images/Painters shop2.jpg',400,600,'Artists Gallery','http://admin2.clikpic.com/ballyearl/images/Painters shop2_thumb.jpg',130, 195,0, 0,'Artists gallery old town Vence South of France.','08/08/08','Fred Robinson','Vence South of France',40.00,'Size 12 x 18 Gloss or lustre finish. lovely print');
photos[37] = new photo(2622723,'166822','Vence 010','gallery','http://admin2.clikpic.com/ballyearl/images/Artists Gallery.jpg',400,600,'Artists Gallery 2','http://admin2.clikpic.com/ballyearl/images/Artists Gallery_thumb.jpg',130, 195,0, 0,'Artists gallery & Shop','08/08/08','Fred Robinson','Old town Vence france',40.00,'Size 12 x 18 Gloss or lustre finish. lovely print with beautiful colours.');
photos[38] = new photo(2622819,'166822','Vence 006','gallery','http://admin2.clikpic.com/ballyearl/images/Through Arch cloned copy.jpg',400,600,'Historic Archway','http://admin2.clikpic.com/ballyearl/images/Through Arch cloned copy_thumb.jpg',130, 195,0, 0,'Historic archway leading to artists gallery and potters workshop.','08/08/08','Fred Robinson','Vence France',40.00,'Size 12 x 18 Gloss or Lustre Finish. Beautiful print');
photos[39] = new photo(2622830,'166822','Vence 011','gallery','http://admin2.clikpic.com/ballyearl/images/street.jpg',400,600,'Narrow street in Vence looking towards the mountains.','http://admin2.clikpic.com/ballyearl/images/street_thumb.jpg',130, 195,0, 0,'Narrow street in old town Vence, France.','08/08/08','Fred Robinson','Vence South of  France',35.00,'Size 12 x 18 Gloss or lustre finish. lovely print');
photos[40] = new photo(2633147,'166822','Vence 012','gallery','http://admin2.clikpic.com/ballyearl/images/steps2.jpg',400,600,'Steps','http://admin2.clikpic.com/ballyearl/images/steps2_thumb.jpg',130, 195,0, 0,'Village home in Vence','08/08/08','Fred Robinson','Vence France',40.00,'Size 12 x 18 Gloss or Lustre Lovely print');
photos[41] = new photo(2633227,'166822','Vence 002','gallery','http://admin2.clikpic.com/ballyearl/images/Pitza Cafe2.jpg',400,600,'Pitza Parlour','http://admin2.clikpic.com/ballyearl/images/Pitza Cafe2_thumb.jpg',130, 195,0, 0,'Pitza Parlour old town Vence','07/08/08','Fred Robinson','Vence South of  France',35.00,'Size 12 x 18 Gloss or lustre finish. lovely print');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
galleries = new Array();
galleries[0] = new gallery(166869,'2633598','Gallery 1   Grasse South of France','gallery');
galleries[1] = new gallery(166988,'3743383,2636224,2636199','Gallery 2   Scotland','gallery');
galleries[2] = new gallery(222452,'3638907,3638899,3638892,3638887,3638877,3638871','Gallery 3   Prague','gallery');
galleries[3] = new gallery(222453,'3748684,3748640,3743358,3713826,3713808,3713794,3713787,3713781,3713745,3713548','Gallery 4   Ireland','gallery');
galleries[4] = new gallery(228549,'3745732,3745731','Gallery 5   The Mournes Co Down','gallery');
galleries[5] = new gallery(166368,'2633222','Gallery 6   Nice South of France','gallery');
galleries[6] = new gallery(166822,'2633227,2633147,2622830,2622819,2622723,2622719,2622703,2622600,2622574','Gallery 7   Vence France','gallery');

