/***************************************************************************
* 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('160647,160603');
	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('160647,160603');
	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;
			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(461103,'39586','','gallery','http://www1.clikpic.com/laravr/images/Aiden\'s eye webpage1.jpg',400,267,'Aiden,3mths','http://www1.clikpic.com/laravr/images/Aiden\'s eye webpage1_thumb.jpg',130, 87,0, 0,'','','Lara van Rooyen','Bristol','','');
photos[1] = new photo(519649,'39586','','gallery','http://www1.clikpic.com/laravr/images/Innes Website1.jpg',400,267,'Ines, 3 Months','http://www1.clikpic.com/laravr/images/Innes Website1_thumb.jpg',130, 87,0, 0,'','','Lara van Rooyen','Bristol','','');
photos[2] = new photo(519658,'39586','','gallery','http://www1.clikpic.com/laravr/images/Janie.jpg',400,267,'Janie,15 Weeks','http://www1.clikpic.com/laravr/images/Janie_thumb.jpg',130, 87,0, 0,'','','Lara van Rooyen','Bristol','','');
photos[3] = new photo(598500,'39586','','gallery','http://www1.clikpic.com/laravr/images/Ciara and Finn.jpg',400,267,'Ciara and Finn','http://www1.clikpic.com/laravr/images/Ciara and Finn_thumb.jpg',130, 87,0, 0,'','','Lara van Rooyen','Bristol','','');
photos[4] = new photo(598504,'39586','','gallery','http://www1.clikpic.com/laravr/images/Finn, 4 mths.jpg',400,267,'Finn, 4mths','http://www1.clikpic.com/laravr/images/Finn, 4 mths_thumb.jpg',130, 87,0, 0,'','','Lara van Rooyen','Bristol','','');
photos[5] = new photo(641510,'39586','','gallery','http://www1.clikpic.com/laravr/images/Olivia.jpg',400,267,'Olivia, 5mths','http://www1.clikpic.com/laravr/images/Olivia_thumb.jpg',130, 87,0, 0,'','','Lara van Rooyen','Bristol','','');
photos[6] = new photo(914182,'39586','','gallery','http://www1.clikpic.com/laravr/images/Annabell Website.jpg',192,288,'Annabelle','http://www1.clikpic.com/laravr/images/Annabell Website_thumb.jpg',130, 195,0, 0,'','','Lara van Rooyen','Bristol','','');
photos[7] = new photo(2008764,'39586','','gallery','http://www1.clikpic.com/laravr/images/Hannah1 Website.jpg',300,450,'Hannah','http://www1.clikpic.com/laravr/images/Hannah1 Website_thumb.jpg',130, 195,0, 0,'','','Lara van Rooyen','Bristol','','');
photos[8] = new photo(2008829,'39586','','gallery','http://www1.clikpic.com/laravr/images/Thomas Website.jpg',308,450,'Thomas','http://www1.clikpic.com/laravr/images/Thomas Website_thumb.jpg',130, 190,0, 0,'','','Lara van Rooyen','Portishead, Bristol','','');
photos[9] = new photo(2008835,'39586','','gallery','http://www1.clikpic.com/laravr/images/Morgan Website.jpg',300,450,'Morgan','http://www1.clikpic.com/laravr/images/Morgan Website_thumb.jpg',130, 195,0, 0,'','','Lara van Rooyen','Portishead, Bristol','','');
photos[10] = new photo(2008842,'134711','','gallery','http://www1.clikpic.com/laravr/images/Cake Website.jpg',200,300,'','http://www1.clikpic.com/laravr/images/Cake Website_thumb.jpg',130, 195,0, 0,'','','Lara van Rooyen','Franschhoek, South Africa','','');
photos[11] = new photo(2008843,'134711','','gallery','http://www1.clikpic.com/laravr/images/Karin 1 Website.jpg',450,300,'','http://www1.clikpic.com/laravr/images/Karin 1 Website_thumb.jpg',130, 87,0, 0,'','','Lara van Rooyen','Franschhoek','','');
photos[12] = new photo(2008851,'134711','','gallery','http://www1.clikpic.com/laravr/images/Karin Website.jpg',450,300,'','http://www1.clikpic.com/laravr/images/Karin Website_thumb.jpg',130, 87,0, 0,'','','Lara van Rooyen','Franschhoek','','');
photos[13] = new photo(2008852,'134711','','gallery','http://www1.clikpic.com/laravr/images/Table Decor Website.jpg',300,205,'','http://www1.clikpic.com/laravr/images/Table Decor Website_thumb.jpg',130, 89,0, 0,'','','Lara van Rooyen','','','');
photos[14] = new photo(2008854,'39586','','gallery','http://www1.clikpic.com/laravr/images/Kiara Website.jpg',300,450,'Ciara','http://www1.clikpic.com/laravr/images/Kiara Website_thumb.jpg',130, 195,0, 0,'','','Lara van Rooyen','Clevedon, Bristol','','');
photos[15] = new photo(2008868,'134711','','gallery','http://www1.clikpic.com/laravr/images/Geogia and Kel Website.jpg',450,300,'','http://www1.clikpic.com/laravr/images/Geogia and Kel Website_thumb.jpg',130, 87,0, 0,'','','Lara van Rooyen','Groot Constantia, South Africa','','');
photos[16] = new photo(2008872,'134711','','gallery','http://www1.clikpic.com/laravr/images/Georgia1 Webiste.jpg',300,450,'','http://www1.clikpic.com/laravr/images/Georgia1 Webiste_thumb.jpg',130, 195,0, 0,'','','Lara van Rooyen','Hout Bay, South Africa','','');
photos[17] = new photo(2008875,'134711','','gallery','http://www1.clikpic.com/laravr/images/Georgia and Eve Website.jpg',300,450,'','http://www1.clikpic.com/laravr/images/Georgia and Eve Website_thumb.jpg',130, 195,0, 0,'','','Lara van Rooyen','Hout Bay, South Africa','','');
photos[18] = new photo(2008877,'134711','','gallery','http://www1.clikpic.com/laravr/images/Rings Website.jpg',300,450,'','http://www1.clikpic.com/laravr/images/Rings Website_thumb.jpg',130, 195,0, 0,'','','Lara van Rooyen','Groot Constantia, South Africa','','');
photos[19] = new photo(2647454,'39586','','gallery','http://admin.clikpic.com/laravr/images/William Website Image.jpg',272,400,'William','http://admin.clikpic.com/laravr/images/William Website Image_thumb.jpg',130, 191,0, 0,'','','Lara van Rooyen','Portishead, Bristol','','');
photos[20] = new photo(161193,'134711','','gallery','http://www1.clikpic.com/laravr/images/Helen & Tom in car with bubbles.jpg',400,278,'Tom and Helen','http://www1.clikpic.com/laravr/images/Helen & Tom in car with bubbles_thumb.jpg',130, 90,0, 0,'','','Lara Van Rooyen','Llangollen, Wales','','');
photos[21] = new photo(160745,'134711','','gallery','http://www1.clikpic.com/laravr/images/Tom & Helen.jpg',400,277,'Tom and Helen','http://www1.clikpic.com/laravr/images/Tom & Helen_thumb.jpg',130, 90,0, 0,'','','Lara Van Rooyen','Llangollen, Wales','','');
photos[22] = new photo(160563,'14696','','gallery','http://www1.clikpic.com/laravr/images/Boys playing tag.jpg',400,272,'Boys Playing Tag','http://www1.clikpic.com/laravr/images/Boys playing tag_thumb.jpg',130, 88,0, 0,'This next group of photographs was taken in the Transkei, South Africa. Here life is very primitive for some and english is not spoken very often. The people were very friendly and although they enjoyed having their photographs taken were often not sure of how to pose. I did not want to direct them as this to me would spoil the image. I made reprints for all the people in my images and sent them back to the local shop for them.','','Lara Van Rooyen','Transkei, South Africa','','');
photos[23] = new photo(160570,'14696','','gallery','http://www1.clikpic.com/laravr/images/Young lady & shadow.jpg',400,278,'Young Lady at Home','http://www1.clikpic.com/laravr/images/Young lady & shadow_thumb.jpg',130, 90,0, 0,'','','Lara Van Rooyen','Transkei, South Africa','','');
photos[24] = new photo(160573,'14696','','gallery','http://www1.clikpic.com/laravr/images/Mother & Son.jpg',400,270,'Mother and Son','http://www1.clikpic.com/laravr/images/Mother & Son_thumb.jpg',130, 88,0, 0,'','','Lara Van Rooyen','Transkei, South Africa','','');
photos[25] = new photo(160583,'14696','','gallery','http://www1.clikpic.com/laravr/images/Qwebe ladies.jpg',400,273,'Ladies at the Cwebe Shop','http://www1.clikpic.com/laravr/images/Qwebe ladies_thumb.jpg',130, 89,0, 0,'','','Lara Van Rooyen','Transkei, South Africa','','');
photos[26] = new photo(160585,'14696','','gallery','http://www1.clikpic.com/laravr/images/Lady sitting on stoep.jpg',400,274,'Sitting on the Stoep','http://www1.clikpic.com/laravr/images/Lady sitting on stoep_thumb.jpg',130, 89,0, 0,'','','Lara Van Rooyen','Transkei, South Africa','','');
photos[27] = new photo(160590,'14696','','gallery','http://www1.clikpic.com/laravr/images/Old man & wife.jpg',400,272,'Man and Wife','http://www1.clikpic.com/laravr/images/Old man & wife_thumb.jpg',130, 88,0, 0,'','','Lara Van Rooyen','Transkei, South Africa','','');
photos[28] = new photo(160602,'14696','','gallery','http://www1.clikpic.com/laravr/images/Old lady.jpg',400,276,'Grandmother','http://www1.clikpic.com/laravr/images/Old lady_thumb.jpg',130, 90,0, 0,'','','Lara Van Rooyen','Transkei, South Africa','','');
photos[29] = new photo(160603,'14696','','gallery','http://www1.clikpic.com/laravr/images/Old man & horse.jpg',400,275,'Old Man and Horse','http://www1.clikpic.com/laravr/images/Old man & horse_thumb.jpg',130, 89,1, 1,'','','Lara Van Rooyen','Transkei, South Africa','','');
photos[30] = new photo(160647,'14988','','gallery','http://www1.clikpic.com/laravr/images/Baby Meintjies.jpg',400,267,'Baby Meintjies','http://www1.clikpic.com/laravr/images/Baby Meintjies_thumb.jpg',130, 87,1, 1,'','','Lara Van Rooyen','Retreat Maternity, Cape Town','','');
photos[31] = new photo(160653,'14988','','gallery','http://www1.clikpic.com/laravr/images/Thembi being baptized.jpg',400,266,'Thembi being Baptized','http://www1.clikpic.com/laravr/images/Thembi being baptized_thumb.jpg',130, 86,0, 0,'','','Lara Van Rooyen','Zeekoei Vlei, Cape Town','','');
photos[32] = new photo(160656,'14988','','gallery','http://www1.clikpic.com/laravr/images/Stevens Barmitzvah.jpg',400,263,'Steven\'s Bar Mitzvah','http://www1.clikpic.com/laravr/images/Stevens Barmitzvah_thumb.jpg',130, 85,0, 0,'','','Lara Van Rooyen','Green Point, Cape Town','','');
photos[33] = new photo(160664,'14988','','gallery','http://www1.clikpic.com/laravr/images/Simphiwe after annitiation.jpg',400,267,'Simphiwe after Initiation','http://www1.clikpic.com/laravr/images/Simphiwe after annitiation_thumb.jpg',130, 87,0, 0,'','','Lara Van Rooyen','Hout Bay, Cape Town','','');
photos[34] = new photo(160674,'14988','','gallery','http://www1.clikpic.com/laravr/images/JP & Larrissa.jpg',400,264,'Larissa and Jean-Pierre','http://www1.clikpic.com/laravr/images/JP & Larrissa_thumb.jpg',130, 86,0, 0,'','','Lara Van Rooyen','Stellenbosch, Cape Town','','');
photos[35] = new photo(160679,'14988','','gallery','http://www1.clikpic.com/laravr/images/Diana awaiting her 1st baby.jpg',400,266,'Diana\'s First Baby','http://www1.clikpic.com/laravr/images/Diana awaiting her 1st baby_thumb.jpg',130, 86,0, 0,'','','Lara Van Rooyen','Woodstock, Cape Town','','');
photos[36] = new photo(160685,'14988','','gallery','http://www1.clikpic.com/laravr/images/Hettie & family.jpg',400,265,'Hettie and Family','http://www1.clikpic.com/laravr/images/Hettie & family_thumb.jpg',130, 86,0, 0,'','','Lara Van Rooyen','Tokai Forest, Cape Town','','');
photos[37] = new photo(160691,'14988','','gallery','http://www1.clikpic.com/laravr/images/Funeral of Maria Jaars.jpg',400,264,'Maria Jaars\' Funeral','http://www1.clikpic.com/laravr/images/Funeral of Maria Jaars_thumb.jpg',130, 86,0, 0,'','','Lara Van Rooyen','Imizamo Yethu Township, Cape Town','','');
photos[38] = new photo(602761,'14990','','gallery','http://www1.clikpic.com/laravr/images/Molly and Maire.jpg',400,265,'Molly and Maire','http://www1.clikpic.com/laravr/images/Molly and Maire_thumb.jpg',130, 86,0, 0,'','','Lara van Rooyen','Bristol','','');
photos[39] = new photo(914184,'14990','','gallery','http://www1.clikpic.com/laravr/images/Jacob and Kate Website.jpg',192,288,'Jacob and Kate','http://www1.clikpic.com/laravr/images/Jacob and Kate Website_thumb.jpg',130, 195,0, 0,'','','Lara van Rooyen','Bristol','','');
photos[40] = new photo(2008859,'14990','','gallery','http://www1.clikpic.com/laravr/images/Oliver - Website.jpg',450,300,'Oliver and Family','http://www1.clikpic.com/laravr/images/Oliver - Website_thumb.jpg',130, 87,0, 0,'','','Lara van Rooyen','Portishead, Bristol','','');
photos[41] = new photo(165297,'14990','','gallery','http://www1.clikpic.com/laravr/images/Georgia dble exp1.jpg',267,400,'Georgia Christian','http://www1.clikpic.com/laravr/images/Georgia dble exp1_thumb.jpg',130, 195,0, 1,'','','Lara Van Rooyen','Groot Moddergat, Cape Town','','');
photos[42] = new photo(165300,'14990','','gallery','http://www1.clikpic.com/laravr/images/Self Portrait leaf1.jpg',278,400,'Self Portrait','http://www1.clikpic.com/laravr/images/Self Portrait leaf1_thumb.jpg',130, 187,0, 0,'','','Lara Van Rooyen','Hout Bay, Cape Town','','');
photos[43] = new photo(165304,'14990','','gallery','http://www1.clikpic.com/laravr/images/Self Portrait water on window1.jpg',277,400,'Self Portrait','http://www1.clikpic.com/laravr/images/Self Portrait water on window1_thumb.jpg',130, 188,0, 0,'','','Lara Van Rooyen','Milnerton, Cape Town','','');
photos[44] = new photo(165307,'14990','','gallery','http://www1.clikpic.com/laravr/images/Georgia with broom 11.jpg',265,400,'Georgia Christian','http://www1.clikpic.com/laravr/images/Georgia with broom 11_thumb.jpg',130, 196,0, 0,'','','Lara Van Rooyen','Groot Moddergat, Cape Town','','');
photos[45] = new photo(160733,'14990','','gallery','http://www1.clikpic.com/laravr/images/Olivia 3.jpg',400,277,'Olivia','http://www1.clikpic.com/laravr/images/Olivia 3_thumb.jpg',130, 90,0, 0,'','','Lara Van Rooyen','Sea Point, Cape Town','','');
photos[46] = new photo(160737,'14990','','gallery','http://www1.clikpic.com/laravr/images/Sarah.jpg',400,264,'Sarah Nankin','http://www1.clikpic.com/laravr/images/Sarah_thumb.jpg',130, 86,0, 0,'','','Lara Van Rooyen','Ruth Prowse, Cape Town','','');
photos[47] = new photo(209461,'14990','','gallery','http://www1.clikpic.com/laravr/images/28wks2daysBWclikpic.jpg',268,400,'Self Portrait','http://www1.clikpic.com/laravr/images/28wks2daysBWclikpic_thumb.jpg',130, 194,0, 0,'28 Weeks Pregnant','','Lara van Rooyen','Bristol','','');
photos[48] = new photo(160739,'14990','','gallery','http://www1.clikpic.com/laravr/images/Lauren Chantal portrait.jpg',400,265,'Lauren Chantelle','http://www1.clikpic.com/laravr/images/Lauren Chantal portrait_thumb.jpg',130, 86,0, 0,'','','Lara Van Rooyen','Observatory, Cape Town','','');
photos[49] = new photo(160741,'14990','','gallery','http://www1.clikpic.com/laravr/images/Mark with mud socks.jpg',400,263,'Mark Van Rooyen','http://www1.clikpic.com/laravr/images/Mark with mud socks_thumb.jpg',130, 85,0, 0,'','','Lara Van Rooyen','Kei River Mouth, South Africa','','');
photos[50] = new photo(160743,'14990','','gallery','http://www1.clikpic.com/laravr/images/Finaly with his Great Grandfather.jpg',400,274,'Finlay McAuslin and Great Grandfather','http://www1.clikpic.com/laravr/images/Finaly with his Great Grandfather_thumb.jpg',130, 89,0, 0,'','','Lara Van Rooyen','Llangollen, Wales','','');
photos[51] = new photo(911807,'14991','','gallery','http://www1.clikpic.com/laravr/images/King Street Col3.jpg',432,288,'King Street','http://www1.clikpic.com/laravr/images/King Street Col3_thumb.jpg',130, 87,0, 0,'','','Lara van Rooyen','Bristol','','');
photos[52] = new photo(165281,'14991','','gallery','http://www1.clikpic.com/laravr/images/Dead Vlei 21.jpg',282,400,'Dead Vlei, Namibia','http://www1.clikpic.com/laravr/images/Dead Vlei 21_thumb.jpg',130, 184,0, 1,'','','Lara Van Rooyen','Dead Vlei, Namibia','','');
photos[53] = new photo(160751,'14991','','gallery','http://www1.clikpic.com/laravr/images/Dead Vlei 1.jpg',400,281,'Dead Vlei, Namibia','http://www1.clikpic.com/laravr/images/Dead Vlei 1_thumb.jpg',130, 91,0, 0,'','','Lara Van Rooyen','Dead Vlei, Namibia','','');
photos[54] = new photo(161373,'14991','','gallery','http://www1.clikpic.com/laravr/images/Sentinel1.jpg',400,267,'The Sentinel, Hout Bay','http://www1.clikpic.com/laravr/images/Sentinel1_thumb.jpg',130, 87,0, 0,'','','Lara Van Rooyen','Hout Bay, Cape Town','','');
photos[55] = new photo(165311,'14991','','gallery','http://www1.clikpic.com/laravr/images/H.smith River,Harrods Dispense1.jpg',267,400,'Harrods Dispensary','http://www1.clikpic.com/laravr/images/H_thumb.smith River,Harrods Dispense1.jpg',130, 195,0, 0,'','','Lara Van Rooyen','Hammersmith, London','','');
photos[56] = new photo(161184,'15028','','gallery','http://www1.clikpic.com/laravr/images/hello.jpg',400,267,'Painting With Light','http://www1.clikpic.com/laravr/images/hello_thumb.jpg',130, 87,0, 0,'','','Lara Van Rooyen','Cape Town School of Photography','','');
photos[57] = new photo(165315,'15028','','gallery','http://www1.clikpic.com/laravr/images/Food 21.jpg',308,400,'','http://www1.clikpic.com/laravr/images/Food 21_thumb.jpg',130, 169,0, 1,'','','Lara Van Rooyen','Cape Town','','');
photos[58] = new photo(165317,'15028','','gallery','http://www1.clikpic.com/laravr/images/Flight of Fantasy 21.jpg',306,400,'Flight of Fantasy','http://www1.clikpic.com/laravr/images/Flight of Fantasy 21_thumb.jpg',130, 170,0, 0,'','','Lara Van Rooyen','Cape Town','','');
photos[59] = new photo(161442,'15028','','gallery','http://www1.clikpic.com/laravr/images/Stained Glass Window, Edinburgh.jpg',400,271,'Old Church Window','http://www1.clikpic.com/laravr/images/Stained Glass Window, Edinburgh_thumb.jpg',130, 88,0, 0,'','','Lara Van Rooyen','Edinburgh, Scotland','','');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
galleries = new Array();
galleries[0] = new gallery(39586,'2647454,2008854,2008835,2008829,2008764,914182,641510,598504,598500,519658','Little People Portraits','gallery');
galleries[1] = new gallery(134711,'2008877,2008875,2008872,2008868,2008852,2008851,2008843,2008842,161193,160745','Weddings','gallery');
galleries[2] = new gallery(14696,'160603','Transkei, South Africa','gallery');
galleries[3] = new gallery(14988,'160647','Milestones','gallery');
galleries[4] = new gallery(14990,'165297','Portraits','gallery');
galleries[5] = new gallery(14991,'165281','Landscape','gallery');
galleries[6] = new gallery(15028,'165315','Miscellaneous','gallery');


