/***************************************************************************
* 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('1489324');
	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('1489324');
	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(1487170,'102474','','gallery','http://www1.clikpic.com/darrenburnett/images/CAYE .jpg',500,336,'','http://www1.clikpic.com/darrenburnett/images/CAYE _thumb.jpg',130, 87,0, 0,'Caye Caulker','','','','','');
photos[1] = new photo(1487185,'102474','','gallery','http://www1.clikpic.com/darrenburnett/images/DEPUTY.jpg',500,744,'Roof preparation, Cristo Rey School','http://www1.clikpic.com/darrenburnett/images/DEPUTY_thumb.jpg',130, 193,0, 0,'','','','','','');
photos[2] = new photo(1487189,'102474','','gallery','http://www1.clikpic.com/darrenburnett/images/HALFMOON.jpg',500,335,'Sunrise, Half Moon Cay','http://www1.clikpic.com/darrenburnett/images/HALFMOON_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[3] = new photo(1487190,'102474','','gallery','http://www1.clikpic.com/darrenburnett/images/HOME.jpg',500,744,'Basha, Tobacco Cay','http://www1.clikpic.com/darrenburnett/images/HOME_thumb.jpg',130, 193,0, 1,'','','','','','');
photos[4] = new photo(1487192,'102474','','gallery','http://www1.clikpic.com/darrenburnett/images/LR1.jpg',432,291,'Land Rover delivery, Camp Oakley','http://www1.clikpic.com/darrenburnett/images/LR1_thumb.jpg',130, 88,0, 0,'','','','','','');
photos[5] = new photo(1487194,'102474','','gallery','http://www1.clikpic.com/darrenburnett/images/MAYA MOPAN.jpg',500,744,'Children, Maya Mopan','http://www1.clikpic.com/darrenburnett/images/MAYA MOPAN_thumb.jpg',130, 193,0, 0,'','','','','','');
photos[6] = new photo(1487195,'102474','','gallery','http://www1.clikpic.com/darrenburnett/images/SUNRISE  HALFMOON.jpg',500,336,'Lighthouse illumination, Half Moon Cay','http://www1.clikpic.com/darrenburnett/images/SUNRISE  HALFMOON_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[7] = new photo(1487197,'102474','','gallery','http://www1.clikpic.com/darrenburnett/images/TOBACCO.jpg',500,336,'Squall, Tobacco Cay','http://www1.clikpic.com/darrenburnett/images/TOBACCO_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[8] = new photo(1488122,'102531','','gallery','http://www1.clikpic.com/darrenburnett/images/IMG_3396.jpg',500,750,'','http://www1.clikpic.com/darrenburnett/images/IMG_3396_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[9] = new photo(1488524,'102531','','gallery','http://www1.clikpic.com/darrenburnett/images/CNV00001_21.jpg',500,335,'','http://www1.clikpic.com/darrenburnett/images/CNV00001_21_thumb.jpg',130, 87,0, 0,'','','Darren Burnett','The Williams Wedding, Bath, England','','');
photos[10] = new photo(1488528,'102531','','gallery','http://www1.clikpic.com/darrenburnett/images/CNV00002_21.jpg',500,335,'','http://www1.clikpic.com/darrenburnett/images/CNV00002_21_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[11] = new photo(1488532,'102531','','gallery','http://www1.clikpic.com/darrenburnett/images/CNV00006_21.jpg',500,746,'','http://www1.clikpic.com/darrenburnett/images/CNV00006_21_thumb.jpg',130, 194,0, 0,'','','','','','');
photos[12] = new photo(1488536,'102531','','gallery','http://www1.clikpic.com/darrenburnett/images/CNV00012_121.jpg',500,325,'','http://www1.clikpic.com/darrenburnett/images/CNV00012_121_thumb.jpg',130, 85,0, 0,'','','','','','');
photos[13] = new photo(1488540,'102531','','gallery','http://www1.clikpic.com/darrenburnett/images/CNV000191.jpg',500,769,'','http://www1.clikpic.com/darrenburnett/images/CNV000191_thumb.jpg',130, 200,0, 0,'','','','','','');
photos[14] = new photo(1488542,'102531','','gallery','http://www1.clikpic.com/darrenburnett/images/CNV00021_91.jpg',500,325,'','http://www1.clikpic.com/darrenburnett/images/CNV00021_91_thumb.jpg',130, 85,0, 0,'','','','','','');
photos[15] = new photo(1488545,'102531','','gallery','http://www1.clikpic.com/darrenburnett/images/CNV00027_121.jpg',500,325,'','http://www1.clikpic.com/darrenburnett/images/CNV00027_121_thumb.jpg',130, 85,0, 0,'','','','','','');
photos[16] = new photo(1488548,'102531','','gallery','http://www1.clikpic.com/darrenburnett/images/CNV000271.jpg',390,600,'','http://www1.clikpic.com/darrenburnett/images/CNV000271_thumb.jpg',130, 200,0, 1,'','','','','','');
photos[17] = new photo(1488552,'102531','','gallery','http://www1.clikpic.com/darrenburnett/images/CNV00028_11.jpg',390,600,'','http://www1.clikpic.com/darrenburnett/images/CNV00028_11_thumb.jpg',130, 200,0, 0,'','','','','','');
photos[18] = new photo(1488556,'102531','','gallery','http://www1.clikpic.com/darrenburnett/images/CNV000281.jpg',500,325,'','http://www1.clikpic.com/darrenburnett/images/CNV000281_thumb.jpg',130, 85,0, 0,'','','','','','');
photos[19] = new photo(1488560,'102531','','gallery','http://www1.clikpic.com/darrenburnett/images/CNV00029_121.jpg',390,600,'','http://www1.clikpic.com/darrenburnett/images/CNV00029_121_thumb.jpg',130, 200,0, 0,'','','','','','');
photos[20] = new photo(1488564,'102531','','gallery','http://www1.clikpic.com/darrenburnett/images/CNV00029.jpg',390,600,'','http://www1.clikpic.com/darrenburnett/images/CNV00029_thumb.jpg',130, 200,0, 0,'','','','','','');
photos[21] = new photo(1488569,'102531','','gallery','http://www1.clikpic.com/darrenburnett/images/CNV00056_1.jpg',500,198,'','http://www1.clikpic.com/darrenburnett/images/CNV00056_1_thumb.jpg',130, 51,0, 0,'','','','','','');
photos[22] = new photo(1488573,'102531','','gallery','http://www1.clikpic.com/darrenburnett/images/CNV000741.jpg',500,769,'','http://www1.clikpic.com/darrenburnett/images/CNV000741_thumb.jpg',130, 200,0, 0,'','','','','','');
photos[23] = new photo(1488576,'102531','','gallery','http://www1.clikpic.com/darrenburnett/images/CNV00100.jpg',500,325,'','http://www1.clikpic.com/darrenburnett/images/CNV00100_thumb.jpg',130, 85,0, 0,'','','','','','');
photos[24] = new photo(1488579,'102531','','gallery','http://www1.clikpic.com/darrenburnett/images/IMG_3399.jpg',500,333,'','http://www1.clikpic.com/darrenburnett/images/IMG_3399_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[25] = new photo(1488582,'102531','','gallery','http://www1.clikpic.com/darrenburnett/images/IMG_3410.jpg',500,750,'','http://www1.clikpic.com/darrenburnett/images/IMG_3410_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[26] = new photo(1488584,'102531','','gallery','http://www1.clikpic.com/darrenburnett/images/IMG_3487.jpg',500,750,'','http://www1.clikpic.com/darrenburnett/images/IMG_3487_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[27] = new photo(1488633,'119410','','gallery','http://www1.clikpic.com/darrenburnett/images/CNV00012.jpg',500,746,'','http://www1.clikpic.com/darrenburnett/images/CNV00012_thumb.jpg',130, 194,0, 0,'','','Darren Burnett','Half Moon Cay, Belize','','');
photos[28] = new photo(1488639,'119410','','gallery','http://www1.clikpic.com/darrenburnett/images/CNV00021.jpg',500,746,'','http://www1.clikpic.com/darrenburnett/images/CNV00021_thumb.jpg',130, 194,0, 0,'','','Darren Burnett','Half Moon Cay, Belize','','');
photos[29] = new photo(1488641,'102337','','gallery','http://www1.clikpic.com/darrenburnett/images/CNV00017.jpg',500,746,'','http://www1.clikpic.com/darrenburnett/images/CNV00017_thumb.jpg',130, 194,0, 1,'','','','','','');
photos[30] = new photo(1488647,'102337','','gallery','http://www1.clikpic.com/darrenburnett/images/IMG_0534.JPG',500,373,'','http://www1.clikpic.com/darrenburnett/images/IMG_0534_thumb.JPG',130, 97,0, 0,'','','','','','');
photos[31] = new photo(1488941,'102564','','gallery','http://www1.clikpic.com/darrenburnett/images/ALCATRAZ.jpg',500,746,'','http://www1.clikpic.com/darrenburnett/images/ALCATRAZ_thumb.jpg',130, 194,0, 0,'','','Darren Burnett','Alcatraz Prison, San Francisco, USA','','');
photos[32] = new photo(1488947,'102564','','gallery','http://www1.clikpic.com/darrenburnett/images/BEIRUT.jpg',500,746,'','http://www1.clikpic.com/darrenburnett/images/BEIRUT_thumb.jpg',130, 194,0, 0,'','','','','','');
photos[33] = new photo(1488953,'102564','','gallery','http://www1.clikpic.com/darrenburnett/images/GREAT ZIM.jpg',500,746,'','http://www1.clikpic.com/darrenburnett/images/GREAT ZIM_thumb.jpg',130, 194,0, 0,'','','Darren Burnett','Great Zimbabwe Ruins, Zimbabwe','','');
photos[34] = new photo(1488959,'102564','','gallery','http://www1.clikpic.com/darrenburnett/images/SYDNEY.jpg',500,702,'','http://www1.clikpic.com/darrenburnett/images/SYDNEY_thumb.jpg',130, 183,0, 0,'','','','','','');
photos[35] = new photo(1489228,'102573','','gallery','http://www1.clikpic.com/darrenburnett/images/ANGEL.jpg',500,746,'','http://www1.clikpic.com/darrenburnett/images/ANGEL_thumb.jpg',130, 194,0, 0,'','','','','','');
photos[36] = new photo(1489232,'102573','','gallery','http://www1.clikpic.com/darrenburnett/images/CHEROB.jpg',500,746,'','http://www1.clikpic.com/darrenburnett/images/CHEROB_thumb.jpg',130, 194,0, 0,'','','','','','');
photos[37] = new photo(1489238,'102573','','gallery','http://www1.clikpic.com/darrenburnett/images/PUNTS.jpg',500,753,'','http://www1.clikpic.com/darrenburnett/images/PUNTS_thumb.jpg',130, 196,0, 0,'','','','','','');
photos[38] = new photo(1489242,'102573','','gallery','http://www1.clikpic.com/darrenburnett/images/STAINGLASS.jpg',432,576,'','http://www1.clikpic.com/darrenburnett/images/STAINGLASS_thumb.jpg',130, 173,0, 0,'','','','','','');
photos[39] = new photo(1489273,'102575','','gallery','http://www1.clikpic.com/darrenburnett/images/WASH ME.jpg',500,714,'','http://www1.clikpic.com/darrenburnett/images/WASH ME_thumb.jpg',130, 186,0, 0,'','','','','','');
photos[40] = new photo(1489324,'102337','','gallery','http://www1.clikpic.com/darrenburnett/images/RADCLIFFESQ.jpg',500,335,'','http://www1.clikpic.com/darrenburnett/images/RADCLIFFESQ_thumb.jpg',130, 87,1, 0,'','','','','','');
photos[41] = new photo(1489401,'102337','','gallery','http://www1.clikpic.com/darrenburnett/images/GLACIER.jpg',500,374,'','http://www1.clikpic.com/darrenburnett/images/GLACIER_thumb.jpg',130, 97,0, 0,'','','','','','');
photos[42] = new photo(1489405,'102337','','gallery','http://www1.clikpic.com/darrenburnett/images/MERIBEL.jpg',500,375,'','http://www1.clikpic.com/darrenburnett/images/MERIBEL_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[43] = new photo(1489409,'102573','','gallery','http://www1.clikpic.com/darrenburnett/images/ZIM.jpg',500,746,'','http://www1.clikpic.com/darrenburnett/images/ZIM_thumb.jpg',130, 194,0, 0,'','','Darren Burnett','Zambesi River, Nr Mana Pools, Zimbabwe','','');
photos[44] = new photo(1489411,'102573','','gallery','http://www1.clikpic.com/darrenburnett/images/SYDNEY1.jpg',500,746,'','http://www1.clikpic.com/darrenburnett/images/SYDNEY1_thumb.jpg',130, 194,0, 0,'','','','','','');
photos[45] = new photo(1489415,'102573','','gallery','http://www1.clikpic.com/darrenburnett/images/PANAMAHATS.jpg',500,335,'','http://www1.clikpic.com/darrenburnett/images/PANAMAHATS_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[46] = new photo(1489418,'102337','','gallery','http://www1.clikpic.com/darrenburnett/images/PINN.jpg',500,335,'','http://www1.clikpic.com/darrenburnett/images/PINN_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[47] = new photo(1489458,'102474','','gallery','http://www1.clikpic.com/darrenburnett/images/DAZ.jpg',500,746,'','http://www1.clikpic.com/darrenburnett/images/DAZ_thumb.jpg',130, 194,0, 0,'','','','','','');
photos[48] = new photo(1489460,'102573','','gallery','http://www1.clikpic.com/darrenburnett/images/FERN.jpg',500,746,'','http://www1.clikpic.com/darrenburnett/images/FERN_thumb.jpg',130, 194,0, 0,'','','','','','');
photos[49] = new photo(1489464,'102573','','gallery','http://www1.clikpic.com/darrenburnett/images/GOA.jpg',500,746,'','http://www1.clikpic.com/darrenburnett/images/GOA_thumb.jpg',130, 194,0, 0,'','','','','','');
photos[50] = new photo(1775817,'119410','','gallery','http://www1.clikpic.com/darrenburnett/images/IMG_0032E.jpg',500,750,'','http://www1.clikpic.com/darrenburnett/images/IMG_0032E_thumb.jpg',130, 195,0, 0,'','','Darren Burnett','Saunton Sands, Devon, England','','');
photos[51] = new photo(1775821,'119410','','gallery','http://www1.clikpic.com/darrenburnett/images/IMG_0035E.jpg',500,750,'','http://www1.clikpic.com/darrenburnett/images/IMG_0035E_thumb.jpg',130, 195,0, 0,'','','Darren Burnett','Saunton Sands, Devon, England','','');
photos[52] = new photo(1775823,'119410','','gallery','http://www1.clikpic.com/darrenburnett/images/IMG_0049E.jpg',432,576,'','http://www1.clikpic.com/darrenburnett/images/IMG_0049E_thumb.jpg',130, 173,0, 0,'','','Darren Burnett','Saunton Bay, Devon, England','','');
photos[53] = new photo(1775989,'119410','','gallery','http://www1.clikpic.com/darrenburnett/images/IMG_0056E.jpg',500,750,'','http://www1.clikpic.com/darrenburnett/images/IMG_0056E_thumb.jpg',130, 195,0, 0,'','','Darren Burnett','Croyde Bay, Devon, England','','');
photos[54] = new photo(1778846,'119410','','gallery','http://www1.clikpic.com/darrenburnett/images/IMG_0036E.jpg',500,333,'','http://www1.clikpic.com/darrenburnett/images/IMG_0036E_thumb.jpg',130, 87,0, 0,'','','Darren Burnett','Saunton Bay, Devon, England','','');
photos[55] = new photo(1778849,'102573','','gallery','http://www1.clikpic.com/darrenburnett/images/IMG_8238E.jpg',500,667,'','http://www1.clikpic.com/darrenburnett/images/IMG_8238E_thumb.jpg',130, 173,0, 0,'','','','','','');
photos[56] = new photo(1778852,'102573','','gallery','http://www1.clikpic.com/darrenburnett/images/IMG_8227E.jpg',500,750,'','http://www1.clikpic.com/darrenburnett/images/IMG_8227E_thumb.jpg',130, 195,0, 0,'','','Darren Burnett','','','');
photos[57] = new photo(1778886,'102575','','gallery','http://www1.clikpic.com/darrenburnett/images/fruitmarket.jpg',432,576,'','http://www1.clikpic.com/darrenburnett/images/fruitmarket_thumb.jpg',130, 173,0, 0,'','','Darren Burnett','Sidon, Beirut','','');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
galleries = new Array();
galleries[0] = new gallery(102564,'1488959,1488953,1488947,1488941','ARCHITECTURE','gallery');
galleries[1] = new gallery(102575,'1778886,1489273','DOCUMENTARY','gallery');
galleries[2] = new gallery(102573,'1778852,1778849,1489464,1489460,1489415,1489411,1489409,1489242,1489238,1489232','GENERAL','gallery');
galleries[3] = new gallery(102337,'1488641','LANDSCAPE','gallery');
galleries[4] = new gallery(102474,'1487190','RALEIGH INTERNATIONAL BELIZE ','gallery');
galleries[5] = new gallery(119410,'1778846,1775989,1775823,1775821,1775817,1488639,1488633','SEASCAPE','gallery');
galleries[6] = new gallery(102531,'1488548','WEDDINGS','gallery');

