/***************************************************************************
* 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('1953356,1953350,1953348,1953346,1953344,1953342,1953339,1953337,1953335,1953332,1953329,1953326,1953323,1953322,1953320,1953311,1953305,1953300,1953294,1953292,1953275,1953273,1953270,1953267,1953264,1953256,1953250,1953238,1953233,1952049,1952048,1952047,1952045,1952043,1952042,1952041,1952040,1952038,1952037,1952036,1952034,1952033,1952032,1952031,1952029,1952027,1952026,1951996,1951995,1951994');
	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('1953356,1953350,1953348,1953346,1953344,1953342,1953339,1953337,1953335,1953332,1953329,1953326,1953323,1953322,1953320,1953311,1953305,1953300,1953294,1953292,1953275,1953273,1953270,1953267,1953264,1953256,1953250,1953238,1953233,1952049,1952048,1952047,1952045,1952043,1952042,1952041,1952040,1952038,1952037,1952036,1952034,1952033,1952032,1952031,1952029,1952027,1952026,1951996,1951995,1951994');
	for (j = 0; j < photos.length; j++) {
		if (photos[j].id == imageID) {
			if ('gallery' != '') {
						if (photos[j].galleries_id != '') {
						document.write('<a href="' + photos[j].section_code + '_' + photos[j].galleries_id + '.html">');
						}
						else {
						document.write('<a href="gallery.html">');
						}
			}
			document.write('<img src="' + photos[j].src + '" width="' + photos[j].width + '" height="' + photos[j].height + '" class="mainhomepageimage" id="mainSample" name="mainSample" alt="' + photos[j].caption  + '" border="0">');
			if ('gallery' != '') {
				document.write('</a>');
			}
			break;
		}
	}
	
}

/***************************************************************************
* Show the next image in a gallery.  field = hidden field containing       *
* image_id                                                                 *
*  img = reference to image object in which to show image                  *
***************************************************************************/
function next(field,img) {

	debug('IN next');
	imageID = field.value;
	
	for (j = 0; j < photos.length; j++) {
		if (photos[j].id == imageID) {
			break;
		}
	}
	debug('image is ' + j);
	nextImg = -1;
	k= j + 1;
	while (nextImg < 0) {
		for (; k < photos.length; k++) {
			debug('testing image ' + k + ': gallery = ' + photos[k].galleries_id + '(existing: ' + photos[j].galleries_id + ')');
			if (photos[k].galleries_id == photos[j].galleries_id) {
				nextImg = k;
				debug('setting  nextImg = ' + k);
				break;
			}
		}
		if (nextImg == -1) {
			k = 0;
		}
	}
	if (nextImg != -1) {
		updateImage(nextImg, field,img);
	}


}


/***************************************************************************
* Set a new image on the gallery detail page given its array position      *
***************************************************************************/
function updateImage (nextImg, field,img) {
	debug('Updating image');
	if (!basic && !(1)) {
		debug('In updateImage');
		debug('setting  img src = ' + photos[nextImg].src);
		
					
			document.getElementById('imagePhoto').innerHTML = '<img class="mainphoto" src="' + photos[nextImg].src + ' " id="mainPic" name="mainPic" width="' + photos[nextImg].width + '" height="' + photos[nextImg].height + '" alt="' + photos[nextImg].caption + '" border="0">';
						field.value = photos[nextImg].id;
			document.getElementById('imageTitle').innerHTML = photos[nextImg].caption;
			document.title = photos[nextImg].caption;
			/* apply 'blank' classname to element where */			if ( photos[nextImg].caption == '') {
				document.getElementById('imageTitle').style.className = 'blank';
			}
			else {
				document.getElementById('imageTitle').style.className = 'normal';
			}
						temp = '';
			if (photos[nextImg].description != '') {
				temp = temp +  '<p id="imageDescription">' + photos[nextImg].description + '</p>';
			}
			if (photos[nextImg].photo_ref != '') {
				temp = temp + '<p class="imageinfo" id="imageRef"><strong>Ref: </strong>' + photos[nextImg].photo_ref + '</p>';
			}
			if (photos[nextImg].takendate != '') {
				debug('Resetting taken date');
				temp = temp + '<p class="imageinfo" id="imageDate"><strong>Date: </strong>' + photos[nextImg].takendate + '</p>';
			}
			
			if (photos[nextImg].location != '') {
				debug('Resetting location');
				temp = temp + '<p class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  photos[nextImg].location + '</p>';
			}
			
			if (photos[nextImg].photographer != '') {
				debug('Resetting photographer');
				temp = temp + '<p class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + photos[nextImg].photographer + '</p>';
			}
			if (temp != '') {				temp = temp + '<div class="spacer"></div>';			}					if (temp == '') {
			document.getElementById('imageDetails').style.display = 'none';
		}
		else {
			document.getElementById('imageDetails').style.display = 'block';
		}
		document.getElementById('imageDetails').innerHTML =temp;	
		
	}
	else {
		debug('Redirecting to id ' + photos[nextImg].id);
		window.location = 'photo_' + photos[nextImg].id + '.html';
	}
}

/***************************************************************************
* Show the previous image for a gallery. field = hidden field containing   *
* image_id                                                                 *
*  img = reference to image object in which to show image                  *
***************************************************************************/
function previous(field,img) {


	imageID = field.value;
	for (j = 0; j < photos.length; j++) {
		if (photos[j].id == imageID) {
			break;
		}
	}
	debug('image is ' + j);
	nextImg = -1;
	k = j -1;
	while (nextImg < 0) {
		for (; k >= 0; k--) {
			if (photos[k].galleries_id == photos[j].galleries_id) {
				nextImg = k;
				break;
			}
		}
		if (nextImg == -1) {
			k = photos.length -1;
		}
	}
	if (nextImg != -1) {
		updateImage(nextImg, field,img);	
	}
}

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.
        *
* Gallery_id = id of gallery to choose                                     *
* 
 img = reference to html image                                       *
* in which to show image                                                   *
***************************************************************************/
function showGalleryImage(gallery_id, img) {
	debug('Gallery = ' + gallery_id);
	for (i = 0; i < galleries.length; i++) {
		if (galleries[i].id == gallery_id) {
			imageID = randomListVal(galleries[i].featured_images);
				for (j = 0; j < photos.length; j++) {
					if (photos[j].id == imageID) {
						
						img.src = photos[j].thumbnail;
						img.width = photos[j].thumbnail_width;
						img.height = photos[j].thumbnail_height;
						
						break;
					}
				}
			break;
		}
	} 
	}

/***************************************************************************
* If we have dynamic HTML                                                  *
*  replace the galleries link with a list that                             *
* doesn't include the current gallery                                      *
***************************************************************************/
function showGalleries(gallery_id) {
	debug('Showing links for gallery ' + gallery_id);
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
			debug('Testing gallery ' + galleries[i].id);
			
			if (galleries[i].id != gallery_id) {
				debug('Adding link');
				if (temp != '') {
					temp = temp + ' | ';
				}
				temp = temp + '<a href="gallery_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
			}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}
/***************************************************************************
* Create the array of Photo objects                                        *
***************************************************************************/
photos = new Array();
photos[0] = new photo(1951958,'160675','','gallery','http://www1.clikpic.com/lukewestern/images/making footprints 2 002.JPG',442,344,'','http://www1.clikpic.com/lukewestern/images/making footprints 2 002_thumb.JPG',130, 101,0, 0,'','','','',50.00,'Original - Spin off of \'Movement in Action\' series.');
photos[1] = new photo(1952047,'160675','','gallery','http://www1.clikpic.com/lukewestern/images/making footprints 2 003.JPG',500,261,'','http://www1.clikpic.com/lukewestern/images/making footprints 2 003_thumb.JPG',130, 68,0, 0,'','','','',125.00,'Spin off of \'Movement in Action\' series');
photos[2] = new photo(1952048,'160675','','gallery','http://www1.clikpic.com/lukewestern/images/making footprints 2 004.JPG',500,253,'','http://www1.clikpic.com/lukewestern/images/making footprints 2 004_thumb.JPG',130, 66,0, 0,'','','','',125.00,'Spin off of \'Movement in Action\' series.');
photos[3] = new photo(1952049,'160675','','gallery','http://www1.clikpic.com/lukewestern/images/making footprints 2 005.JPG',500,250,'','http://www1.clikpic.com/lukewestern/images/making footprints 2 005_thumb.JPG',130, 65,0, 0,'','','','',125.00,'Spin off of \'Movement in Action\' series.');
photos[4] = new photo(1953233,'131191','','gallery','http://www1.clikpic.com/lukewestern/images/making footprints4 001.JPG',500,400,'','http://www1.clikpic.com/lukewestern/images/making footprints4 001_thumb.JPG',130, 104,0, 0,'','','','','','');
photos[5] = new photo(1953238,'131191','','gallery','http://www1.clikpic.com/lukewestern/images/making footprints4 002.JPG',500,400,'','http://www1.clikpic.com/lukewestern/images/making footprints4 002_thumb.JPG',130, 104,0, 0,'','','','','','');
photos[6] = new photo(1953250,'131191','','gallery','http://www1.clikpic.com/lukewestern/images/making footprints4 003.JPG',500,625,'','http://www1.clikpic.com/lukewestern/images/making footprints4 003_thumb.JPG',130, 163,0, 0,'','','','','','');
photos[7] = new photo(1953256,'131191','','gallery','http://www1.clikpic.com/lukewestern/images/making footprints4 004.JPG',500,400,'','http://www1.clikpic.com/lukewestern/images/making footprints4 004_thumb.JPG',130, 104,0, 0,'','','','','','');
photos[8] = new photo(1953264,'131191','','gallery','http://www1.clikpic.com/lukewestern/images/making footprints4 005.JPG',500,641,'','http://www1.clikpic.com/lukewestern/images/making footprints4 005_thumb.JPG',130, 167,0, 0,'','','','','','');
photos[9] = new photo(1953267,'131191','','gallery','http://www1.clikpic.com/lukewestern/images/making footprints4 006.JPG',500,400,'','http://www1.clikpic.com/lukewestern/images/making footprints4 006_thumb.JPG',130, 104,0, 0,'','','','','','');
photos[10] = new photo(1953270,'131191','','gallery','http://www1.clikpic.com/lukewestern/images/making footprints4 010.JPG',500,400,'','http://www1.clikpic.com/lukewestern/images/making footprints4 010_thumb.JPG',130, 104,0, 0,'','','','','','');
photos[11] = new photo(1953273,'131191','','gallery','http://www1.clikpic.com/lukewestern/images/making footprints4 011.JPG',500,625,'','http://www1.clikpic.com/lukewestern/images/making footprints4 011_thumb.JPG',130, 163,0, 0,'','','','','','');
photos[12] = new photo(1953275,'131191','','gallery','http://www1.clikpic.com/lukewestern/images/making footprints4 012.JPG',500,400,'','http://www1.clikpic.com/lukewestern/images/making footprints4 012_thumb.JPG',130, 104,0, 0,'','','','','','');
photos[13] = new photo(1953292,'131191','','gallery','http://www1.clikpic.com/lukewestern/images/making footprints4 013.JPG',500,391,'','http://www1.clikpic.com/lukewestern/images/making footprints4 013_thumb.JPG',130, 102,0, 0,'','','','','','');
photos[14] = new photo(1953294,'131191','','gallery','http://www1.clikpic.com/lukewestern/images/making footprints4 014.JPG',500,400,'','http://www1.clikpic.com/lukewestern/images/making footprints4 014_thumb.JPG',130, 104,0, 0,'','','','','','');
photos[15] = new photo(1953300,'131191','','gallery','http://www1.clikpic.com/lukewestern/images/making footprints4 017.JPG',500,400,'','http://www1.clikpic.com/lukewestern/images/making footprints4 017_thumb.JPG',130, 104,0, 0,'','','','','','');
photos[16] = new photo(1953305,'131191','','gallery','http://www1.clikpic.com/lukewestern/images/making footprints4 019.JPG',500,400,'','http://www1.clikpic.com/lukewestern/images/making footprints4 019_thumb.JPG',130, 104,0, 0,'','','','','','');
photos[17] = new photo(1953311,'131191','','gallery','http://www1.clikpic.com/lukewestern/images/making footprints4 020.JPG',500,625,'','http://www1.clikpic.com/lukewestern/images/making footprints4 020_thumb.JPG',130, 163,0, 0,'','','','','','');
photos[18] = new photo(1953320,'160675','','gallery','http://www1.clikpic.com/lukewestern/images/orange.jpg',353,445,'','http://www1.clikpic.com/lukewestern/images/orange_thumb.jpg',130, 164,0, 0,'','','','',125.00,'Original - Spin off of \'Movement in Action\' series.');
photos[19] = new photo(1953322,'131191','','gallery','http://www1.clikpic.com/lukewestern/images/purple1.jpg',354,359,'','http://www1.clikpic.com/lukewestern/images/purple1_thumb.jpg',130, 132,0, 0,'','','','','','');
photos[20] = new photo(1953323,'131191','','gallery','http://www1.clikpic.com/lukewestern/images/red.jpg',405,373,'','http://www1.clikpic.com/lukewestern/images/red_thumb.jpg',130, 120,0, 0,'','','','','','');
photos[21] = new photo(1953326,'160675','','gallery','http://www1.clikpic.com/lukewestern/images/red1st.jpg',333,443,'','http://www1.clikpic.com/lukewestern/images/red1st_thumb.jpg',130, 173,0, 0,'','','','',75.00,'Original - First of \'Movement in Action\' series. (canvas on cardboard)');
photos[22] = new photo(1953329,'160675','','gallery','http://www1.clikpic.com/lukewestern/images/redwhite1.jpg',369,379,'','http://www1.clikpic.com/lukewestern/images/redwhite1_thumb.jpg',130, 134,0, 0,'','','','',135.00,'Original -  \'Movement in Action\' series.');
photos[23] = new photo(1953332,'160675','','gallery','http://www1.clikpic.com/lukewestern/images/turquise.jpg',355,352,'','http://www1.clikpic.com/lukewestern/images/turquise_thumb.jpg',130, 129,0, 0,'','','','',135.00,'Original - \'Movement in Action\' series.');
photos[24] = new photo(1953335,'131191','','gallery','http://www1.clikpic.com/lukewestern/images/yellowweb1.jpg',369,371,'','http://www1.clikpic.com/lukewestern/images/yellowweb1_thumb.jpg',130, 131,0, 0,'','','','','','');
photos[25] = new photo(1953337,'160675','','gallery','http://www1.clikpic.com/lukewestern/images/blue.jpg',365,364,'','http://www1.clikpic.com/lukewestern/images/blue_thumb.jpg',130, 130,0, 0,'','','','',135.00,'Original - \'Movement in Action\' series.');
photos[26] = new photo(1953339,'160675','','gallery','http://www1.clikpic.com/lukewestern/images/bluered1.jpg',368,369,'','http://www1.clikpic.com/lukewestern/images/bluered1_thumb.jpg',130, 130,0, 0,'','','','',100.00,'Original - \'Movement in Action\' series.');
photos[27] = new photo(1953342,'160675','','gallery','http://www1.clikpic.com/lukewestern/images/brown.jpg',369,371,'','http://www1.clikpic.com/lukewestern/images/brown_thumb.jpg',130, 131,0, 0,'','','','',135.00,'Original - \'Movement in Action\' series.');
photos[28] = new photo(1953344,'160675','','gallery','http://www1.clikpic.com/lukewestern/images/dance.jpg',357,361,'','http://www1.clikpic.com/lukewestern/images/dance_thumb.jpg',130, 131,0, 0,'','','','',100.00,'Original - \'Movement in Action\' series.');
photos[29] = new photo(1953346,'131191','','gallery','http://www1.clikpic.com/lukewestern/images/gold.jpg',245,488,'','http://www1.clikpic.com/lukewestern/images/gold_thumb.jpg',130, 259,0, 0,'','','','','','');
photos[30] = new photo(1953348,'160675','','gallery','http://www1.clikpic.com/lukewestern/images/green.jpg',369,368,'','http://www1.clikpic.com/lukewestern/images/green_thumb.jpg',130, 130,0, 0,'','','','',175.00,'Original - Spin off of \'Movement in Action\' series.');
photos[31] = new photo(1953350,'160675','','gallery','http://www1.clikpic.com/lukewestern/images/greenlight.jpg',386,364,'','http://www1.clikpic.com/lukewestern/images/greenlight_thumb.jpg',130, 123,0, 0,'','','','',135.00,'Original - \'Movement in Action\' series.');
photos[32] = new photo(1951959,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/making footprints 2 006.JPG',477,671,'','http://www1.clikpic.com/lukewestern/images/making footprints 2 006_thumb.JPG',130, 183,0, 0,'','','','','','');
photos[33] = new photo(1951960,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/making footprints 2 007.JPG',442,470,'','http://www1.clikpic.com/lukewestern/images/making footprints 2 007_thumb.JPG',130, 138,0, 0,'','','','','','');
photos[34] = new photo(1951961,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/making footprints 2 008.JPG',280,344,'','http://www1.clikpic.com/lukewestern/images/making footprints 2 008_thumb.JPG',130, 160,0, 0,'','','','','','');
photos[35] = new photo(1951962,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/making footprints 2 009.JPG',500,348,'','http://www1.clikpic.com/lukewestern/images/making footprints 2 009_thumb.JPG',130, 90,0, 0,'','','','','','');
photos[36] = new photo(1951963,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/making footprints 2 010.JPG',405,598,'','http://www1.clikpic.com/lukewestern/images/making footprints 2 010_thumb.JPG',130, 192,0, 0,'','','','','','');
photos[37] = new photo(1951964,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/making footprints 2 012.JPG',361,348,'','http://www1.clikpic.com/lukewestern/images/making footprints 2 012_thumb.JPG',130, 125,0, 0,'','','','','','');
photos[38] = new photo(1951965,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/making footprints 2 013.JPG',500,350,'','http://www1.clikpic.com/lukewestern/images/making footprints 2 013_thumb.JPG',130, 91,0, 0,'','','','','','');
photos[39] = new photo(1951966,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/making footprints 2 014.JPG',373,497,'','http://www1.clikpic.com/lukewestern/images/making footprints 2 014_thumb.JPG',130, 173,0, 0,'','','','','','');
photos[40] = new photo(1951967,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/making footprints 2 016.JPG',435,530,'','http://www1.clikpic.com/lukewestern/images/making footprints 2 016_thumb.JPG',130, 158,0, 0,'','','','','','');
photos[41] = new photo(1951968,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/making footprints 2 017.JPG',500,255,'','http://www1.clikpic.com/lukewestern/images/making footprints 2 017_thumb.JPG',130, 66,0, 0,'','','','','','');
photos[42] = new photo(1951970,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/making footprints 2 018.JPG',500,320,'','http://www1.clikpic.com/lukewestern/images/making footprints 2 018_thumb.JPG',130, 83,0, 0,'','','','','','');
photos[43] = new photo(1951971,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/making footprints 2 019.JPG',452,658,'','http://www1.clikpic.com/lukewestern/images/making footprints 2 019_thumb.JPG',130, 189,0, 0,'','','','','','');
photos[44] = new photo(1951972,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/making footprints 2 020.JPG',265,334,'','http://www1.clikpic.com/lukewestern/images/making footprints 2 020_thumb.JPG',130, 164,0, 0,'','','','','','');
photos[45] = new photo(1951973,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/making footprints 2 021.JPG',329,486,'','http://www1.clikpic.com/lukewestern/images/making footprints 2 021_thumb.JPG',130, 192,0, 0,'','','','','','');
photos[46] = new photo(1951974,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/making footprints 2 022.JPG',500,271,'','http://www1.clikpic.com/lukewestern/images/making footprints 2 022_thumb.JPG',130, 70,0, 0,'Click <a target=\"_blank\" href=\"http://www.makingfootprints.co.uk/photo_1952047.html\">here</a> to see the final painting of this sketch.','','','','','');
photos[47] = new photo(1951976,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/making footprints 2 024.JPG',500,499,'','http://www1.clikpic.com/lukewestern/images/making footprints 2 024_thumb.JPG',130, 130,0, 0,'','','','','','');
photos[48] = new photo(1951978,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/making footprints 2 025.JPG',500,504,'','http://www1.clikpic.com/lukewestern/images/making footprints 2 025_thumb.JPG',130, 131,0, 0,'','','','','','');
photos[49] = new photo(1951979,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/making footprints 2 026.JPG',385,381,'','http://www1.clikpic.com/lukewestern/images/making footprints 2 026_thumb.JPG',130, 129,0, 0,'','','','','','');
photos[50] = new photo(1951981,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/making footprints 2 027.JPG',500,506,'','http://www1.clikpic.com/lukewestern/images/making footprints 2 027_thumb.JPG',130, 132,0, 0,'','','','','','');
photos[51] = new photo(1951983,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/making footprints 3 001.JPG',468,636,'','http://www1.clikpic.com/lukewestern/images/making footprints 3 001_thumb.JPG',130, 177,0, 0,'Click <a target=\"_blank\" href=\"http://www.makingfootprints.co.uk/photo_1953326.html\">here</a> to see the final painting of this sketch.','','','','','');
photos[52] = new photo(1951984,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/making footprints 3 002.JPG',486,540,'','http://www1.clikpic.com/lukewestern/images/making footprints 3 002_thumb.JPG',130, 144,0, 0,'','','','','','');
photos[53] = new photo(1951985,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/making footprints 3 003.JPG',442,537,'','http://www1.clikpic.com/lukewestern/images/making footprints 3 003_thumb.JPG',130, 158,0, 0,'','','','','','');
photos[54] = new photo(1951986,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/making footprints 3 004.JPG',500,521,'','http://www1.clikpic.com/lukewestern/images/making footprints 3 004_thumb.JPG',130, 135,0, 0,'','','','','','');
photos[55] = new photo(1951987,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/making footprints 3 005.JPG',343,557,'','http://www1.clikpic.com/lukewestern/images/making footprints 3 005_thumb.JPG',130, 211,0, 0,'','','','','','');
photos[56] = new photo(1951988,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/makingfootprints 002.JPG',273,543,'','http://www1.clikpic.com/lukewestern/images/makingfootprints 002_thumb.JPG',130, 259,0, 0,'','','','','','');
photos[57] = new photo(1951989,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/makingfootprints 004.JPG',500,671,'','http://www1.clikpic.com/lukewestern/images/makingfootprints 004_thumb.JPG',130, 174,0, 0,'','','','','','');
photos[58] = new photo(1951990,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/makingfootprints 005.JPG',500,375,'','http://www1.clikpic.com/lukewestern/images/makingfootprints 005_thumb.JPG',130, 98,0, 0,'Click <a target=\"_blank\" href=\"http://http://www.makingfootprints.co.uk/photo_1953256.html\">here</a> to see the final painting of this sketch.','','','','','');
photos[59] = new photo(1951991,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/makingfootprints 006.JPG',500,656,'','http://www1.clikpic.com/lukewestern/images/makingfootprints 006_thumb.JPG',130, 171,0, 0,'Click <a target=\"_blank\" href=\"http://www.makingfootprints.co.uk/photo_1953346.html\">here</a> to see the final painting of this sketch.','','','','','');
photos[60] = new photo(1951992,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/makingfootprints 007.JPG',500,667,'','http://www1.clikpic.com/lukewestern/images/makingfootprints 007_thumb.JPG',130, 173,0, 0,'','','','','','');
photos[61] = new photo(1951994,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/makingfootprints 008.JPG',258,344,'','http://www1.clikpic.com/lukewestern/images/makingfootprints 008_thumb.JPG',130, 173,0, 0,'','','','','','');
photos[62] = new photo(1951995,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/makingfootprints 009.JPG',500,667,'','http://www1.clikpic.com/lukewestern/images/makingfootprints 009_thumb.JPG',130, 173,0, 0,'','','','','','');
photos[63] = new photo(1951996,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/makingfootprints 010.JPG',500,735,'','http://www1.clikpic.com/lukewestern/images/makingfootprints 010_thumb.JPG',130, 191,0, 0,'','','','','','');
photos[64] = new photo(1952026,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/makingfootprints 013.JPG',500,368,'','http://www1.clikpic.com/lukewestern/images/makingfootprints 013_thumb.JPG',130, 96,0, 0,'','','','','','');
photos[65] = new photo(1952027,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/makingfootprints 014.JPG',500,606,'','http://www1.clikpic.com/lukewestern/images/makingfootprints 014_thumb.JPG',130, 158,0, 0,'','','','','','');
photos[66] = new photo(1952029,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/makingfootprints 015.JPG',500,666,'','http://www1.clikpic.com/lukewestern/images/makingfootprints 015_thumb.JPG',130, 173,0, 0,'','','','','','');
photos[67] = new photo(1952031,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/makingfootprints 016.JPG',500,428,'','http://www1.clikpic.com/lukewestern/images/makingfootprints 016_thumb.JPG',130, 111,0, 0,'','','','','','');
photos[68] = new photo(1952032,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/makingfootprints 017.JPG',500,723,'','http://www1.clikpic.com/lukewestern/images/makingfootprints 017_thumb.JPG',130, 188,0, 0,'','','','','','');
photos[69] = new photo(1952033,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/makingfootprints 018.JPG',500,399,'','http://www1.clikpic.com/lukewestern/images/makingfootprints 018_thumb.JPG',130, 104,0, 0,'','','','','','');
photos[70] = new photo(1952034,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/makingfootprints 019.JPG',500,667,'','http://www1.clikpic.com/lukewestern/images/makingfootprints 019_thumb.JPG',130, 173,0, 0,'','','','','','');
photos[71] = new photo(1952036,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/makingfootprints 020.JPG',443,581,'','http://www1.clikpic.com/lukewestern/images/makingfootprints 020_thumb.JPG',130, 170,0, 0,'','','','','','');
photos[72] = new photo(1952037,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/makingfootprints 021.JPG',384,524,'','http://www1.clikpic.com/lukewestern/images/makingfootprints 021_thumb.JPG',130, 177,0, 0,'','','','','','');
photos[73] = new photo(1952038,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/makingfootprints 023.JPG',299,368,'','http://www1.clikpic.com/lukewestern/images/makingfootprints 023_thumb.JPG',130, 160,0, 0,'','','','','','');
photos[74] = new photo(1952040,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/makingfootprints 024.JPG',317,311,'','http://www1.clikpic.com/lukewestern/images/makingfootprints 024_thumb.JPG',130, 128,0, 0,'','','','','','');
photos[75] = new photo(1952041,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/makingfootprints 025.JPG',460,702,'','http://www1.clikpic.com/lukewestern/images/makingfootprints 025_thumb.JPG',130, 198,0, 0,'','','','','','');
photos[76] = new photo(1952042,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/makingfootprints 026.JPG',498,743,'','http://www1.clikpic.com/lukewestern/images/makingfootprints 026_thumb.JPG',130, 194,0, 0,'','','','','','');
photos[77] = new photo(1952043,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/makingfootprints 027.JPG',500,811,'','http://www1.clikpic.com/lukewestern/images/makingfootprints 027_thumb.JPG',130, 211,0, 0,'','','','','','');
photos[78] = new photo(1952045,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/makingfootprints 028.JPG',351,264,'','http://www1.clikpic.com/lukewestern/images/makingfootprints 028_thumb.JPG',130, 98,0, 0,'','','','','','');
photos[79] = new photo(1953356,'129828','','gallery','http://www1.clikpic.com/lukewestern/images/fresh vision 011.jpg',127,166,'','http://www1.clikpic.com/lukewestern/images/fresh vision 011_thumb.jpg',130, 170,0, 0,'','','','','','');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
galleries = new Array();
galleries[0] = new gallery(131191,'1953346,1953335,1953323,1953322,1953311,1953305,1953300,1953294,1953292,1953275','Paintings','gallery');
galleries[1] = new gallery(160675,'1953350,1953348,1953344,1953342,1953339,1953337,1953332,1953329,1953326,1953320','Paintings Available for Purchase','gallery');
galleries[2] = new gallery(129828,'1953356,1952045,1952043,1952042,1952041,1952040,1952038,1952037,1952036,1952034','Doodles...','gallery');

