/***************************************************************************
* 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('1642542,560586,557716,557696,557671,557663,557643,557641,557608,557606,557605,557599,557594,557585,557577,557139,557063');
	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('1642542,560586,557716,557696,557671,557663,557643,557641,557608,557606,557605,557599,557594,557585,557577,557139,557063');
	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(623931,'','','','http://www1.clikpic.com/mikemccombie/images/AA_00084.jpg',599,400,'AA 00084','http://www1.clikpic.com/mikemccombie/images/AA_00084_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[1] = new photo(1642542,'111078','','gallery','http://www1.clikpic.com/mikemccombie/images/IMG_00003_09909_217310.jpg',600,400,'IMG 00003 09909 217310','http://www1.clikpic.com/mikemccombie/images/IMG_00003_09909_217310_thumb.jpg',130, 87,1, 1,'','','','','','');
photos[2] = new photo(1642544,'111078','','gallery','http://www1.clikpic.com/mikemccombie/images/IMG_00004_09943_217310.jpg',267,400,'IMG 00004 09943 217310','http://www1.clikpic.com/mikemccombie/images/IMG_00004_09943_217310_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[3] = new photo(1642545,'111078','','gallery','http://www1.clikpic.com/mikemccombie/images/IMG_00006_10186_217310.jpg',267,400,'IMG 00006 10186 217310','http://www1.clikpic.com/mikemccombie/images/IMG_00006_10186_217310_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[4] = new photo(1642546,'111078','','gallery','http://www1.clikpic.com/mikemccombie/images/IMG_00007_10447_2411200263.jpg',267,400,'IMG 00007 10447 2411200263','http://www1.clikpic.com/mikemccombie/images/IMG_00007_10447_2411200263_thumb.jpg',130, 195,0, 1,'','','','','','');
photos[5] = new photo(557121,'42970','','gallery','http://www1.clikpic.com/mikemccombie/images/AmurLeopard_mmc00007.jpg',600,401,'Milly','http://www1.clikpic.com/mikemccombie/images/AmurLeopard_mmc00007_thumb.jpg',130, 87,0, 0,'Milly, Amur Leopard cub, with her stick','','','','','');
photos[6] = new photo(557139,'42970','','gallery','http://www1.clikpic.com/mikemccombie/images/AmurLeopard_mmc00015.jpg',600,401,'Tired','http://www1.clikpic.com/mikemccombie/images/AmurLeopard_mmc00015_thumb.jpg',130, 87,1, 0,'A huge yawn by Milly, the Amur Leopard cub at Marwell','','','','','');
photos[7] = new photo(557620,'42998','','gallery','http://www1.clikpic.com/mikemccombie/images/MaraLion_mmc00001.jpg',480,600,'The Stare','http://www1.clikpic.com/mikemccombie/images/MaraLion_mmc00001_thumb.jpg',130, 163,0, 1,'The trans-mara pride - the leader of the pride resting in the mid-day sun.','','','','','');
photos[8] = new photo(557641,'42998','','gallery','http://www1.clikpic.com/mikemccombie/images/MaraLion_mmc00009.jpg',600,400,'The glance','http://www1.clikpic.com/mikemccombie/images/MaraLion_mmc00009_thumb.jpg',130, 87,1, 0,'The king of the pride glances across, just as the sun shed its last light for the day','','','','','');
photos[9] = new photo(557642,'42998','','gallery','http://www1.clikpic.com/mikemccombie/images/MaraLion_mmc00010.jpg',600,399,'Pride','http://www1.clikpic.com/mikemccombie/images/MaraLion_mmc00010_thumb.jpg',130, 86,0, 1,'The king of this pride starig into the last of the setting sun - a majestic sight','','','','','');
photos[10] = new photo(557643,'42998','','gallery','http://www1.clikpic.com/mikemccombie/images/MaraLion_mmc00011.jpg',600,399,'Returning from the kill','http://www1.clikpic.com/mikemccombie/images/MaraLion_mmc00011_thumb.jpg',130, 86,1, 0,'The big lionesses lead the pride back from the nights kill','','','','','');
photos[11] = new photo(557661,'42987','','gallery','http://www1.clikpic.com/mikemccombie/images/NewForest_mmc00002.jpg',600,399,'Atmosphere','http://www1.clikpic.com/mikemccombie/images/NewForest_mmc00002_thumb.jpg',130, 86,0, 0,'A  misty dawn on a new Autumn day in the New Forest','','','','','');
photos[12] = new photo(557663,'42987','','gallery','http://www1.clikpic.com/mikemccombie/images/NewForest_mmc00003.jpg',600,399,'Ponies at dawn','http://www1.clikpic.com/mikemccombie/images/NewForest_mmc00003_thumb.jpg',130, 86,1, 0,'A misty atmospheric, almost secret autumn dawn in the New Forest.','','','','','');
photos[13] = new photo(557671,'42987','','gallery','http://www1.clikpic.com/mikemccombie/images/NewForest_mmc00007.jpg',600,300,'Majestic Dawn','http://www1.clikpic.com/mikemccombie/images/NewForest_mmc00007_thumb.jpg',130, 65,1, 0,'A mody dawn above the New Forest','','','','','');
photos[14] = new photo(557402,'42986','','gallery','http://www1.clikpic.com/mikemccombie/images/Dartmoor_mmc00006.jpg',600,399,'Diversion','http://www1.clikpic.com/mikemccombie/images/Dartmoor_mmc00006_thumb.jpg',130, 86,0, 0,'','','','','','');
photos[15] = new photo(557403,'42986','','gallery','http://www1.clikpic.com/mikemccombie/images/Dartmoor_mmc00007.jpg',399,600,'Waterfalls','http://www1.clikpic.com/mikemccombie/images/Dartmoor_mmc00007_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[16] = new photo(557439,'42986','','gallery','http://www1.clikpic.com/mikemccombie/images/Dartmoor_mmc00012.jpg',399,600,'Waterfall','http://www1.clikpic.com/mikemccombie/images/Dartmoor_mmc00012_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[17] = new photo(557441,'42986','','gallery','http://www1.clikpic.com/mikemccombie/images/Dartmoor_mmc00014.jpg',600,399,'Idyllic','http://www1.clikpic.com/mikemccombie/images/Dartmoor_mmc00014_thumb.jpg',130, 86,0, 0,'','','','','','');
photos[18] = new photo(557577,'42994','','gallery','http://www1.clikpic.com/mikemccombie/images/MaraCheetah_mmc00001.jpg',600,302,'Slender female','http://www1.clikpic.com/mikemccombie/images/MaraCheetah_mmc00001_thumb.jpg',130, 65,1, 0,'A slender female cheetah, far South in hte Masai Mara, hungry for a kill.','','','','','');
photos[19] = new photo(557579,'42994','','gallery','http://www1.clikpic.com/mikemccombie/images/MaraCheetah_mmc00002.jpg',600,400,'Kike','http://www1.clikpic.com/mikemccombie/images/MaraCheetah_mmc00002_thumb.jpg',130, 87,0, 1,'Kike, the cheetah who has appeared so many times with Jonathan Scott on the BBC\'s Big Cat Diary.  She\'d just finished eating her nights kill.','','','','','');
photos[20] = new photo(557585,'42994','','gallery','http://www1.clikpic.com/mikemccombie/images/MaraCheetah_mmc00004.jpg',600,399,'Cooling off','http://www1.clikpic.com/mikemccombie/images/MaraCheetah_mmc00004_thumb.jpg',130, 86,1, 0,'Two cheetah brothers trying to cool off in the mid-day sun.  There is very little shade here.','','','','','');
photos[21] = new photo(557586,'42994','','gallery','http://www1.clikpic.com/mikemccombie/images/MaraCheetah_mmc00005.jpg',600,399,'Restless','http://www1.clikpic.com/mikemccombie/images/MaraCheetah_mmc00005_thumb.jpg',130, 86,0, 1,'Two cheetah brothers rest in the mid-day sun, one of them restless to keep a watch.','','','','','');
photos[22] = new photo(623857,'42994','','gallery','http://www1.clikpic.com/mikemccombie/images/AA_00010.jpg',600,400,'AA 00010','http://www1.clikpic.com/mikemccombie/images/AA_00010_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[23] = new photo(557063,'42969','','gallery','http://www1.clikpic.com/mikemccombie/images/AfricanLeopard_mmc00002.jpg',600,481,'African Leopard','http://www1.clikpic.com/mikemccombie/images/AfricanLeopard_mmc00002_thumb.jpg',130, 104,1, 0,'','','','Santago','','');
photos[24] = new photo(557064,'42969','','gallery','http://www1.clikpic.com/mikemccombie/images/AfricanLeopard_mmc00003.jpg',479,600,'African Leopard','http://www1.clikpic.com/mikemccombie/images/AfricanLeopard_mmc00003_thumb.jpg',130, 163,0, 1,'African Leopard','','','Santago','','');
photos[25] = new photo(623897,'47726','','gallery','http://www1.clikpic.com/mikemccombie/images/AA_00051.jpg',599,400,'AA 00051','http://www1.clikpic.com/mikemccombie/images/AA_00051_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[26] = new photo(623899,'47726','','gallery','http://www1.clikpic.com/mikemccombie/images/AA_00052.jpg',599,400,'AA 00052','http://www1.clikpic.com/mikemccombie/images/AA_00052_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[27] = new photo(557343,'42974','','gallery','http://www1.clikpic.com/mikemccombie/images/Cheetah_mmc00004.jpg',600,401,'Aware','http://www1.clikpic.com/mikemccombie/images/Cheetah_mmc00004_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[28] = new photo(557598,'47728','','gallery','http://www1.clikpic.com/mikemccombie/images/MaraHerbivore_mmc00007.jpg',600,301,'Standing his ground','http://www1.clikpic.com/mikemccombie/images/MaraHerbivore_mmc00007_thumb.jpg',130, 65,0, 0,'The young giraffe checks things out, waiting for his mother to catch up','','','','','');
photos[29] = new photo(557599,'47728','','gallery','http://www1.clikpic.com/mikemccombie/images/MaraHerbivore_mmc00008.jpg',600,397,'Mara Giraffe','http://www1.clikpic.com/mikemccombie/images/MaraHerbivore_mmc00008_thumb.jpg',130, 86,1, 0,'The Mara giraffe are extraordinarily beautiful, deep rich colours, matching so well the rich colours of the backdrop','','','','','');
photos[30] = new photo(623910,'47728','','gallery','http://www1.clikpic.com/mikemccombie/images/AA_00063.jpg',600,300,'AA 00063','http://www1.clikpic.com/mikemccombie/images/AA_00063_thumb.jpg',130, 65,0, 0,'','','','','','');
photos[31] = new photo(557696,'42981','','gallery','http://www1.clikpic.com/mikemccombie/images/SlenderTailedMeerkat_mmc00004.jpg',600,401,'Keeping watch','http://www1.clikpic.com/mikemccombie/images/SlenderTailedMeerkat_mmc00004_thumb.jpg',130, 87,1, 0,'Something got the attention of these young Slender Tailed Meerkat','','','','','');
photos[32] = new photo(557707,'42981','','gallery','http://www1.clikpic.com/mikemccombie/images/SlenderTailedMeerkat_mmc00009.jpg',400,600,'Keeping Watch','http://www1.clikpic.com/mikemccombie/images/SlenderTailedMeerkat_mmc00009_thumb.jpg',130, 195,0, 1,'It\'s not long before the young Slender Tailed Meerkat take their turn','','','','','');
photos[33] = new photo(623870,'42981','','gallery','http://www1.clikpic.com/mikemccombie/images/AA_00023.jpg',267,400,'AA 00023','http://www1.clikpic.com/mikemccombie/images/AA_00023_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[34] = new photo(557483,'42976','','gallery','http://www1.clikpic.com/mikemccombie/images/GrevysZebra_mmc00001.jpg',481,600,'Beautiful','http://www1.clikpic.com/mikemccombie/images/GrevysZebra_mmc00001_thumb.jpg',130, 162,0, 1,'','','','','','');
photos[35] = new photo(560586,'47727','','gallery','http://www1.clikpic.com/mikemccombie/images/MaraHerbivore_mmc00012.jpg',600,301,'Zebra at the Waterhole','http://www1.clikpic.com/mikemccombie/images/MaraHerbivore_mmc00012_thumb.jpg',130, 65,1, 0,'Zebra at the waterhole in the Masai Mara','','','','','');
photos[36] = new photo(557269,'42959','','gallery','http://www1.clikpic.com/mikemccombie/images/Birds_mmc00013.jpg',600,399,'Pheasant in Bluebells','http://www1.clikpic.com/mikemccombie/images/Birds_mmc00013_thumb.jpg',130, 86,0, 0,'','','','','','');
photos[37] = new photo(557389,'42975','','gallery','http://www1.clikpic.com/mikemccombie/images/CloudedLeopard_mmc00002.jpg',600,401,'Watchful','http://www1.clikpic.com/mikemccombie/images/CloudedLeopard_mmc00002_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[38] = new photo(557594,'47734','','gallery','http://www1.clikpic.com/mikemccombie/images/MaraHerbivore_mmc00004.jpg',600,302,'Resting','http://www1.clikpic.com/mikemccombie/images/MaraHerbivore_mmc00004_thumb.jpg',130, 65,1, 0,'A group of Hippos cool themselves in a side pool of the waterhole, while birds walk around above keeping teh flies away','','','','','');
photos[39] = new photo(623848,'47734','','gallery','http://www1.clikpic.com/mikemccombie/images/AA_00001.jpg',599,400,'AA 00001','http://www1.clikpic.com/mikemccombie/images/AA_00001_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[40] = new photo(623852,'47734','','gallery','http://www1.clikpic.com/mikemccombie/images/AA_00005.jpg',599,400,'AA 00005','http://www1.clikpic.com/mikemccombie/images/AA_00005_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[41] = new photo(623853,'47734','','gallery','http://www1.clikpic.com/mikemccombie/images/AA_00006.jpg',600,399,'AA 00006','http://www1.clikpic.com/mikemccombie/images/AA_00006_thumb.jpg',130, 86,0, 0,'','','','','','');
photos[42] = new photo(623883,'47734','','gallery','http://www1.clikpic.com/mikemccombie/images/AA_00036.jpg',600,399,'AA 00036','http://www1.clikpic.com/mikemccombie/images/AA_00036_thumb.jpg',130, 86,0, 0,'','','','','','');
photos[43] = new photo(557716,'42982','','gallery','http://www1.clikpic.com/mikemccombie/images/SnowLeopard_mmc00001.jpg',600,480,'Snow Leopard','http://www1.clikpic.com/mikemccombie/images/SnowLeopard_mmc00001_thumb.jpg',130, 104,1, 0,'A mature Snow Leopard at Santago','','','','','');
photos[44] = new photo(557680,'42978','','gallery','http://www1.clikpic.com/mikemccombie/images/RedPanda_mmc00002.jpg',600,401,'Warm','http://www1.clikpic.com/mikemccombie/images/RedPanda_mmc00002_thumb.jpg',130, 87,0, 0,'Warmed by the sun, this Red Panda seelps the cool day away.','','','','','');
photos[45] = new photo(557682,'42978','','gallery','http://www1.clikpic.com/mikemccombie/images/RedPanda_mmc00003.jpg',600,401,'Comfortable','http://www1.clikpic.com/mikemccombie/images/RedPanda_mmc00003_thumb.jpg',130, 87,0, 1,'Don\'t we all feel like this Red Panda sometimes?','','','','','');
photos[46] = new photo(560585,'47735','','gallery','http://www1.clikpic.com/mikemccombie/images/MaraHerbivore_mmc00011.jpg',403,400,'White Rhino','http://www1.clikpic.com/mikemccombie/images/MaraHerbivore_mmc00011_thumb.jpg',130, 129,0, 0,'This White Rhino is a little bit shy.  Unusual in the Masai Mara, this one is in a small group specially protected','','','','','');
photos[47] = new photo(623889,'47735','','gallery','http://www1.clikpic.com/mikemccombie/images/AA_00043.jpg',599,400,'AA 00043','http://www1.clikpic.com/mikemccombie/images/AA_00043_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[48] = new photo(557251,'43058','','gallery','http://www1.clikpic.com/mikemccombie/images/BengalTiger_mmc00001.jpg',600,399,'Bengal Tiger at the WHF','http://www1.clikpic.com/mikemccombie/images/BengalTiger_mmc00001_thumb.jpg',130, 86,0, 0,'','','','','','');
photos[49] = new photo(557605,'42997','','gallery','http://www1.clikpic.com/mikemccombie/images/MaraLandscape_mmc00003.jpg',600,399,'Rich Dawn Colour','http://www1.clikpic.com/mikemccombie/images/MaraLandscape_mmc00003_thumb.jpg',130, 86,1, 0,'Another typical Mara dawn - extraordinary colour, in an extraordinary place','','','','','');
photos[50] = new photo(557606,'42997','','gallery','http://www1.clikpic.com/mikemccombie/images/MaraLandscape_mmc00004.jpg',600,401,'Triumphant Dawn','http://www1.clikpic.com/mikemccombie/images/MaraLandscape_mmc00004_thumb.jpg',130, 87,1, 0,'A dramatic opening to the day.','','','','','');
photos[51] = new photo(557608,'42997','','gallery','http://www1.clikpic.com/mikemccombie/images/MaraLandscape_mmc00005.jpg',600,399,'Smooth Dawn','http://www1.clikpic.com/mikemccombie/images/MaraLandscape_mmc00005_thumb.jpg',130, 86,1, 0,'Not, as you might suppose, Sunset, but dawn.  A beautiful silky velvet sky such as you might see on your most fortunate day.','','','','','');
photos[52] = new photo(623902,'42997','','gallery','http://www1.clikpic.com/mikemccombie/images/AA_00055.jpg',600,399,'AA 00055','http://www1.clikpic.com/mikemccombie/images/AA_00055_thumb.jpg',130, 86,0, 0,'','','','','','');
photos[53] = new photo(623908,'43058','','gallery','http://www1.clikpic.com/mikemccombie/images/AA_00061.jpg',266,400,'AA 00061','http://www1.clikpic.com/mikemccombie/images/AA_00061_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[54] = new photo(623917,'47725','','gallery','http://www1.clikpic.com/mikemccombie/images/AA_00070.jpg',267,400,'AA 00070','http://www1.clikpic.com/mikemccombie/images/AA_00070_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[55] = new photo(623919,'47725','','gallery','http://www1.clikpic.com/mikemccombie/images/AA_00072.jpg',267,400,'AA 00072','http://www1.clikpic.com/mikemccombie/images/AA_00072_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[56] = new photo(623922,'47725','','gallery','http://www1.clikpic.com/mikemccombie/images/AA_00075.jpg',267,400,'AA 00075','http://www1.clikpic.com/mikemccombie/images/AA_00075_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[57] = new photo(623881,'42984','','gallery','http://www1.clikpic.com/mikemccombie/images/AA_00034.jpg',599,400,'AA 00034','http://www1.clikpic.com/mikemccombie/images/AA_00034_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[58] = new photo(557272,'47724','','gallery','http://www1.clikpic.com/mikemccombie/images/CaptiveAnimals_mmc00001.jpg',480,600,'White Faced Saki Monkey','http://www1.clikpic.com/mikemccombie/images/CaptiveAnimals_mmc00001_thumb.jpg',130, 163,0, 0,'','','','','','');
photos[59] = new photo(623894,'47724','','gallery','http://www1.clikpic.com/mikemccombie/images/AA_00048.jpg',400,400,'AA 00048','http://www1.clikpic.com/mikemccombie/images/AA_00048_thumb.jpg',130, 130,0, 0,'','','','','','');
photos[60] = new photo(623901,'47724','','gallery','http://www1.clikpic.com/mikemccombie/images/AA_00054.jpg',600,400,'AA 00054','http://www1.clikpic.com/mikemccombie/images/AA_00054_thumb.jpg',130, 87,0, 0,'','','','','','');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
galleries = new Array();
galleries[0] = new gallery(111078,'1642546,1642542','Great Apes','gallery');
galleries[1] = new gallery(111077,'1642546,1642542','New Work','gallery');
galleries[2] = new gallery(111308,'','Elephants','gallery');
galleries[3] = new gallery(111310,'','Lions','gallery');
galleries[4] = new gallery(42970,'557139,557121','Amur Leopard','gallery');
galleries[5] = new gallery(42998,'557642,557620','Mara Lions','gallery');
galleries[6] = new gallery(43246,'557642,557620,557586,557579','Masai Mara','gallery');
galleries[7] = new gallery(42987,'557671,557663,557661','New Forest','gallery');
galleries[8] = new gallery(43247,'557707,557682,557483,557064','Animals','gallery');
galleries[9] = new gallery(42986,'557441,557439,557403,557402','Dartmoor','gallery');
galleries[10] = new gallery(42994,'557586,557579','Mara Cheetah','gallery');
galleries[11] = new gallery(42969,'557064','African Leopard','gallery');
galleries[12] = new gallery(47726,'623899,623897','Mara Elephants','gallery');
galleries[13] = new gallery(42974,'557343','Cheetah','gallery');
galleries[14] = new gallery(47728,'623910,557599,557598','Mara Giraffe','gallery');
galleries[15] = new gallery(42981,'557707','Meerkat','gallery');
galleries[16] = new gallery(42976,'557483','Grevy\'s Zebra','gallery');
galleries[17] = new gallery(47727,'560586','Mara Zebra','gallery');
galleries[18] = new gallery(42959,'557269','Birds','gallery');
galleries[19] = new gallery(42975,'557389','Clouded Leopard','gallery');
galleries[20] = new gallery(47734,'623883,623853,623852,623848,557594','Mara Hippos','gallery');
galleries[21] = new gallery(42982,'557716','Snow Leopard','gallery');
galleries[22] = new gallery(47735,'623889,560585','Mara White Rhino','gallery');
galleries[23] = new gallery(42978,'557682','Red Panda','gallery');
galleries[24] = new gallery(43058,'623908,557251','Bengal Tiger','gallery');
galleries[25] = new gallery(42997,'623902,557608,557606,557605','Mara Landscape','gallery');
galleries[26] = new gallery(47725,'623922,623919,623917','Golden Lion Tamarin','gallery');
galleries[27] = new gallery(42984,'623881','Others','gallery');
galleries[28] = new gallery(47724,'623901,623894,557272','Marwell Mix','gallery');

