/***************************************************************************
* 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('425138,157433');
	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('425138,157433');
	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) || (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 + '">';
						field.value = photos[nextImg].id;
			document.getElementById('imageTitle').innerHTML = photos[nextImg].caption;
									document.title = 'Graham Would Photography: ' + 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(565323,'43572','Miss England 2006','gallery','http://www1.clikpic.com/Gray52/images/MEng06 2.jpg',400,324,'Miss England','http://www1.clikpic.com/Gray52/images/MEng06 2_thumb.jpg',130, 105,0, 0,'Official group photograph Miss England Contetsants at the Final athena Leicester','','Graham Would','Leicester','','');
photos[1] = new photo(565314,'43572','Miss England 2006','gallery','http://www1.clikpic.com/Gray52/images/MEng06.jpg',400,325,'Miss England','http://www1.clikpic.com/Gray52/images/MEng06_thumb.jpg',130, 106,0, 0,'Official Group shot of all Contestants at leicester city football Ground,','','Graham Would','Leicester','','');
photos[2] = new photo(314540,'43572','Miss England','gallery','http://www1.clikpic.com/Gray52/images/miss y018 copy.jpg',600,418,'Danielle Lloyd','http://www1.clikpic.com/Gray52/images/miss y018 copy_thumb.jpg',130, 91,0, 0,'Graham and Danielle Lloyd Miss England 2004 judging and having fun at Miss York','','Ron Disney','York Racecourse','','');
photos[3] = new photo(594440,'43572','Miss England 2004','gallery','http://www1.clikpic.com/Gray52/images/DL Lay.jpg',400,265,'Danielle Lloyd','http://www1.clikpic.com/Gray52/images/DL Lay_thumb.jpg',130, 86,0, 0,'Danielle Lloyd Miss England Lingerie shoot','','Graham Would','York','','');
photos[4] = new photo(564443,'43572','Miss England 2004','gallery','http://www1.clikpic.com/Gray52/images/Miss EnglandL2.jpg',400,603,'Dannielle Lloyd','http://www1.clikpic.com/Gray52/images/Miss EnglandL2_thumb.jpg',130, 196,0, 0,'Lingerie shot for the Miss England Competition organisers','','Graham Would','York','','');
photos[5] = new photo(208104,'43572','','gallery','http://www1.clikpic.com/Gray52/images/Miss Englandl3.jpg',400,603,'Danielle Lloyd','http://www1.clikpic.com/Gray52/images/Miss Englandl3_thumb.jpg',130, 196,0, 1,'Shoot for Miss England Lingerie Launch York 2005 with Danielle Miss England 2004/5 and Miss Great Britain 2006','','Graham Would','York','','');
photos[6] = new photo(565325,'43572','Miss Lincolnshire 2006','gallery','http://www1.clikpic.com/Gray52/images/sammie p.jpg',400,572,'Miss Lincolnshire 06','http://www1.clikpic.com/Gray52/images/sammie p_thumb.jpg',130, 186,0, 0,'Sammi miss Lincolnshire 2006 studio image','','Graham Would','Studio','','');
photos[7] = new photo(565365,'43572','Miss Lincolnshire 2006','gallery','http://www1.clikpic.com/Gray52/images/Sammi p6.JPG',400,604,'Miss Lincolnshire 06','http://www1.clikpic.com/Gray52/images/Sammi p6_thumb.JPG',130, 196,0, 0,'Portrait off Sammi our Miss Lincolnshire','','Graham Would','Studio','','');
photos[8] = new photo(565327,'43572','miss hertfordshire 2006','gallery','http://www1.clikpic.com/Gray52/images/Miss hertfordshire 2006.JPG',400,627,'Miss Hertfordshire 2006','http://www1.clikpic.com/Gray52/images/Miss hertfordshire 2006_thumb.JPG',130, 204,0, 0,'Studio image','','Graham Would','Studio','','');
photos[9] = new photo(157436,'43572','','gallery','http://www1.clikpic.com/Gray52/images/Laura 1.jpg',400,603,'Laura Miss England 2008','http://www1.clikpic.com/Gray52/images/Laura 1_thumb.jpg',130, 196,0, 0,'fashion Image of Laura Miss Leicestershire 2005 and Miss England 2008','','Graham Would','','','');
photos[10] = new photo(353959,'43572','Miss England','gallery','http://www1.clikpic.com/Gray52/images/DSC_7909.jpg',400,604,'Miss England 2006 Eleanor Glynn','http://www1.clikpic.com/Gray52/images/DSC_7909_thumb.jpg',130, 196,0, 0,'Official Miss England Photography 14th July','14/07/06','Graham Would','Athena Leicester','','');
photos[11] = new photo(594443,'43572','Miss England 2004','gallery','http://www1.clikpic.com/Gray52/images/DL sash.jpg',400,631,'Danielle Lloyd','http://www1.clikpic.com/Gray52/images/DL sash_thumb.jpg',130, 205,0, 1,'Danielle Lloyd Miss England Lingerie Shoot','','Graham Would','York','','');
photos[12] = new photo(640627,'43572','Miss Lincolnshire 2005','gallery','http://www1.clikpic.com/Gray52/images/Emilyo6.JPG',400,639,'Emily Miss Lincolnshire 2005','http://www1.clikpic.com/Gray52/images/Emilyo6_thumb.JPG',130, 208,0, 0,'Emily Okelo Miss Lincolnshire 2005','','Graham Would','Studio','','');
photos[13] = new photo(640707,'43572','Miss Lincolnshire 2005','gallery','http://www1.clikpic.com/Gray52/images/emily 04.JPG',400,604,'Emily Miss Lincolnshire 2005','http://www1.clikpic.com/Gray52/images/emily 04_thumb.JPG',130, 196,0, 0,'Emily Miss Lincolnsire 2005','','Graham Would','Studio','','');
photos[14] = new photo(646183,'43572','Miss Lincolnshire 2007','gallery','http://www1.clikpic.com/Gray52/images/Miss Lincs 077.JPG',400,604,'Miss Lincolnshire 2007','http://www1.clikpic.com/Gray52/images/Miss Lincs 077_thumb.JPG',130, 196,0, 0,'Miss Lincolnshire 2007 Kimberley Howson','','Graham Would','Studio','','');
photos[15] = new photo(646185,'43572','Miss Lincolnshire 2007','gallery','http://www1.clikpic.com/Gray52/images/Miss Lincs 073.JPG',400,594,'Miss Lincolnshire 2007','http://www1.clikpic.com/Gray52/images/Miss Lincs 073_thumb.JPG',130, 193,0, 0,'Miss Lincolnshire 2007 Kimberley Howson','','Graham Would','Studio','','');
photos[16] = new photo(607268,'43572','Miss England 2006','gallery','http://www1.clikpic.com/Gray52/images/Massa ME.JPG',400,283,'Miss England','http://www1.clikpic.com/Gray52/images/Massa ME_thumb.JPG',130, 92,0, 0,'Miss England Eleanor at Mela 06 official photography by Graham','','Graham Would','NEC','','');
photos[17] = new photo(157846,'14635','','gallery','http://www1.clikpic.com/Gray52/images/Claire louise g.JPG',400,604,'Golden Claire Louise','http://www1.clikpic.com/Gray52/images/Claire louise g_thumb.JPG',130, 196,0, 0,'Very nice Lingerie image','','Graham Would','','','');
photos[18] = new photo(314533,'14635','fashion','gallery','http://www1.clikpic.com/Gray52/images/sakeena3.jpg',600,842,'Slinky Dress Sakeena','http://www1.clikpic.com/Gray52/images/sakeena3_thumb.jpg',130, 182,0, 1,'Very Hot Dress Shot','','Graham Would','Studio','','');
photos[19] = new photo(317097,'14635','Glamour','gallery','http://www1.clikpic.com/Gray52/images/File0030.jpg',400,543,'Sakeena\'s Shorts','http://www1.clikpic.com/Gray52/images/File0030_thumb.jpg',130, 176,0, 0,'Hot Shorts and a very sexy Lady','','Graham Would','Studio','','');
photos[20] = new photo(374440,'14635','Lingerie','gallery','http://www1.clikpic.com/Gray52/images/Nic M5.jpg',400,604,'nicola\'s teasing Basque','http://www1.clikpic.com/Gray52/images/Nic M5_thumb.jpg',130, 196,0, 0,'teasing Lingerie shot in a basque of new model Nicola','','Graham Would','Studio','','');
photos[21] = new photo(564449,'14635','Lingerie','gallery','http://www1.clikpic.com/Gray52/images/kelly6.jpg',400,604,'Kelly','http://www1.clikpic.com/Gray52/images/kelly6_thumb.jpg',130, 196,0, 0,'Lingerie studio shot','','Graham Would','Studio','','');
photos[22] = new photo(2063201,'14635','Glamour portrait','gallery','http://www1.clikpic.com/Gray52/images/Katie Clements 2.JPG',400,604,'Katie C','http://www1.clikpic.com/Gray52/images/Katie Clements 2_thumb.JPG',130, 196,0, 0,'Katie looking stunning','','Graham Would','Studio','','');
photos[23] = new photo(1943260,'14635','Glitzy Shot','gallery','http://www1.clikpic.com/Gray52/images/anna marie 1.JPG',400,604,'AnnaMarie','http://www1.clikpic.com/Gray52/images/anna marie 1_thumb.JPG',130, 196,0, 0,'The Lovely AnnaMarie looking Great','','graham Would','Studio','','');
photos[24] = new photo(1943264,'14635','AnnaMarie','gallery','http://www1.clikpic.com/Gray52/images/annamarie 7.JPG',400,627,'WetWetWet','http://www1.clikpic.com/Gray52/images/annamarie 7_thumb.JPG',130, 204,0, 0,'A very wet AnnaMarie having fun','','Graham Would','Studio','','');
photos[25] = new photo(1943268,'14635','Glamour','gallery','http://www1.clikpic.com/Gray52/images/stacey 4.JPG',400,614,'Stacey','http://www1.clikpic.com/Gray52/images/stacey 4_thumb.JPG',130, 200,0, 0,'Funky Glamour Lingerie shot','','Graham Would','Studio','','');
photos[26] = new photo(1943272,'14635','Glamour','gallery','http://www1.clikpic.com/Gray52/images/Stacey 1.JPG',400,604,'Stacey','http://www1.clikpic.com/Gray52/images/Stacey 1_thumb.JPG',130, 196,0, 0,'great glitzy head Shot of a stunning girl','','Graham Would','Studio','','');
photos[27] = new photo(2532817,'14635','Lingerie shot','gallery','http://www1.clikpic.com/Gray52/images/Ella G 1.JPG',400,606,'Ela Good','http://www1.clikpic.com/Gray52/images/Ella G 1_thumb.JPG',130, 197,0, 0,'Great Lingerie Shot','','Graham Would','Studio','','');
photos[28] = new photo(157859,'14638','','gallery','http://www1.clikpic.com/Gray52/images/Kate B1.jpg',400,603,'Kates legs','http://www1.clikpic.com/Gray52/images/Kate B1_thumb.jpg',130, 196,0, 0,'Fashion pic','','Graham Would','','','');
photos[29] = new photo(210555,'14638','','gallery','http://www1.clikpic.com/Gray52/images/File0034.jpg',400,556,'Nicola','http://www1.clikpic.com/Gray52/images/File0034_thumb.jpg',130, 181,0, 0,'sepia portrait head shot','','Graham Would','studio','','');
photos[30] = new photo(314535,'14638','Lingerie Shot','gallery','http://www1.clikpic.com/Gray52/images/Nell 1.jpg',600,821,'Nell McAndrew','http://www1.clikpic.com/Gray52/images/Nell 1_thumb.jpg',130, 178,0, 0,'Lingerie shot for Coopers Textiles','','Graham Would','Studio','','');
photos[31] = new photo(315169,'14638','Hair Shot','gallery','http://www1.clikpic.com/Gray52/images/07890014.jpg',400,563,'Urban Roots','http://www1.clikpic.com/Gray52/images/07890014_thumb.jpg',130, 183,0, 0,'Creative Hair Shot','','Graham Would','Studio','','');
photos[32] = new photo(374422,'14638','Portrait','gallery','http://www1.clikpic.com/Gray52/images/Nic M 1.jpg',400,610,'Portrait of Nicola','http://www1.clikpic.com/Gray52/images/Nic M 1_thumb.jpg',130, 198,0, 0,'Soft natural Portrait of a new model','','Graham Would','Studio','','');
photos[33] = new photo(564456,'14638','portrait','gallery','http://www1.clikpic.com/Gray52/images/kelly 5.jpg',400,604,'Smile Kelly','http://www1.clikpic.com/Gray52/images/kelly 5_thumb.jpg',130, 196,0, 0,'Happy portrait with gells and studio Lighting','','Graham Would','Studio','','');
photos[34] = new photo(629668,'14638','Portrait','gallery','http://www1.clikpic.com/Gray52/images/LauraB2.JPG',400,604,'Laura','http://www1.clikpic.com/Gray52/images/LauraB2_thumb.JPG',130, 196,0, 0,'Portrait of a very pretty Girl','','Graham Would','newark','','');
photos[35] = new photo(629670,'14638','beauty','gallery','http://www1.clikpic.com/Gray52/images/sakeena1163.JPG',400,568,'Beauty','http://www1.clikpic.com/Gray52/images/sakeena1163_thumb.JPG',130, 185,0, 0,'Sakeena looking stunning','','Graham Would','newark','','');
photos[36] = new photo(157433,'14638','','gallery','http://www1.clikpic.com/Gray52/images/Laura 3.jpg',400,603,'Laura Coleman Miss England 2008','http://www1.clikpic.com/Gray52/images/Laura 3_thumb.jpg',130, 196,1, 0,'Fashion Portrait of a stunning woman','','Graham Would','','','');
photos[37] = new photo(157390,'14638','','gallery','http://www1.clikpic.com/Gray52/images/sweet pea 2.jpg',400,603,'Sweetpea','http://www1.clikpic.com/Gray52/images/sweet pea 2_thumb.jpg',130, 196,0, 1,'Portrait','','Graham Would','','','');
photos[38] = new photo(640744,'14638','Portrait','gallery','http://www1.clikpic.com/Gray52/images/shazia 1.JPG',400,604,'Shazia','http://www1.clikpic.com/Gray52/images/shazia 1_thumb.JPG',130, 196,0, 0,'Shazia a stunning asian Model','','Graham Would','Studio','','');
photos[39] = new photo(640745,'14638','Asian Model','gallery','http://www1.clikpic.com/Gray52/images/shazia3.JPG',400,568,'Shazia','http://www1.clikpic.com/Gray52/images/shazia3_thumb.JPG',130, 185,0, 0,'Stunning Asian model','','Graham Would','Studio','','');
photos[40] = new photo(1638448,'14638','Brazilian Model','gallery','http://www1.clikpic.com/Gray52/images/Roberta 1.JPG',400,604,'Roberta','http://www1.clikpic.com/Gray52/images/Roberta 1_thumb.JPG',130, 196,0, 0,'Stunning Brazilian Model','','graham Would','Studio','','');
photos[41] = new photo(1638487,'14638','Brazilian Fashion and Glamour Model','gallery','http://www1.clikpic.com/Gray52/images/Roberta 3.JPG',400,604,'Roberta','http://www1.clikpic.com/Gray52/images/Roberta 3_thumb.JPG',130, 196,0, 0,'Brazilian Model','','Graham Would','Studio','','');
photos[42] = new photo(2063194,'14638','portrait','gallery','http://www1.clikpic.com/Gray52/images/kerrie 3.JPG',400,604,'Kerrie','http://www1.clikpic.com/Gray52/images/kerrie 3_thumb.JPG',130, 196,0, 0,'sexy natural portrait of a very nice lady','','graham Would','Studio','','');
photos[43] = new photo(2532813,'14638','Portrait','gallery','http://www1.clikpic.com/Gray52/images/Alex K 1.JPG',400,542,'Alex K','http://www1.clikpic.com/Gray52/images/Alex K 1_thumb.JPG',130, 176,0, 0,'Sunny Natural Portrait','','graham Would','Garden','','');
photos[44] = new photo(257828,'14636','Wedding 3','gallery','http://www1.clikpic.com/Gray52/images/91160005.JPG',600,398,'Roger and Claire','http://www1.clikpic.com/Gray52/images/91160005_thumb.JPG',130, 86,0, 0,'Jersey wedding image Gorey','','Graham Would','Jersey','','');
photos[45] = new photo(425140,'14636','Weddings','gallery','http://www1.clikpic.com/Gray52/images/Rog Wed b.jpg',400,265,'Nice Car','http://www1.clikpic.com/Gray52/images/Rog Wed b_thumb.jpg',130, 86,0, 0,'Roger and Claire dancing away','','Graham Would','Jersey','','');
photos[46] = new photo(257823,'14636','Wedding 2','gallery','http://www1.clikpic.com/Gray52/images/91160003.JPG',600,398,'Roger and Claire','http://www1.clikpic.com/Gray52/images/91160003_thumb.JPG',130, 86,0, 0,'Wedding image Jersey 2005','','Graham Would','Jersey','','');
photos[47] = new photo(1639772,'14636','Weddings','gallery','http://www1.clikpic.com/Gray52/images/Sarah and Simon 4.jpg',400,298,'Sarah & Simon','http://www1.clikpic.com/Gray52/images/Sarah and Simon 4_thumb.jpg',130, 97,0, 0,'Wedding shot with aii the guys','','Graham Would','Allerton Castle','','');
photos[48] = new photo(425138,'14636','Wedding','gallery','http://www1.clikpic.com/Gray52/images/Rog wed C.jpg',400,603,'Kiss Me','http://www1.clikpic.com/Gray52/images/Rog wed C_thumb.jpg',130, 196,1, 1,'Jersey Potteries Wedding 2005','','Graham Would','Jersey','','');
photos[49] = new photo(564282,'14636','Wedding','gallery','http://www1.clikpic.com/Gray52/images/File0175.jpg',400,541,'Ben and Hannah','http://www1.clikpic.com/Gray52/images/File0175_thumb.jpg',130, 176,0, 0,'Wedding shot at the Victorian Gazebo, Kelham Hall','','Graham Would','Kelham Hall Newark','','');
photos[50] = new photo(564309,'14636','Wedding','gallery','http://www1.clikpic.com/Gray52/images/File0173.jpg',400,545,'Bridesmaid','http://www1.clikpic.com/Gray52/images/File0173_thumb.jpg',130, 177,0, 0,'Backlit Bridesmaid image','','Graham Would','Ye Olde Bell','','');
photos[51] = new photo(565193,'14636','Wedding','gallery','http://www1.clikpic.com/Gray52/images/File0174.jpg',400,548,'HannaH and Ben','http://www1.clikpic.com/Gray52/images/File0174_thumb.jpg',130, 178,0, 0,'Victorian Gazeebo wedding image','','Graham Would','Kelham Hall Newark','','');
photos[52] = new photo(206087,'14636','','gallery','http://www1.clikpic.com/Gray52/images/Wed HPH1.jpg',400,265,'Simon and Sally','http://www1.clikpic.com/Gray52/images/Wed HPH1_thumb.jpg',130, 86,0, 0,'reportage wedding also used as main magazine feature in your perfect day','','Graham Would','Holme Pierepoint Hall','','');
photos[53] = new photo(315332,'14636','Wedding','gallery','http://www1.clikpic.com/Gray52/images/simon sally wed.jpg',400,265,'Simon and Sally','http://www1.clikpic.com/Gray52/images/simon sally wed_thumb.jpg',130, 86,0, 0,'Reportage Wedding and Magazine feature','','Graham Would','Holmepierpoint Hall','','');
photos[54] = new photo(314541,'14636','Wedding','gallery','http://www1.clikpic.com/Gray52/images/Wed HPH2.jpg',600,398,'Simon and Sally','http://www1.clikpic.com/Gray52/images/Wed HPH2_thumb.jpg',130, 86,0, 0,'HolmePierpoint Hall ottingham reportage wedding photography and magazine feature','','Graham Would','Holmepierpoint Hall','','');
photos[55] = new photo(1661128,'14636','Wedding','gallery','http://www1.clikpic.com/Gray52/images/Simon & Sally 3.jpg',400,264,'Simon & Sally','http://www1.clikpic.com/Gray52/images/Simon & Sally 3_thumb.jpg',130, 86,0, 0,'HolmePierpoint Hall informal familly group shot','','Graham Would','Holmepierpoint Hall Nottingham','','');
photos[56] = new photo(637183,'14636','Weddings','gallery','http://www1.clikpic.com/Gray52/images/Angela & Chris 1.jpg',400,587,'Angela & Chris','http://www1.clikpic.com/Gray52/images/Angela & Chris 1_thumb.jpg',130, 191,0, 0,'romantic wedding pic in the grounds  of a stately home','','Graham Would','Dunchurch Park','','');
photos[57] = new photo(637186,'14636','Wedding','gallery','http://www1.clikpic.com/Gray52/images/Angela & Chris 2.jpg',400,594,'Angela & Chris','http://www1.clikpic.com/Gray52/images/Angela & Chris 2_thumb.jpg',130, 193,0, 0,'Sunset wedding image overlooking a lake','','Graham Would','Dunchurch Sailing Club','','');
photos[58] = new photo(653192,'14636','Wedding Lincoln','gallery','http://www1.clikpic.com/Gray52/images/Edd & Kirsty 1.jpg',400,533,'Edd & Kirsty','http://www1.clikpic.com/Gray52/images/Edd & Kirsty 1_thumb.jpg',130, 173,0, 0,'Wedding image taken at Lincoln Cathedral','','Graham Would','Lincoln Cathedral','','');
photos[59] = new photo(653193,'14636','Wedding Nettleham Church','gallery','http://www1.clikpic.com/Gray52/images/Edd & Kirsty 2.jpg',400,525,'Edd & Kirsty','http://www1.clikpic.com/Gray52/images/Edd & Kirsty 2_thumb.jpg',130, 171,0, 0,'Wedding image at the picturesque village of Nettleham, Lincolnshire','','Graham Would','Nettleham','','');
photos[60] = new photo(660853,'14636','Wedding','gallery','http://www1.clikpic.com/Gray52/images/David & Sarah 1.jpg',400,570,'David & Sarah','http://www1.clikpic.com/Gray52/images/David & Sarah 1_thumb.jpg',130, 185,0, 0,'Black and white reportage wedding  Roche Abbey','','Graham Would','Roche Abbey','','');
photos[61] = new photo(704008,'14636','Weddings','gallery','http://www1.clikpic.com/Gray52/images/Amanda & Thomas 1.jpg',400,560,'Amanda & Tom','http://www1.clikpic.com/Gray52/images/Amanda & Thomas 1_thumb.jpg',130, 182,0, 0,'Reportage wedding image','','Graham Would','West Retford Hotel','','');
photos[62] = new photo(704010,'14636','Weddings','gallery','http://www1.clikpic.com/Gray52/images/Amanda & Thomas 2.jpg',400,553,'Amanda & Tom','http://www1.clikpic.com/Gray52/images/Amanda & Thomas 2_thumb.jpg',130, 180,0, 0,'reportage Wedding Image','','Graham Would','West Retford Hotel','','');
photos[63] = new photo(704016,'14636','Weddings','gallery','http://www1.clikpic.com/Gray52/images/Amanda & Thomas 3.jpg',400,542,'Amanda & Tom','http://www1.clikpic.com/Gray52/images/Amanda & Thomas 3_thumb.jpg',130, 176,0, 0,'Reportage Wedding Portrait','','Graham Would','West Retford Hotel','','');
photos[64] = new photo(1472356,'14636','Wedding','gallery','http://www1.clikpic.com/Gray52/images/69950017.jpg',400,265,'Mel and Ian','http://www1.clikpic.com/Gray52/images/69950017_thumb.jpg',130, 86,0, 0,'Wedding Shot','','Graham Would','Priests House Castle Donnington','','');
photos[65] = new photo(1472360,'14636','Wedding','gallery','http://www1.clikpic.com/Gray52/images/69950028.jpg',400,260,'Mel and Ian 2','http://www1.clikpic.com/Gray52/images/69950028_thumb.jpg',130, 85,0, 0,'Mill Bridge black and white shot','','Graham Would','Priests House Castle Donnington','','');
photos[66] = new photo(564315,'14636','Wedding','gallery','http://www1.clikpic.com/Gray52/images/File0172.jpg',400,304,'Bridesmaids','http://www1.clikpic.com/Gray52/images/File0172_thumb.jpg',130, 99,0, 0,'Lets stick together','','Graham Would','Ordsall Retford','','');
photos[67] = new photo(660854,'14636','Wedding','gallery','http://www1.clikpic.com/Gray52/images/David & Sarah 2.jpg',400,319,'David & Sarah','http://www1.clikpic.com/Gray52/images/David & Sarah 2_thumb.jpg',130, 104,0, 0,'reportage wedding Photography at Roche Abbey','','Graham Would','Roche Abbey','','');
photos[68] = new photo(2068321,'14636','Wedding','gallery','http://www1.clikpic.com/Gray52/images/Rachel 21.jpg',400,622,'Rachel','http://www1.clikpic.com/Gray52/images/Rachel 21_thumb.jpg',130, 202,0, 0,'Romantic window shot','','Graham Would ','Castle Donnington','','');
photos[69] = new photo(1639321,'14636','Castle Donnington Wedding','gallery','http://www1.clikpic.com/Gray52/images/Danial and Rachel 1.jpg',400,603,'Danial & Rachel','http://www1.clikpic.com/Gray52/images/Danial and Rachel 1_thumb.jpg',130, 196,0, 0,'Wedding image at Castle Donnington Race circuit','','Graham Would','Castle Donnington','','');
photos[70] = new photo(1639817,'14636','Wedding','gallery','http://www1.clikpic.com/Gray52/images/Sarah and Simon 2.jpg',400,578,'Sarah & Simon','http://www1.clikpic.com/Gray52/images/Sarah and Simon 2_thumb.jpg',130, 188,0, 0,'Wedding Image at St Johns Knaresborough','','Graham Would','Knaresborough','','');
photos[71] = new photo(1639823,'14636','Wedding','gallery','http://www1.clikpic.com/Gray52/images/Sarah and Simon 3.jpg',400,523,'Sarah & Simon','http://www1.clikpic.com/Gray52/images/Sarah and Simon 3_thumb.jpg',130, 170,0, 0,'Grand Drawing Room Allerton Castle','','Graham Would','Allerton Castle Yorkshire','','');
photos[72] = new photo(564291,'14636','Wedding','gallery','http://www1.clikpic.com/Gray52/images/File0171.jpg',400,297,'Kay and James','http://www1.clikpic.com/Gray52/images/File0171_thumb.jpg',130, 97,0, 0,'Picking up the bride with style','','Graham Would','Belton Woods','','');
photos[73] = new photo(1661135,'14636','Wedding','gallery','http://www1.clikpic.com/Gray52/images/Chris & Angela 1.jpg',400,265,'Chris & Angela','http://www1.clikpic.com/Gray52/images/Chris & Angela 1_thumb.jpg',130, 86,0, 0,'Angela and her Bridesmaids','','Graham Would','Leicestershire','','');
photos[74] = new photo(1661145,'14636','wedding','gallery','http://www1.clikpic.com/Gray52/images/Chris & Angela 2.jpg',400,265,'Chris & Angela','http://www1.clikpic.com/Gray52/images/Chris & Angela 2_thumb.jpg',130, 86,0, 0,'The whole wedding Party on the garden steps with the wonderfull house','','Graham Would','Dunchurch Park Leicestershire','','');
photos[75] = new photo(1665860,'14636','Weddings','gallery','http://www1.clikpic.com/Gray52/images/Anna & Andy.jpg',400,549,'Anna & Andy','http://www1.clikpic.com/Gray52/images/Anna & Andy_thumb.jpg',130, 178,0, 0,'Wedding at Doncaster Rugby Club','','Graham Would','Doncaster Rugby Club','','');
photos[76] = new photo(157833,'14633','','gallery','http://www1.clikpic.com/Gray52/images/sakeena2.jpg',400,582,'Sakeena\'s Hat','http://www1.clikpic.com/Gray52/images/sakeena2_thumb.jpg',130, 189,0, 0,'Nice art Nude image','','Graham Would','','','');
photos[77] = new photo(210547,'14633','','gallery','http://www1.clikpic.com/Gray52/images/File00891.jpg',400,510,'Sepia woods','http://www1.clikpic.com/Gray52/images/File00891_thumb.jpg',130, 166,0, 1,'Landscape Art Nude sepia image','','Graham Would','Yorkshire','','');
photos[78] = new photo(157870,'14633','','gallery','http://www1.clikpic.com/Gray52/images/sweet pea 1.jpg',400,500,'Blue Ice','http://www1.clikpic.com/Gray52/images/sweet pea 1_thumb.jpg',130, 163,0, 0,'Creative artistic nude shot','','Graham Would','','','');
photos[79] = new photo(314532,'14633','Body painting','gallery','http://www1.clikpic.com/Gray52/images/File0033.jpg',600,833,'Jules','http://www1.clikpic.com/Gray52/images/File0033_thumb.jpg',130, 180,0, 0,'Body Painting shoot for Granada Television','','Graham Would','Studio','','');
photos[80] = new photo(314530,'14633','Art Nude','gallery','http://www1.clikpic.com/Gray52/images/File0048.jpg',600,412,'Sakeena','http://www1.clikpic.com/Gray52/images/File0048_thumb.jpg',130, 89,0, 0,'Sakeena wrapped in satin','','Graham Would','Studio','','');
photos[81] = new photo(631659,'14637','Lancaster','gallery','http://www1.clikpic.com/Gray52/images/Lanc cu.JPG',400,260,'Just Jane2','http://www1.clikpic.com/Gray52/images/Lanc cu_thumb.JPG',130, 85,0, 0,'Just Jane Lancaster at East Kirkby Lincolnshire, with Thanks to the Panton Brothers','','Graham Would','East Kirkby','','');
photos[82] = new photo(214723,'14637','','gallery','http://www1.clikpic.com/Gray52/images/Punches.jpg',400,300,'Punch Product Shot','http://www1.clikpic.com/Gray52/images/Punches_thumb.jpg',130, 98,0, 0,'Brochure Photography for Piece-All','','Graham Would','studio','','');
photos[83] = new photo(317087,'14637','Conference','gallery','http://www1.clikpic.com/Gray52/images/rmc.jpg',400,250,'RMC Corporate Conference','http://www1.clikpic.com/Gray52/images/rmc_thumb.jpg',130, 81,0, 0,'Corporate conference production, staging and multi=screen moodsetters','','Graham Would','Torquay','','');
photos[84] = new photo(585494,'14637','Just Jane','gallery','http://www1.clikpic.com/Gray52/images/Just Jane1.JPG',400,265,'Just Jane','http://www1.clikpic.com/Gray52/images/Just Jane1_thumb.JPG',130, 86,0, 0,'Just Jane Lancaster at East Kirkby, with Thanks to the Panton Brothers','','Graham Would','East Kirkby','','');
photos[85] = new photo(208094,'14637','','gallery','http://www1.clikpic.com/Gray52/images/File0051.jpg',400,592,'Keith Duffy and Kya PR shot','http://www1.clikpic.com/Gray52/images/File0051_thumb.jpg',130, 192,0, 0,'Miss Great Britain Official Photographer Celebrity PR shot','','Graham Would','London','','');
photos[86] = new photo(214720,'14637','','gallery','http://www1.clikpic.com/Gray52/images/File0163.jpg',400,534,'Product Shot','http://www1.clikpic.com/Gray52/images/File0163_thumb.jpg',130, 174,0, 0,'Nivea Visage product Launch A/V photography','','Graham Would','Studio London','','');
photos[87] = new photo(631633,'14637','P.R. Photography','gallery','http://www1.clikpic.com/Gray52/images/brake748.JPG',400,538,'Brake 2006','http://www1.clikpic.com/Gray52/images/brake748_thumb.JPG',130, 175,0, 1,'National Brake campaign Launch Nottingham','','Graham Would','Nottingham','','');
photos[88] = new photo(312637,'14637','Lesley Garrett','gallery','http://www1.clikpic.com/Gray52/images/DSC_4827.jpg',600,992,'Lesley Garrett in Concert','http://www1.clikpic.com/Gray52/images/DSC_4827_thumb.jpg',130, 215,0, 0,'CP Sports Charity Event','','Graham Would','Colwick Hall','','');
photos[89] = new photo(346634,'14637','Fashion','gallery','http://www1.clikpic.com/Gray52/images/Reg add.jpg',400,530,'Fashion Add','http://www1.clikpic.com/Gray52/images/Reg add_thumb.jpg',130, 172,0, 0,'Editorial advertisement','','Graham Would','Studio','','');
photos[90] = new photo(214729,'14637','','gallery','http://www1.clikpic.com/Gray52/images/tear Sheet.jpg',400,552,'Industrial Cover Shot','http://www1.clikpic.com/Gray52/images/tear Sheet_thumb.jpg',130, 179,0, 0,'One of Many industrial cover shots and feature work. Client Pierce-all and Avebury Circle','','Graham Would','Factory','','');
photos[91] = new photo(786635,'14637','England Cricket','gallery','http://www1.clikpic.com/Gray52/images/Paul nixon 1.jpg',400,537,'Englands Paul Nixon','http://www1.clikpic.com/Gray52/images/Paul nixon 1_thumb.jpg',130, 175,0, 0,'Englands Paul Nixon with the commonwealth 1 day international trophy 2007','','Graham Would for K T Photography','Walkers Stadium Leicester','','');
photos[92] = new photo(786665,'14637','England Cricket','gallery','http://www1.clikpic.com/Gray52/images/Paul & Monty.jpg',400,523,'Englands Paul and Monty','http://www1.clikpic.com/Gray52/images/Paul & Monty_thumb.jpg',130, 170,0, 0,'Pual with Monty and The 1 Day International commonwealth Trophy at the Paul Nixon Benefit evening Leicester 2007','','Graham Would for K T Photography','Walkers Stadium Leicester','','');
photos[93] = new photo(1651714,'14637','Product Shot','gallery','http://www1.clikpic.com/Gray52/images/smoothies.JPG',400,256,'Smoothies','http://www1.clikpic.com/Gray52/images/smoothies_thumb.JPG',130, 83,0, 0,'Smoothies product Shot','','graham Would','Newark','','');
photos[94] = new photo(1651717,'14637','PR Shot','gallery','http://www1.clikpic.com/Gray52/images/Bovis 1.JPG',400,265,'Bovis Homes','http://www1.clikpic.com/Gray52/images/Bovis 1_thumb.JPG',130, 86,0, 0,'Interior shot new home for Bovis Homes','','Graham Would','Newark','','');
photos[95] = new photo(2068293,'14637','commercial','gallery','http://www1.clikpic.com/Gray52/images/Richmond.JPG',400,265,'Richmond Plant Hire','http://www1.clikpic.com/Gray52/images/Richmond_thumb.JPG',130, 86,0, 0,'Brochure image','','Graham Would','Long Bennington','','');
photos[96] = new photo(1472374,'110940','Portrait','gallery','http://www1.clikpic.com/Gray52/images/DSC_0606.JPG',400,585,'Charlene','http://www1.clikpic.com/Gray52/images/DSC_0606_thumb.JPG',130, 190,0, 0,'Charlene and her Birthing partner Helen','','Graham Would','Studio','','');
photos[97] = new photo(1472370,'110940','Portrait','gallery','http://www1.clikpic.com/Gray52/images/DSC_0550.JPG',400,626,'Charlene','http://www1.clikpic.com/Gray52/images/DSC_0550_thumb.JPG',130, 203,0, 1,'Charlene and her Birthing Partner','','Graham Would','Studio','','');
photos[98] = new photo(3065874,'110940','Portrait','gallery','http://admin.clikpic.com/Gray52/images/Amanda & Chris.JPG',400,265,'engagement Portrait','http://admin.clikpic.com/Gray52/images/Amanda & Chris_thumb.JPG',130, 86,0, 0,'Amanda & Chris\'s portrait for a canvas print in sepia','','graham Would','studio','','');
photos[99] = new photo(2864523,'178148','Album','gallery','http://www1.clikpic.com/Gray52/images/DSC_9081.jpg',400,265,'Graphis Storybook','http://www1.clikpic.com/Gray52/images/DSC_9081_thumb.jpg',129, 86,0, 1,'High Quality italian storybook','','Sample album','Studio','','');
photos[100] = new photo(2864524,'178148','Wedding Album','gallery','http://www1.clikpic.com/Gray52/images/DSC_9076.jpg',400,265,'Graphis Storybook','http://www1.clikpic.com/Gray52/images/DSC_9076_thumb.jpg',129, 86,0, 0,'Italian Storybook Album','','Graphis Sample','Studio','','');
photos[101] = new photo(2864525,'178148','wedding album','gallery','http://www1.clikpic.com/Gray52/images/DSC_9061.jpg',400,265,'Steel Album','http://www1.clikpic.com/Gray52/images/DSC_9061_thumb.jpg',129, 86,0, 0,'Steel reportage and steel minor albums with individual initials','','Graham Would','studio','','');
photos[102] = new photo(2864531,'178148','Steel albums','gallery','http://www1.clikpic.com/Gray52/images/DSC_9065.jpg',400,265,'Steel album','http://www1.clikpic.com/Gray52/images/DSC_9065_thumb.jpg',129, 86,0, 0,'Steel reportage and minor albums','','Graham Would','studio','','');
photos[103] = new photo(2864542,'178148','wedding album','gallery','http://www1.clikpic.com/Gray52/images/DSC_9053.jpg',400,265,'reportage','http://www1.clikpic.com/Gray52/images/DSC_9053_thumb.jpg',129, 86,0, 0,'Champagne satin reportage album','','Graham Would','sheffield','','');
photos[104] = new photo(2866139,'178148','wedding album','gallery','http://www1.clikpic.com/Gray52/images/DSC_9077.jpg',400,265,'Graphis','http://www1.clikpic.com/Gray52/images/DSC_9077_thumb.jpg',129, 86,0, 0,'Graphis storybook reportage album','','Graphis sample','','','');
photos[105] = new photo(2866152,'178148','wedding album','gallery','http://www1.clikpic.com/Gray52/images/DSC_9073.jpg',400,265,'Reportage BL','http://www1.clikpic.com/Gray52/images/DSC_9073_thumb.jpg',129, 86,0, 0,'Black italian leather album from Milan with laid card pages and inserts','','Graham Would','','','');
photos[106] = new photo(2866178,'178148','wedding album','gallery','http://www1.clikpic.com/Gray52/images/DSC_9083.jpg',399,275,'Tuscany','http://www1.clikpic.com/Gray52/images/DSC_9083_thumb.jpg',130, 89,0, 0,'Italian leather 8x6 album for weddings, Parents and also ideal for Christenings','','Graham Would','','','');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
galleries = new Array();
galleries[0] = new gallery(43572,'594443,208104','Miss England & Miss Lincolnshire','gallery');
galleries[1] = new gallery(14635,'314533','Glitz and Glamour','gallery');
galleries[2] = new gallery(14638,'157390','Fashion and Portrait','gallery');
galleries[3] = new gallery(14636,'425138','Weddings','gallery');
galleries[4] = new gallery(14633,'210547','Artistic','gallery');
galleries[5] = new gallery(14637,'631633','PR and Commercial','gallery');
galleries[6] = new gallery(110940,'1472370','Lifestyle','gallery');
galleries[7] = new gallery(178148,'2864523','Wedding Albums ','gallery');


