/***************************************************************************
* 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('2508643,2227807,2227806,2227805,2173614,2158553,2158552,2158550,2158549,2158548,2158546,2099119,2099112,2099110,2099078,2099075,2099068,2099067,2099028,2099022,2099006,2099005,2099003,2099002,2098998,2098992,2098985,2098984,2098981,2098976,2098974,2098970,2098961,2093541,2093540');
	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('2508643,2227807,2227806,2227805,2173614,2158553,2158552,2158550,2158549,2158548,2158546,2099119,2099112,2099110,2099078,2099075,2099068,2099067,2099028,2099022,2099006,2099005,2099003,2099002,2098998,2098992,2098985,2098984,2098981,2098976,2098974,2098970,2098961,2093541,2093540');
	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(2098970,'139607','','gallery','http://admin2.clikpic.com/mattcurd/images/Abyss1.jpg',500,358,'','http://admin2.clikpic.com/mattcurd/images/Abyss1_thumb.jpg',130, 93,1, 0,'','','Matt Curd','Studio',25.00,'Water Sculpture');
photos[1] = new photo(2098976,'139607','','gallery','http://admin2.clikpic.com/mattcurd/images/Blue-i.jpg',500,358,'','http://admin2.clikpic.com/mattcurd/images/Blue-i_thumb.jpg',130, 93,1, 1,'','','Matt Curd','Studio',25.00,'Water Sculpture');
photos[2] = new photo(2098984,'139607','','gallery','http://admin2.clikpic.com/mattcurd/images/Crowning-glory2.jpg',500,358,'','http://admin2.clikpic.com/mattcurd/images/Crowning-glory2_thumb.jpg',130, 93,1, 0,'','','Matt Curd','Studio',25.00,'Water Sculpture');
photos[3] = new photo(2098998,'139607','','gallery','http://admin2.clikpic.com/mattcurd/images/Onfire.jpg',500,358,'','http://admin2.clikpic.com/mattcurd/images/Onfire_thumb.jpg',130, 93,1, 1,'','','Matt Curd','Studio',25.00,'Water Sculpture');
photos[4] = new photo(2099003,'139607','','gallery','http://admin2.clikpic.com/mattcurd/images/Milk2.jpg',500,358,'','http://admin2.clikpic.com/mattcurd/images/Milk2_thumb.jpg',130, 93,1, 0,'','','Matt Curd','Studio',25.00,'');
photos[5] = new photo(2099005,'139607','','gallery','http://admin2.clikpic.com/mattcurd/images/Purplelava.jpg',500,358,'','http://admin2.clikpic.com/mattcurd/images/Purplelava_thumb.jpg',130, 93,1, 0,'','','Matt Curd','Studio',25.00,'');
photos[6] = new photo(2099006,'139607','','gallery','http://admin2.clikpic.com/mattcurd/images/RWB_splash.jpg',500,358,'','http://admin2.clikpic.com/mattcurd/images/RWB_splash_thumb.jpg',130, 93,1, 0,'','','Matt Curd','Studio',25.00,'');
photos[7] = new photo(2099067,'139607','','gallery','http://admin2.clikpic.com/mattcurd/images/Purplejelly.jpg',500,358,'','http://admin2.clikpic.com/mattcurd/images/Purplejelly_thumb.jpg',130, 93,1, 0,'','','Matt Curd','Studio',25.00,'Water Sculpture');
photos[8] = new photo(2099068,'139607','','gallery','http://admin2.clikpic.com/mattcurd/images/Milk1.jpg',500,358,'','http://admin2.clikpic.com/mattcurd/images/Milk1_thumb.jpg',130, 93,1, 0,'','','Matt Curd','Studio',25.00,'Milk');
photos[9] = new photo(2227803,'139612','','gallery','http://admin2.clikpic.com/mattcurd/images/Falcons1-800x600.jpg',357,500,'','http://admin2.clikpic.com/mattcurd/images/Falcons1-800x600_thumb.jpg',130, 182,0, 0,'','5/25/08','Matt Curd','Southend Airshow',25.00,'RAF Falcons Parachute Display Team');
photos[10] = new photo(2227805,'139612','','gallery','http://admin2.clikpic.com/mattcurd/images/Mustang1-800x600.jpg',500,357,'','http://admin2.clikpic.com/mattcurd/images/Mustang1-800x600_thumb.jpg',130, 93,1, 0,'','5/25/08','Matt Curd','Southend Airshow',25.00,'P51 Mustang');
photos[11] = new photo(2227806,'139612','','gallery','http://admin2.clikpic.com/mattcurd/images/Red-Arrows1-800x600.jpg',500,333,'','http://admin2.clikpic.com/mattcurd/images/Red-Arrows1-800x600_thumb.jpg',130, 87,1, 1,'','5/25/08','Matt Curd','Southend Airshow',25.00,'Red Arrows Start of display');
photos[12] = new photo(2227807,'139612','','gallery','http://admin2.clikpic.com/mattcurd/images/Red-Arrows-Cross-800x600.jpg',500,357,'','http://admin2.clikpic.com/mattcurd/images/Red-Arrows-Cross-800x600_thumb.jpg',130, 93,1, 0,'','5/25/08','Matt Curd','Southend Airshow',25.00,'Red Arrows Crossover');
photos[13] = new photo(2158546,'139612','','gallery','http://admin2.clikpic.com/mattcurd/images/IMG_6199.jpg',500,357,'','http://admin2.clikpic.com/mattcurd/images/IMG_6199_thumb.jpg',130, 93,1, 0,'','5/7/08','Matt Curd','The Bwlch',25.00,'Eurofighter - Typhoon');
photos[14] = new photo(2158547,'139612','','gallery','http://admin2.clikpic.com/mattcurd/images/IMG_6220.jpg',500,357,'','http://admin2.clikpic.com/mattcurd/images/IMG_6220_thumb.jpg',130, 93,0, 0,'','5/7/08','Matt Curd','The Bwlch',25.00,'French Alphajet');
photos[15] = new photo(2158548,'139612','','gallery','http://admin2.clikpic.com/mattcurd/images/IMG_6228.jpg',500,357,'','http://admin2.clikpic.com/mattcurd/images/IMG_6228_thumb.jpg',130, 93,1, 0,'','5/7/08','Matt Curd','The Bwlch',25.00,'French Alphajet');
photos[16] = new photo(2158549,'139612','','gallery','http://admin2.clikpic.com/mattcurd/images/IMG_6334.jpg',500,357,'','http://admin2.clikpic.com/mattcurd/images/IMG_6334_thumb.jpg',130, 93,1, 0,'','5/7/08','Matt Curd','The Bwlch',25.00,'Hawk in primer colours');
photos[17] = new photo(2158550,'139612','','gallery','http://admin2.clikpic.com/mattcurd/images/IMG_6358.jpg',500,357,'','http://admin2.clikpic.com/mattcurd/images/IMG_6358_thumb.jpg',130, 93,1, 0,'','5/7/08','Matt Curd','The Bwlch',25.00,'Eurofighter - Typhoon');
photos[18] = new photo(2158552,'139612','','gallery','http://admin2.clikpic.com/mattcurd/images/IMG_6442.jpg',500,400,'','http://admin2.clikpic.com/mattcurd/images/IMG_6442_thumb.jpg',130, 104,1, 0,'','5/7/08','Matt Curd','The Bwlch',25.00,'Boscombe Alphajet');
photos[19] = new photo(2158553,'139612','','gallery','http://admin2.clikpic.com/mattcurd/images/IMG_6470.jpg',500,357,'','http://admin2.clikpic.com/mattcurd/images/IMG_6470_thumb.jpg',130, 93,1, 0,'','5/7/08','Matt Curd','The Bwlch',25.00,'Hawk');
photos[20] = new photo(2093541,'139612','','gallery','http://admin2.clikpic.com/mattcurd/images/IMG_5605edit.jpg',500,333,'','http://admin2.clikpic.com/mattcurd/images/IMG_5605edit_thumb.jpg',130, 87,1, 0,'','','Matt Curd','Cad West',25.00,'Tornado F3');
photos[21] = new photo(2093545,'139612','','gallery','http://admin2.clikpic.com/mattcurd/images/IMG_5681edit.jpg',500,363,'','http://admin2.clikpic.com/mattcurd/images/IMG_5681edit_thumb.jpg',130, 94,0, 0,'','','Matt Curd','Cad West',25.00,'Hawk');
photos[22] = new photo(2099110,'139612','','gallery','http://admin2.clikpic.com/mattcurd/images/IMG_5603.jpg',500,333,'','http://admin2.clikpic.com/mattcurd/images/IMG_5603_thumb.jpg',130, 87,1, 0,'','','Matt Curd','Cad West',25.00,'');
photos[23] = new photo(2099112,'139612','','gallery','http://admin2.clikpic.com/mattcurd/images/IMG_5630.jpg',500,358,'','http://admin2.clikpic.com/mattcurd/images/IMG_5630_thumb.jpg',130, 93,1, 0,'','','Matt Curd','Cad West',25.00,'Hercules');
photos[24] = new photo(2099113,'139612','','gallery','http://admin2.clikpic.com/mattcurd/images/IMG_5656.jpg',500,358,'','http://admin2.clikpic.com/mattcurd/images/IMG_5656_thumb.jpg',130, 93,0, 0,'','','Matt Curd','Cad West',25.00,'Hawk');
photos[25] = new photo(2098981,'139616','','gallery','http://admin2.clikpic.com/mattcurd/images/Chess3D.jpg',459,400,'','http://admin2.clikpic.com/mattcurd/images/Chess3D_thumb.jpg',130, 113,1, 0,'NOT FOR SALE - FOR ILLUSTRATIVE PURPOSES ONLY.','','Matt Curd','Office','','3D Imagery');
photos[26] = new photo(2098992,'139616','','gallery','http://admin2.clikpic.com/mattcurd/images/frog3D.jpg',500,375,'','http://admin2.clikpic.com/mattcurd/images/frog3D_thumb.jpg',130, 98,1, 0,'NOT FOR SALE - FOR ILLUSTRATIVE PURPOSES ONLY.','','Matt Curd','Office','','3D Imagery');
photos[27] = new photo(2098997,'139616','','gallery','http://admin2.clikpic.com/mattcurd/images/Leaking3.jpg',429,600,'','http://admin2.clikpic.com/mattcurd/images/Leaking3_thumb.jpg',130, 182,0, 0,'','','Matt Curd','Studio',25.00,'Fluid Manipulation');
photos[28] = new photo(2099002,'139616','','gallery','http://admin2.clikpic.com/mattcurd/images/MotoGP3D.jpg',500,364,'','http://admin2.clikpic.com/mattcurd/images/MotoGP3D_thumb.jpg',130, 95,1, 0,'NOT FOR SALE - FOR ILLUSTRATIVE PURPOSES ONLY.','','Matt Curd','Studio','','');
photos[29] = new photo(2099022,'139616','','gallery','http://admin2.clikpic.com/mattcurd/images/rose3D.jpg',500,333,'','http://admin2.clikpic.com/mattcurd/images/rose3D_thumb.jpg',130, 87,1, 0,'NOT FOR SALE - FOR ILLUSTRATIVE PURPOSES ONLY.','','Matt Curd','Office','','3D Imagery');
photos[30] = new photo(2099024,'139616','','gallery','http://admin2.clikpic.com/mattcurd/images/Jake-and-Casey-800x600.jpg',400,600,'','http://admin2.clikpic.com/mattcurd/images/Jake-and-Casey-800x600_thumb.jpg',130, 195,0, 0,'NOT FOR SALE - FOR ILLUSTRATIVE PURPOSES ONLY.','','Matt Curd','Office','','3D Imagery');
photos[31] = new photo(2134190,'139617','','gallery','http://admin2.clikpic.com/mattcurd/images/IMG_6106.jpg',500,333,'','http://admin2.clikpic.com/mattcurd/images/IMG_6106_thumb.jpg',130, 87,0, 0,'','5/1/08','Matt Curd','Stoke Bruerne',25.00,'');
photos[32] = new photo(2134196,'139617','','gallery','http://admin2.clikpic.com/mattcurd/images/IMG_6107.jpg',333,500,'','http://admin2.clikpic.com/mattcurd/images/IMG_6107_thumb.jpg',130, 195,0, 0,'','5/1/08','Matt Curd','Stoke Bruerne',25.00,'');
photos[33] = new photo(2098974,'139617','','gallery','http://admin2.clikpic.com/mattcurd/images/Appleslpash.jpg',500,358,'','http://admin2.clikpic.com/mattcurd/images/Appleslpash_thumb.jpg',130, 93,1, 1,'','','Matt Curd','Studio',25.00,'Apple Splash');
photos[34] = new photo(2099114,'139617','','gallery','http://admin2.clikpic.com/mattcurd/images/IMG_5700.jpg',400,600,'','http://admin2.clikpic.com/mattcurd/images/IMG_5700_thumb.jpg',130, 195,0, 0,'','','Matt Curd','Cad West',25.00,'');
photos[35] = new photo(2508643,'139617','','gallery','http://admin.clikpic.com/mattcurd/images/Bug1.jpg',500,333,'','http://admin.clikpic.com/mattcurd/images/Bug1_thumb.jpg',130, 87,1, 0,'','','Matt Curd','Northampton',25.00,'');
photos[36] = new photo(2508647,'139617','','gallery','http://admin.clikpic.com/mattcurd/images/Bug2.jpg',500,333,'','http://admin.clikpic.com/mattcurd/images/Bug2_thumb.jpg',130, 87,0, 0,'','','Matt Curd','Northampton',25.00,'');
photos[37] = new photo(2227802,'139618','','gallery','http://admin2.clikpic.com/mattcurd/images/2-Yachts-800x600.jpg',357,500,'','http://admin2.clikpic.com/mattcurd/images/2-Yachts-800x600_thumb.jpg',130, 182,0, 0,'','5/25/08','Matt Curd','Southend seafront',25.00,'Yachts');
photos[38] = new photo(2134161,'139618','','gallery','http://admin2.clikpic.com/mattcurd/images/IMG_6101.jpg',357,500,'','http://admin2.clikpic.com/mattcurd/images/IMG_6101_thumb.jpg',130, 182,0, 0,'','5/1/08','Matt Curd','Stoke Bruerne',25.00,'');
photos[39] = new photo(2134167,'139618','','gallery','http://admin2.clikpic.com/mattcurd/images/IMG_6109.jpg',333,500,'','http://admin2.clikpic.com/mattcurd/images/IMG_6109_thumb.jpg',130, 195,0, 0,'','5/1/08','Matt Curd','Stoke Bruerne',25.00,'');
photos[40] = new photo(2134174,'139618','','gallery','http://admin2.clikpic.com/mattcurd/images/IMG_6130.jpg',500,333,'','http://admin2.clikpic.com/mattcurd/images/IMG_6130_thumb.jpg',130, 87,0, 0,'','5/1/08','Matt Curd','Stoke Bruerne',25.00,'');
photos[41] = new photo(2134178,'139618','','gallery','http://admin2.clikpic.com/mattcurd/images/IMG_6149.jpg',500,333,'','http://admin2.clikpic.com/mattcurd/images/IMG_6149_thumb.jpg',130, 87,0, 0,'','5/1/08','Matt Curd','Stoke Bruerne',25.00,'');
photos[42] = new photo(2093540,'139618','','gallery','http://admin2.clikpic.com/mattcurd/images/ab_park3.jpg',500,333,'A walk in the park','http://admin2.clikpic.com/mattcurd/images/ab_park3_thumb.jpg',130, 87,1, 1,'Abington Park taken in the autumn of 2007 on a frosty & misty morning','','Matt Curd','Abington Park, Northampton',25.00,'');
photos[43] = new photo(2098963,'139618','','gallery','http://admin2.clikpic.com/mattcurd/images/0017.jpg',500,333,'','http://admin2.clikpic.com/mattcurd/images/0017_thumb.jpg',130, 87,0, 0,'','','Matt Curd','Kent',25.00,'');
photos[44] = new photo(2098964,'139618','','gallery','http://admin2.clikpic.com/mattcurd/images/0019.jpg',400,600,'','http://admin2.clikpic.com/mattcurd/images/0019_thumb.jpg',130, 195,0, 0,'','','Matt Curd','Kent',25.00,'');
photos[45] = new photo(2098993,'139618','','gallery','http://admin2.clikpic.com/mattcurd/images/IMG_5903.jpg',500,358,'','http://admin2.clikpic.com/mattcurd/images/IMG_5903_thumb.jpg',130, 93,0, 0,'','','Matt Curd','Northampton',25.00,'Moon');
photos[46] = new photo(2099109,'139618','','gallery','http://admin2.clikpic.com/mattcurd/images/IMG_5584.jpg',400,600,'','http://admin2.clikpic.com/mattcurd/images/IMG_5584_thumb.jpg',130, 195,0, 0,'','','Matt Curd','Cad West',25.00,'Landscape');
photos[47] = new photo(2099075,'139845','','gallery','http://admin2.clikpic.com/mattcurd/images/Char1.jpg',400,600,'','http://admin2.clikpic.com/mattcurd/images/Char1_thumb.jpg',130, 195,1, 0,'NOT FOR SALE - FOR ILLUSTRATIVE PURPOSES ONLY.','','Matt Curd','Studio','','');
photos[48] = new photo(2099076,'139845','','gallery','http://admin2.clikpic.com/mattcurd/images/Club-B&W1.jpg',400,550,'','http://admin2.clikpic.com/mattcurd/images/Club-B&W1_thumb.jpg',130, 179,0, 1,'NOT FOR SALE - FOR ILLUSTRATIVE PURPOSES ONLY.','','Matt Curd','Studio','','');
photos[49] = new photo(2099077,'139845','','gallery','http://admin2.clikpic.com/mattcurd/images/Club-B&W2.jpg',400,550,'','http://admin2.clikpic.com/mattcurd/images/Club-B&W2_thumb.jpg',130, 179,0, 0,'NOT FOR SALE - FOR ILLUSTRATIVE PURPOSES ONLY.','','Matt Curd','Studio','','');
photos[50] = new photo(2099078,'139845','','gallery','http://admin2.clikpic.com/mattcurd/images/Club-B&W2b.jpg',500,358,'','http://admin2.clikpic.com/mattcurd/images/Club-B&W2b_thumb.jpg',130, 93,1, 0,'NOT FOR SALE - FOR ILLUSTRATIVE PURPOSES ONLY.','','Matt Curd','Studio','','');
photos[51] = new photo(2099118,'139845','','gallery','http://admin2.clikpic.com/mattcurd/images/IMG_5812.jpg',429,600,'','http://admin2.clikpic.com/mattcurd/images/IMG_5812_thumb.jpg',130, 182,0, 0,'NOT FOR SALE - FOR ILLUSTRATIVE PURPOSES ONLY.','','Matt Curd','Park','','');
photos[52] = new photo(2173614,'139615','','gallery','http://admin2.clikpic.com/mattcurd/images/IMG_6745.jpg',500,333,'','http://admin2.clikpic.com/mattcurd/images/IMG_6745_thumb.jpg',130, 87,1, 1,'','5/12/08','Matt Curd','Northampton',25.00,'');
photos[53] = new photo(2173716,'139615','','gallery','http://admin2.clikpic.com/mattcurd/images/IMG_67971.jpg',500,333,'','http://admin2.clikpic.com/mattcurd/images/IMG_67971_thumb.jpg',130, 87,0, 0,'','5/12/08','Matt Curd','Northampton',25.00,'');
photos[54] = new photo(2098961,'139615','','gallery','http://admin2.clikpic.com/mattcurd/images/0009.jpg',500,333,'','http://admin2.clikpic.com/mattcurd/images/0009_thumb.jpg',130, 87,1, 0,'','','Matt Curd','Canvey Island',25.00,'Giant Thistle');
photos[55] = new photo(2098985,'139615','','gallery','http://admin2.clikpic.com/mattcurd/images/Drake1.jpg',500,333,'','http://admin2.clikpic.com/mattcurd/images/Drake1_thumb.jpg',130, 87,1, 0,'','','Matt Curd','Park',25.00,'Drake');
photos[56] = new photo(2098987,'139615','','gallery','http://admin2.clikpic.com/mattcurd/images/Duck1.jpg',500,358,'','http://admin2.clikpic.com/mattcurd/images/Duck1_thumb.jpg',130, 93,0, 0,'','','Matt Curd','Park',25.00,'Duck');
photos[57] = new photo(2099000,'139615','','gallery','http://admin2.clikpic.com/mattcurd/images/Otter1.jpg',400,600,'','http://admin2.clikpic.com/mattcurd/images/Otter1_thumb.jpg',130, 195,0, 1,'','','Matt Curd','',25.00,'');
photos[58] = new photo(2099028,'139615','','gallery','http://admin2.clikpic.com/mattcurd/images/Swan1.jpg',500,358,'','http://admin2.clikpic.com/mattcurd/images/Swan1_thumb.jpg',130, 93,1, 0,'','','Matt Curd','Park',25.00,'Swan');
photos[59] = new photo(2099119,'139615','','gallery','http://admin2.clikpic.com/mattcurd/images/Twig1.jpg',429,600,'','http://admin2.clikpic.com/mattcurd/images/Twig1_thumb.jpg',130, 182,1, 0,'','','Matt Curd','Park',25.00,'');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
galleries = new Array();
galleries[0] = new gallery(139607,'2098998,2098976','Liquidity','gallery');
galleries[1] = new gallery(139612,'2227806','Avionics','gallery');
galleries[2] = new gallery(139616,'2099024,2099022,2099002,2098997,2098992,2098981','Creative Imagery','gallery');
galleries[3] = new gallery(139617,'2098974','Abstract','gallery');
galleries[4] = new gallery(139618,'2093540','Around Us','gallery');
galleries[5] = new gallery(139845,'2099076','People & Portraits','gallery');
galleries[6] = new gallery(139615,'2173614,2099000','Flora & Fauna','gallery');

