/***************************************************************************
* 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('1305164,1305085,361495');
	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('1305164,1305085,361495');
	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)) {
		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(312657,'24563','','gallery','http://www1.clikpic.com/branwell/images/DSCF3500.JPG',400,338,'','http://www1.clikpic.com/branwell/images/DSCF3500_thumb.JPG',130, 110,0, 0,'','17/06/06','Robert Fisher','','','');
photos[1] = new photo(312667,'24563','','gallery','http://www1.clikpic.com/branwell/images/DSCF3462.JPG',400,531,'','http://www1.clikpic.com/branwell/images/DSCF3462_thumb.JPG',130, 173,0, 0,'','17/06/06','Robert Fisher','','','');
photos[2] = new photo(312662,'24563','','gallery','http://www1.clikpic.com/branwell/images/DSCF3494.JPG',400,531,'','http://www1.clikpic.com/branwell/images/DSCF3494_thumb.JPG',130, 173,0, 0,'','16/06/06','Robert Fisher','','','');
photos[3] = new photo(312671,'25264','','gallery','http://www1.clikpic.com/branwell/images/DSCF3387.JPG',400,531,'','http://www1.clikpic.com/branwell/images/DSCF3387_thumb.JPG',130, 173,0, 0,'','14/06/06','Robert Fisher','Llandaff Cathedral','','');
photos[4] = new photo(312672,'25264','','gallery','http://www1.clikpic.com/branwell/images/DSCF3425.JPG',400,531,'','http://www1.clikpic.com/branwell/images/DSCF3425_thumb.JPG',130, 173,0, 0,'','14/06/06','Robert Fisher','Llandaff Cathedral','','');
photos[5] = new photo(287256,'25200','','gallery','http://www1.clikpic.com/branwell/images/0081.jpg',400,552,'','http://www1.clikpic.com/branwell/images/0081_thumb.jpg',130, 179,0, 0,'','23/03/06','Robert Fisher','','','');
photos[6] = new photo(287257,'25200','','gallery','http://www1.clikpic.com/branwell/images/0121.jpg',400,747,'','http://www1.clikpic.com/branwell/images/0121_thumb.jpg',130, 243,0, 0,'','23/03/06','Robert Fisher','','','');
photos[7] = new photo(287258,'25200','','gallery','http://www1.clikpic.com/branwell/images/0171.jpg',400,533,'','http://www1.clikpic.com/branwell/images/0171_thumb.jpg',130, 173,0, 0,'','23/03/06','Robert Fisher','','','');
photos[8] = new photo(293246,'25200','','gallery','http://www1.clikpic.com/branwell/images/DSCF2353.jpg',400,300,'','http://www1.clikpic.com/branwell/images/DSCF2353_thumb.jpg',130, 98,0, 0,'','23/03/06','Robert Fisher','Cardiff','','');
photos[9] = new photo(290497,'25203','','gallery','http://www1.clikpic.com/branwell/images/12120_6566-1_H0402.jpg',400,267,'','http://www1.clikpic.com/branwell/images/12120_6566-1_H0402_thumb.jpg',130, 87,0, 0,'','15/08/96','Robert Fisher','New Zealand','','');
photos[10] = new photo(290499,'25203','','gallery','http://www1.clikpic.com/branwell/images/12121_6567-1_H0021.jpg',400,267,'','http://www1.clikpic.com/branwell/images/12121_6567-1_H0021_thumb.jpg',130, 87,0, 0,'','15/08/96','Robert Fisher','New Zealand','','');
photos[11] = new photo(291758,'25203','','gallery','http://www1.clikpic.com/branwell/images/12120_6566-1_H0371.jpg',400,267,'','http://www1.clikpic.com/branwell/images/12120_6566-1_H0371_thumb.jpg',130, 87,0, 0,'','01/07/96','Robert Fisher','South Australia','','');
photos[12] = new photo(290496,'25203','','gallery','http://www1.clikpic.com/branwell/images/12120_6566-1_H0062.jpg',400,267,'','http://www1.clikpic.com/branwell/images/12120_6566-1_H0062_thumb.jpg',130, 87,0, 0,'','27/08/95','Robert Fisher','Sulphur Mountain, Banff, Alberta, Canada','','');
photos[13] = new photo(287268,'25200','','gallery','http://www1.clikpic.com/branwell/images/DSCF2473 (2)1.jpg',400,531,'','http://www1.clikpic.com/branwell/images/DSCF2473 (2)1_thumb.jpg',130, 173,0, 0,'','','','','','');
photos[14] = new photo(287271,'25200','','gallery','http://www1.clikpic.com/branwell/images/DSCF25031.jpg',400,301,'','http://www1.clikpic.com/branwell/images/DSCF25031_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[15] = new photo(290482,'25199','','gallery','http://www1.clikpic.com/branwell/images/Rocky5.JPG',400,300,'Rocky','http://www1.clikpic.com/branwell/images/Rocky5_thumb.JPG',130, 98,0, 0,'Rocky, my little West Highland White Terrier. Alright, so technically he doesn\'t count as Wildlife, but you might wonder if you saw him when the postman arrives.','','','','','');
photos[16] = new photo(290483,'25199','','gallery','http://www1.clikpic.com/branwell/images/DSCF27411.JPG',400,323,'Rocky','http://www1.clikpic.com/branwell/images/DSCF27411_thumb.JPG',130, 105,0, 0,'Rocky, my little West Highland White Terrier. Alright, so technically he doesn\'t count as Wildlife, but you might wonder if you saw him when the postman arrives.','','','','','');
photos[17] = new photo(290484,'25167','','gallery','http://www1.clikpic.com/branwell/images/DSCF1312 (Cropped)1.jpg',400,245,'','http://www1.clikpic.com/branwell/images/DSCF1312 (Cropped)1_thumb.jpg',130, 80,0, 0,'','','Robert Fisher','The Moors Road, nr. Cowbridge','','');
photos[18] = new photo(290485,'25207','','gallery','http://www1.clikpic.com/branwell/images/2004_1118Image00651.JPG',400,300,'','http://www1.clikpic.com/branwell/images/2004_1118Image00651_thumb.JPG',130, 98,0, 0,'','','Sarah Fisher','Salzburg, Austria','','');
photos[19] = new photo(290487,'25207','','gallery','http://www1.clikpic.com/branwell/images/2005_0624Image0071 (Cropped)1.jpg',400,314,'','http://www1.clikpic.com/branwell/images/2005_0624Image0071 (Cropped)1_thumb.jpg',130, 102,0, 0,'','','','Luca, Tuscany, Italy','','');
photos[20] = new photo(290488,'25166','','gallery','http://www1.clikpic.com/branwell/images/DSCF01141.JPG',400,300,'','http://www1.clikpic.com/branwell/images/DSCF01141_thumb.JPG',130, 98,0, 0,'','','','Blue Anchor Bay','','');
photos[21] = new photo(290490,'25167','','gallery','http://www1.clikpic.com/branwell/images/DSCF12981.jpg',400,533,'','http://www1.clikpic.com/branwell/images/DSCF12981_thumb.jpg',130, 173,0, 0,'','','Robert Fisher','Penllyn Castle, nr. Cowbridge, South Wales','','');
photos[22] = new photo(290491,'25166','','gallery','http://www1.clikpic.com/branwell/images/DSCF14971.jpg',400,301,'','http://www1.clikpic.com/branwell/images/DSCF14971_thumb.jpg',130, 98,0, 0,'','','','Dunraven Bay','','');
photos[23] = new photo(290492,'25166','','gallery','http://www1.clikpic.com/branwell/images/DSCF1499 (2)1.jpg',400,531,'','http://www1.clikpic.com/branwell/images/DSCF1499 (2)1_thumb.jpg',130, 173,0, 0,'','','Sarah Fisher','Dunraven Bay','','');
photos[24] = new photo(290494,'25166','','gallery','http://www1.clikpic.com/branwell/images/DSCF1544 (2)1.jpg',400,301,'','http://www1.clikpic.com/branwell/images/DSCF1544 (2)1_thumb.jpg',130, 98,0, 0,'','','Robert Fisher','Dunraven Bay','','Dawn Surfer');
photos[25] = new photo(290495,'25199','','gallery','http://www1.clikpic.com/branwell/images/Image A1.jpg',400,438,'','http://www1.clikpic.com/branwell/images/Image A1_thumb.jpg',130, 142,0, 0,'','','Robert Fisher','','','');
photos[26] = new photo(290501,'25203','','gallery','http://www1.clikpic.com/branwell/images/12121_6567-1_H0092.jpg',400,267,'','http://www1.clikpic.com/branwell/images/12121_6567-1_H0092_thumb.jpg',130, 87,0, 0,'','','','Cowbridge, South Wales','','');
photos[27] = new photo(290503,'25203','','gallery','http://www1.clikpic.com/branwell/images/12121_6567-1_H013 (B)2.jpg',400,262,'','http://www1.clikpic.com/branwell/images/12121_6567-1_H013 (B)2_thumb.jpg',130, 85,0, 0,'','','','Witch\'s Point, South Wales','','');
photos[28] = new photo(290713,'25264','','gallery','http://www1.clikpic.com/branwell/images/DSCF31501.JPG',400,301,'','http://www1.clikpic.com/branwell/images/DSCF31501_thumb.JPG',130, 98,0, 0,'','','','','','');
photos[29] = new photo(290717,'25199','','gallery','http://www1.clikpic.com/branwell/images/DSCF2566 (2)1.jpg',400,301,'','http://www1.clikpic.com/branwell/images/DSCF2566 (2)1_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[30] = new photo(290772,'25166','','gallery','http://www1.clikpic.com/branwell/images/DSCF3295.JPG',400,544,'','http://www1.clikpic.com/branwell/images/DSCF3295_thumb.JPG',130, 177,0, 0,'','','','Dunraven Bay','','');
photos[31] = new photo(291749,'25199','','gallery','http://www1.clikpic.com/branwell/images/DSCF29322.JPG',400,301,'','http://www1.clikpic.com/branwell/images/DSCF29322_thumb.JPG',130, 98,0, 0,'','','','','','');
photos[32] = new photo(291751,'25199','','gallery','http://www1.clikpic.com/branwell/images/DSCF29532.JPG',400,301,'','http://www1.clikpic.com/branwell/images/DSCF29532_thumb.JPG',130, 98,0, 0,'','','','','','');
photos[33] = new photo(291752,'25199','','gallery','http://www1.clikpic.com/branwell/images/DSCF29092.JPG',400,301,'','http://www1.clikpic.com/branwell/images/DSCF29092_thumb.JPG',130, 98,0, 0,'','','','','','');
photos[34] = new photo(291823,'25264','','gallery','http://www1.clikpic.com/branwell/images/Biker Girl.jpg',400,531,'','http://www1.clikpic.com/branwell/images/Biker Girl_thumb.jpg',130, 173,0, 0,'','','','Cardiff City Hall (Background)','','');
photos[35] = new photo(291824,'25264','','gallery','http://www1.clikpic.com/branwell/images/Head.jpg',400,533,'','http://www1.clikpic.com/branwell/images/Head_thumb.jpg',130, 173,0, 0,'','','','Cardiff City Centre','','');
photos[36] = new photo(291827,'25264','','gallery','http://www1.clikpic.com/branwell/images/Another Way 1.jpg',400,533,'','http://www1.clikpic.com/branwell/images/Another Way 1_thumb.jpg',130, 173,0, 0,'','','','Cardiff City Centre','','');
photos[37] = new photo(291828,'25264','','gallery','http://www1.clikpic.com/branwell/images/Old Lady.jpg',400,533,'','http://www1.clikpic.com/branwell/images/Old Lady_thumb.jpg',130, 173,0, 0,'','','Robert Fisher','Cardiff City Centre','','');
photos[38] = new photo(291830,'25264','','gallery','http://www1.clikpic.com/branwell/images/Bikes.jpg',400,531,'','http://www1.clikpic.com/branwell/images/Bikes_thumb.jpg',130, 173,0, 0,'','','','','','');
photos[39] = new photo(291841,'25167','','gallery','http://www1.clikpic.com/branwell/images/100_2052.JPG',400,302,'','http://www1.clikpic.com/branwell/images/100_2052_thumb.JPG',130, 98,0, 0,'','','Robert Fisher','Stonehenge, where else?','','');
photos[40] = new photo(312663,'24563','','gallery','http://www1.clikpic.com/branwell/images/DSCF3468.JPG',400,323,'','http://www1.clikpic.com/branwell/images/DSCF3468_thumb.JPG',130, 105,0, 0,'','','','','','');
photos[41] = new photo(361495,'25167','','gallery','http://www1.clikpic.com/branwell/images/DSCF3869 (Cropped).jpg',400,557,'','http://www1.clikpic.com/branwell/images/DSCF3869 (Cropped)_thumb.jpg',130, 181,1, 0,'','','Robert Fisher','Tintern Abbey','','');
photos[42] = new photo(1305071,'25199','','gallery','http://www1.clikpic.com/branwell/images/0001 (2).jpg',400,267,'The Phoenix','http://www1.clikpic.com/branwell/images/0001 (2)_thumb.jpg',130, 87,0, 0,'Mayrhoffen, Austria','','Robert Fisher','','','');
photos[43] = new photo(1305074,'25199','','gallery','http://www1.clikpic.com/branwell/images/0001 (3).jpg',400,267,'Harris Hawk','http://www1.clikpic.com/branwell/images/0001 (3)_thumb.jpg',130, 87,0, 0,'','','Robert Fisher','','','');
photos[44] = new photo(1305077,'25167','','gallery','http://www1.clikpic.com/branwell/images/0001 (4).jpg',400,267,'Mountain Mist','http://www1.clikpic.com/branwell/images/0001 (4)_thumb.jpg',130, 87,0, 0,'','','Robert Fisher','','','');
photos[45] = new photo(1305078,'25167','','gallery','http://www1.clikpic.com/branwell/images/0001 (6).jpg',400,267,'Starlings Over Glastonbury','http://www1.clikpic.com/branwell/images/0001 (6)_thumb.jpg',130, 87,0, 0,'','','Robert Fisher','','','');
photos[46] = new photo(1305079,'25264','','gallery','http://www1.clikpic.com/branwell/images/000118 (1).jpg',400,600,'Snow Family','http://www1.clikpic.com/branwell/images/000118 (1)_thumb.jpg',130, 195,0, 0,'','','Robert Fisher','','','');
photos[47] = new photo(1305083,'25200','','gallery','http://www1.clikpic.com/branwell/images/DPP_0018.jpg',400,600,'Kim','http://www1.clikpic.com/branwell/images/DPP_0018_thumb.jpg',130, 195,0, 0,'','','Robert Fisher','','','');
photos[48] = new photo(1305085,'25167','','gallery','http://www1.clikpic.com/branwell/images/Favourite.jpg',400,600,'Tulip','http://www1.clikpic.com/branwell/images/Favourite_thumb.jpg',130, 195,1, 0,'','','Robert Fisher','','','');
photos[49] = new photo(1305094,'25200','','gallery','http://www1.clikpic.com/branwell/images/DPP_0064.jpg',400,600,'A Private Moment','http://www1.clikpic.com/branwell/images/DPP_0064_thumb.jpg',130, 195,0, 0,'','','Robert Fisher','','','');
photos[50] = new photo(1305098,'25207','','gallery','http://www1.clikpic.com/branwell/images/Z (10).jpg',400,267,'Corpus Christi','http://www1.clikpic.com/branwell/images/Z (10)_thumb.jpg',130, 87,0, 0,'','','Robert Fisher','Mayrhoffen','','');
photos[51] = new photo(1305110,'25264','','gallery','http://www1.clikpic.com/branwell/images/Z (7) (Cropped).jpg',400,352,'London Girl','http://www1.clikpic.com/branwell/images/Z (7) (Cropped)_thumb.jpg',130, 114,0, 0,'','','Robert Fisher','','','');
photos[52] = new photo(1305116,'25167','','gallery','http://www1.clikpic.com/branwell/images/DPP_0037.jpg',400,400,'Pinhole','http://www1.clikpic.com/branwell/images/DPP_0037_thumb.jpg',130, 130,0, 0,'','','Robert Fisher','','','');
photos[53] = new photo(1305133,'25200','','gallery','http://www1.clikpic.com/branwell/images/DPP_0014.jpg',400,600,'Kim','http://www1.clikpic.com/branwell/images/DPP_0014_thumb.jpg',130, 195,0, 0,'','','Robert Fisher','','','');
photos[54] = new photo(1305153,'25167','','gallery','http://www1.clikpic.com/branwell/images/Z (5).jpg',400,267,'Daffodil','http://www1.clikpic.com/branwell/images/Z (5)_thumb.jpg',130, 87,0, 0,'','','Robert Fisher','','','');
photos[55] = new photo(1305158,'25167','','gallery','http://www1.clikpic.com/branwell/images/DPP_0036 (Solarised).jpg',400,267,'Solarisation','http://www1.clikpic.com/branwell/images/DPP_0036 (Solarised)_thumb.jpg',130, 87,0, 0,'','','Robert Fisher','','','');
photos[56] = new photo(1305161,'25167','','gallery','http://www1.clikpic.com/branwell/images/A (3).jpg',400,558,'','http://www1.clikpic.com/branwell/images/A (3)_thumb.jpg',130, 181,0, 0,'Cornish Beach','','Robert Fisher','','','');
photos[57] = new photo(1305164,'25264','','gallery','http://www1.clikpic.com/branwell/images/dpp_0011 (2).jpg',400,755,'Skies','http://www1.clikpic.com/branwell/images/dpp_0011 (2)_thumb.jpg',130, 245,1, 0,'','','Robert Fisher','','','');
photos[58] = new photo(1305170,'25207','','gallery','http://www1.clikpic.com/branwell/images/Z (9).jpg',400,267,'Umbrellas','http://www1.clikpic.com/branwell/images/Z (9)_thumb.jpg',130, 87,0, 0,'','','Robert Fisher','','','');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
galleries = new Array();
galleries[0] = new gallery(25264,'1305164,1305110,1305079,312672,312671,291830,291828,291827,291824,291823','Black and White','gallery');
galleries[1] = new gallery(25167,'1305161,1305158,1305153,1305116,1305085,1305078,1305077,361495,291841,290490','Landscapes','gallery');
galleries[2] = new gallery(25200,'1305133,1305094,1305083,293246,287271,287268,287258,287257,287256','Portraits','gallery');
galleries[3] = new gallery(25203,'291758,290503,290501,290499,290497,290496','Scanned 35mm Photographs','gallery');
galleries[4] = new gallery(25166,'290772,290494,290492,290491,290488','Seascapes','gallery');
galleries[5] = new gallery(24563,'312667,312663,312662,312657','Summer Solstice Festival','gallery');
galleries[6] = new gallery(25207,'1305170,1305098,290487,290485','Travel Photos','gallery');
galleries[7] = new gallery(25199,'1305074,1305071,291752,291751,291749,290717,290495,290483,290482','Wildlife','gallery');

