/***************************************************************************
* 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('1795812');
	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('1795812');
	for (j = 0; j < photos.length; j++) {
		if (photos[j].id == imageID) {
			if ('gallery' != '') {
						if (photos[j].galleries_id != '') {
						document.write('<a href="' + photos[j].section_code + '_' + photos[j].galleries_id + '.html">');
						}
						else {
						document.write('<a href="gallery.html">');
						}
			}
			document.write('<img src="' + photos[j].src + '" width="' + photos[j].width + '" height="' + photos[j].height + '" class="mainhomepageimage" id="mainSample" name="mainSample" alt="' + photos[j].caption  + '" border="0">');
			if ('gallery' != '') {
				document.write('</a>');
			}
			break;
		}
	}
	
}

/***************************************************************************
* Show the next image in a gallery.  field = hidden field containing       *
* image_id                                                                 *
*  img = reference to image object in which to show image                  *
***************************************************************************/
function next(field,img) {

	debug('IN next');
	imageID = field.value;
	
	for (j = 0; j < photos.length; j++) {
		if (photos[j].id == imageID) {
			break;
		}
	}
	debug('image is ' + j);
	nextImg = -1;
	k= j + 1;
	while (nextImg < 0) {
		for (; k < photos.length; k++) {
			debug('testing image ' + k + ': gallery = ' + photos[k].galleries_id + '(existing: ' + photos[j].galleries_id + ')');
			if (photos[k].galleries_id == photos[j].galleries_id) {
				nextImg = k;
				debug('setting  nextImg = ' + k);
				break;
			}
		}
		if (nextImg == -1) {
			k = 0;
		}
	}
	if (nextImg != -1) {
		updateImage(nextImg, field,img);
	}


}


/***************************************************************************
* Set a new image on the gallery detail page given its array position      *
***************************************************************************/
function updateImage (nextImg, field,img) {
	debug('Updating image');
	if (!basic && !(0)) {
		debug('In updateImage');
		debug('setting  img src = ' + photos[nextImg].src);
		
					
			document.getElementById('imagePhoto').innerHTML = '<img class="mainphoto" src="' + photos[nextImg].src + ' " id="mainPic" name="mainPic" width="' + photos[nextImg].width + '" height="' + photos[nextImg].height + '" alt="' + photos[nextImg].caption + '" border="0">';
						field.value = photos[nextImg].id;
			document.getElementById('imageTitle').innerHTML = photos[nextImg].caption;
			/* 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(1795812,'','','','http://admin.clikpic.com/Maidenhall/images/blue coornflower.jpg',375,250,'','http://admin.clikpic.com/Maidenhall/images/blue coornflower_thumb.jpg',130, 87,1, 0,'','','','','','');
photos[1] = new photo(1838630,'123558','','gallery','http://admin.clikpic.com/Maidenhall/images/July_rosebedJPG.jpg',400,267,'Rose_bed_in_July','http://admin.clikpic.com/Maidenhall/images/July_rosebedJPG_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[2] = new photo(1838631,'123558','','gallery','http://admin.clikpic.com/Maidenhall/images/rose_Sexy RexyJPG.jpg',400,267,'Sexy_Rexy','http://admin.clikpic.com/Maidenhall/images/rose_Sexy RexyJPG_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[3] = new photo(1838632,'123558','','gallery','http://admin.clikpic.com/Maidenhall/images/rose_ramblerJPG.jpg',400,267,'Old_Rambler','http://admin.clikpic.com/Maidenhall/images/rose_ramblerJPG_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[4] = new photo(1838634,'123558','','gallery','http://admin.clikpic.com/Maidenhall/images/Rose_with_teardropJPG.jpg',400,267,'Rose_with_tear_drop','http://admin.clikpic.com/Maidenhall/images/Rose_with_teardropJPG_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[5] = new photo(1838637,'123558','','gallery','http://admin.clikpic.com/Maidenhall/images/rose_iceberg_climbing JPG.jpg',400,267,'Climbing_Iceberg','http://admin.clikpic.com/Maidenhall/images/rose_iceberg_climbing JPG_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[6] = new photo(1838639,'123558','','gallery','http://admin.clikpic.com/Maidenhall/images/Rose_Tostock_PostofficeJPG.jpg',400,267,'Tostock_Post_office','http://admin.clikpic.com/Maidenhall/images/Rose_Tostock_PostofficeJPG_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[7] = new photo(1838642,'123558','','gallery','http://admin.clikpic.com/Maidenhall/images/Old_climberJPG.jpg',400,267,'Old_climber','http://admin.clikpic.com/Maidenhall/images/Old_climberJPG_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[8] = new photo(1838644,'123558','','gallery','http://admin.clikpic.com/Maidenhall/images/AlbertineJPG1.jpg',400,267,'Albertine','http://admin.clikpic.com/Maidenhall/images/AlbertineJPG1_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[9] = new photo(1838646,'123561','','gallery','http://admin.clikpic.com/Maidenhall/images/Melica_altissima_atropurpureaJPG.jpg',400,267,'Melica_altissima_altropurpurea','http://admin.clikpic.com/Maidenhall/images/Melica_altissima_atropurpureaJPG_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[10] = new photo(1838718,'123559','','gallery','http://admin.clikpic.com/Maidenhall/images/PrimroseJPG.jpg',400,267,'Primrose','http://admin.clikpic.com/Maidenhall/images/PrimroseJPG_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[11] = new photo(1838721,'123559','','gallery','http://admin.clikpic.com/Maidenhall/images/primula_vialiiJPG.jpg',400,600,'Primula_vialii','http://admin.clikpic.com/Maidenhall/images/primula_vialiiJPG_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[12] = new photo(1838724,'123562','','gallery','http://admin.clikpic.com/Maidenhall/images/p_Beauty_of_LivermereJPG.jpg',400,408,'Poppy_Beauty_of_Livermere','http://admin.clikpic.com/Maidenhall/images/p_Beauty_of_LivermereJPG_thumb.jpg',130, 133,0, 0,'','','','','','');
photos[13] = new photo(1838728,'123562','','gallery','http://admin.clikpic.com/Maidenhall/images/p_Mrs_PerryJPG.jpg',400,336,'Poppy_Mrs_Perry','http://admin.clikpic.com/Maidenhall/images/p_Mrs_PerryJPG_thumb.jpg',130, 109,0, 0,'','','','','','');
photos[14] = new photo(1838733,'123562','','gallery','http://admin.clikpic.com/Maidenhall/images/p_Patty_s_PlumJPG.jpg',400,267,'Poppy_Pattys_Plum','http://admin.clikpic.com/Maidenhall/images/p_Patty_s_PlumJPG_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[15] = new photo(1838739,'123562','','gallery','http://admin.clikpic.com/Maidenhall/images/p_Perry_s_WhiteJPG.jpg',400,267,'Poppy_Perrys_White','http://admin.clikpic.com/Maidenhall/images/p_Perry_s_WhiteJPG_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[16] = new photo(1838743,'123559','','gallery','http://admin.clikpic.com/Maidenhall/images/Red_polyanthusJPG.jpg',400,267,'Polyanthus_hybrid','http://admin.clikpic.com/Maidenhall/images/Red_polyanthusJPG_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[17] = new photo(1838746,'123559','','gallery','http://admin.clikpic.com/Maidenhall/images/winter_iris JPG.jpg',400,267,'Winter_Iris','http://admin.clikpic.com/Maidenhall/images/winter_iris JPG_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[18] = new photo(1838751,'123559','','gallery','http://admin.clikpic.com/Maidenhall/images/winter jasmine 001JPG.jpg',400,267,'Winter_Jasmine','http://admin.clikpic.com/Maidenhall/images/winter jasmine 001JPG_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[19] = new photo(1838754,'123561','','gallery','http://admin.clikpic.com/Maidenhall/images/tree_peony budJPG.jpg',400,267,'Tree_peony_bud','http://admin.clikpic.com/Maidenhall/images/tree_peony budJPG_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[20] = new photo(1838756,'123561','','gallery','http://admin.clikpic.com/Maidenhall/images/Turk\'s Cap lilyJPG.jpg',400,600,'Turks_cap_lily','http://admin.clikpic.com/Maidenhall/images/Turk\'s Cap lilyJPG_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[21] = new photo(1838760,'123561','','gallery','http://admin.clikpic.com/Maidenhall/images/Teasles_in_snowJPG.jpg',400,267,'Teasles_in_snow','http://admin.clikpic.com/Maidenhall/images/Teasles_in_snowJPG_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[22] = new photo(1838762,'123559','','gallery','http://admin.clikpic.com/Maidenhall/images/Spring_cherry_blossomJPG.jpg',400,267,'Spring_cherry_blossom','http://admin.clikpic.com/Maidenhall/images/Spring_cherry_blossomJPG_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[23] = new photo(1838764,'123561','','gallery','http://admin.clikpic.com/Maidenhall/images/Snakes_head_fritilleryJPG.jpg',400,267,'Snakes_head_fritillery','http://admin.clikpic.com/Maidenhall/images/Snakes_head_fritilleryJPG_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[24] = new photo(1838768,'123561','','gallery','http://admin.clikpic.com/Maidenhall/images/Salvia_guaranticaJPG.jpg',400,267,'Salvia_guarantica','http://admin.clikpic.com/Maidenhall/images/Salvia_guaranticaJPG_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[25] = new photo(1838769,'123561','','gallery','http://admin.clikpic.com/Maidenhall/images/Fascicularia_bicolor.jpg',400,267,'Fascicularia_bicolor','http://admin.clikpic.com/Maidenhall/images/Fascicularia_bicolor_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[26] = new photo(1838771,'123561','','gallery','http://admin.clikpic.com/Maidenhall/images/dracunculas_vulgarisJPG.jpg',400,600,'Dracunculas_vulgaris','http://admin.clikpic.com/Maidenhall/images/dracunculas_vulgarisJPG_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[27] = new photo(1839229,'123562','','gallery','http://admin.clikpic.com/Maidenhall/images/Delphinium_Alice_ArtindaleJPG.jpg',400,600,'Delph_Alice_Artindale','http://admin.clikpic.com/Maidenhall/images/Delphinium_Alice_ArtindaleJPG_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[28] = new photo(1839233,'123561','','gallery','http://admin.clikpic.com/Maidenhall/images/Dicentra_albaJPG.jpg',400,267,'Dicentra_Alba','http://admin.clikpic.com/Maidenhall/images/Dicentra_albaJPG_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[29] = new photo(1839237,'123561','','gallery','http://admin.clikpic.com/Maidenhall/images/emerging_fern_frondsJPG.jpg',400,267,'Emerging_fern_fronds','http://admin.clikpic.com/Maidenhall/images/emerging_fern_frondsJPG_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[30] = new photo(1839240,'123561','','gallery','http://admin.clikpic.com/Maidenhall/images/Epimedium_Grandiflorum_MerlinJPG.jpg',400,267,'Epimedium_Grandiflorum_Merlin','http://admin.clikpic.com/Maidenhall/images/Epimedium_Grandiflorum_MerlinJPG_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[31] = new photo(1839243,'123554','','gallery','http://admin.clikpic.com/Maidenhall/images/D_FacinationJPG.jpg',400,337,'Dahlia_Facination','http://admin.clikpic.com/Maidenhall/images/D_FacinationJPG_thumb.jpg',130, 110,0, 0,'','','','','','');
photos[32] = new photo(1839245,'123554','','gallery','http://admin.clikpic.com/Maidenhall/images/D_MoonflowerJPG.jpg',400,267,'Dahlia_Moonflower','http://admin.clikpic.com/Maidenhall/images/D_MoonflowerJPG_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[33] = new photo(1839249,'123562','','gallery','http://admin.clikpic.com/Maidenhall/images/Iris_germanica_Skating_PartyJPG.jpg',400,267,'Iris_Germanica_Skating_Party','http://admin.clikpic.com/Maidenhall/images/Iris_germanica_Skating_PartyJPG_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[34] = new photo(1839252,'123562','','gallery','http://admin.clikpic.com/Maidenhall/images/Iris_Lady_FriendJPG.jpg',400,267,'Iris_germanica_Lady_Friend','http://admin.clikpic.com/Maidenhall/images/Iris_Lady_FriendJPG_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[35] = new photo(1839255,'123562','','gallery','http://admin.clikpic.com/Maidenhall/images/Iris_Mary_ConstanceJPG.jpg',400,267,'Iris_germanica_Mary_Constance','http://admin.clikpic.com/Maidenhall/images/Iris_Mary_ConstanceJPG_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[36] = new photo(1839258,'123562','','gallery','http://admin.clikpic.com/Maidenhall/images/Iris_Rajah_BrookeJPG.jpg',400,267,'Iris_germanica_Rajah_Brooke','http://admin.clikpic.com/Maidenhall/images/Iris_Rajah_BrookeJPG_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[37] = new photo(1839260,'123562','','gallery','http://admin.clikpic.com/Maidenhall/images/Iris_SilveradoJPG.jpg',400,410,'Iris_germanica_Silverado','http://admin.clikpic.com/Maidenhall/images/Iris_SilveradoJPG_thumb.jpg',130, 133,0, 0,'','','','','','');
photos[38] = new photo(1839262,'123554','','gallery','http://admin.clikpic.com/Maidenhall/images/Day lily_StaffordJPG.jpg',400,267,'Day_lily_Stafford','http://admin.clikpic.com/Maidenhall/images/Day lily_StaffordJPG_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[39] = new photo(1839263,'123554','','gallery','http://admin.clikpic.com/Maidenhall/images/Daylily_Moonlight_MasqueradeJPG.jpg',400,266,'Day_lily_Moonlight_Masquerade','http://admin.clikpic.com/Maidenhall/images/Daylily_Moonlight_MasqueradeJPG_thumb.jpg',130, 86,0, 0,'','','','','','');
photos[40] = new photo(1839264,'123554','','gallery','http://admin.clikpic.com/Maidenhall/images/Daylily_StaffordJPG.jpg',400,266,'Day_lily_Stafford','http://admin.clikpic.com/Maidenhall/images/Daylily_StaffordJPG_thumb.jpg',130, 86,0, 0,'','','','','','');
photos[41] = new photo(1839265,'123554','','gallery','http://admin.clikpic.com/Maidenhall/images/Daylily_SuperlativeJPG.jpg',400,267,'Day_lily_Superlative','http://admin.clikpic.com/Maidenhall/images/Daylily_SuperlativeJPG_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[42] = new photo(1839267,'123554','','gallery','http://admin.clikpic.com/Maidenhall/images/Chicago_BlackoutJPG.jpg',400,501,'Day_lily_Chicago_Blackout','http://admin.clikpic.com/Maidenhall/images/Chicago_BlackoutJPG_thumb.jpg',130, 163,0, 0,'','','','','','');
photos[43] = new photo(1839269,'123554','','gallery','http://admin.clikpic.com/Maidenhall/images/Dahlia_Akita JPG.jpg',400,267,'Dahlia_Akita','http://admin.clikpic.com/Maidenhall/images/Dahlia_Akita JPG_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[44] = new photo(1839270,'123554','','gallery','http://admin.clikpic.com/Maidenhall/images/Dahlia_EdinburghJPG.jpg',400,267,'Dahlia_Edinburgh','http://admin.clikpic.com/Maidenhall/images/Dahlia_EdinburghJPG_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[45] = new photo(1839271,'123554','','gallery','http://admin.clikpic.com/Maidenhall/images/Dahlia_Nina_ChesterJPG.jpg',400,267,'Dahlia_Nina_Chester','http://admin.clikpic.com/Maidenhall/images/Dahlia_Nina_ChesterJPG_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[46] = new photo(1839272,'123554','','gallery','http://admin.clikpic.com/Maidenhall/images/Dahlia_Red_MajoretteJPG.jpg',400,600,'Dahlia_Red_Majorette','http://admin.clikpic.com/Maidenhall/images/Dahlia_Red_MajoretteJPG_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[47] = new photo(1839274,'123554','','gallery','http://admin.clikpic.com/Maidenhall/images/Bis_of_Llandaff JPG.jpg',400,180,'Dahlia_Bishop_of_Llandaff','http://admin.clikpic.com/Maidenhall/images/Bis_of_Llandaff JPG_thumb.jpg',130, 59,0, 0,'','','','','','');
photos[48] = new photo(1839520,'123561','','gallery','http://admin.clikpic.com/Maidenhall/images/Clematis_Jackmanii_Blue_SkiesJPG.jpg',400,600,'Clematis_Jackmanii_Blue_skies','http://admin.clikpic.com/Maidenhall/images/Clematis_Jackmanii_Blue_SkiesJPG_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[49] = new photo(1839523,'123559','','gallery','http://admin.clikpic.com/Maidenhall/images/Black_helleboreJPG.jpg',400,267,'Black_hellebore','http://admin.clikpic.com/Maidenhall/images/Black_helleboreJPG_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[50] = new photo(1839525,'123559','','gallery','http://admin.clikpic.com/Maidenhall/images/bluebellsJPG.jpg',400,267,'Bluebells','http://admin.clikpic.com/Maidenhall/images/bluebellsJPG_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[51] = new photo(1839527,'123559','','gallery','http://admin.clikpic.com/Maidenhall/images/Bugbane JPG.jpg',400,267,'Bugbane','http://admin.clikpic.com/Maidenhall/images/Bugbane JPG_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[52] = new photo(1839528,'123561','','gallery','http://admin.clikpic.com/Maidenhall/images/Callicarpa_in_snowJPG.jpg',400,290,'Callicarpa_in_snow','http://admin.clikpic.com/Maidenhall/images/Callicarpa_in_snowJPG_thumb.jpg',130, 94,0, 0,'','','','','','');
photos[53] = new photo(1839531,'123561','','gallery','http://admin.clikpic.com/Maidenhall/images/callistemon_violaceusJPG.jpg',400,267,'Callistemon_violaceus','http://admin.clikpic.com/Maidenhall/images/callistemon_violaceusJPG_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[54] = new photo(1839542,'123561','','gallery','http://admin.clikpic.com/Maidenhall/images/Chatham_Island_Forget_me_not_Myosottidium_hortensiaJPG.jpg',400,267,'Myosottidiem_hortensia_Chatham_Island_forget_me_not','http://admin.clikpic.com/Maidenhall/images/Chatham_Island_Forget_me_not_Myosottidium_hortensiaJPG_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[55] = new photo(1839544,'123562','','gallery','http://admin.clikpic.com/Maidenhall/images/Delphinium5JPG.jpg',400,600,'Delphinium_Purple_Ruffles','http://admin.clikpic.com/Maidenhall/images/Delphinium5JPG_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[56] = new photo(1839545,'123562','','gallery','http://admin.clikpic.com/Maidenhall/images/Delphinium7JPG.jpg',400,600,'Delphinium_Pacific_Hybrid','http://admin.clikpic.com/Maidenhall/images/Delphinium7JPG_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[57] = new photo(1839547,'123562','','gallery','http://admin.clikpic.com/Maidenhall/images/Delphinium6JPG.jpg',400,600,'Delphinium_Pacific_hybrid','http://admin.clikpic.com/Maidenhall/images/Delphinium6JPG_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[58] = new photo(1839551,'123562','','gallery','http://admin.clikpic.com/Maidenhall/images/Delphinium9JPG.jpg',400,600,'Delphinium_Pacific_hybrid','http://admin.clikpic.com/Maidenhall/images/Delphinium9JPG_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[59] = new photo(1839554,'123562','','gallery','http://admin.clikpic.com/Maidenhall/images/Delphinium2JPG.jpg',400,989,'Delphinium_Pacific_hybrid','http://admin.clikpic.com/Maidenhall/images/Delphinium2JPG_thumb.jpg',130, 321,0, 0,'','','','','','');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
galleries = new Array();
galleries[0] = new gallery(123554,'1839274,1839272,1839271,1839270,1839269,1839267,1839265,1839264,1839263,1839262','Dahlia and Day Lily','gallery');
galleries[1] = new gallery(123562,'1839554,1839551,1839547,1839545,1839544,1839260,1839258,1839255,1839252,1839249','Iris, Poppy and Delphinium','gallery');
galleries[2] = new gallery(123561,'1839542,1839531,1839528,1839520,1839240,1839237,1839233,1838771,1838769,1838768','Plant portraits','gallery');
galleries[3] = new gallery(123558,'1838644,1838642,1838639,1838637,1838634,1838632,1838631,1838630','Roses','gallery');
galleries[4] = new gallery(123559,'1839527,1839525,1839523,1838762,1838751,1838746,1838743,1838721,1838718','Spring time','gallery');

