/***************************************************************************
* 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('3337215,3337214,3337212,3337210,992963,992961,992960,992959,992956,992952,992942,992935,992933,992930,992924,992918,992916,975168,975166,975164,975162,975071,975069,975067,975064,975055,975044,973804,973803,973802,973800,971915,971914,971910,971861,971833,971732,971725,971651,971646,971642,971638,971628,971622,971610,971350');
	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('3337215,3337214,3337212,3337210,992963,992961,992960,992959,992956,992952,992942,992935,992933,992930,992924,992918,992916,975168,975166,975164,975162,975071,975069,975067,975064,975055,975044,973804,973803,973802,973800,971915,971914,971910,971861,971833,971732,971725,971651,971646,971642,971638,971628,971622,971610,971350');
	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 = 'Aerial Photographer Manchester Liverpool: ' + 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(974400,'','','','http://www1.clikpic.com/lightboxaerial/images/lakefromair.jpg',240,240,'Lake District From The Air by Simon Kirwan, published by Myriad Books','http://www1.clikpic.com/lightboxaerial/images/lakefromair_thumb.jpg',130, 130,0, 0,'Lake District From The Air, published by Myriad Books','','Simon Kirwan','Lake District, Cumbria','','');
photos[1] = new photo(3337210,'','','','http://www1.clikpic.com/lightboxaerial/images/_LBP2484.jpg',500,333,'MV Riverdance on Cleveleys beach, near Blackpool','http://www1.clikpic.com/lightboxaerial/images/_LBP2484_thumb.jpg',130, 87,1, 0,'MV Riverdance on Cleveleys beach, near Blackpool','','Simon Kirwan','Blackpool','','');
photos[2] = new photo(971342,'73032','','gallery','http://www1.clikpic.com/lightboxaerial/images/_LBP7331.jpg',500,332,'GMEX Arena, Manchester','http://www1.clikpic.com/lightboxaerial/images/_LBP7331_thumb.jpg',130, 86,0, 0,'','','Simon Kirwan','','','');
photos[3] = new photo(971350,'73032','','gallery','http://www1.clikpic.com/lightboxaerial/images/_LBP7335.jpg',500,332,'Central Library, Manchester','http://www1.clikpic.com/lightboxaerial/images/_LBP7335_thumb.jpg',130, 86,1, 0,'','','Simon Kirwan','Manchester','','');
photos[4] = new photo(971580,'73032','','gallery','http://www1.clikpic.com/lightboxaerial/images/_LBP7337.jpg',500,332,'Urbis Museum & MEN Arena','http://www1.clikpic.com/lightboxaerial/images/_LBP7337_thumb.jpg',130, 86,0, 0,'','','Simon Kirwan','Manchester','','');
photos[5] = new photo(971582,'73032','','gallery','http://www1.clikpic.com/lightboxaerial/images/_LBP7340.jpg',500,332,'Manchester City Centre','http://www1.clikpic.com/lightboxaerial/images/_LBP7340_thumb.jpg',130, 86,0, 0,'','','Simon Kirwan','Manchester','','');
photos[6] = new photo(992959,'73032','','gallery','http://www1.clikpic.com/lightboxaerial/images/_LBP7343.jpg',500,332,'Manchester City Centre','http://www1.clikpic.com/lightboxaerial/images/_LBP7343_thumb.jpg',130, 86,1, 0,'','','Simon Kirwan','Manchester','','');
photos[7] = new photo(992960,'73032','','gallery','http://www1.clikpic.com/lightboxaerial/images/_LBP7349.jpg',500,332,'Manchester City Centre','http://www1.clikpic.com/lightboxaerial/images/_LBP7349_thumb.jpg',130, 86,1, 0,'','','Simon Kirwan','Manchester','','');
photos[8] = new photo(992961,'73032','','gallery','http://www1.clikpic.com/lightboxaerial/images/_LBP7358.jpg',500,332,'Manchester City Centre','http://www1.clikpic.com/lightboxaerial/images/_LBP7358_thumb.jpg',130, 86,1, 0,'','','Simon Kirwan','Manchester','','');
photos[9] = new photo(992963,'73032','','gallery','http://www1.clikpic.com/lightboxaerial/images/_LBP7363.jpg',500,332,'Manchester City Centre','http://www1.clikpic.com/lightboxaerial/images/_LBP7363_thumb.jpg',130, 86,1, 0,'','','Simon Kirwan','Manchester','','');
photos[10] = new photo(971610,'73045','','gallery','http://www1.clikpic.com/lightboxaerial/images/_LBP6211.jpg',500,332,'Liver Building, Cunard Building, Port of Liverpool Building - The Three Graces','http://www1.clikpic.com/lightboxaerial/images/_LBP6211_thumb.jpg',130, 86,1, 0,'','','Simon Kirwan','Liverpool','','');
photos[11] = new photo(971613,'73045','','gallery','http://www1.clikpic.com/lightboxaerial/images/_LBP6204.jpg',500,332,'Metropolitan Cathedral of Christ the King, Liverpool','http://www1.clikpic.com/lightboxaerial/images/_LBP6204_thumb.jpg',130, 86,0, 0,'','','Simon Kirwan','Liverpool','','');
photos[12] = new photo(971617,'73045','','gallery','http://www1.clikpic.com/lightboxaerial/images/_LBP6206.jpg',500,332,'Lime Street Station, Liverpool','http://www1.clikpic.com/lightboxaerial/images/_LBP6206_thumb.jpg',130, 86,0, 0,'','','Simon Kirwan','Liverpool','','');
photos[13] = new photo(971619,'73045','','gallery','http://www1.clikpic.com/lightboxaerial/images/_LBP6215.jpg',500,332,'Albert Dock, Liverpool','http://www1.clikpic.com/lightboxaerial/images/_LBP6215_thumb.jpg',130, 86,0, 0,'','','Simon Kirwan','Liverpool','','');
photos[14] = new photo(975069,'73045','','gallery','http://www1.clikpic.com/lightboxaerial/images/_LBP6223.jpg',500,332,'Liverpool city centre & waterfront','http://www1.clikpic.com/lightboxaerial/images/_LBP6223_thumb.jpg',130, 86,1, 0,'','','Simon Kirwan','Liverpool','','');
photos[15] = new photo(975071,'73045','','gallery','http://www1.clikpic.com/lightboxaerial/images/_LBP6225.jpg',500,332,'King\'s Dock development, Liverpool','http://www1.clikpic.com/lightboxaerial/images/_LBP6225_thumb.jpg',130, 86,1, 0,'','','Merseyside','Liverpool','','');
photos[16] = new photo(992952,'73045','','gallery','http://www1.clikpic.com/lightboxaerial/images/_LBP6235.jpg',500,332,'Liverpool waterfront & city centre','http://www1.clikpic.com/lightboxaerial/images/_LBP6235_thumb.jpg',130, 86,1, 0,'','','Simon Kirwan','Liverpool','','');
photos[17] = new photo(992956,'73045','','gallery','http://www1.clikpic.com/lightboxaerial/images/_LBP6229.jpg',500,332,'Liver Building, Cunard Building, Port of Liverpool Building','http://www1.clikpic.com/lightboxaerial/images/_LBP6229_thumb.jpg',130, 86,1, 0,'','','Simon Kirwan','Liverpool','','');
photos[18] = new photo(3337214,'73045','','gallery','http://www1.clikpic.com/lightboxaerial/images/_SK26199.jpg',500,333,'Liverpool ONE Retail Development','http://www1.clikpic.com/lightboxaerial/images/_SK26199_thumb.jpg',130, 87,1, 0,'Liverpool ONE Retail Development','','Simon Kirwan','','','');
photos[19] = new photo(3337215,'73045','','gallery','http://www1.clikpic.com/lightboxaerial/images/_SK26206.jpg',500,333,'Liverpool ONE Retail Development','http://www1.clikpic.com/lightboxaerial/images/_SK26206_thumb.jpg',130, 87,1, 0,'Liverpool ONE Retail Development','','Simon Kirwan','Liverpool','','');
photos[20] = new photo(3337216,'73045','','gallery','http://www1.clikpic.com/lightboxaerial/images/_SK35695.jpg',500,333,'Liverpool, showing Echo Arena and BT Convention Centre, Albert Dock and Liverpool ONE','http://www1.clikpic.com/lightboxaerial/images/_SK35695_thumb.jpg',130, 87,0, 0,'Liverpool, showing Echo Arena and BT Convention Centre, Albert Dock and Liverpool ONE','','Simon Kirwan','','','');
photos[21] = new photo(971622,'73046','','gallery','http://www1.clikpic.com/lightboxaerial/images/ambleside2374.jpg',500,332,'Ambleside and Lake Windermere','http://www1.clikpic.com/lightboxaerial/images/ambleside2374_thumb.jpg',130, 86,1, 0,'','','Simon Kirwan','Lake District, Cumbria','','');
photos[22] = new photo(971628,'73046','','gallery','http://www1.clikpic.com/lightboxaerial/images/keswick2400.jpg',500,332,'Keswick & Derwent Water','http://www1.clikpic.com/lightboxaerial/images/keswick2400_thumb.jpg',130, 86,1, 0,'','','Simon Kirwan','Lake District, Cumbria','','');
photos[23] = new photo(971634,'73046','','gallery','http://www1.clikpic.com/lightboxaerial/images/skiddaw2391.jpg',500,332,'Skiddaw','http://www1.clikpic.com/lightboxaerial/images/skiddaw2391_thumb.jpg',130, 86,0, 0,'','','Simon Kirwan','Lake District, Cumbria','','');
photos[24] = new photo(971638,'73046','','gallery','http://www1.clikpic.com/lightboxaerial/images/conistonoldman2442.jpg',500,332,'Coniston Old Man','http://www1.clikpic.com/lightboxaerial/images/conistonoldman2442_thumb.jpg',130, 86,1, 0,'','','Simon Kirwan','Lake District, Cumbria','','');
photos[25] = new photo(992930,'73046','','gallery','http://www1.clikpic.com/lightboxaerial/images/angletarn5401.jpg',500,332,'Angle Tarn, Cumbria','http://www1.clikpic.com/lightboxaerial/images/angletarn5401_thumb.jpg',130, 86,1, 0,'','','Simon Kirwan','Lake District','','');
photos[26] = new photo(992933,'73046','','gallery','http://www1.clikpic.com/lightboxaerial/images/belleisle5444.jpg',500,332,'Belle Isle, Lake Windermere','http://www1.clikpic.com/lightboxaerial/images/belleisle5444_thumb.jpg',130, 86,1, 0,'','','Simon Kirwan','Lake District','','');
photos[27] = new photo(992935,'73046','','gallery','http://www1.clikpic.com/lightboxaerial/images/crummock5509.jpg',500,332,'Crummock Water, Buttermere','http://www1.clikpic.com/lightboxaerial/images/crummock5509_thumb.jpg',130, 86,1, 0,'','','Simon Kirwan','Lake District','','');
photos[28] = new photo(992942,'73046','','gallery','http://www1.clikpic.com/lightboxaerial/images/scafellpike2408.jpg',500,332,'Sca Fell Pike, Wasdale','http://www1.clikpic.com/lightboxaerial/images/scafellpike2408_thumb.jpg',130, 86,1, 0,'','','Simon Kirwan','Lake District','','');
photos[29] = new photo(971642,'73047','','gallery','http://www1.clikpic.com/lightboxaerial/images/aranfawddwy0107.jpg',500,332,'Aran Fawddwy','http://www1.clikpic.com/lightboxaerial/images/aranfawddwy0107_thumb.jpg',130, 86,1, 0,'','','Simon Kirwan','Wales','','');
photos[30] = new photo(971646,'73047','','gallery','http://www1.clikpic.com/lightboxaerial/images/bardsey6296.jpg',500,332,'Bardsey Island','http://www1.clikpic.com/lightboxaerial/images/bardsey6296_thumb.jpg',130, 86,1, 0,'','','Simon Kirwan','Wales','','');
photos[31] = new photo(971651,'73047','','gallery','http://www1.clikpic.com/lightboxaerial/images/snowdon6339.jpg',500,332,'Mount Snowdon','http://www1.clikpic.com/lightboxaerial/images/snowdon6339_thumb.jpg',130, 86,1, 0,'','','Simon Kirwan','Wales','','');
photos[32] = new photo(971659,'73047','','gallery','http://www1.clikpic.com/lightboxaerial/images/mawdach0139.jpg',500,332,'Afon Mawdach Estuary','http://www1.clikpic.com/lightboxaerial/images/mawdach0139_thumb.jpg',130, 86,0, 0,'','','Simon Kirwan','Wales','','');
photos[33] = new photo(973800,'73047','','gallery','http://www1.clikpic.com/lightboxaerial/images/_LBP6943.jpg',500,302,'Mawdach Estuary','http://www1.clikpic.com/lightboxaerial/images/_LBP6943_thumb.jpg',130, 79,1, 0,'','','Simon Kirwan','Wales','','');
photos[34] = new photo(973802,'73047','','gallery','http://www1.clikpic.com/lightboxaerial/images/_LBP6788.jpg',500,302,'Cardiff Docklands Development','http://www1.clikpic.com/lightboxaerial/images/_LBP6788_thumb.jpg',130, 79,1, 0,'','','Simon Kirwan','Wales','','');
photos[35] = new photo(973803,'73047','','gallery','http://www1.clikpic.com/lightboxaerial/images/picture-50.jpg',500,332,'Mawdach Estuary','http://www1.clikpic.com/lightboxaerial/images/picture-50_thumb.jpg',130, 86,1, 0,'','','Simon Kirwan','Wales','','');
photos[36] = new photo(973804,'73047','','gallery','http://www1.clikpic.com/lightboxaerial/images/menai6275.jpg',500,332,'Menai Bridge, Anglesey','http://www1.clikpic.com/lightboxaerial/images/menai6275_thumb.jpg',130, 86,1, 0,'','','Simon Kirwan','Wales','','');
photos[37] = new photo(975064,'73047','','gallery','http://www1.clikpic.com/lightboxaerial/images/whitefordpoint6635.jpg',500,332,'Whiteford Point, Pembrokeshire','http://www1.clikpic.com/lightboxaerial/images/whitefordpoint6635_thumb.jpg',130, 86,1, 0,'','','Simon Kirwan','Wales','','');
photos[38] = new photo(975162,'73047','','gallery','http://www1.clikpic.com/lightboxaerial/images/mumbles6609.jpg',500,332,'Mumbles Head, Wales','http://www1.clikpic.com/lightboxaerial/images/mumbles6609_thumb.jpg',130, 86,1, 0,'','','Simon Kirwan','Wales','','');
photos[39] = new photo(975164,'73047','','gallery','http://www1.clikpic.com/lightboxaerial/images/porthiago6294.jpg',500,332,'Porth Iago, Lleyn Peninsula, North Wales','http://www1.clikpic.com/lightboxaerial/images/porthiago6294_thumb.jpg',130, 86,1, 0,'','','Simon Kirwan','Wales','','');
photos[40] = new photo(975166,'73047','','gallery','http://www1.clikpic.com/lightboxaerial/images/skokholm6701.jpg',500,332,'Skokholm Island, Pembroke, Wales','http://www1.clikpic.com/lightboxaerial/images/skokholm6701_thumb.jpg',130, 86,1, 0,'','','Simon Kirwan','Wales','','');
photos[41] = new photo(975168,'73047','','gallery','http://www1.clikpic.com/lightboxaerial/images/yreifl6287.jpg',500,332,'Yr Eifl, Lleyn Peninsula, Wales','http://www1.clikpic.com/lightboxaerial/images/yreifl6287_thumb.jpg',130, 86,1, 0,'','','Simon Kirwan','Wales','','');
photos[42] = new photo(992916,'73047','','gallery','http://www1.clikpic.com/lightboxaerial/images/arenigfawr0093.jpg',500,332,'Arenig Fawr, Snowdonia','http://www1.clikpic.com/lightboxaerial/images/arenigfawr0093_thumb.jpg',130, 86,1, 0,'','','Simon Kirwan','Wales','','');
photos[43] = new photo(992918,'73047','','gallery','http://www1.clikpic.com/lightboxaerial/images/cadairidris6327.jpg',500,332,'Cadair Idris, Snowdonia','http://www1.clikpic.com/lightboxaerial/images/cadairidris6327_thumb.jpg',130, 86,1, 0,'','','Simon Kirwan','Wales','','');
photos[44] = new photo(992924,'73047','','gallery','http://www1.clikpic.com/lightboxaerial/images/tenby6661.jpg',500,332,'Tenby, Pembrokeshire','http://www1.clikpic.com/lightboxaerial/images/tenby6661_thumb.jpg',130, 86,1, 0,'','','Simon Kirwan','Wales','','');
photos[45] = new photo(971725,'73060','','gallery','http://www1.clikpic.com/lightboxaerial/images/_LBP8281.jpg',500,302,'Anfield Park, Liverpool FC','http://www1.clikpic.com/lightboxaerial/images/_LBP8281_thumb.jpg',130, 79,1, 0,'','','Simon Kirwan','Liverpool','','');
photos[46] = new photo(971732,'73060','','gallery','http://www1.clikpic.com/lightboxaerial/images/_LBP6776.jpg',500,302,'Millennium Stadium, Cardiff','http://www1.clikpic.com/lightboxaerial/images/_LBP6776_thumb.jpg',130, 79,1, 0,'','','Simon Kirwan','Cardiff','','');
photos[47] = new photo(971827,'73060','','gallery','http://www1.clikpic.com/lightboxaerial/images/_LBP2614.jpg',500,332,'Ewood Park, Blackburn Rovers FC','http://www1.clikpic.com/lightboxaerial/images/_LBP2614_thumb.jpg',130, 86,0, 0,'','','Simon Kirwan','','','');
photos[48] = new photo(971833,'73060','','gallery','http://www1.clikpic.com/lightboxaerial/images/_LBP8305.jpg',500,332,'Goodison Park, Everton FC','http://www1.clikpic.com/lightboxaerial/images/_LBP8305_thumb.jpg',130, 86,1, 0,'','','Simon Kirwan','Liverpool','','');
photos[49] = new photo(3337212,'73060','','gallery','http://www1.clikpic.com/lightboxaerial/images/_LBP6050.jpg',500,333,'City of Manchester Stadium, Eastlands, home of Manchester City FC','http://www1.clikpic.com/lightboxaerial/images/_LBP6050_thumb.jpg',130, 87,1, 0,'City of Manchester Stadium, Eastlands, home of Manchester City FC','','Simon Kirwan','Manchester','','');
photos[50] = new photo(3337213,'73060','','gallery','http://www1.clikpic.com/lightboxaerial/images/_LBP6943_1.jpg',500,333,'JJB Stadium, Wigan, home of Wigan Warriors RLFC and Wigan Athletic FC','http://www1.clikpic.com/lightboxaerial/images/_LBP6943_1_thumb.jpg',130, 87,0, 0,'JJB Stadium, Wigan, home of Wigan Warriors RLFC and Wigan Athletic FC','','Simon Kirwan','Wigan','','');
photos[51] = new photo(971861,'73063','','gallery','http://www1.clikpic.com/lightboxaerial/images/caernarfon6282.jpg',500,332,'Caernarfon Castle','http://www1.clikpic.com/lightboxaerial/images/caernarfon6282_thumb.jpg',130, 86,1, 0,'','','Simon Kirwan','Wales','','');
photos[52] = new photo(971867,'73063','','gallery','http://www1.clikpic.com/lightboxaerial/images/beaumaris6268.jpg',500,332,'Beaumaris Castle, Anglesey','http://www1.clikpic.com/lightboxaerial/images/beaumaris6268_thumb.jpg',130, 86,0, 0,'','','Simon Kirwan','Wales','','');
photos[53] = new photo(971871,'73063','','gallery','http://www1.clikpic.com/lightboxaerial/images/carewcastle6678.jpg',500,332,'Carew Castle','http://www1.clikpic.com/lightboxaerial/images/carewcastle6678_thumb.jpg',130, 86,0, 0,'','','Simon Kirwan','Wales','','');
photos[54] = new photo(971876,'73063','','gallery','http://www1.clikpic.com/lightboxaerial/images/raglancastle6530.jpg',500,332,'Raglan Castle','http://www1.clikpic.com/lightboxaerial/images/raglancastle6530_thumb.jpg',130, 86,0, 0,'','','Simon Kirwan','Wales','','');
photos[55] = new photo(971910,'73066','','gallery','http://www1.clikpic.com/lightboxaerial/images/DSCF9575.jpg',500,302,'St Joseph\'s College, Upholland','http://www1.clikpic.com/lightboxaerial/images/DSCF9575_thumb.jpg',130, 79,1, 0,'','','Simon Kirwan','Wigan','','');
photos[56] = new photo(971912,'73066','','gallery','http://www1.clikpic.com/lightboxaerial/images/haighaerial (1).jpg',500,302,'Haigh Hall, Wigan','http://www1.clikpic.com/lightboxaerial/images/haighaerial (1)_thumb.jpg',130, 79,0, 0,'','','Simon Kirwan','Wigan','','');
photos[57] = new photo(971914,'73066','','gallery','http://www1.clikpic.com/lightboxaerial/images/kinmelbay6240.jpg',500,302,'Caravan Park, Kinmel Bay, North Wales','http://www1.clikpic.com/lightboxaerial/images/kinmelbay6240_thumb.jpg',130, 79,1, 0,'','','Simon Kirwan','Wales','','');
photos[58] = new photo(971915,'73066','','gallery','http://www1.clikpic.com/lightboxaerial/images/wateraerial (1).jpg',500,302,'Water Treatment Plant, West Lancashire','http://www1.clikpic.com/lightboxaerial/images/wateraerial (1)_thumb.jpg',130, 79,1, 0,'','','Simon Kirwan','Lancashire','','');
photos[59] = new photo(975044,'73066','','gallery','http://www1.clikpic.com/lightboxaerial/images/containers.jpg',500,332,'Containers, Liverpool Freeport','http://www1.clikpic.com/lightboxaerial/images/containers_thumb.jpg',130, 86,1, 0,'','','Simon Kirwan','Liverpool','','');
photos[60] = new photo(975055,'73066','','gallery','http://www1.clikpic.com/lightboxaerial/images/southportaerial.jpg',500,335,'Southport Beach and Seafront','http://www1.clikpic.com/lightboxaerial/images/southportaerial_thumb.jpg',130, 87,1, 0,'','','Simon Kirwan','Southport','','');
photos[61] = new photo(975067,'73066','','gallery','http://www1.clikpic.com/lightboxaerial/images/bridgeaerial.jpg',500,335,'Marine Way Bridge, Southport under construction','http://www1.clikpic.com/lightboxaerial/images/bridgeaerial_thumb.jpg',130, 87,1, 0,'','','Simon Kirwan','Southport','','');
photos[62] = new photo(972283,'73069','','gallery','http://www1.clikpic.com/lightboxaerial/images/_LBP1196.jpg',500,332,'Taylor Woodrow NHS Hospital Site, St Helens Feb 2007','http://www1.clikpic.com/lightboxaerial/images/_LBP1196_thumb.jpg',130, 86,0, 0,'','','Simon Kirwan','St Helens','','');
photos[63] = new photo(972284,'73069','','gallery','http://www1.clikpic.com/lightboxaerial/images/_LBP1833.jpg',500,332,'Taylor Woodrow NHS Hospital Site, St Helens March 2007','http://www1.clikpic.com/lightboxaerial/images/_LBP1833_thumb.jpg',130, 86,0, 0,'','','Simon Kirwan','St Helens','','');
photos[64] = new photo(972288,'73069','','gallery','http://www1.clikpic.com/lightboxaerial/images/_LBP2492.jpg',500,332,'Taylor Woodrow NHS Hospital Site, St Helens April 2007','http://www1.clikpic.com/lightboxaerial/images/_LBP2492_thumb.jpg',130, 86,0, 0,'','','Simon Kirwan','St Helens','','');
photos[65] = new photo(972302,'73069','','gallery','http://www1.clikpic.com/lightboxaerial/images/_LBP2938.jpg',500,332,'Taylor Woodrow NHS Hospital Site, St Helens May 2007','http://www1.clikpic.com/lightboxaerial/images/_LBP2938_thumb.jpg',130, 86,0, 0,'','','Simon Kirwan','St Helens','','');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
galleries = new Array();
galleries[0] = new gallery(73032,'992963,992961,992960,992959,971582,971580,971350,971342','Manchester Aerial Views','gallery');
galleries[1] = new gallery(73045,'3337216,3337215,3337214,992956,992952,975071,975069,971619,971617,971613','Liverpool Aerial Views','gallery');
galleries[2] = new gallery(73046,'992942,992935,992933,992930,971638,971634,971628,971622','Lake District From The Air','gallery');
galleries[3] = new gallery(73047,'992924,992918,992916,975168,975166,975164,975162,975064,973804,973803','Wales From The Air','gallery');
galleries[4] = new gallery(73060,'3337213,3337212,971833,971827,971732,971725','Football Stadiums Aerial Views','gallery');
galleries[5] = new gallery(73063,'971876,971871,971867,971861','Castles of Wales Aerial Views','gallery');
galleries[6] = new gallery(73066,'975067,975055,975044,971915,971914,971912,971910','Architecture Aerial Views','gallery');
galleries[7] = new gallery(73069,'972302,972288,972284,972283','Construction Progress Aerial Views','gallery');

