/***************************************************************************
* 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('3967985,3967919,2748957,2748898,2747727,2740083,2650990,2491007,2429023,2196075,2196056,2195974,2195971,2195768');
	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('3967985,3967919,2748957,2748898,2747727,2740083,2650990,2491007,2429023,2196075,2196056,2195974,2195971,2195768');
	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 = 'Peninsula Property Services: ' + 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(2740083,'','','','http://www4.clikpic.com/matfarrow/images/DSC_00608821.jpg',600,402,'','http://www4.clikpic.com/matfarrow/images/DSC_00608821_thumb.jpg',130, 87,1, 0,'','','','','','');
photos[1] = new photo(2740189,'','','','http://www4.clikpic.com/matfarrow/images/DSC_00378798.jpg',600,402,'','http://www4.clikpic.com/matfarrow/images/DSC_00378798_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[2] = new photo(2740192,'','','','http://www4.clikpic.com/matfarrow/images/DSC_00458806.jpg',400,598,'','http://www4.clikpic.com/matfarrow/images/DSC_00458806_thumb.jpg',130, 194,0, 0,'','','','','','');
photos[3] = new photo(2740220,'','','','http://www4.clikpic.com/matfarrow/images/DSC_00718832.jpg',400,598,'','http://www4.clikpic.com/matfarrow/images/DSC_00718832_thumb.jpg',130, 194,0, 0,'','','','','','');
photos[4] = new photo(2740224,'','','','http://www4.clikpic.com/matfarrow/images/DSC_00858846.jpg',600,402,'','http://www4.clikpic.com/matfarrow/images/DSC_00858846_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[5] = new photo(2740232,'','','','http://www4.clikpic.com/matfarrow/images/DSC_00928853.jpg',600,402,'','http://www4.clikpic.com/matfarrow/images/DSC_00928853_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[6] = new photo(2740235,'','','','http://www4.clikpic.com/matfarrow/images/DSC_01208881.jpg',600,402,'','http://www4.clikpic.com/matfarrow/images/DSC_01208881_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[7] = new photo(2740239,'','','','http://www4.clikpic.com/matfarrow/images/DSC_01278888.jpg',600,407,'','http://www4.clikpic.com/matfarrow/images/DSC_01278888_thumb.jpg',130, 88,0, 0,'','','','','','');
photos[8] = new photo(2196179,'145281','','gallery','http://www4.clikpic.com/matfarrow/images/P3010056web.jpg',600,474,'<a href=\"http://www.peninsula-ps.co.uk/photo_2196179.html\">CARPENTRY</a>','http://www4.clikpic.com/matfarrow/images/P3010056web_thumb.jpg',130, 103,0, 0,'Made to measure stair gate','','','','','');
photos[9] = new photo(2195960,'145281','','gallery','http://www4.clikpic.com/matfarrow/images/before.JPG',239,319,'Before','http://www4.clikpic.com/matfarrow/images/before_thumb.JPG',130, 174,0, 0,'','','','','','');
photos[10] = new photo(2195970,'145281','','gallery','http://www4.clikpic.com/matfarrow/images/mid build of fence.JPG',319,239,'Mid Construction','http://www4.clikpic.com/matfarrow/images/mid build of fence_thumb.JPG',130, 97,0, 0,'','','','','','');
photos[11] = new photo(2196188,'145281','','gallery','http://www4.clikpic.com/matfarrow/images/door.JPG',240,320,'<a href=\"http://www.peninsula-ps.co.uk/photo_2196188.html\">JOINERY</a>','http://www4.clikpic.com/matfarrow/images/door_thumb.JPG',130, 173,0, 0,'Made to measure garage side door','','','','','');
photos[12] = new photo(2491007,'240314','','gallery','http://www4.clikpic.com/matfarrow/images/DSC00022[1]web.jpg',400,533,'<a href=\"http://www.peninsula-ps.co.uk/photo_2491007.html\">PLUMBING</a>','http://www4.clikpic.com/matfarrow/images/DSC00022[1]web_thumb.jpg',130, 173,1, 1,'','','','','','');
photos[13] = new photo(2195971,'145410','','gallery','http://www4.clikpic.com/matfarrow/images/Image020web.jpg',600,480,'<a href=\"http://www.peninsula-ps.co.uk/gallery_144438.html\">PLAY HOUSES</a>','http://www4.clikpic.com/matfarrow/images/Image020web_thumb.jpg',130, 104,1, 0,'Pre-School Playhouse','','','','','');
photos[14] = new photo(2195974,'145410','','gallery','http://www4.clikpic.com/matfarrow/images/Image021web.jpg',600,480,'Pre-School Playhouse 2','http://www4.clikpic.com/matfarrow/images/Image021web_thumb.jpg',130, 104,1, 0,'','','','','','');
photos[15] = new photo(2195947,'145406','','gallery','http://www4.clikpic.com/matfarrow/images/PA070056web.jpg',600,413,'Dining Room Stripped Out 1 of 2','http://www4.clikpic.com/matfarrow/images/PA070056web_thumb.jpg',130, 89,0, 0,'all stripped out','','','','','');
photos[16] = new photo(2747710,'172588','','gallery','http://www4.clikpic.com/matfarrow/images/before1.jpg',600,450,'Kitchen diner 1 refurb before photo 1','http://www4.clikpic.com/matfarrow/images/before1_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[17] = new photo(2195956,'145406','','gallery','http://www4.clikpic.com/matfarrow/images/PA070054web.jpg',400,533,'Dining Room Stripped Out 2 of 2','http://www4.clikpic.com/matfarrow/images/PA070054web_thumb.jpg',130, 173,0, 0,'','','','','','');
photos[18] = new photo(2747723,'172588','','gallery','http://www4.clikpic.com/matfarrow/images/before2.jpg',600,450,'<a href=\"http://www.peninsula-ps.co.uk/gallery_172588.html\">PLASTERING</a>','http://www4.clikpic.com/matfarrow/images/before2_thumb.jpg',130, 98,0, 0,'Kitchen diner 1 refurb before photo 2','','','','','');
photos[19] = new photo(2212071,'145406','','gallery','http://www4.clikpic.com/matfarrow/images/PA070057web.jpg',600,450,'','http://www4.clikpic.com/matfarrow/images/PA070057web_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[20] = new photo(2195993,'145406','','gallery','http://www4.clikpic.com/matfarrow/images/floating floor.JPG',319,239,'Dining Room with Floating Floor Fitted','http://www4.clikpic.com/matfarrow/images/floating floor_thumb.JPG',130, 97,0, 0,'','','','','','');
photos[21] = new photo(2271318,'145410','','gallery','http://www4.clikpic.com/matfarrow/images/P2240104web.jpg',400,478,'Pre School playhouse 3','http://www4.clikpic.com/matfarrow/images/P2240104web_thumb.jpg',130, 155,0, 1,'Inside view','','','','','');
photos[22] = new photo(2747727,'172588','','gallery','http://www4.clikpic.com/matfarrow/images/After1.jpg',600,450,'Kitchen diner 1 refurb after photo 1','http://www4.clikpic.com/matfarrow/images/After1_thumb.jpg',130, 98,1, 1,'','','','','','');
photos[23] = new photo(2195996,'145406','','gallery','http://www4.clikpic.com/matfarrow/images/PA230067[1]web.jpg',600,450,'Setting out and the start of the floor tiling','http://www4.clikpic.com/matfarrow/images/PA230067[1]web_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[24] = new photo(2747736,'172588','','gallery','http://www4.clikpic.com/matfarrow/images/After2.jpg',600,450,'Kitchen diner 1 refurb after photo 2','http://www4.clikpic.com/matfarrow/images/After2_thumb.jpg',130, 98,0, 1,'','','','','','');
photos[25] = new photo(2196075,'145406','','gallery','http://www4.clikpic.com/matfarrow/images/P2030033web.jpg',600,450,'<a href=\"http://www.peninsula-ps.co.uk/gallery_145407.html\">FLOORING</a>','http://www4.clikpic.com/matfarrow/images/P2030033web_thumb.jpg',130, 98,1, 1,'Dining room floor finished','','','','','');
photos[26] = new photo(2196060,'145412','','gallery','http://www4.clikpic.com/matfarrow/images/P5170116web.jpg',600,355,'Hexagonal Playhouse Construction 1','http://www4.clikpic.com/matfarrow/images/P5170116web_thumb.jpg',130, 77,0, 0,'','','','','','');
photos[27] = new photo(2748898,'172590','','gallery','http://www4.clikpic.com/matfarrow/images/DSC_01618922.jpg',600,402,'<a href=\"http://www.peninsula-ps.co.uk/gallery_172590.html\">DECORATING/REFURBISHMENT</a>','http://www4.clikpic.com/matfarrow/images/DSC_01618922_thumb.jpg',130, 87,1, 1,'Kitchen diner 2 refurb after photo 1','','','','','');
photos[28] = new photo(3967985,'240315','','gallery','http://www4.clikpic.com/matfarrow/images/Nick-and-mandy-bathroom.jpg',450,600,'','http://www4.clikpic.com/matfarrow/images/Nick-and-mandy-bathroom_thumb.jpg',130, 173,1, 1,'','','','','','');
photos[29] = new photo(2196058,'145412','','gallery','http://www4.clikpic.com/matfarrow/images/P5170117web.jpg',600,450,'Hexagonal Playhouse Construction 2','http://www4.clikpic.com/matfarrow/images/P5170117web_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[30] = new photo(2748957,'172590','','gallery','http://www4.clikpic.com/matfarrow/images/DSC_01548915.jpg',600,410,'Kitchen diner 2 refurb after photo 2','http://www4.clikpic.com/matfarrow/images/DSC_01548915_thumb.jpg',130, 89,1, 1,'','','','','','');
photos[31] = new photo(2196074,'145412','','gallery','http://www4.clikpic.com/matfarrow/images/P5180120web.jpg',600,450,'Hexagonal Playhouse Construction 3','http://www4.clikpic.com/matfarrow/images/P5180120web_thumb.jpg',130, 98,0, 0,'Constructing the roof','','','','','');
photos[32] = new photo(2196071,'145412','','gallery','http://www4.clikpic.com/matfarrow/images/hexagonal playhouse during construction3.JPG',319,239,'Hexagonal Playhouse Construction 4','http://www4.clikpic.com/matfarrow/images/hexagonal playhouse during construction3_thumb.JPG',130, 97,0, 0,'','','','','','');
photos[33] = new photo(2271306,'145412','','gallery','http://www4.clikpic.com/matfarrow/images/P5180119web.jpg',600,421,'','http://www4.clikpic.com/matfarrow/images/P5180119web_thumb.jpg',130, 91,0, 1,'Hexagonal Playhouse construction 5','','','','','');
photos[34] = new photo(2196056,'145408','','gallery','http://www4.clikpic.com/matfarrow/images/P2260047web.jpg',400,626,'<a href=\"http://www.peninsula-ps.co.uk/gallery_145407.html\">TILING</a>','http://www4.clikpic.com/matfarrow/images/P2260047web_thumb.jpg',130, 203,1, 0,'','','','','','');
photos[35] = new photo(2196095,'145412','','gallery','http://www4.clikpic.com/matfarrow/images/P5180121web.jpg',400,582,'Hexagonal Playhouse Construction 6','http://www4.clikpic.com/matfarrow/images/P5180121web_thumb.jpg',130, 189,0, 0,'','','','','','');
photos[36] = new photo(2196070,'145412','','gallery','http://www4.clikpic.com/matfarrow/images/P5180124web.jpg',600,450,'Hexagonal Playhouse Construction 7','http://www4.clikpic.com/matfarrow/images/P5180124web_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[37] = new photo(2218923,'145412','','gallery','http://www4.clikpic.com/matfarrow/images/P5240134web.jpg',600,450,'Hexagonal Playhouse Construction 8','http://www4.clikpic.com/matfarrow/images/P5240134web_thumb.jpg',130, 98,0, 1,'','','','','','');
photos[38] = new photo(2271313,'145412','','gallery','http://www4.clikpic.com/matfarrow/images/P5260135web.jpg',400,533,'Hexagonal Playhouse construction 9','http://www4.clikpic.com/matfarrow/images/P5260135web_thumb.jpg',130, 173,0, 1,'','','','','','');
photos[39] = new photo(2281250,'145412','','gallery','http://www4.clikpic.com/matfarrow/images/P6080141web.jpg',600,539,'Hexagonal Playhouse construction 10','http://www4.clikpic.com/matfarrow/images/P6080141web_thumb.jpg',130, 117,0, 1,'','','','','','');
photos[40] = new photo(2429023,'145412','','gallery','http://www4.clikpic.com/matfarrow/images/DSC00019[1].jpg',600,440,'Hexagonal Playhouse complete','http://www4.clikpic.com/matfarrow/images/DSC00019[1]_thumb.jpg',130, 95,1, 1,'','','','','','');
photos[41] = new photo(2461713,'158461','','gallery','http://www4.clikpic.com/matfarrow/images/DSC00114web.jpg',400,533,'Tiled Flooring','http://www4.clikpic.com/matfarrow/images/DSC00114web_thumb.jpg',130, 173,0, 1,'','','','','','');
photos[42] = new photo(2650990,'158461','','gallery','http://www4.clikpic.com/matfarrow/images/DSC00026[1].jpg',600,450,'Wall tiling','http://www4.clikpic.com/matfarrow/images/DSC00026[1]_thumb.jpg',130, 98,1, 1,'','','','','','');
photos[43] = new photo(2195768,'145413','','gallery','http://www4.clikpic.com/matfarrow/images/P3180055web.jpg',600,395,'Tree House','http://www4.clikpic.com/matfarrow/images/P3180055web_thumb.jpg',130, 86,1, 0,'','','','','','');
photos[44] = new photo(3967901,'232664','','gallery','http://www4.clikpic.com/matfarrow/images/mandy-playarea.jpg',600,450,'','http://www4.clikpic.com/matfarrow/images/mandy-playarea_thumb.jpg',130, 98,0, 1,'','','','','','');
photos[45] = new photo(3967905,'232664','','gallery','http://www4.clikpic.com/matfarrow/images/mandy-playarea1.jpg',600,450,'','http://www4.clikpic.com/matfarrow/images/mandy-playarea1_thumb.jpg',130, 98,0, 1,'','','','','','');
photos[46] = new photo(3967911,'232664','','gallery','http://www4.clikpic.com/matfarrow/images/mandy-playarea2.jpg',450,600,'','http://www4.clikpic.com/matfarrow/images/mandy-playarea2_thumb.jpg',130, 173,0, 0,'','','','','','');
photos[47] = new photo(3967919,'232664','','gallery','http://www4.clikpic.com/matfarrow/images/mandy-playarea3.jpg',450,600,'','http://www4.clikpic.com/matfarrow/images/mandy-playarea3_thumb.jpg',130, 173,1, 1,'','','','','','');
photos[48] = new photo(3967926,'232664','','gallery','http://www4.clikpic.com/matfarrow/images/mandy-playarea4.jpg',600,450,'','http://www4.clikpic.com/matfarrow/images/mandy-playarea4_thumb.jpg',130, 98,0, 0,'','','','','','');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
galleries = new Array();
galleries[0] = new gallery(145281,'2196188,2196179,2195970,2195960','Sheds, Fencing & Gates','gallery');
galleries[1] = new gallery(145406,'2196075','Dining Room','gallery');
galleries[2] = new gallery(172588,'2747736,2747727','Kitchen diner 1','gallery');
galleries[3] = new gallery(240314,'2491007','Plumbing','gallery');
galleries[4] = new gallery(129911,'3967985,2491007','Plumbing / Bathroom Refits','gallery');
galleries[5] = new gallery(145410,'2271318','Pre School Playhouse','gallery');
galleries[6] = new gallery(145412,'2429023,2281250,2271313,2271306,2218923','Hexagonal Playhouse','gallery');
galleries[7] = new gallery(172590,'2748957,2748898','Kitchen diner 2','gallery');
galleries[8] = new gallery(145407,'2650990,2461713,2196075','Tiling','gallery');
galleries[9] = new gallery(145408,'2196056','Utility Room','gallery');
galleries[10] = new gallery(240315,'3967985','Wet Rooms','gallery');
galleries[11] = new gallery(172567,'2748957,2748898,2747736,2747727','Refurbishments/Decorating','gallery');
galleries[12] = new gallery(158461,'2650990,2461713','Bathroom','gallery');
galleries[13] = new gallery(144438,'2429023,2281250,2271318,2271313,2271306,2218923','Playhouses','gallery');
galleries[14] = new gallery(145413,'2195768','Treehouse','gallery');
galleries[15] = new gallery(232664,'3967919,3967905,3967901','Play Area','gallery');

