/***************************************************************************
* 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('1913907');
	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('1913907');
	for (j = 0; j < photos.length; j++) {
		if (photos[j].id == imageID) {
			if ('gallery' != '') {
						if (photos[j].galleries_id != '') {
						document.write('<a href="' + photos[j].section_code + '_' + photos[j].galleries_id + '.html">');
						}
						else {
						document.write('<a href="gallery.html">');
						}
			}
			document.write('<img src="' + photos[j].src + '" width="' + photos[j].width + '" height="' + photos[j].height + '" class="mainhomepageimage" id="mainSample" name="mainSample" alt="' + photos[j].caption  + '" border="0">');
			if ('gallery' != '') {
				document.write('</a>');
			}
			break;
		}
	}
	
}

/***************************************************************************
* Show the next image in a gallery.  field = hidden field containing       *
* image_id                                                                 *
*  img = reference to image object in which to show image                  *
***************************************************************************/
function next(field,img) {

	debug('IN next');
	imageID = field.value;
	
	for (j = 0; j < photos.length; j++) {
		if (photos[j].id == imageID) {
			break;
		}
	}
	debug('image is ' + j);
	nextImg = -1;
	k= j + 1;
	while (nextImg < 0) {
		for (; k < photos.length; k++) {
			debug('testing image ' + k + ': gallery = ' + photos[k].galleries_id + '(existing: ' + photos[j].galleries_id + ')');
			if (photos[k].galleries_id == photos[j].galleries_id) {
				nextImg = k;
				debug('setting  nextImg = ' + k);
				break;
			}
		}
		if (nextImg == -1) {
			k = 0;
		}
	}
	if (nextImg != -1) {
		updateImage(nextImg, field,img);
	}


}


/***************************************************************************
* Set a new image on the gallery detail page given its array position      *
***************************************************************************/
function updateImage (nextImg, field,img) {
	debug('Updating image');
	if (!basic && !(0)) {
		debug('In updateImage');
		debug('setting  img src = ' + photos[nextImg].src);
		
					
			document.getElementById('imagePhoto').innerHTML = '<img class="mainphoto" src="' + photos[nextImg].src + ' " id="mainPic" name="mainPic" width="' + photos[nextImg].width + '" height="' + photos[nextImg].height + '" alt="' + photos[nextImg].caption + '" border="0">';
						field.value = photos[nextImg].id;
			document.getElementById('imageTitle').innerHTML = photos[nextImg].caption;
			/* 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(1913214,'128302','','gallery','http://www1.clikpic.com/branny/images/Barry, Art Deco.jpg',500,355,'This is renovated house in Barry south Wales','http://www1.clikpic.com/branny/images/Barry, Art Deco_thumb.jpg',130, 92,0, 0,'','','','','','');
photos[1] = new photo(1913413,'128302','','gallery','http://www1.clikpic.com/branny/images/Barmouth Marina1.jpg',500,350,'This a renovated Art Deco house in Barmouth Marina','http://www1.clikpic.com/branny/images/Barmouth Marina1_thumb.jpg',130, 91,0, 0,'','','','','','');
photos[2] = new photo(1913415,'128302','','gallery','http://www1.clikpic.com/branny/images/Barry Art Deco House.jpg',500,718,'Axonometric view of an Art Deco house in Barry','http://www1.clikpic.com/branny/images/Barry Art Deco House_thumb.jpg',130, 187,0, 0,'','','','','','');
photos[3] = new photo(1913417,'128302','','gallery','http://www1.clikpic.com/branny/images/Far Moss Road Liverpool.jpg',500,346,'Art Deco house in Liverpool Far Moss Road','http://www1.clikpic.com/branny/images/Far Moss Road Liverpool_thumb.jpg',130, 90,0, 0,'','','','','','');
photos[4] = new photo(1913562,'128306','','gallery','http://www1.clikpic.com/branny/images/Waunfaur.jpg',500,328,'Renovated cottage in Waunfawr North Wales','http://www1.clikpic.com/branny/images/Waunfaur_thumb.jpg',130, 85,0, 0,'','','','','','');
photos[5] = new photo(1913573,'128306','','gallery','http://www1.clikpic.com/branny/images/Cadnant1.jpg',500,333,'Renovated cottage in Cadnant Estate, Anglesey','http://www1.clikpic.com/branny/images/Cadnant1_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[6] = new photo(1913582,'128306','','gallery','http://www1.clikpic.com/branny/images/Cadnant2.jpg',500,300,'Cottage in Cadnant 2','http://www1.clikpic.com/branny/images/Cadnant2_thumb.jpg',130, 78,0, 0,'','','','','','');
photos[7] = new photo(1913587,'128306','','gallery','http://www1.clikpic.com/branny/images/Cadnant3.jpg',500,303,'Cottage in Cadnant 3','http://www1.clikpic.com/branny/images/Cadnant3_thumb.jpg',130, 79,0, 0,'','','','','','');
photos[8] = new photo(1913600,'128306','','gallery','http://www1.clikpic.com/branny/images/Hatherton nr.Nantwich2.jpg',500,347,'Hatherton Farm near Nantwich','http://www1.clikpic.com/branny/images/Hatherton nr_thumb.Nantwich2.jpg',130, 90,0, 0,'','','','','','');
photos[9] = new photo(1913607,'128306','','gallery','http://www1.clikpic.com/branny/images/Pub nr. Oxford.jpg',500,351,'Old pub nr.Oxford','http://www1.clikpic.com/branny/images/Pub nr_thumb. Oxford.jpg',130, 91,0, 0,'','','','','','');
photos[10] = new photo(1913611,'128306','','gallery','http://www1.clikpic.com/branny/images/Greenfarm Rainhill, Mreseyside.jpg',500,336,'Greenfarm Rainhill Merseyside','http://www1.clikpic.com/branny/images/Greenfarm Rainhill, Mreseyside_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[11] = new photo(1913626,'128310','','gallery','http://www1.clikpic.com/branny/images/Huddersfield2.jpg',500,352,'Modern blocks of flats built in Huddersfield','http://www1.clikpic.com/branny/images/Huddersfield2_thumb.jpg',130, 92,0, 0,'','','','','','');
photos[12] = new photo(1913637,'128310','','gallery','http://www1.clikpic.com/branny/images/Ynys Mon Gallery,proposed extension.jpg',500,369,'Proposed extension to Ynys Mon Gallery','http://www1.clikpic.com/branny/images/Ynys Mon Gallery,proposed extension_thumb.jpg',130, 96,0, 0,'','','','','','');
photos[13] = new photo(1913647,'128310','','gallery','http://www1.clikpic.com/branny/images/Menai Bridge.jpg',500,353,'Flats in Menai Bridge','http://www1.clikpic.com/branny/images/Menai Bridge_thumb.jpg',130, 92,0, 0,'','','','','','');
photos[14] = new photo(1913662,'128313','','gallery','http://www1.clikpic.com/branny/images/Beddgelert.jpg',500,354,'House\\in Snowdonia National Park','http://www1.clikpic.com/branny/images/Beddgelert_thumb.jpg',130, 92,0, 0,'','','','','','');
photos[15] = new photo(1913669,'128313','','gallery','http://www1.clikpic.com/branny/images/Craigside.jpg',500,349,'Brick House in Craigsite, North Wales','http://www1.clikpic.com/branny/images/Craigside_thumb.jpg',130, 91,0, 0,'','','','','','');
photos[16] = new photo(1913671,'128313','','gallery','http://www1.clikpic.com/branny/images/Deganwy.jpg',500,356,'Architect\'s designed house in Deganwy','http://www1.clikpic.com/branny/images/Deganwy_thumb.jpg',130, 93,0, 0,'','','','','','');
photos[17] = new photo(1913674,'128313','','gallery','http://www1.clikpic.com/branny/images/Llanrwst11.jpg',500,355,'Architect\'s designed postmodernistic house in Llanrwst','http://www1.clikpic.com/branny/images/Llanrwst11_thumb.jpg',130, 92,0, 0,'','','','','','');
photos[18] = new photo(1913676,'128313','','gallery','http://www1.clikpic.com/branny/images/Llanrwst21.jpg',500,352,'House in Llanrwst 2','http://www1.clikpic.com/branny/images/Llanrwst21_thumb.jpg',130, 92,0, 0,'','','','','','');
photos[19] = new photo(1913677,'128313','','gallery','http://www1.clikpic.com/branny/images/Wilmslow 001.jpg',500,362,'Postmodernistic House Architects\'s designed House in Wilmslow','http://www1.clikpic.com/branny/images/Wilmslow 001_thumb.jpg',130, 94,0, 0,'','','','','','');
photos[20] = new photo(1913679,'128313','','gallery','http://www1.clikpic.com/branny/images/Gerddi Benar, Bontnewydd.jpg',500,343,'Architect\'s designed houses in Bontnewydd, North Wales','http://www1.clikpic.com/branny/images/Gerddi Benar, Bontnewydd_thumb.jpg',130, 89,0, 0,'','','','','','');
photos[21] = new photo(1913695,'128313','','gallery','http://www1.clikpic.com/branny/images/Porthmadog.jpg',500,346,'Designed dwellings in Porthmadog','http://www1.clikpic.com/branny/images/Porthmadog_thumb.jpg',130, 90,0, 0,'','','','','','');
photos[22] = new photo(1913699,'128318','','gallery','http://www1.clikpic.com/branny/images/Acton Farm, Nantwich, Cheshire.jpg',500,356,'Acton Farm in Cheshire','http://www1.clikpic.com/branny/images/Acton Farm, Nantwich, Cheshire_thumb.jpg',130, 93,0, 0,'','','','','','');
photos[23] = new photo(1913701,'128318','','gallery','http://www1.clikpic.com/branny/images/Betsy Yn Rhos3.jpg',500,354,'Betsy yn Rhos ','http://www1.clikpic.com/branny/images/Betsy Yn Rhos3_thumb.jpg',130, 92,0, 0,'','','','','','');
photos[24] = new photo(1913702,'128318','','gallery','http://www1.clikpic.com/branny/images/Dolwen road aerial view.jpg',500,358,'Dolwen road aerial view','http://www1.clikpic.com/branny/images/Dolwen road aerial view_thumb.jpg',130, 93,0, 0,'','','','','','');
photos[25] = new photo(1913705,'128318','','gallery','http://www1.clikpic.com/branny/images/Llandaniel2.jpg',500,367,'llandaniel aerial view','http://www1.clikpic.com/branny/images/Llandaniel2_thumb.jpg',130, 95,0, 0,'','','','','','');
photos[26] = new photo(1913707,'128318','','gallery','http://www1.clikpic.com/branny/images/Port dinorwig.jpg',500,324,'Development in Portdinorwig','http://www1.clikpic.com/branny/images/Port dinorwig_thumb.jpg',130, 84,0, 0,'','','','','','');
photos[27] = new photo(1913710,'128318','','gallery','http://www1.clikpic.com/branny/images/Treaddur Bay 2.jpg',500,354,'Hotel in Treaddur Bay','http://www1.clikpic.com/branny/images/Treaddur Bay 2_thumb.jpg',130, 92,0, 0,'','','','','','');
photos[28] = new photo(1913714,'128318','','gallery','http://www1.clikpic.com/branny/images/Splash point2, Rhyl.jpg',500,358,'Splash point in Rhyl','http://www1.clikpic.com/branny/images/Splash point2, Rhyl_thumb.jpg',130, 93,0, 0,'','','','','','');
photos[29] = new photo(1913718,'128318','','gallery','http://www1.clikpic.com/branny/images/Bala3.jpg',500,366,'Bala development','http://www1.clikpic.com/branny/images/Bala3_thumb.jpg',130, 95,0, 0,'','','','','','');
photos[30] = new photo(1913731,'128321','','gallery','http://www1.clikpic.com/branny/images/Climbing wall Bolton.jpg',500,745,'Climbing wall in Bolton, Manchester','http://www1.clikpic.com/branny/images/Climbing wall Bolton_thumb.jpg',130, 194,0, 0,'','','','','','');
photos[31] = new photo(1913766,'128323','','gallery','http://www1.clikpic.com/branny/images/msoEA2C1.jpg',500,338,'Model of Wells kelo Factory','http://www1.clikpic.com/branny/images/msoEA2C1_thumb.jpg',130, 88,0, 0,'','','','','','');
photos[32] = new photo(1913768,'128323','','gallery','http://www1.clikpic.com/branny/images/Wellskelo Factory.jpg',500,323,'Model of Wells Kelo Factory 2','http://www1.clikpic.com/branny/images/Wellskelo Factory_thumb.jpg',130, 84,0, 0,'','','','','','');
photos[33] = new photo(1913771,'128323','','gallery','http://www1.clikpic.com/branny/images/British Pavilon.jpg',500,331,'British Pavilon','http://www1.clikpic.com/branny/images/British Pavilon_thumb.jpg',130, 86,0, 0,'','','','','','');
photos[34] = new photo(1913775,'128323','','gallery','http://www1.clikpic.com/branny/images/model.jpg',500,746,'Model for an exhibition about steelwork','http://www1.clikpic.com/branny/images/model_thumb.jpg',130, 194,0, 0,'','','','','','');
photos[35] = new photo(1913777,'128323','','gallery','http://www1.clikpic.com/branny/images/Model of an Exhibition.jpg',500,673,'Model for an exhibition about steelwork 2','http://www1.clikpic.com/branny/images/Model of an Exhibition_thumb.jpg',130, 175,0, 0,'','','','','','');
photos[36] = new photo(1913907,'','','','http://www1.clikpic.com/branny/images/Old College Fields, Shropshire.jpg',500,320,'Old College Fields,Shopshire','http://www1.clikpic.com/branny/images/Old College Fields, Shropshire_thumb.jpg',130, 83,1, 0,'','','','','','');
photos[37] = new photo(1913912,'128310','','gallery','http://www1.clikpic.com/branny/images/Rhyl Promenade1.jpg',500,344,'Rhyl Promenade','http://www1.clikpic.com/branny/images/Rhyl Promenade1_thumb.jpg',130, 89,0, 0,'','','','','','');
photos[38] = new photo(1917084,'128321','','gallery','http://www1.clikpic.com/branny/images/School in Llandudno.jpg',500,709,'Interior of Victorian school in Llandudno','http://www1.clikpic.com/branny/images/School in Llandudno_thumb.jpg',130, 184,0, 0,'','','','','','');
photos[39] = new photo(1917085,'128321','','gallery','http://www1.clikpic.com/branny/images/Silver Shop in London.jpg',500,372,'Silver Shop in London','http://www1.clikpic.com/branny/images/Silver Shop in London_thumb.jpg',130, 97,0, 0,'','','','','','');
photos[40] = new photo(1917087,'128321','','gallery','http://www1.clikpic.com/branny/images/Swimming pool Treysgawen Hall.jpg',500,340,'Swimming pool in Treysgawen Hall','http://www1.clikpic.com/branny/images/Swimming pool Treysgawen Hall_thumb.jpg',130, 88,0, 0,'','','','','','');
photos[41] = new photo(1917096,'128323','','gallery','http://www1.clikpic.com/branny/images/Britannia Housing.jpg',500,339,'Britannia Housing','http://www1.clikpic.com/branny/images/Britannia Housing_thumb.jpg',130, 88,0, 0,'','','','','','');
photos[42] = new photo(1921879,'128334','','gallery','http://www1.clikpic.com/branny/images/At the Excel Centre London.jpg',500,363,'Property Exhibition, Excel,London','http://www1.clikpic.com/branny/images/At the Excel Centre London_thumb.jpg',130, 94,0, 0,'','','','','','');
photos[43] = new photo(1921880,'128334','','gallery','http://www1.clikpic.com/branny/images/At the Excel Centre London 2.jpg',500,497,'At the Excel Exhibition in London','http://www1.clikpic.com/branny/images/At the Excel Centre London 2_thumb.jpg',130, 129,0, 0,'','','','','','');
photos[44] = new photo(1921882,'128334','','gallery','http://www1.clikpic.com/branny/images/In Colwyn Bay.jpg',500,336,'Board in Colwyn Bay','http://www1.clikpic.com/branny/images/In Colwyn Bay_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[45] = new photo(1921884,'128334','','gallery','http://www1.clikpic.com/branny/images/Portdinorwig.jpg',440,680,'Display in Portdinorwig','http://www1.clikpic.com/branny/images/Portdinorwig_thumb.jpg',130, 201,0, 0,'','','','','','');
photos[46] = new photo(1921886,'128334','','gallery','http://www1.clikpic.com/branny/images/Porthmadog1.jpg',500,373,'Board in Porthmadog','http://www1.clikpic.com/branny/images/Porthmadog1_thumb.jpg',130, 97,0, 0,'','','','','','');
photos[47] = new photo(1922565,'128515','','gallery','http://www1.clikpic.com/branny/images/Church.jpg',500,774,'Sketch of a church','http://www1.clikpic.com/branny/images/Church_thumb.jpg',130, 201,0, 0,'','','','','','');
photos[48] = new photo(1923318,'128306','','gallery','http://www1.clikpic.com/branny/images/Conversion of a Barn in Bryngwran.jpg',500,344,'Conversion of a barn in Bryngwran','http://www1.clikpic.com/branny/images/Conversion of a Barn in Bryngwran_thumb.jpg',130, 89,0, 0,'','','','','','');
photos[49] = new photo(1971976,'128515','','gallery','http://www1.clikpic.com/branny/images/Chester 1.jpg',500,397,'Chester 1','http://www1.clikpic.com/branny/images/Chester 1_thumb.jpg',130, 103,0, 0,'','','','','','');
photos[50] = new photo(1971978,'128515','','gallery','http://www1.clikpic.com/branny/images/Chester 2.jpg',500,680,'Chester 2','http://www1.clikpic.com/branny/images/Chester 2_thumb.jpg',130, 177,0, 0,'','','','','','');
photos[51] = new photo(1971980,'128515','','gallery','http://www1.clikpic.com/branny/images/Chester  Industrial Park.jpg',500,320,'Chester Industrial Park','http://www1.clikpic.com/branny/images/Chester  Industrial Park_thumb.jpg',130, 83,0, 0,'','','','','','');
photos[52] = new photo(1913064,'128265','','gallery','http://www1.clikpic.com/branny/images/Americka 37 Praha.jpg',500,716,'Period style house in Prague','http://www1.clikpic.com/branny/images/Americka 37 Praha_thumb.jpg',130, 186,0, 0,'','','','','','');
photos[53] = new photo(1913096,'128265','','gallery','http://www1.clikpic.com/branny/images/Colwyn Bay1.jpg',500,351,'Victorian House in Colwyn Bay','http://www1.clikpic.com/branny/images/Colwyn Bay1_thumb.jpg',130, 91,0, 0,'','','','','','');
photos[54] = new photo(1913132,'128265','','gallery','http://www1.clikpic.com/branny/images/Bangor.jpg',500,368,'Victorian school in Bangor','http://www1.clikpic.com/branny/images/Bangor_thumb.jpg',130, 96,0, 0,'','','','','','');
photos[55] = new photo(1913145,'128265','','gallery','http://www1.clikpic.com/branny/images/Llandudno1.jpg',500,355,'Victorian School in Llandudno','http://www1.clikpic.com/branny/images/Llandudno1_thumb.jpg',130, 92,0, 0,'','','','','','');
photos[56] = new photo(1913168,'128265','','gallery','http://www1.clikpic.com/branny/images/Penworks, Birmingham.jpg',500,355,'Old Victorian warehouse in Birmingham','http://www1.clikpic.com/branny/images/Penworks, Birmingham_thumb.jpg',130, 92,0, 0,'','','','','','');
photos[57] = new photo(1913180,'128265','','gallery','http://www1.clikpic.com/branny/images/Palace Hotel Rhyl.jpg',500,353,'Victorian Hotel in Rhyl','http://www1.clikpic.com/branny/images/Palace Hotel Rhyl_thumb.jpg',130, 92,0, 0,'','','','','','');
photos[58] = new photo(1917078,'128265','','gallery','http://www1.clikpic.com/branny/images/St James s Church1.jpg',500,363,'St.James\'s Church in Bangor','http://www1.clikpic.com/branny/images/St James s Church1_thumb.jpg',130, 94,0, 0,'','','','','','');
photos[59] = new photo(2218483,'128265','','gallery','http://admin.clikpic.com/branny/images/Szkola nr.5 001.jpg',500,355,'Elementary school in Bytom/Beuthen,O.S.<br>\nSecession/Art Deco style (1905)','http://admin.clikpic.com/branny/images/Szkola nr_thumb.5 001.jpg',130, 92,0, 0,'','','','','','');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
galleries = new Array();
galleries[0] = new gallery(128302,'1913417,1913415,1913413,1913214','Art Deco','gallery');
galleries[1] = new gallery(128313,'1913695,1913679,1913677,1913676,1913674,1913671,1913669,1913662','Contemporary houses','gallery');
galleries[2] = new gallery(128306,'1923318,1913611,1913607,1913600,1913587,1913582,1913573,1913562','Cottages','gallery');
galleries[3] = new gallery(128334,'1921886,1921884,1921882,1921880,1921879','Exhibitions and displays','gallery');
galleries[4] = new gallery(128321,'1917087,1917085,1917084,1913731','Interiors','gallery');
galleries[5] = new gallery(128323,'1917096,1913777,1913775,1913771,1913768,1913766','Models','gallery');
galleries[6] = new gallery(128310,'1913912,1913647,1913637,1913626','Modern Architecture','gallery');
galleries[7] = new gallery(128318,'1913718,1913714,1913710,1913707,1913705,1913702,1913701,1913699','Panoramic and bird\'s eye views ','gallery');
galleries[8] = new gallery(128515,'1971980,1971978,1971976,1922565','Sketches','gallery');
galleries[9] = new gallery(128265,'2218483,1917078,1913180,1913168,1913145,1913132,1913096,1913064','Period architecture','gallery');

