/***************************************************************************
* 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('3762629,2953582,2464561,2416683,1680945,1519408,1516249,1513489,1322022,1303882,1300864,1300361,1299575,1297021,1296544,1296518,1294221,1294210,1292044,1290065,1290054,1290038,1286531,1286489,1286464,1286451,1283410,1282957,1278643,1278640,1278537,1278025,1276188');
	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('3762629,2953582,2464561,2416683,1680945,1519408,1516249,1513489,1322022,1303882,1300864,1300361,1299575,1297021,1296544,1296518,1294221,1294210,1292044,1290065,1290054,1290038,1286531,1286489,1286464,1286451,1283410,1282957,1278643,1278640,1278537,1278025,1276188');
	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 = 'Noel Brennan Artist: ' + 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(1276188,'90688','','gallery','http://www4.clikpic.com/noelbrennan/images/Madonna.jpg',337,450,'Madonna','http://www4.clikpic.com/noelbrennan/images/Madonna_thumb.jpg',130, 174,1, 1,'Carved from concrete.<br>\r\nDimensions 600x300x100<br>\r\n2007','','','','','');
photos[1] = new photo(1278025,'90688','','gallery','http://www4.clikpic.com/noelbrennan/images/Atomica.jpg',327,450,'Atomica','http://www4.clikpic.com/noelbrennan/images/Atomica_thumb.jpg',130, 179,1, 0,'An explosion of metal spikes!<br>\r\nDimensions 700x600x500<br>\r\n2007','','','','','');
photos[2] = new photo(1278640,'90688','','gallery','http://www4.clikpic.com/noelbrennan/images/Cara.jpg',271,450,'Cara-The face','http://www4.clikpic.com/noelbrennan/images/Cara_thumb.jpg',130, 216,1, 0,'Resin impregnated with steel filings and allowed to rust.<br>\r\nDimensions 500 high<br>\r\n2002','','','','','');
photos[3] = new photo(1278643,'90688','','gallery','http://www4.clikpic.com/noelbrennan/images/jil.jpg',286,450,'Grace','http://www4.clikpic.com/noelbrennan/images/jil_thumb.jpg',130, 205,1, 0,'Fired terracotta bust. Sculpted from life model.<br>\r\nDimensions 3/4 life size.<br>\r\n1998','','','','','');
photos[4] = new photo(1278537,'90688','','gallery','http://www4.clikpic.com/noelbrennan/images/emerge2.jpg',379,450,'Emerge-re-emerge','http://www4.clikpic.com/noelbrennan/images/emerge2_thumb.jpg',130, 154,1, 0,'60kg of Cornish Soapstone.<br>\r\nAs featured on \'The Big Art Challenge\' (see Brian Sewell photo)<br>\r\nDimensions 600x500x450<br>\r\n2003','','','','','');
photos[5] = new photo(1282913,'90688','','gallery','http://www4.clikpic.com/noelbrennan/images/bigart.jpg',500,372,'The Big Art Challenge','http://www4.clikpic.com/noelbrennan/images/bigart_thumb.jpg',130, 97,0, 0,'Five thousand people entered Channel Five\'s national art competition in 2004. I was one of only 100 selected for the regional heats where I exhibited my \"Emerge-re-emerge\" Sculpture. <br>\r\nFrom here I was one of only 40 artists to make it through to the National Heat, which was held at the Baltic Gallery in Newcastle. <br>\r\nThe Big Art Challenge judging panel comprised critic, Brian Sewell; designer, Wayne Hemingway; and artist, Jane Wilson. <br>\r\n\"In terms of what you\'ve managed to do I think it\'s astonishing. It\'s actually difficult for people who know absolutely nothing about the work of a sculptor to understand. In fact, I don\'t think that they ever could contemplate the difficulty of having something in your minds eye, selecting a piece of stone and then translating what is here to form something within the block.\" <br>\r\n \"This is really interesting because this is such an alien material. It is intellectually, physically, aesthetically an entirely different business.\" -- Brian Sewell<br>\r\n\"Personally I think it [Emerge-re-emerge] is really well finished and very skillfully done. It felt a bit like a V&A museum piece.\" -- Wayne Hemingway','','','','','');
photos[6] = new photo(1282957,'90688','','gallery','http://www4.clikpic.com/noelbrennan/images/ties2.jpg',500,375,'\"The ties that bind you, will ultimately set you free\"','http://www4.clikpic.com/noelbrennan/images/ties2_thumb.jpg',130, 98,1, 0,'Part of the Hebden Bridge sculpture trail in 2003. A larger than life \'Angel\' was suspended over the historic Gibson mill pond.','','','','','');
photos[7] = new photo(1283331,'90688','','gallery','http://www4.clikpic.com/noelbrennan/images/celtic.jpg',500,321,'Proposal for Gateway','http://www4.clikpic.com/noelbrennan/images/celtic_thumb.jpg',130, 83,0, 0,'This was a proposal for a gateway to be sited in Cornwall.<br>\r\n1999','','','','','');
photos[8] = new photo(1283343,'90688','','gallery','http://www4.clikpic.com/noelbrennan/images/dancer.jpg',217,450,'The Dancer - after Degas','http://www4.clikpic.com/noelbrennan/images/dancer_thumb.jpg',130, 270,0, 0,'The love of Degas\' \'Little Dancer\' inspired this small scale sculpture. This is to be a limited edition bronze casting.<br>\r\nDimensions 300mm high<br>\r\n2004','','','','','');
photos[9] = new photo(1283410,'90688','','gallery','http://www4.clikpic.com/noelbrennan/images/torse.jpg',238,450,'\'Torse tordu\'','http://www4.clikpic.com/noelbrennan/images/torse_thumb.jpg',130, 246,1, 0,'A classical torso.<br>\r\nFired in white clay.<br>\r\nDimensions 250mm high<br>\r\n2006','','','','','');
photos[10] = new photo(1283421,'90688','','gallery','http://www4.clikpic.com/noelbrennan/images/lethargica.jpg',349,450,'\'Lethargica\'','http://www4.clikpic.com/noelbrennan/images/lethargica_thumb.jpg',130, 168,0, 0,'Following a documentary on the real suffers of lethargica (see Robin Williams \'Awakenings\'). This image of a man frozen in his own body has always been with me!<br>\r\nFired clay.<br>\r\nDimensions 600mm high<br>\r\n1998','','','','','');
photos[11] = new photo(1322022,'90688','','gallery','http://www4.clikpic.com/noelbrennan/images/shoot.jpg',309,450,'Shoot!','http://www4.clikpic.com/noelbrennan/images/shoot_thumb.jpg',130, 189,1, 0,'This was the maquette for an eleven foot \'seedling\' sculpture that was sited in the river on the Hebden Bridge Sculpture Trail.<br>\r\n2005','','','','','');
photos[12] = new photo(2416724,'90688','','gallery','http://www4.clikpic.com/noelbrennan/images/boy.jpg',349,450,'\"...and so our children are free\"<br>\r\n158 Squadron Memorial.','http://www4.clikpic.com/noelbrennan/images/boy_thumb.jpg',130, 168,0, 0,'Proposal for a commission for a memorial to the 158 Squadron at Lisset Airfield in Yorkshire. The Memorial wwas to be constructed in stone with a bronze of a boy freely playing with a model of a Halifax Bomber, the plane used by the Squadron during WWII.<br>\r\nThe commission was sponsored by Novera energy who are to develope the site into a windfarm.','','','','','');
photos[13] = new photo(2517389,'90688','','gallery','http://www4.clikpic.com/noelbrennan/images/boy maquette.jpg',352,450,'...and so our children are free! Maquette.','http://www4.clikpic.com/noelbrennan/images/boy maquette_thumb.jpg',130, 166,0, 0,'This was the 1/10 scale Maquette for the Memorial proposal.','','','','','');
photos[14] = new photo(3762421,'90688','','gallery','http://admin.clikpic.com/noelbrennan/images/hfull.jpg',500,679,'Horace Hasling','http://admin.clikpic.com/noelbrennan/images/hfull_thumb.jpg',130, 177,0, 0,'A bronze cast of a sculpture of Horace Hasling commissioned by a local businessman.<br>\r\nDimensions 300mm high<br>\r\n2009','','','','','');
photos[15] = new photo(3762606,'90688','','gallery','http://admin.clikpic.com/noelbrennan/images/h-leg-up-.jpg',500,787,'Another view of Horace','http://admin.clikpic.com/noelbrennan/images/h-leg-up-_thumb.jpg',130, 205,0, 0,'Another view of the sculpture','','','','','');
photos[16] = new photo(1286451,'90806','','gallery','http://www4.clikpic.com/noelbrennan/images/theplayer.jpg',371,450,'The Player','http://www4.clikpic.com/noelbrennan/images/theplayer_thumb.jpg',130, 158,1, 1,'The player has got the ball he runs, he shoots, he scores!<br>\r\nOil on Canvas.<br>\r\nDimensions 500x400<br>\r\n2005','','','','','');
photos[17] = new photo(1286464,'90806','','gallery','http://www4.clikpic.com/noelbrennan/images/stitch.jpg',377,450,'Stitch!','http://www4.clikpic.com/noelbrennan/images/stitch_thumb.jpg',130, 155,1, 0,'Almost a tapestry, rich in colour and texture.<br>\r\nDimensions 500x400<br>\r\n2005','','','','','');
photos[18] = new photo(1286489,'90806','','gallery','http://www4.clikpic.com/noelbrennan/images/bluesquare.jpg',450,450,'The calm blue space interrupted by chaos!','http://www4.clikpic.com/noelbrennan/images/bluesquare_thumb.jpg',130, 130,1, 0,'Abstract mayhem!<br>\r\nOil on canvas.<br>\r\nDimensions 800x800<br>\r\n2004','','','','','');
photos[19] = new photo(1286519,'90806','','gallery','http://www4.clikpic.com/noelbrennan/images/event.jpg',500,333,'Event Horizon','http://www4.clikpic.com/noelbrennan/images/event_thumb.jpg',130, 87,0, 0,'You are an observer at the edge of a great event. All you have to do is take one step!<br>\r\nOil on Canvas.<br>\r\nDimension 400x600<br>\r\n2002','','','','','');
photos[20] = new photo(1286531,'90806','','gallery','http://www4.clikpic.com/noelbrennan/images/qllbbs.jpg',500,171,'Q.L.L.B.B.S!','http://www4.clikpic.com/noelbrennan/images/qllbbs_thumb.jpg',130, 44,1, 0,'The actual title will remain a mystery. But don\'t you just love the effect!<br>\r\nOil on Canvas.<br>\r\nDimensions 300x700<br>\r\n2002','','','','','');
photos[21] = new photo(1303882,'90806','','gallery','http://www4.clikpic.com/noelbrennan/images/BLUE2.jpg',357,450,'Lazy slipstream','http://www4.clikpic.com/noelbrennan/images/BLUE2_thumb.jpg',130, 164,1, 0,'Full of vibrant energy and colour contained in a solid handmade framed and ready to go!<br>\r\nOil on Canvas.<br>\r\nDimensions 700x600<br>\r\n2006','','','','','');
photos[22] = new photo(1300361,'90806','','gallery','http://www4.clikpic.com/noelbrennan/images/SKYLI.jpg',500,408,'Painting with light','http://www4.clikpic.com/noelbrennan/images/SKYLI_thumb.jpg',130, 106,1, 0,'This leaded light ceiling panel was commissioned for a Georgian House during refurbishment.<br>\r\nI designed, manufactured, and fitted this using only traditional tools and methods.<br>\r\nDimensions 600x500 inner panel.<br>\r\n2002','','','','','');
photos[23] = new photo(1300864,'90806','','gallery','http://www4.clikpic.com/noelbrennan/images/glass.jpg',500,276,'Leaded light','http://www4.clikpic.com/noelbrennan/images/glass_thumb.jpg',130, 72,1, 0,'This one was for above a front door in a private house in West London. The light in the hallway was amazing!<br>\r\nOnly traditional tools and methods were used in the construction of this panel.<br>\r\nDimensions 400x800','','','','','');
photos[24] = new photo(1286614,'90806','','gallery','http://www4.clikpic.com/noelbrennan/images/onlyaripple.jpg',500,383,'It\'s only a ripple!','http://www4.clikpic.com/noelbrennan/images/onlyaripple_thumb.jpg',130, 100,0, 0,'A ripple in the middle of the ocean can be a Tsunami by the time it reaches the shore!<br>\r\nOil on Canvas.<br>\r\nDimensions 400x500<br>\r\n2003','','','','','');
photos[25] = new photo(1513489,'90806','','gallery','http://www4.clikpic.com/noelbrennan/images/shock.jpg',329,450,'Any jolt or sudden movement can frequently dis-orientate the viewer!','http://www4.clikpic.com/noelbrennan/images/shock_thumb.jpg',130, 178,1, 0,'Abstract expression! A series of new abstract paintings.<br>\r\nAcrylic on Canvas.<br>\r\nDimensions 400x300mm<br>\r\n2007','','','','','');
photos[26] = new photo(1516244,'90806','','gallery','http://www4.clikpic.com/noelbrennan/images/cicle.jpg',339,450,'If you want to keep moving, sometimes you have to turn around!','http://www4.clikpic.com/noelbrennan/images/cicle_thumb.jpg',130, 173,0, 0,'The title refers to the reverent nod to the abstract expressionist movement.<br>\r\nAcrylic on Canvas.<br>\r\nDimensions 400x300mm<br>\r\n2007','','','','','');
photos[27] = new photo(1516249,'90806','','gallery','http://www4.clikpic.com/noelbrennan/images/egg.jpg',334,450,'Even on a calm day the wind blows colours across the sky!','http://www4.clikpic.com/noelbrennan/images/egg_thumb.jpg',130, 175,1, 0,'A further delve into abstract expressionism. This has the look and movement of a mobile.<br>\r\nAcrylic on Canvas.<br>\r\nDimensions 400x300mm<br>\r\n2007','','','','','');
photos[28] = new photo(1600135,'90806','','gallery','http://www4.clikpic.com/noelbrennan/images/P1030645.jpg',335,450,'Blat!! You\'ll be on your knees before you hear a noise!','http://www4.clikpic.com/noelbrennan/images/P1030645_thumb.jpg',130, 175,0, 0,'A sharp \'crack\' of paint comes out of the darkness!<br>\r\nAcrylic on Canvas<br>\r\nDimensions 400x300mm<br>\r\n2007','','','','','');
photos[29] = new photo(1625700,'90806','','gallery','http://www4.clikpic.com/noelbrennan/images/host.jpg',348,450,'HOST Art Fair 2007','http://www4.clikpic.com/noelbrennan/images/host_thumb.jpg',130, 168,0, 0,'This years Host Art Fair Exhibition.<br>\r\n2007','','','','','');
photos[30] = new photo(1680945,'90806','','gallery','http://www4.clikpic.com/noelbrennan/images/DOORGL~1.jpg',299,450,'A new age of light is with us!','http://www4.clikpic.com/noelbrennan/images/DOORGL~1_thumb.jpg',130, 196,1, 0,'Just completed!<br>\r\nA stained glass commission for a Victorian front door. private.<br>\r\nInfluences for this piece include Japanese \'Manga\' comics and Roy Lichtenstein \'Pop Art\' paintings<br>\r\n2007','','','','','');
photos[31] = new photo(2416683,'90806','','gallery','http://www4.clikpic.com/noelbrennan/images/portj.jpg',164,450,'\'My heart is full my needs are met, my needs are met my heart is full\'!','http://www4.clikpic.com/noelbrennan/images/portj_thumb.jpg',130, 357,1, 0,'I entered this painting into this years (2008) John Moores contemporary painting competition. With an exhibition to be held at the Walker Gallery in Liverpool. On this years judging panel were Turner prize winners Jake and Dinos Chapman.<br>\r\nOil on Canvas<br>\r\nDimensions 1400x550<br>\r\n2008','','','','','');
photos[32] = new photo(2953582,'90806','','gallery','http://www4.clikpic.com/noelbrennan/images/bigpaint.jpg',414,439,'Another stormy day! Summer 2008!','http://www4.clikpic.com/noelbrennan/images/bigpaint_thumb.jpg',130, 138,1, 0,'Oh! What a lovely summer! I only had a little spell between jobs to get this one in! So I thought I\'d make it a big one!<br>\r\nOil on Canvas<br>\r\nDimensions 1500x1500mm<br>\r\n2008','','','','','');
photos[33] = new photo(1290038,'91517','','gallery','http://www4.clikpic.com/noelbrennan/images/eve.jpg',329,450,'Eve','http://www4.clikpic.com/noelbrennan/images/eve_thumb.jpg',130, 178,1, 1,'Eve Brennan aged 7 in full Kung Fu action pose.<br>\r\nOil on Canvas.<br>\r\nDimensions 800x600<br>\r\n2007','','','','','');
photos[34] = new photo(1290054,'91517','','gallery','http://www4.clikpic.com/noelbrennan/images/lennon.jpg',480,450,'Lennon!','http://www4.clikpic.com/noelbrennan/images/lennon_thumb.jpg',130, 122,1, 0,'For the 40th anniversary of Sgt. Pepper a portrait of  John. This is on a convex canvas which adds a further dimension.<br>\r\nAcylic and Pastel on Canvas.<br>\r\nDimensions 600x600<br>\r\n2007','','','','','');
photos[35] = new photo(1290065,'91517','','gallery','http://www4.clikpic.com/noelbrennan/images/Jill.jpg',306,450,'Jill','http://www4.clikpic.com/noelbrennan/images/Jill_thumb.jpg',130, 191,1, 0,'This painting I did of my beautiful wife Jill. I love the Modernist feel to this portrait.<br>\r\nOil on Canvas.<br>\r\nDimensions 600x450<br>\r\n2007','','','','','');
photos[36] = new photo(1292044,'91517','','gallery','http://www4.clikpic.com/noelbrennan/images/jimi.jpg',451,450,'Jimi Hendrix \'Purple Haze\'','http://www4.clikpic.com/noelbrennan/images/jimi_thumb.jpg',130, 130,1, 0,'Heavy, expressive and explosive. Just like the man and his music!<br>\r\nOil on Canvas.<br>\r\nDimensions 400x400','','','','','');
photos[37] = new photo(1292571,'91517','','gallery','http://www4.clikpic.com/noelbrennan/images/ebeneezer.jpg',262,450,'Ebeneezer Howard','http://www4.clikpic.com/noelbrennan/images/ebeneezer_thumb.jpg',130, 223,0, 0,'This was a life size, full body, sculpted portrait of Ebeneezer Howard the founder of Letchworth Garden City.<br>\r\nFull body and head sculpt, cast hands, resin impregnated clothes, applied hair.<br>\r\n1996','','','','','');
photos[38] = new photo(1292574,'91517','','gallery','http://www4.clikpic.com/noelbrennan/images/iz.jpg',320,450,'Isobel','http://www4.clikpic.com/noelbrennan/images/iz_thumb.jpg',130, 183,0, 0,'A small scale bust of Isobel Fletcher aged 1.<br>\r\nCast in Bronze powder.<br>\r\nDimensions 150mm high.<br>\r\n2001','','','','','');
photos[39] = new photo(1292576,'91517','','gallery','http://www4.clikpic.com/noelbrennan/images/jim.jpg',206,450,'Jim','http://www4.clikpic.com/noelbrennan/images/jim_thumb.jpg',130, 284,0, 0,'This portrait of Jim Turner Esq. before he lost the Rasputin beard.<br>\r\nOil on Board.<br>\r\nDimensions 400x250<br>\r\n2001','','','','','');
photos[40] = new photo(1292578,'91517','','gallery','http://www4.clikpic.com/noelbrennan/images/isobel.jpg',291,450,'Isobel','http://www4.clikpic.com/noelbrennan/images/isobel_thumb.jpg',130, 201,0, 0,'Once again the lovely Isobel Fletcher. A little older on a cold day.<br>\r\nOil on Board.<br>\r\nDimensions 250x180<br>\r\n2003','','','','','');
photos[41] = new photo(3762629,'91517','','gallery','http://admin.clikpic.com/noelbrennan/images/h-torso-web.jpg',500,441,'Portrait Sculpture of Horace Hasling','http://admin.clikpic.com/noelbrennan/images/h-torso-web_thumb.jpg',130, 115,1, 0,'A close up of horace\'s face.<br>\r\nDimensions 300mm high<br>\r\n2009','','','','','');
photos[42] = new photo(1294221,'91655','','gallery','http://www4.clikpic.com/noelbrennan/images/bird.jpg',333,450,'The dove of peace observed the chaos and flew swiftly by!','http://www4.clikpic.com/noelbrennan/images/bird_thumb.jpg',130, 176,1, 1,'I love the naive bird shape in this one!<br>\r\nCharcoal and Pastel on Canvas.<br>\r\nDimensions 400x300<br>\r\n2007','','','','','');
photos[43] = new photo(1296498,'91655','','gallery','http://www4.clikpic.com/noelbrennan/images/ned1.jpg',333,450,'Only a wicked thorn would pierce that which contained wonder!','http://www4.clikpic.com/noelbrennan/images/ned1_thumb.jpg',130, 176,0, 0,'I feel that this one turned up many sublime symbols and reference patterns.<br>\r\nCharcoal and Pastel on Canvas<br>\r\nDimensions 400x300<br>\r\n2007','','','','','');
photos[44] = new photo(1294210,'91655','','gallery','http://www4.clikpic.com/noelbrennan/images/juggle.jpg',335,450,'The Jester juggles with many an abstract thought in his quest to please!','http://www4.clikpic.com/noelbrennan/images/juggle_thumb.jpg',130, 175,1, 0,'An Early piece from the series.<br>\r\nCharcoal and pastel on Canvas.<br>\r\nDimensions 400x300<br>\r\n2007','','','','','');
photos[45] = new photo(1296518,'91655','','gallery','http://www4.clikpic.com/noelbrennan/images/tech.jpg',332,450,'Technological imprisonment of the modern consciousness','http://www4.clikpic.com/noelbrennan/images/tech_thumb.jpg',130, 176,1, 0,'Although all the shapes and patterns are organic, this one has a mechanical order to it.<br>\r\nCharcoal and pastel on Canvas.<br>\r\nDimensions 400x300<br>\r\n2007','','','','','');
photos[46] = new photo(1296544,'91655','','gallery','http://www4.clikpic.com/noelbrennan/images/tree.jpg',331,450,'The Sun Tree has many a thorny root!','http://www4.clikpic.com/noelbrennan/images/tree_thumb.jpg',130, 177,1, 0,'A primitive plant form in vibrant yellows.<br>\r\nCharcoal and Pastel on Canvas.<br>\r\nDimensions 400x300<br>\r\n2007','','','','','');
photos[47] = new photo(1296559,'91655','','gallery','http://www4.clikpic.com/noelbrennan/images/sky.jpg',334,450,'Would a fool look to the sky to find the key they had dropped?','http://www4.clikpic.com/noelbrennan/images/sky_thumb.jpg',130, 175,0, 0,'There is an amazing energy here with lots of animal symboism.<br>\r\nCharcoal and Pastel on Canvas.<br>\r\nDimensions 400x300<br>\r\n2007','','','','','');
photos[48] = new photo(1297000,'91655','','gallery','http://www4.clikpic.com/noelbrennan/images/star.jpg',338,450,'In the icy chill of the night the warmth of the day is but a memory!','http://www4.clikpic.com/noelbrennan/images/star_thumb.jpg',130, 173,0, 0,'Fire and ice!<br>\r\nCharcoal and pastel on Canvas.<br>\r\nDimensions 400x300<br>\r\n2007','','','','','');
photos[49] = new photo(1296562,'91655','','gallery','http://www4.clikpic.com/noelbrennan/images/thorn.jpg',335,450,'The roots danced as the flower ripped a blood red hole in the sky!','http://www4.clikpic.com/noelbrennan/images/thorn_thumb.jpg',130, 175,0, 0,'Here the roots of this strange plant turn into dancing figures.<br>\r\nCharcoal and Pastel on Canvas.<br>\r\nDimensions 400x300<br>\r\n2007','','','','','');
photos[50] = new photo(1297021,'91655','','gallery','http://www4.clikpic.com/noelbrennan/images/tt2.jpg',333,450,'You only had to look to realise everything would now be never the same!','http://www4.clikpic.com/noelbrennan/images/tt2_thumb.jpg',130, 176,1, 0,'I see you! I love the static crackle with the soft shapes!<br>\r\nCharcoal and Pastel on Canvas.<br>\r\nDimensions 400x300<br>\r\n2007','','','','','');
photos[51] = new photo(1968888,'91655','','gallery','http://www4.clikpic.com/noelbrennan/images/fuit.jpg',327,442,'The fruit on the vine is sweetened by the decay of the Earth','http://www4.clikpic.com/noelbrennan/images/fuit_thumb.jpg',130, 176,0, 0,'This drawing contains many plant and water references.<br>\r\nCharcoal and Pastel on Canvas.<br>\r\n400x300mm<br>\r\n2008','','','','','');
photos[52] = new photo(1289623,'91507','','gallery','http://www4.clikpic.com/noelbrennan/images/hamleys.jpg',500,332,'Hamley\'s Toy Store','http://www4.clikpic.com/noelbrennan/images/hamleys_thumb.jpg',130, 86,0, 0,'Next time you are in Hamley\'s Toy Store (the biggest in the world!) Take a visit to the sweet section to see the famous \'Gobstopper\' machine in action. I was asked to design and build this in 1999 and it\'s still going strong.','','','','','');
photos[53] = new photo(1289631,'91507','','gallery','http://www4.clikpic.com/noelbrennan/images/topgear.jpg',338,450,'Top Gear','http://www4.clikpic.com/noelbrennan/images/topgear_thumb.jpg',130, 173,0, 0,'This was a perculiar one! James May, one of the Top Gear presenters commissioned a Limo. The front half was the front of a Saab the back half was the front of an Alpha Romeo. Inside the Saab was a full working Sauna. In the Alpha was a minature Cistene Chapel. He used this \'pushmepullyou\' contraption to chauffer Limar to the 2007 Brit Awards! No! It doesn\'t make any sense to me either! Fun though!','','','','','');
photos[54] = new photo(1289635,'91507','','gallery','http://www4.clikpic.com/noelbrennan/images/train.jpg',500,398,'Belfast Folk and Transport Museum','http://www4.clikpic.com/noelbrennan/images/train_thumb.jpg',130, 103,0, 0,'The Belfast Folk and Transport Museum is filled with static scenes of times gone by. It\'s a great place! I made many of these throughout the nineties!','','','','','');
photos[55] = new photo(1289632,'91507','','gallery','http://www4.clikpic.com/noelbrennan/images/hawser.jpg',500,361,'Hawser Glider','http://www4.clikpic.com/noelbrennan/images/hawser_thumb.jpg',130, 94,0, 0,'Towards the end of the Second World War we where sending troops and vehicles across the Channel in Gliders.<br>\r\nThis scenic model was built for the Imperial War Museum. It depicts a crashed glider with wounded pilot talking to a BBC correspondent.','','','','','');
photos[56] = new photo(1292564,'91507','','gallery','http://www4.clikpic.com/noelbrennan/images/pilgrimm.jpg',296,450,'Pilgrim Stone','http://www4.clikpic.com/noelbrennan/images/pilgrimm_thumb.jpg',130, 198,0, 1,'These stones can be found all over Europe and are markers that direct pilgrims to holy sites.<br>\r\nThis was a reconstruction for a museum in Ireland.<br>\r\nDimensions 800x400x300<br>\r\nModelled in clay, cast in fibre glass.<br>\r\n1996','','','','','');
photos[57] = new photo(1292565,'91507','','gallery','http://www4.clikpic.com/noelbrennan/images/drama.jpg',281,450,'Drama','http://www4.clikpic.com/noelbrennan/images/drama_thumb.jpg',130, 208,0, 0,'One of two entrance columns for the BBC\'s visitor centre at Portland Place. This one is represents drama the second is a female figure with a Harp and represents music.<br>\r\nFibre glass.<br>\r\n1998','','','','','');
photos[58] = new photo(1292568,'91507','','gallery','http://www4.clikpic.com/noelbrennan/images/railings.jpg',500,328,'Riverside railings','http://www4.clikpic.com/noelbrennan/images/railings_thumb.jpg',130, 85,0, 0,'Not really a modelmaking project. I designed fabricated and fitted these railings at a riverside residence in Twickenham.<br>\r\nThe total lenght of the railings was 20m and climbed to a height of 2.2m.<br>\r\n1999','','','','','');
photos[59] = new photo(1309934,'91507','','gallery','http://www4.clikpic.com/noelbrennan/images/dino.jpg',500,379,'Lulworth Cove','http://www4.clikpic.com/noelbrennan/images/dino_thumb.jpg',130, 99,0, 0,'The footprint of a Dinosaur was discovered at Lulworth Cove back in the 60\'s. This was the first ever evidence of Dinosaurs in Britain! Hence a visitors centre was built.<br>\r\n1996','','','','','');
photos[60] = new photo(1309949,'91507','','gallery','http://www4.clikpic.com/noelbrennan/images/PROP14~1.jpg',300,450,'Microlease H.Q.','http://www4.clikpic.com/noelbrennan/images/PROP14~1_thumb.jpg',130, 195,0, 0,'Microlease commissioned this mural to decorate their reception. They sponsor an arial acrobatic team and had two scale models to hang from the ceiling.<br>\r\nThe total area of this painting was 24m2.<br>\r\n1998','','','','','');
photos[61] = new photo(2389273,'91507','','gallery','http://www4.clikpic.com/noelbrennan/images/raven.jpg',320,240,'\'RAVEN\'','http://www4.clikpic.com/noelbrennan/images/raven_thumb.jpg',130, 98,0, 0,'I was working for the BBC in Scotland for the Design Crew on the 8th series of the popular Children\'s Adventure game show \'RAVEN\'. It was all filmed in Aviemore, Scotland. We all had a wicked time!','','','','','');
photos[62] = new photo(3495942,'91507','','gallery','http://www4.clikpic.com/noelbrennan/images/ravenadpicweb.png',320,240,'Raven Adventure 2009','http://www4.clikpic.com/noelbrennan/images/ravenadpicweb_thumb.png',130, 98,0, 0,'Raven Adventure 2009<br>\r\nOnce again for the BBC in Scotland, filmed between September and November. This time the challenges involved Spiders, giant insects and Rats!','','','','','');
photos[63] = new photo(1299506,'92138','','gallery','http://www4.clikpic.com/noelbrennan/images/2004.jpg',500,360,'Golden Gods 2004','http://www4.clikpic.com/noelbrennan/images/2004_thumb.jpg',130, 94,0, 0,'The original \'Golden God\' Handed out in 2004 to rock legends such as Lemmy from Motorhead and Bruce Dickinson from Iron Maiden.','','','','','');
photos[64] = new photo(1299512,'92138','','gallery','http://www4.clikpic.com/noelbrennan/images/god06.jpg',180,450,'Golden Gods 2006','http://www4.clikpic.com/noelbrennan/images/god06_thumb.jpg',130, 325,0, 0,'An updated God in 2006 saw him taller and a bit slicker. This was Ozzy Ozbourne\'s year!','','','','','');
photos[65] = new photo(1299530,'92138','','gallery','http://www4.clikpic.com/noelbrennan/images/goldie1.jpg',174,450,'Golden Gods 2007','http://www4.clikpic.com/noelbrennan/images/goldie1_thumb.jpg',130, 336,0, 0,'This a was a big year for the Golden Gods with more being handed out than ever before. Slayer, Slash, Napalm Death, Deathstars and Lamb of God being just a few of the winners.','','','','','');
photos[66] = new photo(1299575,'92138','','gallery','http://www4.clikpic.com/noelbrennan/images/ken.jpg',286,450,'The Ken Wild Memorial Trophy','http://www4.clikpic.com/noelbrennan/images/ken_thumb.jpg',130, 205,1, 1,'This Trophy was commissioned by the wife of the late Ken Wild a breeder of rare sheep, mainly the Whitefaced Woodland. Ken was probably most infamous for living in a remote farmhouse that was surrounded by the M62 high in the Pennines! The Trophy is awarded to the \'Best of Breed\' winner at an annual agricultural show and is returned to be awarded the following year.<br>\r\nCold cast and Silver plated on a Mahogany base.<br>\r\nDimensions 350mm high.<br>\r\n2005','','','','','');
photos[67] = new photo(1299738,'92138','','gallery','http://www4.clikpic.com/noelbrennan/images/cruz.jpg',302,450,'Cruz Bereavement','http://www4.clikpic.com/noelbrennan/images/cruz_thumb.jpg',130, 194,0, 0,'Cruz Bereavement is a charity that offers counselling to people who are finding it difficult to adjust to the loss of a loved one. They commissioned this award to thank organizations and individuals who had supported them in the media. The award itself is modelled on a Cruz, which was a vessel filled with aromatic oils to anoint the dead.<br>\r\nDimensions 200mm high.<br>\r\n1997','','','','','');
photos[68] = new photo(1300874,'92138','','gallery','http://www4.clikpic.com/noelbrennan/images/speech.jpg',397,450,'The Royal College of Speech and Language Therapists','http://www4.clikpic.com/noelbrennan/images/speech_thumb.jpg',130, 147,0, 0,'The college commissioned this piece as an award for excellence in communication.<br>\r\nCold cast Bronze on a mahogany base.<br>\r\nDimensions 200mm high.<br>\r\n1998','','','','','');
photos[69] = new photo(1300893,'92138','','gallery','http://www4.clikpic.com/noelbrennan/images/belt.jpg',500,250,'Get in the ring!','http://www4.clikpic.com/noelbrennan/images/belt_thumb.jpg',130, 65,0, 0,'A \'boxing\' match was set up between four rock bands. The outcome being that there would be only one winner! This was the trophy!<br>\r\nChrome plated panels on a leather belt.<br>\r\n2007','','','','','');
photos[70] = new photo(1300895,'92138','','gallery','http://www4.clikpic.com/noelbrennan/images/GITR.jpg',305,450,'Get in the ring!','http://www4.clikpic.com/noelbrennan/images/GITR_thumb.jpg',130, 192,0, 0,'The lead singer with the Deathstars shows off his award!','','','','','');
photos[71] = new photo(1519408,'104304','','gallery','http://www4.clikpic.com/noelbrennan/images/doll.jpg',500,431,'doll-t-1','http://www4.clikpic.com/noelbrennan/images/doll_thumb.jpg',130, 112,1, 1,'This I find a fascinating image. A doll\'s head I came across, almost hairless with it\'s eyes pushed in. Not an immediate appeal for most, but it will mesmerise!<br>\r\n2006','','','','','');
photos[72] = new photo(1519474,'104304','','gallery','http://www4.clikpic.com/noelbrennan/images/doll3.jpg',240,450,'doll-t-3','http://www4.clikpic.com/noelbrennan/images/doll3_thumb.jpg',130, 244,0, 0,'A second view of doll-t-1. This image has been selected to be published in the first esnips book.<br>\r\nI will update the news section on it\'s progress.<br>\r\n2007','','','','','');
photos[73] = new photo(1548187,'104304','','gallery','http://www4.clikpic.com/noelbrennan/images/sid3.jpg',322,450,'Sid James Brennan','http://www4.clikpic.com/noelbrennan/images/sid3_thumb.jpg',130, 182,0, 0,'A snapshot in the life of Sid (11 weeks)! He seemed to be in quite a thoughtful mood on this particular day!<br>\r\n2007','','','','','');
photos[74] = new photo(2464561,'104304','','gallery','http://www4.clikpic.com/noelbrennan/images/jillnude.jpg',450,291,'\'The Blue Nude\'','http://www4.clikpic.com/noelbrennan/images/jillnude_thumb.jpg',130, 84,1, 0,'A classic abstract nude shot with a difference, the Model was heavily pregnant at the time!<br>\r\n2007','','','','','');
photos[75] = new photo(2464568,'104304','','gallery','http://www4.clikpic.com/noelbrennan/images/bradford.jpg',338,450,'\'Where, from here\'?','http://www4.clikpic.com/noelbrennan/images/bradford_thumb.jpg',130, 173,0, 0,'I like the suggested narrative here.<br>\r\n2006','','','','','');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
galleries = new Array();
galleries[0] = new gallery(90688,'1276188','Sculpture','gallery');
galleries[1] = new gallery(90806,'1286451','Paintings','gallery');
galleries[2] = new gallery(91517,'1290038','Portraits','gallery');
galleries[3] = new gallery(91655,'1294221','Drawings','gallery');
galleries[4] = new gallery(91507,'1292564','Modelmaking','gallery');
galleries[5] = new gallery(92138,'1299575','Awards','gallery');
galleries[6] = new gallery(104304,'1519408','Photography','gallery');

