/***************************************************************************
* 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('729711,167015');
	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('729711,167015');
	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>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(173038,'','','','http://www1.clikpic.com/venosa/images/garrick1small.jpg',400,532,'','http://www1.clikpic.com/venosa/images/garrick1small_thumb.jpg',130, 173,0, 0,'','','','','','');
photos[1] = new photo(190363,'','','','http://www1.clikpic.com/venosa/images/venicebwImage5.jpg',290,400,'','http://www1.clikpic.com/venosa/images/venicebwImage5_thumb.jpg',130, 179,0, 0,'','','','','','');
photos[2] = new photo(166955,'15310','','gallery','http://www1.clikpic.com/venosa/images/coxflute.jpg',400,291,'Michael Cox','http://www1.clikpic.com/venosa/images/coxflute_thumb.jpg',130, 95,0, 0,'','','','','','');
photos[3] = new photo(166961,'15310','','gallery','http://www1.clikpic.com/venosa/images/helena.jpg',400,301,'Helena Browne','http://www1.clikpic.com/venosa/images/helena_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[4] = new photo(167015,'15310','','gallery','http://www1.clikpic.com/venosa/images/NMSO.jpg',292,400,'National Musicians\' Symphony Orchestra','http://www1.clikpic.com/venosa/images/NMSO_thumb.jpg',130, 178,1, 0,'','','','','','');
photos[5] = new photo(167055,'15310','','gallery','http://www1.clikpic.com/venosa/images/academy.jpg',400,301,'Academy','http://www1.clikpic.com/venosa/images/academy_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[6] = new photo(169091,'15310','','gallery','http://www1.clikpic.com/venosa/images/compworkijngtemp.jpg',400,216,'The Demon Barbers','http://www1.clikpic.com/venosa/images/compworkijngtemp_thumb.jpg',130, 70,0, 0,'The Demon Barbers','','','','','');
photos[7] = new photo(169098,'15310','','gallery','http://www1.clikpic.com/venosa/images/jule1.jpg',400,549,'Juliet Trestini','http://www1.clikpic.com/venosa/images/jule1_thumb.jpg',130, 178,0, 0,'Juliet Trestini','','','','','');
photos[8] = new photo(169099,'15310','','gallery','http://www1.clikpic.com/venosa/images/parley.jpg',400,559,'Parley  of Instruments','http://www1.clikpic.com/venosa/images/parley_thumb.jpg',130, 182,0, 0,'','','','','','');
photos[9] = new photo(169100,'15310','','gallery','http://www1.clikpic.com/venosa/images/philip.jpg',291,400,'Philip Salmon','http://www1.clikpic.com/venosa/images/philip_thumb.jpg',130, 179,0, 0,'','','','','','');
photos[10] = new photo(169103,'15310','','gallery','http://www1.clikpic.com/venosa/images/tamsin.jpg',400,541,'Tamsin Coombs','http://www1.clikpic.com/venosa/images/tamsin_thumb.jpg',130, 176,0, 1,'','','','','','');
photos[11] = new photo(169105,'15310','','gallery','http://www1.clikpic.com/venosa/images/violin1.jpg',400,468,'stradivarius','http://www1.clikpic.com/venosa/images/violin1_thumb.jpg',130, 152,0, 0,'','','','','','');
photos[12] = new photo(169108,'15310','','gallery','http://www1.clikpic.com/venosa/images/white.jpg',400,551,'Jeremy White','http://www1.clikpic.com/venosa/images/white_thumb.jpg',130, 179,0, 0,'','','','','','');
photos[13] = new photo(169148,'15310','','gallery','http://www1.clikpic.com/venosa/images/JohnHall.jpg',400,556,'John Graham Hall','http://www1.clikpic.com/venosa/images/JohnHall_thumb.jpg',130, 181,0, 0,'','','','','','');
photos[14] = new photo(169167,'15310','','gallery','http://www1.clikpic.com/venosa/images/kingsingers.jpg',400,551,'King\'s Singers','http://www1.clikpic.com/venosa/images/kingsingers_thumb.jpg',130, 179,0, 0,'','','','','','');
photos[15] = new photo(169170,'15310','','gallery','http://www1.clikpic.com/venosa/images/Kings1.jpg',400,400,'King\'s College Choir Cambridge','http://www1.clikpic.com/venosa/images/Kings1_thumb.jpg',130, 130,0, 0,'','','','','','');
photos[16] = new photo(170293,'15310','','gallery','http://www1.clikpic.com/venosa/images/kate&camille.jpg',400,291,'Birkbeck College Opera','http://www1.clikpic.com/venosa/images/kate&camille_thumb.jpg',130, 95,0, 0,'','','','','','');
photos[17] = new photo(170295,'15310','','gallery','http://www1.clikpic.com/venosa/images/viv.jpg',301,400,'Vivien Tierney','http://www1.clikpic.com/venosa/images/viv_thumb.jpg',130, 173,0, 0,'','','','','','');
photos[18] = new photo(172998,'15310','','gallery','http://www1.clikpic.com/venosa/images/kate.jpg',400,396,'Kate Mapp','http://www1.clikpic.com/venosa/images/kate_thumb.jpg',130, 129,0, 0,'','','','','','');
photos[19] = new photo(188114,'15310','','gallery','http://www1.clikpic.com/venosa/images/bachch.jpg',398,400,'Bach Choir/Westminster Cathedral','http://www1.clikpic.com/venosa/images/bachch_thumb.jpg',130, 131,0, 0,'','','','','','');
photos[20] = new photo(188132,'15310','','gallery','http://www1.clikpic.com/venosa/images/sraahcolour.jpg',289,400,'Sarah Connolly','http://www1.clikpic.com/venosa/images/sraahcolour_thumb.jpg',130, 180,0, 1,'','','','','','');
photos[21] = new photo(195470,'15310','','gallery','http://www1.clikpic.com/venosa/images/musicaantiqua.jpg',400,290,'Musica Antiqua','http://www1.clikpic.com/venosa/images/musicaantiqua_thumb.jpg',130, 94,0, 0,'','','','','','');
photos[22] = new photo(729715,'15310','','gallery','http://www1.clikpic.com/venosa/images/DSCF0025revWEB.jpg',450,627,'Elizabeth Atkinson','http://www1.clikpic.com/venosa/images/DSCF0025revWEB_thumb.jpg',130, 181,0, 0,'','','','','','');
photos[23] = new photo(805375,'15310','','gallery','http://www1.clikpic.com/venosa/images/DSCF0114revweb.jpg',600,446,'Matthias Goerne','http://www1.clikpic.com/venosa/images/DSCF0114revweb_thumb.jpg',130, 97,0, 0,'','','','','','');
photos[24] = new photo(805402,'15310','','gallery','http://www1.clikpic.com/venosa/images/ryland.jpg',400,599,'Ryland Davies','http://www1.clikpic.com/venosa/images/ryland_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[25] = new photo(805411,'15310','','gallery','http://www1.clikpic.com/venosa/images/tahmes2.jpg',600,402,'Thames Youth Orchestra','http://www1.clikpic.com/venosa/images/tahmes2_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[26] = new photo(805416,'15310','','gallery','http://www1.clikpic.com/venosa/images/Gloucester Choristers.jpg',600,388,'','http://www1.clikpic.com/venosa/images/Gloucester Choristers_thumb.jpg',130, 84,0, 0,'Gloucester Cathedral Choristers','','','','','');
photos[27] = new photo(805436,'15310','','gallery','http://www1.clikpic.com/venosa/images/Michael.jpg',400,520,'Michael Lunts as Chopin','http://www1.clikpic.com/venosa/images/Michael_thumb.jpg',130, 169,0, 0,'','','','','','');
photos[28] = new photo(169097,'15310','','gallery','http://www1.clikpic.com/venosa/images/crispian2.jpg',400,544,'Crispian Steele-Perkins & Alison Balsom','http://www1.clikpic.com/venosa/images/crispian2_thumb.jpg',130, 177,0, 1,'Crispian Steele-Perkins & Alison Balsom','','','','','');
photos[29] = new photo(167027,'15409','','gallery','http://www1.clikpic.com/venosa/images/grove.jpg',400,278,'New Grove Dictionary Campaign','http://www1.clikpic.com/venosa/images/grove_thumb.jpg',130, 90,0, 0,'','','','','','');
photos[30] = new photo(169110,'15409','','gallery','http://www1.clikpic.com/venosa/images/BBC.jpg',286,400,'BBC Singers','http://www1.clikpic.com/venosa/images/BBC_thumb.jpg',130, 182,0, 0,'','','','','','');
photos[31] = new photo(169123,'15409','','gallery','http://www1.clikpic.com/venosa/images/sloane_st1.jpg',400,286,'CD cover for Holy Trinity Church, Chelsea','http://www1.clikpic.com/venosa/images/sloane_st1_thumb.jpg',130, 93,0, 0,'','','','','','');
photos[32] = new photo(169133,'15409','','gallery','http://www1.clikpic.com/venosa/images/hillhousefield.jpg',400,251,'for Hill House School Prospectus','http://www1.clikpic.com/venosa/images/hillhousefield_thumb.jpg',130, 82,0, 0,'','','','','','');
photos[33] = new photo(169175,'15409','','gallery','http://www1.clikpic.com/venosa/images/Leopardskin.jpg',393,450,'Giraffe Lager Campaign','http://www1.clikpic.com/venosa/images/Leopardskin_thumb.jpg',130, 149,0, 0,'','','','','','');
photos[34] = new photo(169211,'15409','','gallery','http://www1.clikpic.com/venosa/images/wooderson1.jpg',400,301,'Duo Pastorale CD Liner','http://www1.clikpic.com/venosa/images/wooderson1_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[35] = new photo(170284,'15409','','gallery','http://www1.clikpic.com/venosa/images/frank.jpg',324,400,'Frank Perry','http://www1.clikpic.com/venosa/images/frank_thumb.jpg',130, 160,0, 0,'','','','','','');
photos[36] = new photo(170289,'15409','','gallery','http://www1.clikpic.com/venosa/images/chinesevln.jpg',280,400,'Chinese violin','http://www1.clikpic.com/venosa/images/chinesevln_thumb.jpg',130, 186,0, 1,'','','','','','');
photos[37] = new photo(171899,'15409','','gallery','http://www1.clikpic.com/venosa/images/karatecover.jpg',283,400,'','http://www1.clikpic.com/venosa/images/karatecover_thumb.jpg',130, 184,0, 0,'','','','','','');
photos[38] = new photo(188089,'15409','','gallery','http://www1.clikpic.com/venosa/images/sword-musicsmall.jpg',289,400,'CD Cover for ASV','http://www1.clikpic.com/venosa/images/sword-musicsmall_thumb.jpg',130, 180,0, 0,'','','','','','');
photos[39] = new photo(188091,'15409','','gallery','http://www1.clikpic.com/venosa/images/winesmall.jpg',261,400,'Wine catalogue','http://www1.clikpic.com/venosa/images/winesmall_thumb.jpg',130, 199,0, 0,'','','','','','');
photos[40] = new photo(166968,'15410','','gallery','http://www1.clikpic.com/venosa/images/pru.jpg',268,400,'Pru','http://www1.clikpic.com/venosa/images/pru_thumb.jpg',130, 194,0, 1,'','','','','','');
photos[41] = new photo(168890,'15410','','gallery','http://www1.clikpic.com/venosa/images/arnold1.jpg',400,307,'','http://www1.clikpic.com/venosa/images/arnold1_thumb.jpg',130, 100,0, 0,'','','','','','');
photos[42] = new photo(169129,'15410','','gallery','http://www1.clikpic.com/venosa/images/cath.jpg',304,400,'Charlotte','http://www1.clikpic.com/venosa/images/cath_thumb.jpg',130, 171,0, 0,'','','','','','');
photos[43] = new photo(169136,'15410','','gallery','http://www1.clikpic.com/venosa/images/ELENA2.jpg',266,400,'Elena','http://www1.clikpic.com/venosa/images/ELENA2_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[44] = new photo(169197,'15410','','gallery','http://www1.clikpic.com/venosa/images/marrschild.jpg',400,475,'','http://www1.clikpic.com/venosa/images/marrschild_thumb.jpg',130, 154,0, 0,'','','','','','');
photos[45] = new photo(170298,'15410','','gallery','http://www1.clikpic.com/venosa/images/Naomicolor.jpg',260,400,'','http://www1.clikpic.com/venosa/images/Naomicolor_thumb.jpg',130, 200,0, 1,'','','','','','');
photos[46] = new photo(188095,'15410','','gallery','http://www1.clikpic.com/venosa/images/Luise2.jpg',400,295,'Luise','http://www1.clikpic.com/venosa/images/Luise2_thumb.jpg',130, 96,0, 0,'','','','','','');
photos[47] = new photo(729709,'15410','','gallery','http://www1.clikpic.com/venosa/images/girl.jpg',476,600,'','http://www1.clikpic.com/venosa/images/girl_thumb.jpg',130, 164,0, 0,'','','','','','');
photos[48] = new photo(729711,'15410','','gallery','http://www1.clikpic.com/venosa/images/geach1=2.jpg',458,600,'Catherine Geach','http://www1.clikpic.com/venosa/images/geach1=2_thumb.jpg',130, 170,1, 0,'','','','','','');
photos[49] = new photo(168884,'15411','','gallery','http://www1.clikpic.com/venosa/images/snow3.jpg',400,309,'','http://www1.clikpic.com/venosa/images/snow3_thumb.jpg',130, 100,0, 0,'','','','','','');
photos[50] = new photo(169116,'15411','','gallery','http://www1.clikpic.com/venosa/images/linda.jpg',310,400,'','http://www1.clikpic.com/venosa/images/linda_thumb.jpg',130, 168,0, 0,'','','','','','');
photos[51] = new photo(169139,'15411','','gallery','http://www1.clikpic.com/venosa/images/interior.jpg',301,419,'','http://www1.clikpic.com/venosa/images/interior_thumb.jpg',130, 181,0, 0,'','','','','','');
photos[52] = new photo(169142,'15411','','gallery','http://www1.clikpic.com/venosa/images/Jenkin5.jpg',308,399,'','http://www1.clikpic.com/venosa/images/Jenkin5_thumb.jpg',130, 168,0, 0,'','','','','','');
photos[53] = new photo(169160,'15411','','gallery','http://www1.clikpic.com/venosa/images/A-reck.jpg',254,400,'','http://www1.clikpic.com/venosa/images/A-reck_thumb.jpg',130, 205,0, 0,'','','','','','');
photos[54] = new photo(169161,'15411','','gallery','http://www1.clikpic.com/venosa/images/bridge.jpg',305,400,'','http://www1.clikpic.com/venosa/images/bridge_thumb.jpg',130, 170,0, 0,'','','','','','');
photos[55] = new photo(169164,'15411','','gallery','http://www1.clikpic.com/venosa/images/hcCAR.jpg',400,290,'','http://www1.clikpic.com/venosa/images/hcCAR_thumb.jpg',130, 94,0, 0,'','','','','','');
photos[56] = new photo(169179,'15411','','gallery','http://www1.clikpic.com/venosa/images/kids2.jpg',400,255,'','http://www1.clikpic.com/venosa/images/kids2_thumb.jpg',130, 83,0, 0,'','','','','','');
photos[57] = new photo(169200,'15411','','gallery','http://www1.clikpic.com/venosa/images/naval wed.jpg',308,400,'','http://www1.clikpic.com/venosa/images/naval wed_thumb.jpg',130, 169,0, 0,'','','','','','');
photos[58] = new photo(169203,'15411','','gallery','http://www1.clikpic.com/venosa/images/snow4.jpg',292,400,'','http://www1.clikpic.com/venosa/images/snow4_thumb.jpg',130, 178,0, 1,'','','','','','');
photos[59] = new photo(169208,'15411','','gallery','http://www1.clikpic.com/venosa/images/snow5.jpg',400,294,'','http://www1.clikpic.com/venosa/images/snow5_thumb.jpg',130, 96,0, 0,'','','','','','');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
galleries = new Array();
galleries[0] = new gallery(15310,'188132,169103,169097','Professional Portraits & Groups','gallery');
galleries[1] = new gallery(15409,'170289','Editorial & Illustration','gallery');
galleries[2] = new gallery(15410,'170298,166968','Portraits/Beauty/Fashion','gallery');
galleries[3] = new gallery(15411,'169203','Wedding Photography','gallery');

