/***************************************************************************
* 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('2052692');
	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('2052692');
	for (j = 0; j < photos.length; j++) {
		if (photos[j].id == imageID) {
			if ('gallery' != '') {
						if (photos[j].galleries_id != '') {
						document.write('<a href="' + photos[j].section_code + '_' + photos[j].galleries_id + '.html">');
						}
						else {
						document.write('<a href="gallery.html">');
						}
			}
			document.write('<img src="' + photos[j].src + '" width="' + photos[j].width + '" height="' + photos[j].height + '" class="mainhomepageimage" id="mainSample" name="mainSample" alt="' + photos[j].caption  + '" border="0">');
			if ('gallery' != '') {
				document.write('</a>');
			}
			break;
		}
	}
	
}

/***************************************************************************
* Show the next image in a gallery.  field = hidden field containing       *
* image_id                                                                 *
*  img = reference to image object in which to show image                  *
***************************************************************************/
function next(field,img) {

	debug('IN next');
	imageID = field.value;
	
	for (j = 0; j < photos.length; j++) {
		if (photos[j].id == imageID) {
			break;
		}
	}
	debug('image is ' + j);
	nextImg = -1;
	k= j + 1;
	while (nextImg < 0) {
		for (; k < photos.length; k++) {
			debug('testing image ' + k + ': gallery = ' + photos[k].galleries_id + '(existing: ' + photos[j].galleries_id + ')');
			if (photos[k].galleries_id == photos[j].galleries_id) {
				nextImg = k;
				debug('setting  nextImg = ' + k);
				break;
			}
		}
		if (nextImg == -1) {
			k = 0;
		}
	}
	if (nextImg != -1) {
		updateImage(nextImg, field,img);
	}


}


/***************************************************************************
* Set a new image on the gallery detail page given its array position      *
***************************************************************************/
function updateImage (nextImg, field,img) {
	debug('Updating image');
	if (!basic && !(1)) {
		debug('In updateImage');
		debug('setting  img src = ' + photos[nextImg].src);
		
					
			document.getElementById('imagePhoto').innerHTML = '<img class="mainphoto" src="' + photos[nextImg].src + ' " id="mainPic" name="mainPic" width="' + photos[nextImg].width + '" height="' + photos[nextImg].height + '" alt="' + photos[nextImg].caption + '" border="0">';
						field.value = photos[nextImg].id;
			document.getElementById('imageTitle').innerHTML = photos[nextImg].caption;
			document.title = photos[nextImg].caption;
			/* apply 'blank' classname to element where */			if ( photos[nextImg].caption == '') {
				document.getElementById('imageTitle').style.className = 'blank';
			}
			else {
				document.getElementById('imageTitle').style.className = 'normal';
			}
						temp = '';
			if (photos[nextImg].description != '') {
				temp = temp +  '<p id="imageDescription">' + photos[nextImg].description + '</p>';
			}
			if (photos[nextImg].photo_ref != '') {
				temp = temp + '<p class="imageinfo" id="imageRef"><strong>Ref: </strong>' + photos[nextImg].photo_ref + '</p>';
			}
			if (photos[nextImg].takendate != '') {
				debug('Resetting taken date');
				temp = temp + '<p class="imageinfo" id="imageDate"><strong>Date: </strong>' + photos[nextImg].takendate + '</p>';
			}
			
			if (photos[nextImg].location != '') {
				debug('Resetting location');
				temp = temp + '<p class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  photos[nextImg].location + '</p>';
			}
			
			if (photos[nextImg].photographer != '') {
				debug('Resetting photographer');
				temp = temp + '<p class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + photos[nextImg].photographer + '</p>';
			}
			if (temp != '') {				temp = temp + '<div class="spacer"></div>';			}					if (temp == '') {
			document.getElementById('imageDetails').style.display = 'none';
		}
		else {
			document.getElementById('imageDetails').style.display = 'block';
		}
		document.getElementById('imageDetails').innerHTML =temp;	
		
	}
	else {
		debug('Redirecting to id ' + photos[nextImg].id);
		window.location = 'photo_' + photos[nextImg].id + '.html';
	}
}

/***************************************************************************
* Show the previous image for a gallery. field = hidden field containing   *
* image_id                                                                 *
*  img = reference to image object in which to show image                  *
***************************************************************************/
function previous(field,img) {


	imageID = field.value;
	for (j = 0; j < photos.length; j++) {
		if (photos[j].id == imageID) {
			break;
		}
	}
	debug('image is ' + j);
	nextImg = -1;
	k = j -1;
	while (nextImg < 0) {
		for (; k >= 0; k--) {
			if (photos[k].galleries_id == photos[j].galleries_id) {
				nextImg = k;
				break;
			}
		}
		if (nextImg == -1) {
			k = photos.length -1;
		}
	}
	if (nextImg != -1) {
		updateImage(nextImg, field,img);	
	}
}

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.
        *
* Gallery_id = id of gallery to choose                                     *
* 
 img = reference to html image                                       *
* in which to show image                                                   *
***************************************************************************/
function showGalleryImage(gallery_id, img) {
	debug('Gallery = ' + gallery_id);
	for (i = 0; i < galleries.length; i++) {
		if (galleries[i].id == gallery_id) {
			imageID = randomListVal(galleries[i].featured_images);
				for (j = 0; j < photos.length; j++) {
					if (photos[j].id == imageID) {
						
						img.src = photos[j].thumbnail;
						img.width = photos[j].thumbnail_width;
						img.height = photos[j].thumbnail_height;
						
						break;
					}
				}
			break;
		}
	} 
	}

/***************************************************************************
* If we have dynamic HTML                                                  *
*  replace the galleries link with a list that                             *
* doesn't include the current gallery                                      *
***************************************************************************/
function showGalleries(gallery_id) {
	debug('Showing links for gallery ' + gallery_id);
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
			debug('Testing gallery ' + galleries[i].id);
			
			if (galleries[i].id != gallery_id) {
				debug('Adding link');
				if (temp != '') {
					temp = temp + ' | ';
				}
				temp = temp + '<a href="gallery_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
			}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}
/***************************************************************************
* Create the array of Photo objects                                        *
***************************************************************************/
photos = new Array();
photos[0] = new photo(310529,'26618','','gallery','http://www1.clikpic.com/Renierv/images/Angelstatue29.jpg',600,800,'','http://www1.clikpic.com/Renierv/images/Angelstatue29_thumb.jpg',130, 173,0, 0,'','','','','','');
photos[1] = new photo(310553,'26618','','gallery','http://www1.clikpic.com/Renierv/images/FloridaSunrise30.jpg',600,800,'','http://www1.clikpic.com/Renierv/images/FloridaSunrise30_thumb.jpg',130, 173,0, 0,'','','','','','');
photos[2] = new photo(310559,'26618','','gallery','http://www1.clikpic.com/Renierv/images/Landscapewithrainbow32.jpg',600,800,'','http://www1.clikpic.com/Renierv/images/Landscapewithrainbow32_thumb.jpg',130, 173,0, 0,'','','','','','');
photos[3] = new photo(310561,'26618','','gallery','http://www1.clikpic.com/Renierv/images/Picture 01533.jpg',600,450,'','http://www1.clikpic.com/Renierv/images/Picture 01533_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[4] = new photo(310617,'26627','','gallery','http://www1.clikpic.com/Renierv/images/DSC01678111.jpg',600,450,'','http://www1.clikpic.com/Renierv/images/DSC01678111_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[5] = new photo(310618,'26627','','gallery','http://www1.clikpic.com/Renierv/images/wedding1112.jpg',600,696,'','http://www1.clikpic.com/Renierv/images/wedding1112_thumb.jpg',130, 151,0, 0,'','','','','','');
photos[6] = new photo(310619,'26625','','gallery','http://www1.clikpic.com/Renierv/images/DisneyEpcot5101.jpg',600,800,'','http://www1.clikpic.com/Renierv/images/DisneyEpcot5101_thumb.jpg',130, 173,0, 0,'','','','','','');
photos[7] = new photo(310622,'26625','','gallery','http://www1.clikpic.com/Renierv/images/KnebworthHouse104.jpg',600,440,'','http://www1.clikpic.com/Renierv/images/KnebworthHouse104_thumb.jpg',130, 95,0, 0,'','','','','','');
photos[8] = new photo(310624,'26625','','gallery','http://www1.clikpic.com/Renierv/images/NassauBahamaIsland106.jpg',600,800,'','http://www1.clikpic.com/Renierv/images/NassauBahamaIsland106_thumb.jpg',130, 173,0, 0,'','','','','','');
photos[9] = new photo(310626,'26625','','gallery','http://www1.clikpic.com/Renierv/images/Sweden109.jpg',600,450,'','http://www1.clikpic.com/Renierv/images/Sweden109_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[10] = new photo(310627,'26619','','gallery','http://www1.clikpic.com/Renierv/images/Antelope36.jpg',600,450,'','http://www1.clikpic.com/Renierv/images/Antelope36_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[11] = new photo(310629,'26619','','gallery','http://www1.clikpic.com/Renierv/images/Dolphingroup39.jpg',600,450,'','http://www1.clikpic.com/Renierv/images/Dolphingroup39_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[12] = new photo(310630,'26619','','gallery','http://www1.clikpic.com/Renierv/images/Giraffeherd42.jpg',600,323,'','http://www1.clikpic.com/Renierv/images/Giraffeherd42_thumb.jpg',130, 70,0, 0,'','','','','','');
photos[13] = new photo(310631,'26619','','gallery','http://www1.clikpic.com/Renierv/images/Pelican45.jpg',600,450,'','http://www1.clikpic.com/Renierv/images/Pelican45_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[14] = new photo(310633,'26619','','gallery','http://www1.clikpic.com/Renierv/images/BlackRhinoMale37 copy.jpg',600,800,'','http://www1.clikpic.com/Renierv/images/BlackRhinoMale37 copy_thumb.jpg',130, 173,0, 0,'','','','','','');
photos[15] = new photo(310635,'26619','','gallery','http://www1.clikpic.com/Renierv/images/Youngcheetahl49.jpg',600,520,'','http://www1.clikpic.com/Renierv/images/Youngcheetahl49_thumb.jpg',130, 113,0, 0,'','','','','','');
photos[16] = new photo(310636,'26619','','gallery','http://www1.clikpic.com/Renierv/images/Zebraherdwithbaby50.jpg',600,502,'','http://www1.clikpic.com/Renierv/images/Zebraherdwithbaby50_thumb.jpg',130, 109,0, 0,'','','','','','');
photos[17] = new photo(310638,'26620','','gallery','http://www1.clikpic.com/Renierv/images/ChurchGroup51.jpg',600,247,'','http://www1.clikpic.com/Renierv/images/ChurchGroup51_thumb.jpg',130, 54,0, 0,'','','','','','');
photos[18] = new photo(310639,'26620','','gallery','http://www1.clikpic.com/Renierv/images/DisneyMagic19.jpg',600,813,'','http://www1.clikpic.com/Renierv/images/DisneyMagic19_thumb.jpg',130, 176,0, 0,'','','','','','');
photos[19] = new photo(310640,'26620','','gallery','http://www1.clikpic.com/Renierv/images/Jousting254.jpg',600,800,'','http://www1.clikpic.com/Renierv/images/Jousting254_thumb.jpg',130, 173,0, 0,'','','','','','');
photos[20] = new photo(310641,'26620','','gallery','http://www1.clikpic.com/Renierv/images/Mensconvention55.jpg',600,450,'','http://www1.clikpic.com/Renierv/images/Mensconvention55_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[21] = new photo(310642,'26620','','gallery','http://www1.clikpic.com/Renierv/images/Universal Studios58.jpg',600,800,'','http://www1.clikpic.com/Renierv/images/Universal Studios58_thumb.jpg',130, 173,0, 0,'','','','','','');
photos[22] = new photo(310789,'26621','','gallery','http://www1.clikpic.com/Renierv/images/Nasa036731.jpg',600,800,'','http://www1.clikpic.com/Renierv/images/Nasa036731_thumb.jpg',130, 173,0, 0,'','','','','','');
photos[23] = new photo(310794,'26621','','gallery','http://www1.clikpic.com/Renierv/images/Sweden 175.jpg',600,800,'','http://www1.clikpic.com/Renierv/images/Sweden 175_thumb.jpg',130, 173,0, 0,'','','','','','');
photos[24] = new photo(310795,'26621','','gallery','http://www1.clikpic.com/Renierv/images/Sweden 276.jpg',600,800,'','http://www1.clikpic.com/Renierv/images/Sweden 276_thumb.jpg',130, 173,0, 0,'','','','','','');
photos[25] = new photo(310796,'26621','','gallery','http://www1.clikpic.com/Renierv/images/Wisley gardens78.jpg',600,450,'','http://www1.clikpic.com/Renierv/images/Wisley gardens78_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[26] = new photo(310807,'26636','','gallery','http://www1.clikpic.com/Renierv/images/boys-creative-37.jpg',600,740,'','http://www1.clikpic.com/Renierv/images/boys-creative-37_thumb.jpg',130, 160,0, 0,'','','','','','');
photos[27] = new photo(310808,'26620','','gallery','http://www1.clikpic.com/Renierv/images/NasaStoryMusgrave63.jpg',600,439,'','http://www1.clikpic.com/Renierv/images/NasaStoryMusgrave63_thumb.jpg',130, 95,0, 0,'','','','','','');
photos[28] = new photo(310811,'26623','','gallery','http://www1.clikpic.com/Renierv/images/Bear Big Blue House81.jpg',600,800,'','http://www1.clikpic.com/Renierv/images/Bear Big Blue House81_thumb.jpg',130, 173,0, 0,'','','','','','');
photos[29] = new photo(310814,'26623','','gallery','http://www1.clikpic.com/Renierv/images/Queen live90.jpg',600,378,'','http://www1.clikpic.com/Renierv/images/Queen live90_thumb.jpg',130, 82,0, 0,'','','','','','');
photos[30] = new photo(310815,'26623','','gallery','http://www1.clikpic.com/Renierv/images/Seaworld show 294.jpg',600,800,'','http://www1.clikpic.com/Renierv/images/Seaworld show 294_thumb.jpg',130, 173,0, 0,'','','','','','');
photos[31] = new photo(310816,'26623','','gallery','http://www1.clikpic.com/Renierv/images/theatre 296.jpg',600,866,'','http://www1.clikpic.com/Renierv/images/theatre 296_thumb.jpg',130, 188,0, 0,'','','','','','');
photos[32] = new photo(310817,'26623','','gallery','http://www1.clikpic.com/Renierv/images/theatre 397.jpg',600,535,'','http://www1.clikpic.com/Renierv/images/theatre 397_thumb.jpg',130, 116,0, 0,'','','','','','');
photos[33] = new photo(310826,'26623','','gallery','http://www1.clikpic.com/Renierv/images/dance 3.jpg',600,450,'','http://www1.clikpic.com/Renierv/images/dance 3_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[34] = new photo(310848,'26627','','gallery','http://www1.clikpic.com/Renierv/images/wedding 21132.jpg',600,738,'','http://www1.clikpic.com/Renierv/images/wedding 21132_thumb.jpg',130, 160,0, 0,'','','','','','');
photos[35] = new photo(310859,'26625','','gallery','http://www1.clikpic.com/Renierv/images/hands that flung stars103.jpg',600,450,'','http://www1.clikpic.com/Renierv/images/hands that flung stars103_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[36] = new photo(310877,'26619','','gallery','http://www1.clikpic.com/Renierv/images/Orca killer whale43.jpg',600,450,'','http://www1.clikpic.com/Renierv/images/Orca killer whale43_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[37] = new photo(310878,'26619','','gallery','http://www1.clikpic.com/Renierv/images/African wild dog35.jpg',600,800,'','http://www1.clikpic.com/Renierv/images/African wild dog35_thumb.jpg',130, 173,0, 0,'','','','','','');
photos[38] = new photo(310880,'26625','','gallery','http://www1.clikpic.com/Renierv/images/Florida Birds102.jpg',600,450,'','http://www1.clikpic.com/Renierv/images/Florida Birds102_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[39] = new photo(310881,'26625','','gallery','http://www1.clikpic.com/Renierv/images/Seaworld1071082.jpg',600,800,'','http://www1.clikpic.com/Renierv/images/Seaworld1071082_thumb.jpg',130, 173,0, 0,'','','','','','');
photos[40] = new photo(311189,'26636','','gallery','http://www1.clikpic.com/Renierv/images/family-13-good.jpg',400,339,'','http://www1.clikpic.com/Renierv/images/family-13-good_thumb.jpg',130, 110,0, 0,'','','','','','');
photos[41] = new photo(645755,'26626','','gallery','http://www1.clikpic.com/Renierv/images/showreel-psd-pics-only-600-.jpg',600,546,'Video showreel showing clips of recent productions','http://www1.clikpic.com/Renierv/images/showreel-psd-pics-only-600-_thumb.jpg',130, 118,0, 0,'','','','','','');
photos[42] = new photo(645768,'26636','','gallery','http://www1.clikpic.com/Renierv/images/tilly.jpg',600,800,'Tilly, Vicky\'s horse','http://www1.clikpic.com/Renierv/images/tilly_thumb.jpg',130, 173,0, 0,'','','','','','');
photos[43] = new photo(645775,'26623','','gallery','http://www1.clikpic.com/Renierv/images/gemma-model.jpg',600,800,'','http://www1.clikpic.com/Renierv/images/gemma-model_thumb.jpg',130, 173,0, 0,'','','','','','');
photos[44] = new photo(648454,'26625','','gallery','http://www1.clikpic.com/Renierv/images/le-rozier-.jpg',600,450,'','http://www1.clikpic.com/Renierv/images/le-rozier-_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[45] = new photo(648456,'26625','','gallery','http://www1.clikpic.com/Renierv/images/Paris-by-night.jpg',600,450,'','http://www1.clikpic.com/Renierv/images/Paris-by-night_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[46] = new photo(686523,'26623','','gallery','http://www1.clikpic.com/Renierv/images/alet1-web.jpg',600,424,'Alet Steenkamp','http://www1.clikpic.com/Renierv/images/alet1-web_thumb.jpg',130, 92,0, 0,'','','','','','');
photos[47] = new photo(686525,'26620','','gallery','http://www1.clikpic.com/Renierv/images/fireworks-web.jpg',500,747,'National Symphony Orchestra Richard Koch','http://www1.clikpic.com/Renierv/images/fireworks-web_thumb.jpg',130, 194,0, 0,'','','','','','');
photos[48] = new photo(686532,'26623','','gallery','http://www1.clikpic.com/Renierv/images/theatre-clowns-web.jpg',500,332,'Clowns','http://www1.clikpic.com/Renierv/images/theatre-clowns-web_thumb.jpg',130, 86,0, 0,'','','','','','');
photos[49] = new photo(1089507,'26627','','gallery','http://www1.clikpic.com/Renierv/images/DSC04202-copy.jpg',600,407,'Wedding, St Paul\'s cathedral.','http://www1.clikpic.com/Renierv/images/DSC04202-copy_thumb.jpg',130, 88,0, 0,'','','','','','');
photos[50] = new photo(1089514,'26623','','gallery','http://www1.clikpic.com/Renierv/images/bluemanroup1-web.jpg',600,800,'The Blue Man Group','http://www1.clikpic.com/Renierv/images/bluemanroup1-web_thumb.jpg',130, 173,0, 0,'The Blue Man Group','','','','','');
photos[51] = new photo(1089517,'26627','','gallery','http://www1.clikpic.com/Renierv/images/DSC04247-copy.jpg',600,842,'Wedding, St Paul\'s Cathedral, london','http://www1.clikpic.com/Renierv/images/DSC04247-copy_thumb.jpg',130, 182,0, 0,'','','','','','');
photos[52] = new photo(1091563,'26636','','gallery','http://www1.clikpic.com/Renierv/images/DSC00989.jpg',600,461,'Horseplay','http://www1.clikpic.com/Renierv/images/DSC00989_thumb.jpg',130, 100,0, 0,'','','','','','');
photos[53] = new photo(1091568,'26619','','gallery','http://www1.clikpic.com/Renierv/images/DSC02424.jpg',600,827,'Puffin, Handa Island','http://www1.clikpic.com/Renierv/images/DSC02424_thumb.jpg',130, 179,0, 0,'','','','','','');
photos[54] = new photo(1091569,'26619','','gallery','http://www1.clikpic.com/Renierv/images/DSC03109.jpg',600,896,'Grey Eagle','http://www1.clikpic.com/Renierv/images/DSC03109_thumb.jpg',130, 194,0, 0,'','','','','','');
photos[55] = new photo(1091573,'26618','','gallery','http://www1.clikpic.com/Renierv/images/DSC03424.jpg',600,401,'','http://www1.clikpic.com/Renierv/images/DSC03424_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[56] = new photo(1091577,'26625','','gallery','http://www1.clikpic.com/Renierv/images/DSC03569.jpg',600,454,'Loch More','http://www1.clikpic.com/Renierv/images/DSC03569_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[57] = new photo(1091580,'26619','','gallery','http://www1.clikpic.com/Renierv/images/DSC03600web.jpg',600,896,'','http://www1.clikpic.com/Renierv/images/DSC03600web_thumb.jpg',130, 194,0, 0,'','','','','','');
photos[58] = new photo(1091591,'26619','','gallery','http://www1.clikpic.com/Renierv/images/european-eagle-owl-complete.jpg',600,451,'Eagle Owl','http://www1.clikpic.com/Renierv/images/european-eagle-owl-complete_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[59] = new photo(1091605,'26621','','gallery','http://www1.clikpic.com/Renierv/images/funfair,-Baldock-00136.jpg',600,450,'funfair','http://www1.clikpic.com/Renierv/images/funfair,-Baldock-00136_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[60] = new photo(1091609,'26621','','gallery','http://www1.clikpic.com/Renierv/images/loch-more-DSC03589.jpg',600,800,'Loch More, scotland','http://www1.clikpic.com/Renierv/images/loch-more-DSC03589_thumb.jpg',130, 173,0, 0,'','','','','','');
photos[61] = new photo(1091616,'26618','','gallery','http://www1.clikpic.com/Renierv/images/RTP-PROMO-PIC-2.jpg',600,434,'','http://www1.clikpic.com/Renierv/images/RTP-PROMO-PIC-2_thumb.jpg',130, 94,0, 0,'','','','','','');
photos[62] = new photo(1134634,'26619','','gallery','http://www1.clikpic.com/Renierv/images/4-zebrasjpg.jpg',600,471,'Zebra on the highveld','http://www1.clikpic.com/Renierv/images/4-zebrasjpg_thumb.jpg',130, 102,0, 0,'Zebra wildlife','','','','','');
photos[63] = new photo(1134636,'26625','','gallery','http://www1.clikpic.com/Renierv/images/DSC00024.jpg',600,800,'London','http://www1.clikpic.com/Renierv/images/DSC00024_thumb.jpg',130, 173,0, 0,'','','','','','');
photos[64] = new photo(1134637,'26619','','gallery','http://www1.clikpic.com/Renierv/images/DSC01810.jpg',600,503,'Warthog family','http://www1.clikpic.com/Renierv/images/DSC01810_thumb.jpg',130, 109,0, 0,'','','','','','');
photos[65] = new photo(1134639,'26619','','gallery','http://www1.clikpic.com/Renierv/images/DSC036091.jpg',600,450,'Highland Cows','http://www1.clikpic.com/Renierv/images/DSC036091_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[66] = new photo(1134641,'26627','','gallery','http://www1.clikpic.com/Renierv/images/DSC04154-copy.jpg',600,896,'Cross Wedding, family photographs','http://www1.clikpic.com/Renierv/images/DSC04154-copy_thumb.jpg',130, 194,0, 0,'','','','','','');
photos[67] = new photo(1134643,'26618','','gallery','http://www1.clikpic.com/Renierv/images/IMAGE05503.jpg',600,886,'Lakes','http://www1.clikpic.com/Renierv/images/IMAGE05503_thumb.jpg',130, 192,0, 0,'','','','','','');
photos[68] = new photo(1138093,'26625','','gallery','http://www1.clikpic.com/Renierv/images/DSC02017.jpg',600,401,'Yorkshire dales','http://www1.clikpic.com/Renierv/images/DSC02017_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[69] = new photo(1138095,'26625','','gallery','http://www1.clikpic.com/Renierv/images/DSC02130-copy.jpg',600,401,'Scottish Loch','http://www1.clikpic.com/Renierv/images/DSC02130-copy_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[70] = new photo(1138104,'82788','','gallery','http://www1.clikpic.com/Renierv/images/DSC03557-copy.jpg',600,844,'','http://www1.clikpic.com/Renierv/images/DSC03557-copy_thumb.jpg',130, 183,0, 0,'','','','','','');
photos[71] = new photo(1138105,'26627','','gallery','http://www1.clikpic.com/Renierv/images/DSC03947-copy.jpg',600,794,'The Radiant Bride','http://www1.clikpic.com/Renierv/images/DSC03947-copy_thumb.jpg',130, 172,0, 0,'','','','','','');
photos[72] = new photo(1138109,'26627','','gallery','http://www1.clikpic.com/Renierv/images/DSC03986-copy.jpg',600,961,'Yes - we too can do Photoshop','http://www1.clikpic.com/Renierv/images/DSC03986-copy_thumb.jpg',130, 208,0, 0,'','','','','','');
photos[73] = new photo(1138114,'26627','','gallery','http://www1.clikpic.com/Renierv/images/DSC04247-copy1.jpg',600,841,'','http://www1.clikpic.com/Renierv/images/DSC04247-copy1_thumb.jpg',130, 182,0, 0,'','','','','','');
photos[74] = new photo(1138120,'26627','','gallery','http://www1.clikpic.com/Renierv/images/DSC04306-copy 2.JPG',590,1000,'','http://www1.clikpic.com/Renierv/images/DSC04306-copy 2_thumb.JPG',130, 220,0, 0,'','','','','','');
photos[75] = new photo(1143028,'26619','','gallery','http://www1.clikpic.com/Renierv/images/DSC01056.jpg',600,662,'','http://www1.clikpic.com/Renierv/images/DSC01056_thumb.jpg',130, 143,0, 0,'','','','','','');
photos[76] = new photo(1143030,'26625','Millau Bridge','gallery','http://www1.clikpic.com/Renierv/images/DSC01746.jpg',600,509,'','http://www1.clikpic.com/Renierv/images/DSC01746_thumb.jpg',130, 110,0, 0,'','','','','','');
photos[77] = new photo(1143031,'26623','','gallery','http://www1.clikpic.com/Renierv/images/DSC01932-copy.jpg',600,450,'','http://www1.clikpic.com/Renierv/images/DSC01932-copy_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[78] = new photo(1143033,'26625','','gallery','http://www1.clikpic.com/Renierv/images/DSC02201.jpg',600,376,'Cornwall','http://www1.clikpic.com/Renierv/images/DSC02201_thumb.jpg',130, 81,0, 0,'','','','','','');
photos[79] = new photo(1143034,'26619','','gallery','http://www1.clikpic.com/Renierv/images/DSC03273.jpg',600,423,'','http://www1.clikpic.com/Renierv/images/DSC03273_thumb.jpg',130, 92,0, 0,'','','','','','');
photos[80] = new photo(1281481,'26625','','gallery','http://www1.clikpic.com/Renierv/images/_Disney-Animal157-web.jpg',600,450,'Disney Animal Kingdom','http://www1.clikpic.com/Renierv/images/_Disney-Animal157-web_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[81] = new photo(1281482,'26625','','gallery','http://www1.clikpic.com/Renierv/images/DSC00282-copy-web.jpg',600,167,'Lighthouse Land\'s End','http://www1.clikpic.com/Renierv/images/DSC00282-copy-web_thumb.jpg',130, 36,0, 0,'','','','','','');
photos[82] = new photo(1281484,'82788','','gallery','http://www1.clikpic.com/Renierv/images/DSC01618b-web.jpg',600,402,'','http://www1.clikpic.com/Renierv/images/DSC01618b-web_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[83] = new photo(1281487,'82788','','gallery','http://www1.clikpic.com/Renierv/images/DSC03406-edited-web.jpg',600,450,'','http://www1.clikpic.com/Renierv/images/DSC03406-edited-web_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[84] = new photo(1281488,'82788','','gallery','http://www1.clikpic.com/Renierv/images/DSC03428-web.jpg',600,885,'','http://www1.clikpic.com/Renierv/images/DSC03428-web_thumb.jpg',130, 192,0, 0,'','','','','','');
photos[85] = new photo(1281489,'26621','','gallery','http://www1.clikpic.com/Renierv/images/Picture-325-web.jpg',600,477,'','http://www1.clikpic.com/Renierv/images/Picture-325-web_thumb.jpg',130, 103,0, 0,'','','','','','');
photos[86] = new photo(1528076,'26625','','gallery','http://www1.clikpic.com/Renierv/images/eiger-1-web.jpg',400,634,'Eiger','http://www1.clikpic.com/Renierv/images/eiger-1-web_thumb.jpg',130, 206,0, 0,'','','','','','');
photos[87] = new photo(1528079,'26625','','gallery','http://www1.clikpic.com/Renierv/images/eiger-2-web.jpg',400,598,'Eiger','http://www1.clikpic.com/Renierv/images/eiger-2-web_thumb.jpg',130, 194,0, 0,'','','','','','');
photos[88] = new photo(1528083,'26625','','gallery','http://www1.clikpic.com/Renierv/images/eiger-3-web.jpg',400,268,'Eiger, Switzerland','http://www1.clikpic.com/Renierv/images/eiger-3-web_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[89] = new photo(1528087,'26625','','gallery','http://www1.clikpic.com/Renierv/images/interlaken.jpg',400,776,'Interlaken','http://www1.clikpic.com/Renierv/images/interlaken_thumb.jpg',130, 252,0, 0,'','','','','','');
photos[90] = new photo(1528091,'82788','','gallery','http://www1.clikpic.com/Renierv/images/horses-4-web.jpg',600,402,'','http://www1.clikpic.com/Renierv/images/horses-4-web_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[91] = new photo(1528099,'26625','','gallery','http://www1.clikpic.com/Renierv/images/jungfraujoch-1-web.jpg',400,312,'Jungfraujoch, Switzerland','http://www1.clikpic.com/Renierv/images/jungfraujoch-1-web_thumb.jpg',130, 101,0, 0,'','','','','','');
photos[92] = new photo(1528101,'26625','','gallery','http://www1.clikpic.com/Renierv/images/matterhorn-web.jpg',400,281,'Sunrise over Matterhorn','http://www1.clikpic.com/Renierv/images/matterhorn-web_thumb.jpg',130, 91,0, 0,'','','','','','');
photos[93] = new photo(1528112,'26625','','gallery','http://www1.clikpic.com/Renierv/images/montreaux-web1.jpg',400,268,'Montreaux','http://www1.clikpic.com/Renierv/images/montreaux-web1_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[94] = new photo(1528118,'26623','','gallery','http://www1.clikpic.com/Renierv/images/stadelorgel.jpg',400,275,'','http://www1.clikpic.com/Renierv/images/stadelorgel_thumb.jpg',130, 89,0, 0,'Stadelorgel','','','','','');
photos[95] = new photo(1528120,'26625','','gallery','http://www1.clikpic.com/Renierv/images/switzerland-web.jpg',400,268,'Switzerland','http://www1.clikpic.com/Renierv/images/switzerland-web_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[96] = new photo(1528125,'26627','','gallery','http://www1.clikpic.com/Renierv/images/f828-aug2007-496.jpg',400,683,'','http://www1.clikpic.com/Renierv/images/f828-aug2007-496_thumb.jpg',130, 222,0, 0,'','','','','','');
photos[97] = new photo(1528127,'26627','','gallery','http://www1.clikpic.com/Renierv/images/f828-aug2007-559.jpg',400,234,'','http://www1.clikpic.com/Renierv/images/f828-aug2007-559_thumb.jpg',130, 76,0, 0,'','','','','','');
photos[98] = new photo(1528129,'26627','','gallery','http://www1.clikpic.com/Renierv/images/f828-aug2007-581.jpg',400,260,'','http://www1.clikpic.com/Renierv/images/f828-aug2007-581_thumb.jpg',130, 85,0, 0,'','','','','','');
photos[99] = new photo(1528135,'26627','','gallery','http://www1.clikpic.com/Renierv/images/f828-aug2007-655.jpg',400,573,'','http://www1.clikpic.com/Renierv/images/f828-aug2007-655_thumb.jpg',130, 186,0, 0,'','','','','','');
photos[100] = new photo(1528138,'26627','','gallery','http://www1.clikpic.com/Renierv/images/f828-aug2007-675.jpg',400,544,'','http://www1.clikpic.com/Renierv/images/f828-aug2007-675_thumb.jpg',130, 177,0, 0,'','','','','','');
photos[101] = new photo(1528140,'26627','','gallery','http://www1.clikpic.com/Renierv/images/f828-aug2007-895.jpg',400,598,'','http://www1.clikpic.com/Renierv/images/f828-aug2007-895_thumb.jpg',130, 194,0, 0,'','','','','','');
photos[102] = new photo(1528151,'26627','','gallery','http://www1.clikpic.com/Renierv/images/f828-aug2007-1490-web1.jpg',400,370,'','http://www1.clikpic.com/Renierv/images/f828-aug2007-1490-web1_thumb.jpg',130, 120,0, 0,'','','','','','');
photos[103] = new photo(1686164,'26620','','gallery','http://www1.clikpic.com/Renierv/images/horses-4-web_1.jpg',600,402,'','http://www1.clikpic.com/Renierv/images/horses-4-web_1_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[104] = new photo(1741886,'26623','','gallery','http://www1.clikpic.com/Renierv/images/Nick-1-web.jpg',600,288,'Nick Clube','http://www1.clikpic.com/Renierv/images/Nick-1-web_thumb.jpg',130, 62,0, 0,'','','','','','');
photos[105] = new photo(2052692,'26623','','gallery','http://www1.clikpic.com/Renierv/images/2.jpg',600,407,'Alysse Mallett Photo Shoot March 2008','http://www1.clikpic.com/Renierv/images/2_thumb.jpg',130, 88,1, 0,'Alysse Mallett Photo Shoot March 2008','','','','','');
photos[106] = new photo(2052694,'26623','','gallery','http://www1.clikpic.com/Renierv/images/3.jpg',600,402,'Alysse Mallett Photo Shoot March 2008','http://www1.clikpic.com/Renierv/images/3_thumb.jpg',130, 87,0, 0,'Alysse Mallett Photo Shoot March 2008','','','','','');
photos[107] = new photo(2052697,'26623','','gallery','http://www1.clikpic.com/Renierv/images/4.jpg',450,672,'Alysse Mallett Photo Shoot March 2008','http://www1.clikpic.com/Renierv/images/4_thumb.jpg',130, 194,0, 0,'Alysse Mallett Photo Shoot March 2008','','','','','');
photos[108] = new photo(2052699,'26623','','gallery','http://www1.clikpic.com/Renierv/images/5.jpg',450,305,'Alysse Mallett Photo Shoot March 2008','http://www1.clikpic.com/Renierv/images/5_thumb.jpg',130, 88,0, 0,'Alysse Mallett Photo Shoot March 2008','','','','','');
photos[109] = new photo(2082354,'26636','','gallery','http://www1.clikpic.com/Renierv/images/wedding-3.jpg',450,690,'Alexander Geogina','http://www1.clikpic.com/Renierv/images/wedding-3_thumb.jpg',130, 199,0, 0,'','','','','','');
photos[110] = new photo(2082367,'26619','','gallery','http://www1.clikpic.com/Renierv/images/bears.jpg',400,754,'Looking for Goldilocks','http://www1.clikpic.com/Renierv/images/bears_thumb.jpg',130, 245,0, 0,'','','','','','');
photos[111] = new photo(310570,'26615','','gallery','http://www1.clikpic.com/Renierv/images/catsb&w21.jpg',600,438,'','http://www1.clikpic.com/Renierv/images/catsb&w21_thumb.jpg',130, 95,0, 0,'','','','','','');
photos[112] = new photo(310571,'26615','','gallery','http://www1.clikpic.com/Renierv/images/dance123.jpg',600,751,'','http://www1.clikpic.com/Renierv/images/dance123_thumb.jpg',130, 163,0, 0,'','','','','','');
photos[113] = new photo(310597,'26615','','gallery','http://www1.clikpic.com/Renierv/images/statues b&w27.jpg',600,800,'','http://www1.clikpic.com/Renierv/images/statues b&w27_thumb.jpg',130, 173,0, 0,'','','','','','');
photos[114] = new photo(311175,'26615','','gallery','http://www1.clikpic.com/Renierv/images/bw001-for-businesscard-larg.jpg',600,775,'','http://www1.clikpic.com/Renierv/images/bw001-for-businesscard-larg_thumb.jpg',130, 168,0, 0,'','','','','','');
photos[115] = new photo(686528,'26615','','gallery','http://www1.clikpic.com/Renierv/images/crocodile.jpg',450,308,'Crocodile','http://www1.clikpic.com/Renierv/images/crocodile_thumb.jpg',130, 89,0, 0,'','','','','','');
photos[116] = new photo(1134638,'26615','','gallery','http://www1.clikpic.com/Renierv/images/DSC02140.jpg',600,592,'Tinted Cornwall seascape','http://www1.clikpic.com/Renierv/images/DSC02140_thumb.jpg',130, 128,0, 0,'','','','','','');
photos[117] = new photo(1134642,'26615','','gallery','http://www1.clikpic.com/Renierv/images/Gargoyle,-Cambridge-0265.jpg',600,450,'Gargoyle, Cambridge','http://www1.clikpic.com/Renierv/images/Gargoyle,-Cambridge-0265_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[118] = new photo(1138100,'26615','','gallery','http://www1.clikpic.com/Renierv/images/DSC03098.jpg',600,401,'Night Eyes','http://www1.clikpic.com/Renierv/images/DSC03098_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[119] = new photo(1528122,'26615','','gallery','http://www1.clikpic.com/Renierv/images/f828-aug2007-250.jpg',400,268,'','http://www1.clikpic.com/Renierv/images/f828-aug2007-250_thumb.jpg',130, 87,0, 0,'','','','','','');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
galleries = new Array();
galleries[0] = new gallery(26620,'1686164,686525,310808,310642,310641,310640,310639,310638','Event & Corporate Photography','gallery');
galleries[1] = new gallery(26618,'1134643,1091616,1091573,310561,310559,310553,310529','Inspirational Photography','gallery');
galleries[2] = new gallery(26619,'2082367,1143034,1143028,1134639,1134637,1134634,1091591,1091580,1091569,1091568','Nature and Wildlife Photography','gallery');
galleries[3] = new gallery(26636,'2082354,1091563,645768,311189,310807','Portrait and Pet Photography','gallery');
galleries[4] = new gallery(82788,'1528091,1281488,1281487,1281484,1138104','Product and packshots','gallery');
galleries[5] = new gallery(26621,'1281489,1091609,1091605,310796,310795,310794,310789','Stock Photography','gallery');
galleries[6] = new gallery(26623,'2052699,2052697,2052694,2052692,1741886,1528118,1143031,1089514,686532,686523','Theatre, Actor, Model and Dancer Portfolios','gallery');
galleries[7] = new gallery(26625,'1528120,1528112,1528101,1528099,1528087,1528083,1528079,1528076,1281482,1281481','Travel Photography','gallery');
galleries[8] = new gallery(26626,'645755','Video Production','gallery');
galleries[9] = new gallery(26627,'1528151,1528140,1528138,1528135,1528129,1528127,1528125,1138120,1138114,1138109','Wedding Photography','gallery');
galleries[10] = new gallery(26615,'1528122,1138100,1134642,1134638,686528,311175,310597,310571,310570','Black and White Photography','gallery');

