/***************************************************************************
* 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('6186763,6186758,6186654,6186648,6186645,6186643,5676057,5676053,5676047,5676045,4970946,4969875,4969874,4969871,4969868,4969867,4969866,4969865,4969864,4969722,4969721,4969720,4969719,4969716,4151365,4151362,4151359,4151301,4131450,4131443,4131438,4131435,4131432,4131425,4131422,4131418,4131361,4131357,4131356,3914492,3914488,3914486,3914485,3914477,3821355,3821349,3821344,3821339,3821334,3821329');
	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('6186763,6186758,6186654,6186648,6186645,6186643,5676057,5676053,5676047,5676045,4970946,4969875,4969874,4969871,4969868,4969867,4969866,4969865,4969864,4969722,4969721,4969720,4969719,4969716,4151365,4151362,4151359,4151301,4131450,4131443,4131438,4131435,4131432,4131425,4131422,4131418,4131361,4131357,4131356,3914492,3914488,3914486,3914485,3914477,3821355,3821349,3821344,3821339,3821334,3821329');
	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 = 'Lyndon Methodist Church, Solihull: ' + 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 thecurrent 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(1994483,'','','','http://www.clikchurch.com/richandjud/images/JmaChildrenLogo1.jpg',206,110,'JMA','http://www.clikchurch.com/richandjud/images/JmaChildrenLogo1_thumb.jpg',130, 69,0, 0,'','','','','','');
photos[1] = new photo(2218013,'','','','http://www.clikchurch.com/richandjud/images/Reach logo1.jpg',128,98,'REACH Logo','http://www.clikchurch.com/richandjud/images/Reach logo1_thumb.jpg',130, 100,0, 0,'','','','','','');
photos[2] = new photo(2795095,'','','','http://www.clikchurch.com/richandjud/images/3 customers.JPG',400,300,'Shirley, Hugh & Bob - 3 happy customers','http://www.clikchurch.com/richandjud/images/3 customers_thumb.JPG',130, 98,0, 0,'','','','','','');
photos[3] = new photo(2795125,'','','','http://www.clikchurch.com/richandjud/images/Andrew.JPG',400,300,'Andrew','http://www.clikchurch.com/richandjud/images/Andrew_thumb.JPG',130, 98,0, 0,'','','','','','');
photos[4] = new photo(2795132,'','','','http://www.clikchurch.com/richandjud/images/caterers.JPG',400,300,'3 of the cooks again!','http://www.clikchurch.com/richandjud/images/caterers_thumb.JPG',130, 98,0, 0,'','','','','','');
photos[5] = new photo(3205139,'','','','http://www.clikchurch.com/richandjud/images/2 Kings.JPG',397,441,'2 Kings at the Nativity 2008','http://www.clikchurch.com/richandjud/images/2 Kings_thumb.JPG',130, 144,0, 0,'Nativity Service 2008','','','','','');
photos[6] = new photo(3205153,'','','','http://www.clikchurch.com/richandjud/images/M & J1.JPG',400,414,'Mary & Joseph searching for the Stable','http://www.clikchurch.com/richandjud/images/M & J1_thumb.JPG',130, 135,0, 1,'A very young Mary & Joseph searching for the Stable at the Nativity Service','','','','','');
photos[7] = new photo(3205159,'','','','http://www.clikchurch.com/richandjud/images/Mary & Joseph1.JPG',400,297,'Mary & Joseph coming out of Church','http://www.clikchurch.com/richandjud/images/Mary & Joseph1_thumb.JPG',130, 97,0, 0,'','','','','','');
photos[8] = new photo(3331088,'','','','http://www.clikchurch.com/richandjud/images/Angel1.JPG',400,300,'Angel Banner','http://www.clikchurch.com/richandjud/images/Angel1_thumb.JPG',130, 98,0, 0,'Angel Banner made by Jesus Crew','','','','','');
photos[9] = new photo(3541292,'','','','http://www.clikchurch.com/richandjud/images/Banner now w.JPG',270,409,'Everyday Banner','http://www.clikchurch.com/richandjud/images/Banner now w_thumb.JPG',130, 197,0, 0,'','','','','','');
photos[10] = new photo(3541295,'','','','http://www.clikchurch.com/richandjud/images/christmas banner w.JPG',292,420,'Christmas Banner','http://www.clikchurch.com/richandjud/images/christmas banner w_thumb.JPG',130, 187,0, 0,'','','','','','');
photos[11] = new photo(3541296,'','','','http://www.clikchurch.com/richandjud/images/Harvest banner w.JPG',265,420,'Harvest Banner','http://www.clikchurch.com/richandjud/images/Harvest banner w_thumb.JPG',130, 206,0, 0,'','','','','','');
photos[12] = new photo(5676045,'321594','','gallery','http://www.clikchurch.com/richandjud/images/Colour_song.JPG',400,301,'Jesus Crew marching to the Salvation song','http://www.clikchurch.com/richandjud/images/Colour_song_thumb.JPG',130, 98,0, 0,'','','','','','');
photos[13] = new photo(5676047,'321594','','gallery','http://www.clikchurch.com/richandjud/images/Colour_song2.JPG',400,260,'Jesus Crew using coloured flags to depict the song','http://www.clikchurch.com/richandjud/images/Colour_song2_thumb.JPG',130, 85,0, 0,'','','','','','');
photos[14] = new photo(5676053,'321594','','gallery','http://www.clikchurch.com/richandjud/images/J_Crew1.JPG',400,296,'Jesus Crew after the revived Sunday Scool Anniversary','http://www.clikchurch.com/richandjud/images/J_Crew1_thumb.JPG',130, 96,0, 1,'','','','','','');
photos[15] = new photo(5676057,'321594','','gallery','http://www.clikchurch.com/richandjud/images/J_Crew2.JPG',400,291,'Jesus Crew at Sunday School Anniversary','http://www.clikchurch.com/richandjud/images/J_Crew2_thumb.JPG',130, 95,0, 0,'','','','','','');
photos[16] = new photo(6186643,'345530','','gallery','http://www.clikchurch.com/richandjud/images/Altar.JPG',400,297,'Altar for baptism','http://www.clikchurch.com/richandjud/images/Altar_thumb.JPG',130, 97,0, 0,'','','','','','');
photos[17] = new photo(6186645,'345530','','gallery','http://www.clikchurch.com/richandjud/images/blessing_1.JPG',400,300,'Confirming Matt','http://www.clikchurch.com/richandjud/images/blessing_1_thumb.JPG',130, 98,0, 0,'','','','','','');
photos[18] = new photo(6186648,'345530','','gallery','http://www.clikchurch.com/richandjud/images/blessing_2.JPG',400,300,'Confirming Lesley','http://www.clikchurch.com/richandjud/images/blessing_2_thumb.JPG',130, 98,0, 0,'','','','','','');
photos[19] = new photo(6186654,'345530','','gallery','http://www.clikchurch.com/richandjud/images/Water_ready.JPG',400,330,'Water ready','http://www.clikchurch.com/richandjud/images/Water_ready_thumb.JPG',130, 107,0, 0,'','','','','','');
photos[20] = new photo(6186758,'345530','','gallery','http://www.clikchurch.com/richandjud/images/3_21.JPG',400,325,'Three New Members','http://www.clikchurch.com/richandjud/images/3_21_thumb.JPG',130, 106,0, 0,'','','','','','');
photos[21] = new photo(6186763,'345530','','gallery','http://www.clikchurch.com/richandjud/images/candles3.JPG',400,298,'Lesley & Matt with their candles after Baptism','http://www.clikchurch.com/richandjud/images/candles3_thumb.JPG',130, 97,0, 0,'','','','','','');
photos[22] = new photo(285011,'','','','http://www.clikchurch.com/richandjud/images/cake3.JPG',400,300,'<b>A confirmation cake!! - Yummy!!</b>','http://www.clikchurch.com/richandjud/images/cake3_thumb.JPG',130, 98,0, 0,'','','','','','');
photos[23] = new photo(220044,'','','','http://www.clikchurch.com/richandjud/images/catterpillars1.jpg',400,300,'<b>Caterpillars invade the Church</b>','http://www.clikchurch.com/richandjud/images/catterpillars1_thumb.jpg',130, 98,0, 0,'<b>Who wants to be a \'has been\' when you could be a \'will be?\'</b>','','','','','');
photos[24] = new photo(4969716,'282493','','gallery','http://www.clikchurch.com/richandjud/images/l15.jpg',400,300,'','http://www.clikchurch.com/richandjud/images/l15_thumb.jpg',130, 98,0, 1,'','','','','','');
photos[25] = new photo(4969719,'282493','','gallery','http://www.clikchurch.com/richandjud/images/l16.jpg',400,300,'','http://www.clikchurch.com/richandjud/images/l16_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[26] = new photo(4969720,'282493','','gallery','http://www.clikchurch.com/richandjud/images/l18.jpg',400,300,'','http://www.clikchurch.com/richandjud/images/l18_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[27] = new photo(4969721,'282493','','gallery','http://www.clikchurch.com/richandjud/images/l19.jpg',400,300,'','http://www.clikchurch.com/richandjud/images/l19_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[28] = new photo(4969722,'282493','','gallery','http://www.clikchurch.com/richandjud/images/l20.jpg',400,300,'','http://www.clikchurch.com/richandjud/images/l20_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[29] = new photo(4970946,'282493','','gallery','http://www.clikchurch.com/richandjud/images/l28.jpg',400,293,'','http://www.clikchurch.com/richandjud/images/l28_thumb.jpg',130, 95,0, 0,'','','','','','');
photos[30] = new photo(4969864,'282495','','gallery','http://www.clikchurch.com/richandjud/images/l2.jpg',130,96,'','http://www.clikchurch.com/richandjud/images/l2_thumb.jpg',130, 96,0, 1,'','','','','','');
photos[31] = new photo(4969865,'282495','','gallery','http://www.clikchurch.com/richandjud/images/l12.jpg',400,249,'','http://www.clikchurch.com/richandjud/images/l12_thumb.jpg',130, 81,0, 0,'','','','','','');
photos[32] = new photo(4969866,'282495','','gallery','http://www.clikchurch.com/richandjud/images/l13.jpg',400,257,'','http://www.clikchurch.com/richandjud/images/l13_thumb.jpg',130, 84,0, 0,'','','','','','');
photos[33] = new photo(4969867,'282495','','gallery','http://www.clikchurch.com/richandjud/images/l14.jpg',400,226,'','http://www.clikchurch.com/richandjud/images/l14_thumb.jpg',130, 73,0, 0,'','','','','','');
photos[34] = new photo(4151301,'248001','','gallery','http://www.clikchurch.com/richandjud/images/JC Action w.JPG',400,286,'Jesus Crew action song','http://www.clikchurch.com/richandjud/images/JC Action w_thumb.JPG',130, 93,0, 0,'','','','','','');
photos[35] = new photo(4151359,'248001','','gallery','http://www.clikchurch.com/richandjud/images/JC Cards 2 w.JPG',400,300,'Jesus Crew with Father\'s Day cards','http://www.clikchurch.com/richandjud/images/JC Cards 2 w_thumb.JPG',130, 98,0, 0,'','','','','','');
photos[36] = new photo(4151362,'248001','','gallery','http://www.clikchurch.com/richandjud/images/JC sing w.JPG',400,295,'Jesus Crew singing','http://www.clikchurch.com/richandjud/images/JC sing w_thumb.JPG',130, 96,0, 0,'','','','','','');
photos[37] = new photo(4151365,'248001','','gallery','http://www.clikchurch.com/richandjud/images/JC cards w.JPG',400,300,'Jesus Crew again','http://www.clikchurch.com/richandjud/images/JC cards w_thumb.JPG',130, 98,0, 0,'','','','','','');
photos[38] = new photo(4969868,'175104','','gallery','http://www.clikchurch.com/richandjud/images/l22_harvest.jpg',400,322,'','http://www.clikchurch.com/richandjud/images/l22_harvest_thumb.jpg',130, 105,0, 1,'','','','','','');
photos[39] = new photo(4969871,'175104','','gallery','http://www.clikchurch.com/richandjud/images/l23_harvest.jpg',400,349,'','http://www.clikchurch.com/richandjud/images/l23_harvest_thumb.jpg',130, 113,0, 0,'','','','','','');
photos[40] = new photo(4969874,'175104','','gallery','http://www.clikchurch.com/richandjud/images/l24_harvest.jpg',400,156,'','http://www.clikchurch.com/richandjud/images/l24_harvest_thumb.jpg',130, 51,0, 0,'','','','','','');
photos[41] = new photo(4969875,'175104','','gallery','http://www.clikchurch.com/richandjud/images/l25_harvest.jpg',400,411,'','http://www.clikchurch.com/richandjud/images/l25_harvest_thumb.jpg',130, 134,0, 0,'','','','','','');
photos[42] = new photo(3914477,'237627','','gallery','http://www.clikchurch.com/richandjud/images/P2020707.JPG',400,300,'Happy customer from Face Painting','http://www.clikchurch.com/richandjud/images/P2020707_thumb.JPG',130, 98,0, 0,'','','','','','');
photos[43] = new photo(3914485,'237627','','gallery','http://www.clikchurch.com/richandjud/images/P2020712.JPG',400,300,'Thanks to this young man for his work selling mugs, bookmarks etc','http://www.clikchurch.com/richandjud/images/P2020712_thumb.JPG',130, 98,0, 0,'','','','','','');
photos[44] = new photo(3914486,'237627','','gallery','http://www.clikchurch.com/richandjud/images/P2020713.JPG',400,267,'Eric & Dorothy on the book stall','http://www.clikchurch.com/richandjud/images/P2020713_thumb.JPG',130, 87,0, 0,'','','','','','');
photos[45] = new photo(3914488,'237627','','gallery','http://www.clikchurch.com/richandjud/images/P2020714.JPG',400,376,'Mary with helpers on the White Elephant stall','http://www.clikchurch.com/richandjud/images/P2020714_thumb.JPG',130, 122,0, 0,'','','','','','');
photos[46] = new photo(3914492,'237627','','gallery','http://www.clikchurch.com/richandjud/images/P20207111.JPG',400,300,'Sam being creative with paint, watched by Julia.','http://www.clikchurch.com/richandjud/images/P20207111_thumb.JPG',130, 98,0, 0,'','','','','','');
photos[47] = new photo(3652289,'223189','','gallery','http://www.clikchurch.com/richandjud/images/Anchors w.JPG',400,276,'Anchor Boys being beans!','http://www.clikchurch.com/richandjud/images/Anchors w_thumb.JPG',130, 90,0, 0,'','','','','','');
photos[48] = new photo(3652294,'223189','','gallery','http://www.clikchurch.com/richandjud/images/Anchors w 2.JPG',400,309,'Anchor Boys ready to play games','http://www.clikchurch.com/richandjud/images/Anchors w 2_thumb.JPG',130, 100,0, 0,'','','','','','');
photos[49] = new photo(3652296,'223189','','gallery','http://www.clikchurch.com/richandjud/images/Band w 2.JPG',400,244,'BB/GB Band marching','http://www.clikchurch.com/richandjud/images/Band w 2_thumb.JPG',130, 79,0, 0,'','','','','','');
photos[50] = new photo(3652300,'223189','','gallery','http://www.clikchurch.com/richandjud/images/Band w 3.JPG',400,332,'Three of the GB including a new instrument this year called a Marimba.','http://www.clikchurch.com/richandjud/images/Band w 3_thumb.JPG',130, 108,0, 0,'','','','','','');
photos[51] = new photo(3652303,'223189','','gallery','http://www.clikchurch.com/richandjud/images/Band w 4.JPG',400,258,'Band stepping out!','http://www.clikchurch.com/richandjud/images/Band w 4_thumb.JPG',130, 84,0, 0,'','','','','','');
photos[52] = new photo(3652307,'223189','','gallery','http://www.clikchurch.com/richandjud/images/watching w.JPG',400,300,'Watching the older performers.','http://www.clikchurch.com/richandjud/images/watching w_thumb.JPG',130, 98,0, 0,'','','','','','');
photos[53] = new photo(3652310,'223189','','gallery','http://www.clikchurch.com/richandjud/images/abbba w.JPG',400,297,'Here we go again - Abba','http://www.clikchurch.com/richandjud/images/abbba w_thumb.JPG',130, 97,0, 0,'','','','','','');
photos[54] = new photo(3652312,'223189','','gallery','http://www.clikchurch.com/richandjud/images/glads w.JPG',400,300,'Gladiators in the ring','http://www.clikchurch.com/richandjud/images/glads w_thumb.JPG',130, 98,0, 0,'','','','','','');
photos[55] = new photo(3652337,'223189','','gallery','http://www.clikchurch.com/richandjud/images/glads w 2.JPG',400,300,'Gladiators again','http://www.clikchurch.com/richandjud/images/glads w 2_thumb.JPG',130, 98,0, 0,'','','','','','');
photos[56] = new photo(3652343,'223189','','gallery','http://www.clikchurch.com/richandjud/images/Signing w.JPG',400,220,'Signing a Rainbow','http://www.clikchurch.com/richandjud/images/Signing w_thumb.JPG',130, 72,0, 0,'','','','','','');
photos[57] = new photo(3652353,'223189','','gallery','http://www.clikchurch.com/richandjud/images/Juniors w.JPG',400,222,'Juniors singing enthusiastically!','http://www.clikchurch.com/richandjud/images/Juniors w_thumb.JPG',130, 72,0, 1,'','','','','','');
photos[58] = new photo(3652425,'223189','','gallery','http://www.clikchurch.com/richandjud/images/Juniors w 2.JPG',400,300,'Juniors singing.','http://www.clikchurch.com/richandjud/images/Juniors w 2_thumb.JPG',130, 98,0, 0,'','','','','','');
photos[59] = new photo(3652430,'223189','','gallery','http://www.clikchurch.com/richandjud/images/Expl w.JPG',400,265,'Explorers saying hello from many countries.','http://www.clikchurch.com/richandjud/images/Expl w_thumb.JPG',130, 86,0, 0,'','','','','','');
photos[60] = new photo(3821329,'232897','','gallery','http://www.clikchurch.com/richandjud/images/Cake 1.JPG',400,320,'50th Anniversary Cake.','http://www.clikchurch.com/richandjud/images/Cake 1_thumb.JPG',130, 104,0, 1,'','25/04/09','','','','');
photos[61] = new photo(3821339,'232897','','gallery','http://www.clikchurch.com/richandjud/images/Cake cutting.JPG',400,369,'Tom & Hugh cutting the cake.','http://www.clikchurch.com/richandjud/images/Cake cutting_thumb.JPG',130, 120,0, 0,'','25/04/09','','','','');
photos[62] = new photo(3821344,'232897','','gallery','http://www.clikchurch.com/richandjud/images/Millie showing archives.JPG',400,251,'Millie showing some young people the Archives','http://www.clikchurch.com/richandjud/images/Millie showing archives_thumb.JPG',130, 82,0, 0,'','25/04/09','','','','');
photos[63] = new photo(3821349,'232897','','gallery','http://www.clikchurch.com/richandjud/images/Millie showing archives 2.JPG',400,286,'Another youngster, looking at how we used to be.','http://www.clikchurch.com/richandjud/images/Millie showing archives 2_thumb.JPG',130, 93,0, 0,'','25/04/09','','','','');
photos[64] = new photo(3821355,'232897','','gallery','http://www.clikchurch.com/richandjud/images/Outside Banner.JPG',400,217,'The new Banner which hangs on the outside wall.','http://www.clikchurch.com/richandjud/images/Outside Banner_thumb.JPG',130, 71,0, 0,'','25/04/09','','','','');
photos[65] = new photo(3821334,'232897','','gallery','http://www.clikchurch.com/richandjud/images/50th Flowers.JPG',400,328,'Foundation Stone.','http://www.clikchurch.com/richandjud/images/50th Flowers_thumb.JPG',130, 107,0, 0,'','','','','','');
photos[66] = new photo(4131356,'247367','','gallery','http://www.clikchurch.com/richandjud/images/2 friends w1.JPG',400,266,'2 friends at the Tea Party','http://www.clikchurch.com/richandjud/images/2 friends w1_thumb.JPG',130, 86,0, 1,'Community Fun Day','20/06/09','','','','');
photos[67] = new photo(4131357,'247367','','gallery','http://www.clikchurch.com/richandjud/images/A with strawbs w.JPG',400,323,'Anneleen enjoying some Strawberries','http://www.clikchurch.com/richandjud/images/A with strawbs w_thumb.JPG',130, 105,0, 0,'Community Fun Day','20/06/09','','','','');
photos[68] = new photo(4131361,'247367','','gallery','http://www.clikchurch.com/richandjud/images/biscuits w1.JPG',400,362,'Concentrating on biscuit decorating','http://www.clikchurch.com/richandjud/images/biscuits w1_thumb.JPG',130, 118,0, 0,'Community Fun Day','20/06/09','','','','');
photos[69] = new photo(4131418,'247367','','gallery','http://www.clikchurch.com/richandjud/images/Connect 4 w.JPG',400,300,'Ernest in charge of the Giant Connect 4','http://www.clikchurch.com/richandjud/images/Connect 4 w_thumb.JPG',130, 98,0, 0,'Community Fun Day','20/06/09','','','','');
photos[70] = new photo(4131422,'247367','','gallery','http://www.clikchurch.com/richandjud/images/Emily w.JPG',400,340,'Love the Hat!','http://www.clikchurch.com/richandjud/images/Emily w_thumb.JPG',130, 111,0, 0,'Community Fun Day','20/06/09','','','','');
photos[71] = new photo(4131425,'247367','','gallery','http://www.clikchurch.com/richandjud/images/face painting w.JPG',400,279,'Face & Arm Painting','http://www.clikchurch.com/richandjud/images/face painting w_thumb.JPG',130, 91,0, 0,'Community Fun Day','20/06/09','','','','');
photos[72] = new photo(4131432,'247367','','gallery','http://www.clikchurch.com/richandjud/images/Jenga w.JPG',365,409,'Giant Jenga','http://www.clikchurch.com/richandjud/images/Jenga w_thumb.JPG',130, 146,0, 0,'Community Fun Day','20/06/09','','','','');
photos[73] = new photo(4131435,'247367','','gallery','http://www.clikchurch.com/richandjud/images/Lib w.JPG',400,306,'Libby & friends','http://www.clikchurch.com/richandjud/images/Lib w_thumb.JPG',130, 99,0, 0,'Community Fun Day','20/06/09','','','','');
photos[74] = new photo(4131438,'247367','','gallery','http://www.clikchurch.com/richandjud/images/nursery w.JPG',400,287,'Nursery staff','http://www.clikchurch.com/richandjud/images/nursery w_thumb.JPG',130, 93,0, 0,'Community Fun Day','20/06/09','','','','');
photos[75] = new photo(4131443,'247367','','gallery','http://www.clikchurch.com/richandjud/images/Tea Party Rich w.JPG',400,330,'Tidying up!','http://www.clikchurch.com/richandjud/images/Tea Party Rich w_thumb.JPG',130, 107,0, 0,'Community Fun Day','20/06/09','','','','');
photos[76] = new photo(4131450,'247367','','gallery','http://www.clikchurch.com/richandjud/images/wall w.JPG',400,266,'Lynette & Danni by the Handprints Wall','http://www.clikchurch.com/richandjud/images/wall w_thumb.JPG',130, 86,0, 0,'Community Fun Day','20/06/09','','','','');
photos[77] = new photo(2527475,'161921','','gallery','http://www.clikchurch.com/richandjud/images/Awards2.jpg',131,143,'Boys receive Awards','http://www.clikchurch.com/richandjud/images/Awards2_thumb.jpg',130, 142,0, 0,'','','','','','');
photos[78] = new photo(219044,'133841','','gallery','http://www.clikchurch.com/richandjud/images/garden.jpg',400,300,'The Garden','http://www.clikchurch.com/richandjud/images/garden_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[79] = new photo(1954412,'133841','','gallery','http://www.clikchurch.com/richandjud/images/flowers cross1.jpg',400,440,'','http://www.clikchurch.com/richandjud/images/flowers cross1_thumb.jpg',130, 143,0, 0,'','','','','','');
photos[80] = new photo(1994495,'133841','','gallery','http://www.clikchurch.com/richandjud/images/Palm sunday 1a1.jpg',298,209,'Palm Sunday','http://www.clikchurch.com/richandjud/images/Palm sunday 1a1_thumb.jpg',130, 91,0, 0,'','','','','','');
photos[81] = new photo(1994515,'133841','','gallery','http://www.clikchurch.com/richandjud/images/Palm sunday 2.jpg',400,600,'Evening Service','http://www.clikchurch.com/richandjud/images/Palm sunday 2_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[82] = new photo(220041,'133841','','gallery','http://www.clikchurch.com/richandjud/images/easter cross21.jpg',400,388,'<b>The lovely flower covered Easter Cross</b>','http://www.clikchurch.com/richandjud/images/easter cross21_thumb.jpg',130, 126,0, 0,'<b>Wonderful!</b>','','','','','');
photos[83] = new photo(220042,'133841','','gallery','http://www.clikchurch.com/richandjud/images/easter cross1.jpg',400,177,'<b>The Cross on the Wall!</b>','http://www.clikchurch.com/richandjud/images/easter cross1_thumb.jpg',130, 58,0, 0,'<b>What a beautiful cross to highlight the Church Name</b>','','','','','');
photos[84] = new photo(1946943,'133844','','gallery','http://www.clikchurch.com/richandjud/images/Band 28.jpg',400,299,'Parade Service 9th March 2008','http://www.clikchurch.com/richandjud/images/Band 28_thumb.jpg',130, 97,0, 0,'','','','','','');
photos[85] = new photo(1946945,'133844','','gallery','http://www.clikchurch.com/richandjud/images/Band 42.jpg',400,246,'','http://www.clikchurch.com/richandjud/images/Band 42_thumb.jpg',130, 80,0, 0,'','','','','','');
photos[86] = new photo(1994479,'133844','','gallery','http://www.clikchurch.com/richandjud/images/Terry Trophy Winners.jpg',130,103,'Terry Trophy Winners','http://www.clikchurch.com/richandjud/images/Terry Trophy Winners_thumb.jpg',130, 103,0, 0,'','','','','','');
photos[87] = new photo(3478230,'138032','','gallery','http://www.clikchurch.com/richandjud/images/Church in Spring.JPG',400,294,'','http://www.clikchurch.com/richandjud/images/Church in Spring_thumb.JPG',130, 96,0, 0,'Church in Spring','21/02/09','','','','');
photos[88] = new photo(3541254,'138032','','gallery','http://www.clikchurch.com/richandjud/images/inside church1.jpg',400,287,'Inside Church for wedding','http://www.clikchurch.com/richandjud/images/inside church1_thumb.jpg',130, 93,0, 0,'','26/04/08','','','','');
photos[89] = new photo(1999289,'138032','','gallery','http://www.clikchurch.com/richandjud/images/Church 1.jpg',394,292,'Church in Winter','http://www.clikchurch.com/richandjud/images/Church 1_thumb.jpg',130, 96,0, 0,'','','','','','');
photos[90] = new photo(2220728,'138032','','gallery','http://www.clikchurch.com/richandjud/images/chrismas.jpg',144,108,'Christmas','http://www.clikchurch.com/richandjud/images/chrismas_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[91] = new photo(2220729,'138032','','gallery','http://www.clikchurch.com/richandjud/images/Lentern cross.jpg',144,108,'Lentern Cross','http://www.clikchurch.com/richandjud/images/Lentern cross_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[92] = new photo(2220734,'138032','','gallery','http://www.clikchurch.com/richandjud/images/Cross in church2.jpg',87,110,'Cross above the altar','http://www.clikchurch.com/richandjud/images/Cross in church2_thumb.jpg',130, 164,0, 0,'','','','','','');
photos[93] = new photo(2508517,'138032','','gallery','http://www.clikchurch.com/richandjud/images/Empty church.jpg',400,266,'Empty church','http://www.clikchurch.com/richandjud/images/Empty church_thumb.jpg',130, 86,0, 0,'','','','','','');
photos[94] = new photo(3143592,'138032','','gallery','http://www.clikchurch.com/richandjud/images/Church in Summer.jpg',130,92,'Church in Summer','http://www.clikchurch.com/richandjud/images/Church in Summer_thumb.jpg',130, 92,0, 0,'','','','','','');
photos[95] = new photo(3147741,'138032','','gallery','http://www.clikchurch.com/richandjud/images/Advent ring.JPG',400,325,'Advent Ring','http://www.clikchurch.com/richandjud/images/Advent ring_thumb.JPG',130, 106,0, 0,'','','','','','');
photos[96] = new photo(3228809,'197185','','gallery','http://www.clikchurch.com/richandjud/images/christmas church1.JPG',400,300,'Candlelit Church at the Carol Service','http://www.clikchurch.com/richandjud/images/christmas church1_thumb.JPG',130, 98,0, 1,'','','','','','');
photos[97] = new photo(3228816,'197185','','gallery','http://www.clikchurch.com/richandjud/images/Marions flowers.JPG',400,391,'<b>Pedestal Display','http://www.clikchurch.com/richandjud/images/Marions flowers_thumb.JPG',130, 127,0, 0,'','','','','','');
photos[98] = new photo(3228819,'197185','','gallery','http://www.clikchurch.com/richandjud/images/Porch flowers.JPG',400,281,'<b>Vestibule flowers','http://www.clikchurch.com/richandjud/images/Porch flowers_thumb.JPG',130, 91,0, 0,'','','','','','');
photos[99] = new photo(3228824,'197185','','gallery','http://www.clikchurch.com/richandjud/images/vestibule flowers.JPG',399,549,'<b>More Vestibule flowers','http://www.clikchurch.com/richandjud/images/vestibule flowers_thumb.JPG',130, 179,0, 0,'','','','','','');
photos[100] = new photo(3147738,'192972','','gallery','http://www.clikchurch.com/richandjud/images/3 Kings1.JPG',400,269,'The 3 Kings','http://www.clikchurch.com/richandjud/images/3 Kings1_thumb.JPG',130, 87,0, 0,'Very lifelike our Kings!','','','','','');
photos[101] = new photo(3147744,'192972','','gallery','http://www.clikchurch.com/richandjud/images/Angels.JPG',394,360,'Angels','http://www.clikchurch.com/richandjud/images/Angels_thumb.JPG',130, 119,0, 0,'A mix of traditional & modern Angels!','','','','','');
photos[102] = new photo(3147746,'192972','','gallery','http://www.clikchurch.com/richandjud/images/Cake4.JPG',392,294,'Christmas Cake','http://www.clikchurch.com/richandjud/images/Cake4_thumb.JPG',130, 98,0, 0,'One of the beautiful cakes made by Marion.','','','','','');
photos[103] = new photo(3147757,'192972','','gallery','http://www.clikchurch.com/richandjud/images/Grotto 11.JPG',400,373,'Away in a Manger','http://www.clikchurch.com/richandjud/images/Grotto 11_thumb.JPG',130, 121,0, 0,'We could have used a real baby this year, we had several to chose from!','','','','','');
photos[104] = new photo(3147766,'192972','','gallery','http://www.clikchurch.com/richandjud/images/Grotto 2.JPG',400,368,'Santa\'s Room','http://www.clikchurch.com/richandjud/images/Grotto 2_thumb.JPG',130, 120,0, 0,'','','','','','');
photos[105] = new photo(3147769,'192972','','gallery','http://www.clikchurch.com/richandjud/images/Grotto 3.JPG',398,367,'While Shepherds Watched','http://www.clikchurch.com/richandjud/images/Grotto 3_thumb.JPG',130, 120,0, 0,'','','','','','');
photos[106] = new photo(3147780,'192972','','gallery','http://www.clikchurch.com/richandjud/images/Teddy.JPG',400,421,'Teddy Bear Treasure Hunt','http://www.clikchurch.com/richandjud/images/Teddy_thumb.JPG',130, 137,0, 0,'James did a great job selling the tickets!','','','','','');
photos[107] = new photo(3147790,'192972','','gallery','http://www.clikchurch.com/richandjud/images/Fair 1.JPG',398,300,'Having a Welcome Cuppa!','http://www.clikchurch.com/richandjud/images/Fair 1_thumb.JPG',130, 98,0, 0,'Two of our many hard working stallholders, taking a break!','','','','','');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
galleries = new Array();
galleries[0] = new gallery(345530,'6186763,6186758,6186654,6186648,6186645,6186643','Fathers Day 2010','gallery');
galleries[1] = new gallery(321594,'5676053','Sunday School Anniversary','gallery');
galleries[2] = new gallery(282493,'4969716','The BB Celebrate 70 years and Founders Day Parade','gallery');
galleries[3] = new gallery(243903,'','<B>Cliff Team','gallery');
galleries[4] = new gallery(282495,'4969864','Julia\'s Ordination','gallery');
galleries[5] = new gallery(248001,'4151365,4151362,4151359,4151301','<b>Sunday 21 June','gallery');
galleries[6] = new gallery(175104,'4969868','Harvest 2009','gallery');
galleries[7] = new gallery(237627,'3914492,3914488,3914486,3914485,3914477','<b>May Market 2009','gallery');
galleries[8] = new gallery(223189,'3652353','BB/GB display 2009','gallery');
galleries[9] = new gallery(232897,'3821329','Memories Afternoon.','gallery');
galleries[10] = new gallery(247367,'4131356','Community Fun Day 20 June 2009','gallery');
galleries[11] = new gallery(161921,'2527475','BB','gallery');
galleries[12] = new gallery(133841,'1994515,1994495,1954412,220042,220041,219044','Easter','gallery');
galleries[13] = new gallery(133844,'1994479,1946945,1946943','BB/GB Band','gallery');
galleries[14] = new gallery(138032,'3541254,3478230,3147741,3143592,2508517,2220734,2220729,2220728,1999289','Church building','gallery');
galleries[15] = new gallery(197185,'3228809','Christmas Services','gallery');
galleries[16] = new gallery(192972,'3147790,3147780,3147769,3147766,3147757,3147746,3147744,3147738','Christmas Fayres 2008','gallery');

