/***************************************************************************
* 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('1136529,1136524,1085794,1049228,1049188,1049144,1012658,1009636,1009533,1009527,1009439,1009432');
	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('1136529,1136524,1085794,1049228,1049188,1049144,1012658,1009636,1009533,1009527,1009439,1009432');
	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 = 'Sandra Soulas Photography: ' + photos[nextImg].caption;
										/* apply 'blank' classname to element where */			if ( photos[nextImg].caption == '') {
				document.getElementById('imageTitle').style.className = 'blank';
			}
			else {
				document.getElementById('imageTitle').style.className = 'normal';
			}
						temp = '';
			if (photos[nextImg].description != '') {
				temp = temp +  '<p id="imageDescription">' + photos[nextImg].description + '</p>';
			}
						if (photos[nextImg].photo_ref != '') {
				temp = temp + '<p class="imageinfo" id="imageRef"><strong>Ref: </strong>' + photos[nextImg].photo_ref + '</p>';
			}
						if (photos[nextImg].takendate != '') {
				debug('Resetting taken date');
				temp = temp + '<p class="imageinfo" id="imageDate"><strong>Date: </strong>' + photos[nextImg].takendate + '</p>';
			}
			
			if (photos[nextImg].location != '') {
				debug('Resetting location');
				temp = temp + '<p class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  photos[nextImg].location + '</p>';
			}
			
			if (photos[nextImg].photographer != '') {
				debug('Resetting photographer');
				temp = temp + '<p class="imageinfo" id="imagePhotographer"><strong>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(1011836,'75739','','gallery','http://www3.clikpic.com/SandraSoulas/images/Communion 084a copy WEB.jpg',357,500,'','http://www3.clikpic.com/SandraSoulas/images/Communion 084a copy WEB_thumb.jpg',130, 182,0, 1,'','','','','','');
photos[1] = new photo(1049265,'77951','','gallery','http://www3.clikpic.com/SandraSoulas/images/Confirmation a 160 WEB.jpg',467,700,'','http://www3.clikpic.com/SandraSoulas/images/Confirmation a 160 WEB_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[2] = new photo(1049188,'77951','','gallery','http://www3.clikpic.com/SandraSoulas/images/Confirmation-a-137-a-WEB.jpg',600,480,'','http://www3.clikpic.com/SandraSoulas/images/Confirmation-a-137-a-WEB_thumb.jpg',130, 104,1, 1,'','','','','','');
photos[3] = new photo(2175580,'75739','','gallery','http://www3.clikpic.com/SandraSoulas/images/Harry 1 094 watermark.jpg',600,408,'','http://www3.clikpic.com/SandraSoulas/images/Harry 1 094 watermark_thumb.jpg',130, 88,0, 0,'','','','','','');
photos[4] = new photo(1049228,'77951','','gallery','http://www3.clikpic.com/SandraSoulas/images/Confirmation-a-076-WEB.jpg',467,700,'','http://www3.clikpic.com/SandraSoulas/images/Confirmation-a-076-WEB_thumb.jpg',130, 195,1, 0,'','','','','','');
photos[5] = new photo(1086473,'75739','','gallery','http://www3.clikpic.com/SandraSoulas/images/Clare 2 032a WEB.jpg',429,600,'','http://www3.clikpic.com/SandraSoulas/images/Clare 2 032a WEB_thumb.jpg',130, 182,0, 0,'','','','','','');
photos[6] = new photo(1012466,'77951','','gallery','http://www3.clikpic.com/SandraSoulas/images/Christening 61a WEB.jpg',600,424,'','http://www3.clikpic.com/SandraSoulas/images/Christening 61a WEB_thumb.jpg',130, 92,0, 0,'','','','','','');
photos[7] = new photo(2175590,'75739','','gallery','http://www3.clikpic.com/SandraSoulas/images/Ruairi 2 113 watermarked.jpg',408,600,'','http://www3.clikpic.com/SandraSoulas/images/Ruairi 2 113 watermarked_thumb.jpg',130, 191,0, 0,'','','','','','');
photos[8] = new photo(1009527,'77951','','gallery','http://www3.clikpic.com/SandraSoulas/images/Christening 315 WEB.jpg',504,360,'','http://www3.clikpic.com/SandraSoulas/images/Christening 315 WEB_thumb.jpg',130, 93,1, 0,'','','','','','');
photos[9] = new photo(1011840,'75739','','gallery','http://www3.clikpic.com/SandraSoulas/images/Communion 122 a WEB1.jpg',335,500,'','http://www3.clikpic.com/SandraSoulas/images/Communion 122 a WEB1_thumb.jpg',130, 194,0, 0,'','','','','','');
photos[10] = new photo(2175572,'77951','','gallery','http://www3.clikpic.com/SandraSoulas/images/Mullens b 036 watermarked.jpg',600,447,'','http://www3.clikpic.com/SandraSoulas/images/Mullens b 036 watermarked_thumb.jpg',130, 97,0, 0,'','','','','','');
photos[11] = new photo(2175554,'77951','','gallery','http://www3.clikpic.com/SandraSoulas/images/Kane 1 216 watermarked.jpg',600,385,'','http://www3.clikpic.com/SandraSoulas/images/Kane 1 216 watermarked_thumb.jpg',130, 83,0, 0,'','','','','','');
photos[12] = new photo(2363367,'75739','','gallery','http://www3.clikpic.com/SandraSoulas/images/Henry 1 108 watermarked.jpg',367,514,'','http://www3.clikpic.com/SandraSoulas/images/Henry 1 108 watermarked_thumb.jpg',130, 182,0, 0,'','','','','','');
photos[13] = new photo(1009432,'77951','','gallery','http://www3.clikpic.com/SandraSoulas/images/_AAN0085 WEB.jpg',504,360,'','http://www3.clikpic.com/SandraSoulas/images/_AAN0085 WEB_thumb.jpg',130, 93,1, 0,'','','','','','');
photos[14] = new photo(2175532,'77951','','gallery','http://www3.clikpic.com/SandraSoulas/images/Cuthbert 3 148 watermarked.jpg',600,458,'','http://www3.clikpic.com/SandraSoulas/images/Cuthbert 3 148 watermarked_thumb.jpg',130, 99,0, 0,'','','','','','');
photos[15] = new photo(2175560,'77951','','gallery','http://www3.clikpic.com/SandraSoulas/images/Kane 2 156 watermarked.jpg',394,600,'','http://www3.clikpic.com/SandraSoulas/images/Kane 2 156 watermarked_thumb.jpg',130, 198,0, 0,'','','','','','');
photos[16] = new photo(1009636,'77951','','gallery','http://www3.clikpic.com/SandraSoulas/images/Studio a 034a WEB.jpg',600,402,'','http://www3.clikpic.com/SandraSoulas/images/Studio a 034a WEB_thumb.jpg',130, 87,1, 0,'','','','','','');
photos[17] = new photo(1011899,'75739','','gallery','http://www3.clikpic.com/SandraSoulas/images/Communion 081 WEB.jpg',335,500,'','http://www3.clikpic.com/SandraSoulas/images/Communion 081 WEB_thumb.jpg',130, 194,0, 0,'','','','','','');
photos[18] = new photo(2175537,'77951','','gallery','http://www3.clikpic.com/SandraSoulas/images/Kane Collage watermarked.jpg',600,428,'','http://www3.clikpic.com/SandraSoulas/images/Kane Collage watermarked_thumb.jpg',130, 93,0, 0,'','','','','','');
photos[19] = new photo(1009533,'77951','','gallery','http://www3.clikpic.com/SandraSoulas/images/01 JANVIER WEB.jpg',505,361,'','http://www3.clikpic.com/SandraSoulas/images/01 JANVIER WEB_thumb.jpg',130, 93,1, 0,'','','','','','');
photos[20] = new photo(1011858,'75739','','gallery','http://www3.clikpic.com/SandraSoulas/images/Communion 087 WEB.jpg',600,429,'','http://www3.clikpic.com/SandraSoulas/images/Communion 087 WEB_thumb.jpg',130, 93,0, 0,'','','','','','');
photos[21] = new photo(1009550,'77951','','gallery','http://www3.clikpic.com/SandraSoulas/images/Studio b 054b WEB.jpg',360,360,'','http://www3.clikpic.com/SandraSoulas/images/Studio b 054b WEB_thumb.jpg',130, 130,0, 0,'','','','','','');
photos[22] = new photo(1058217,'75739','','gallery','http://www3.clikpic.com/SandraSoulas/images/David 1A WEB.jpg',354,500,'','http://www3.clikpic.com/SandraSoulas/images/David 1A WEB_thumb.jpg',130, 184,0, 0,'','','','','','');
photos[23] = new photo(1009597,'77951','','gallery','http://www3.clikpic.com/SandraSoulas/images/Studio a 052c WEB.jpg',360,360,'','http://www3.clikpic.com/SandraSoulas/images/Studio a 052c WEB_thumb.jpg',130, 130,0, 0,'','','','','','');
photos[24] = new photo(1086485,'75739','','gallery','http://www3.clikpic.com/SandraSoulas/images/Clare 3 037a b&w WEB 2.jpg',578,578,'','http://www3.clikpic.com/SandraSoulas/images/Clare 3 037a b&w WEB 2_thumb.jpg',130, 130,0, 0,'','','','','','');
photos[25] = new photo(1058215,'75739','','gallery','http://www3.clikpic.com/SandraSoulas/images/David 2 a WEB.jpg',505,357,'','http://www3.clikpic.com/SandraSoulas/images/David 2 a WEB_thumb.jpg',130, 92,0, 0,'','','','','','');
photos[26] = new photo(1011849,'75739','','gallery','http://www3.clikpic.com/SandraSoulas/images/Communion 152a WEB.jpg',471,500,'','http://www3.clikpic.com/SandraSoulas/images/Communion 152a WEB_thumb.jpg',130, 138,0, 0,'','','','','','');
photos[27] = new photo(1012488,'77951','','gallery','http://www3.clikpic.com/SandraSoulas/images/Studio 044b WEB.jpg',600,333,'','http://www3.clikpic.com/SandraSoulas/images/Studio 044b WEB_thumb.jpg',130, 72,0, 0,'','','','','','');
photos[28] = new photo(1012490,'77951','','gallery','http://www3.clikpic.com/SandraSoulas/images/Studio 061a WEB.jpg',357,500,'','http://www3.clikpic.com/SandraSoulas/images/Studio 061a WEB_thumb.jpg',130, 182,0, 0,'','','','','','');
photos[29] = new photo(1012658,'77951','','gallery','http://www3.clikpic.com/SandraSoulas/images/Christening 204 WEB.jpg',335,500,'','http://www3.clikpic.com/SandraSoulas/images/Christening 204 WEB_thumb.jpg',130, 194,1, 0,'','','','','','');
photos[30] = new photo(1012656,'77951','','gallery','http://www3.clikpic.com/SandraSoulas/images/Studio 147a WEB.jpg',504,360,'','http://www3.clikpic.com/SandraSoulas/images/Studio 147a WEB_thumb.jpg',130, 93,0, 0,'','','','','','');
photos[31] = new photo(1136524,'77951','','gallery','http://www3.clikpic.com/SandraSoulas/images/Emilie 020 WEB.jpg',335,500,'','http://www3.clikpic.com/SandraSoulas/images/Emilie 020 WEB_thumb.jpg',130, 194,1, 1,'','','','','','');
photos[32] = new photo(1231168,'77951','','gallery','http://www3.clikpic.com/SandraSoulas/images/Fab 138a WEB.jpg',500,357,'','http://www3.clikpic.com/SandraSoulas/images/Fab 138a WEB_thumb.jpg',130, 93,0, 0,'','','','','','');
photos[33] = new photo(1256130,'77951','','gallery','http://www3.clikpic.com/SandraSoulas/images/Brooks 2 004 WEB.jpg',354,500,'','http://www3.clikpic.com/SandraSoulas/images/Brooks 2 004 WEB_thumb.jpg',130, 184,0, 0,'','','','','','');
photos[34] = new photo(1256132,'77951','','gallery','http://www3.clikpic.com/SandraSoulas/images/Brooks 2 150 WEB.jpg',500,335,'','http://www3.clikpic.com/SandraSoulas/images/Brooks 2 150 WEB_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[35] = new photo(3427287,'77951','','gallery','http://www3.clikpic.com/SandraSoulas/images/Lena und OskarWEB.jpg',465,600,'','http://www3.clikpic.com/SandraSoulas/images/Lena und OskarWEB_thumb.jpg',130, 168,0, 0,'','','','','','');
photos[36] = new photo(3427299,'77951','','gallery','http://www3.clikpic.com/SandraSoulas/images/Chromakey 233WEB.jpg',429,600,'','http://www3.clikpic.com/SandraSoulas/images/Chromakey 233WEB_thumb.jpg',130, 182,0, 0,'','','','','','');
photos[37] = new photo(3427301,'77951','','gallery','http://www3.clikpic.com/SandraSoulas/images/Collage 1WEB.jpg',600,480,'','http://www3.clikpic.com/SandraSoulas/images/Collage 1WEB_thumb.jpg',130, 104,0, 0,'','','','','','');
photos[38] = new photo(3427304,'77951','','gallery','http://www3.clikpic.com/SandraSoulas/images/Cuthbert 1 172aWEB.jpg',600,402,'','http://www3.clikpic.com/SandraSoulas/images/Cuthbert 1 172aWEB_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[39] = new photo(3652015,'77951','','gallery','http://admin.clikpic.com/SandraSoulas/images/Willis_143aWEB.jpg',428,600,'','http://admin.clikpic.com/SandraSoulas/images/Willis_143aWEB_thumb.jpg',130, 182,0, 0,'','','','','','');
photos[40] = new photo(3652019,'77951','','gallery','http://admin.clikpic.com/SandraSoulas/images/Willis_290aWEB.jpg',600,600,'','http://admin.clikpic.com/SandraSoulas/images/Willis_290aWEB_thumb.jpg',130, 130,0, 0,'','','','','','');
photos[41] = new photo(3652036,'77951','','gallery','http://admin.clikpic.com/SandraSoulas/images/Willis_592aWEB.jpg',429,600,'','http://admin.clikpic.com/SandraSoulas/images/Willis_592aWEB_thumb.jpg',130, 182,0, 0,'','','','','','');
photos[42] = new photo(1012673,'75784','','gallery','http://www3.clikpic.com/SandraSoulas/images/Bright Stars 158c WEB.jpg',270,360,'','http://www3.clikpic.com/SandraSoulas/images/Bright Stars 158c WEB_thumb.jpg',130, 173,0, 0,'','','','','','');
photos[43] = new photo(2175743,'144087','','gallery','http://www3.clikpic.com/SandraSoulas/images/Eté 2007 1 638 watermarked.jpg',500,336,'','http://www3.clikpic.com/SandraSoulas/images/Eté 2007 1 638 watermarked_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[44] = new photo(2175643,'75784','','gallery','http://www3.clikpic.com/SandraSoulas/images/Mullens 180 watermarked2.jpg',286,400,'','http://www3.clikpic.com/SandraSoulas/images/Mullens 180 watermarked2_thumb.jpg',130, 182,0, 0,'','','','','','');
photos[45] = new photo(2175716,'144087','','gallery','http://www3.clikpic.com/SandraSoulas/images/Brooks 2 212 watermarked.jpg',500,340,'','http://www3.clikpic.com/SandraSoulas/images/Brooks 2 212 watermarked_thumb.jpg',130, 88,0, 0,'','','','','','');
photos[46] = new photo(2372237,'77952','','gallery','http://www3.clikpic.com/SandraSoulas/images/Kids 118 b&w watermarked.jpg',470,641,'','http://www3.clikpic.com/SandraSoulas/images/Kids 118 b&w watermarked_thumb.jpg',130, 177,0, 0,'','','','','','');
photos[47] = new photo(1049144,'77952','','gallery','http://www3.clikpic.com/SandraSoulas/images/Confirmation-a-146-b&w-WEB.jpg',600,480,'','http://www3.clikpic.com/SandraSoulas/images/Confirmation-a-146-b&w-WEB_thumb.jpg',130, 104,1, 1,'','','','','','');
photos[48] = new photo(2175645,'75784','','gallery','http://www3.clikpic.com/SandraSoulas/images/Keats - Lindsay watermarked1.jpg',290,400,'','http://www3.clikpic.com/SandraSoulas/images/Keats - Lindsay watermarked1_thumb.jpg',130, 179,0, 0,'','','','','','');
photos[49] = new photo(2175928,'144087','','gallery','http://www3.clikpic.com/SandraSoulas/images/DSC_0091 watermarked.jpg',600,403,'','http://www3.clikpic.com/SandraSoulas/images/DSC_0091 watermarked_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[50] = new photo(1009529,'77952','','gallery','http://www3.clikpic.com/SandraSoulas/images/05 MAY WEB.jpg',360,504,'','http://www3.clikpic.com/SandraSoulas/images/05 MAY WEB_thumb.jpg',130, 182,0, 0,'','','','','','');
photos[51] = new photo(2177035,'144087','','gallery','http://www3.clikpic.com/SandraSoulas/images/Mullens b 006 watermarked.jpg',600,414,'','http://www3.clikpic.com/SandraSoulas/images/Mullens b 006 watermarked_thumb.jpg',130, 90,0, 0,'','','','','','');
photos[52] = new photo(1009541,'77952','','gallery','http://www3.clikpic.com/SandraSoulas/images/Studio 140a WEB.jpg',402,600,'','http://www3.clikpic.com/SandraSoulas/images/Studio 140a WEB_thumb.jpg',130, 194,0, 0,'','','','','','');
photos[53] = new photo(1012492,'77952','','gallery','http://www3.clikpic.com/SandraSoulas/images/Miscellaneous 010a WEB.jpg',600,402,'','http://www3.clikpic.com/SandraSoulas/images/Miscellaneous 010a WEB_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[54] = new photo(1009439,'77952','','gallery','http://www3.clikpic.com/SandraSoulas/images/Emilie 162A b&w WEB.jpg',360,504,'','http://www3.clikpic.com/SandraSoulas/images/Emilie 162A b&w WEB_thumb.jpg',130, 182,1, 0,'','','','','','');
photos[55] = new photo(1136529,'77952','','gallery','http://www3.clikpic.com/SandraSoulas/images/Emilie 146 sepia WEB.jpg',354,500,'','http://www3.clikpic.com/SandraSoulas/images/Emilie 146 sepia WEB_thumb.jpg',130, 184,1, 1,'','','','','','');
photos[56] = new photo(1049168,'77952','','gallery','http://www3.clikpic.com/SandraSoulas/images/Confirmation-a-054-b&w.jpg',600,480,'','http://www3.clikpic.com/SandraSoulas/images/Confirmation-a-054-b&w_thumb.jpg',130, 104,0, 0,'','','','','','');
photos[57] = new photo(1085794,'77952','','gallery','http://www3.clikpic.com/SandraSoulas/images/Lena Communion Studio 032 sepia WEB.jpg',357,499,'','http://www3.clikpic.com/SandraSoulas/images/Lena Communion Studio 032 sepia WEB_thumb.jpg',130, 182,1, 1,'','','','','','');
photos[58] = new photo(1231230,'77952','','gallery','http://www3.clikpic.com/SandraSoulas/images/Fab 228a WEB.jpg',500,335,'','http://www3.clikpic.com/SandraSoulas/images/Fab 228a WEB_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[59] = new photo(1256183,'77952','','gallery','http://www3.clikpic.com/SandraSoulas/images/Brooks 2 088 b&w WEB.jpg',500,354,'','http://www3.clikpic.com/SandraSoulas/images/Brooks 2 088 b&w WEB_thumb.jpg',130, 92,0, 0,'','','','','','');
photos[60] = new photo(3427311,'77952','','gallery','http://www3.clikpic.com/SandraSoulas/images/Chromakey 131 bw blurWEB.jpg',402,600,'','http://www3.clikpic.com/SandraSoulas/images/Chromakey 131 bw blurWEB_thumb.jpg',130, 194,0, 0,'','','','','','');
photos[61] = new photo(3427316,'77952','','gallery','http://www3.clikpic.com/SandraSoulas/images/Collage sucette bw red lolly WEB.jpg',500,640,'','http://www3.clikpic.com/SandraSoulas/images/Collage sucette bw red lolly WEB_thumb.jpg',130, 166,0, 0,'','','','','','');
photos[62] = new photo(3427329,'77952','','gallery','http://www3.clikpic.com/SandraSoulas/images/Chromakey 424 bwWEB.jpg',500,500,'','http://www3.clikpic.com/SandraSoulas/images/Chromakey 424 bwWEB_thumb.jpg',130, 130,0, 0,'','','','','','');
photos[63] = new photo(3652037,'77952','','gallery','http://admin.clikpic.com/SandraSoulas/images/Willis_106aWEB1.jpg',600,429,'','http://admin.clikpic.com/SandraSoulas/images/Willis_106aWEB1_thumb.jpg',130, 93,0, 0,'','','','','','');
photos[64] = new photo(1012665,'75783','','gallery','http://www3.clikpic.com/SandraSoulas/images/St George\'s Ball 178 WEB.jpg',600,400,'','http://www3.clikpic.com/SandraSoulas/images/St George\'s Ball 178 WEB_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[65] = new photo(1012739,'75785','','gallery','http://www3.clikpic.com/SandraSoulas/images/Bright Stars 018a WEB.jpg',357,500,'','http://www3.clikpic.com/SandraSoulas/images/Bright Stars 018a WEB_thumb.jpg',130, 182,0, 1,'','','','','','');
photos[66] = new photo(1012669,'75783','','gallery','http://www3.clikpic.com/SandraSoulas/images/St George\'s Ball 213 WEB.jpg',357,500,'','http://www3.clikpic.com/SandraSoulas/images/St George\'s Ball 213 WEB_thumb.jpg',130, 182,0, 0,'','','','','','');
photos[67] = new photo(1012742,'75785','','gallery','http://www3.clikpic.com/SandraSoulas/images/Bright Stars 137a WEB.jpg',500,357,'','http://www3.clikpic.com/SandraSoulas/images/Bright Stars 137a WEB_thumb.jpg',130, 93,0, 1,'','','','','','');
photos[68] = new photo(1012740,'75785','','gallery','http://www3.clikpic.com/SandraSoulas/images/Bright Stars 118a WEB.jpg',357,500,'','http://www3.clikpic.com/SandraSoulas/images/Bright Stars 118a WEB_thumb.jpg',130, 182,0, 0,'','','','','','');
photos[69] = new photo(1012745,'75785','','gallery','http://www3.clikpic.com/SandraSoulas/images/Toddlers 079a WEB.jpg',350,500,'','http://www3.clikpic.com/SandraSoulas/images/Toddlers 079a WEB_thumb.jpg',130, 186,0, 0,'','','','','','');
photos[70] = new photo(1012746,'75785','','gallery','http://www3.clikpic.com/SandraSoulas/images/Toddlers 233a WEB.jpg',500,357,'','http://www3.clikpic.com/SandraSoulas/images/Toddlers 233a WEB_thumb.jpg',130, 93,0, 0,'','','','','','');
photos[71] = new photo(3576553,'75783','','gallery','http://www3.clikpic.com/SandraSoulas/images/Norsemen_012.jpg',600,429,'','http://www3.clikpic.com/SandraSoulas/images/Norsemen_012_thumb.jpg',130, 93,0, 0,'','','','','','');
photos[72] = new photo(3576442,'75783','','gallery','http://www3.clikpic.com/SandraSoulas/images/Carry-Fennessy_5C.jpg',600,429,'','http://www3.clikpic.com/SandraSoulas/images/Carry-Fennessy_5C_thumb.jpg',130, 93,0, 0,'','','','','','');
photos[73] = new photo(3576444,'75783','','gallery','http://www3.clikpic.com/SandraSoulas/images/Trophy_534.jpg',429,600,'','http://www3.clikpic.com/SandraSoulas/images/Trophy_534_thumb.jpg',130, 182,0, 0,'','','','','','');
photos[74] = new photo(3576525,'75783','','gallery','http://www3.clikpic.com/SandraSoulas/images/Gannon_4MN1.jpg',600,429,'','http://www3.clikpic.com/SandraSoulas/images/Gannon_4MN1_thumb.jpg',130, 93,0, 0,'','','','','','');
photos[75] = new photo(3576447,'75783','','gallery','http://www3.clikpic.com/SandraSoulas/images/HSM_1_168.jpg',600,429,'','http://www3.clikpic.com/SandraSoulas/images/HSM_1_168_thumb.jpg',130, 93,0, 0,'','','','','','');
photos[76] = new photo(3576506,'75783','','gallery','http://www3.clikpic.com/SandraSoulas/images/HSM_3_042.jpg',468,600,'','http://www3.clikpic.com/SandraSoulas/images/HSM_3_042_thumb.jpg',130, 167,0, 0,'','','','','','');
photos[77] = new photo(3576519,'75783','','gallery','http://www3.clikpic.com/SandraSoulas/images/HSM_3_0421.jpg',600,429,'','http://www3.clikpic.com/SandraSoulas/images/HSM_3_0421_thumb.jpg',130, 93,0, 0,'','','','','','');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
galleries = new Array();
galleries[0] = new gallery(77951,'1136524,1049188','Colour','gallery');
galleries[1] = new gallery(75739,'1011836','Communion','gallery');
galleries[2] = new gallery(75575,'1136529,1136524,1085794,1049188,1049144','Studio','gallery');
galleries[3] = new gallery(77952,'1136529,1085794,1049144','Black & White','gallery');
galleries[4] = new gallery(75784,'2175645,2175643,1012673','Corporate portraits','gallery');
galleries[5] = new gallery(75605,'1011836','Location','gallery');
galleries[6] = new gallery(144087,'2177035,2175928,2175743,2175716','Outdoor','gallery');
galleries[7] = new gallery(75783,'3576553,3576525,3576519,3576506,3576447,3576444,3576442,1012669,1012665','Events','gallery');
galleries[8] = new gallery(75785,'1012742,1012739','Nursery and playgroup','gallery');
galleries[9] = new gallery(75782,'1012742,1012739','Corporate','gallery');

