/***************************************************************************
* 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('3914804,3896390,3896388,3896385,3896384,3896380,3896376,3896369,3896368,3896365,3896363,3896356,3896355,3896351,3896325,3896320,3896315,3896311,3896306,3896303,3882175,3882169,3882152,3882145,3882140,3882135,3882129,3882124,3882120,3882117,3882112,3882099,3882044');
	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('3914804,3896390,3896388,3896385,3896384,3896380,3896376,3896369,3896368,3896365,3896363,3896356,3896355,3896351,3896325,3896320,3896315,3896311,3896306,3896303,3882175,3882169,3882152,3882145,3882140,3882135,3882129,3882124,3882120,3882117,3882112,3882099,3882044');
	for (j = 0; j < photos.length; j++) {
		if (photos[j].id == imageID) {
			if ('section287365' != '') {
						if (photos[j].galleries_id != '') {
						document.write('<a href="' + photos[j].section_code + '_' + photos[j].galleries_id + '.html">');
						}
						else {
						document.write('<a href="section287365.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 ('section287365' != '') {
				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 = photos[nextImg].caption + ': LOCHINVER VILLAGE HALL';
										/* 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(3880258,'','','','http://www3.clikpic.com/ajdickson/images/Black_Umfolosi.jpg',371,229,'Black Umfolosi 5','http://www3.clikpic.com/ajdickson/images/Black_Umfolosi_thumb.jpg',130, 80,0, 0,'','','','Lochinver Village Hall, Assynt, Sutherland','','');
photos[1] = new photo(3880263,'','','','http://www3.clikpic.com/ajdickson/images/blas.jpg',400,149,'Blas','http://www3.clikpic.com/ajdickson/images/blas_thumb.jpg',130, 48,0, 0,'','','','Lochinver Village Hall, Assynt, Sutherland','','');
photos[2] = new photo(3880271,'','','','http://www3.clikpic.com/ajdickson/images/Bruce_Fummey_-_About_Robert_the_Bruce_1.jpg',400,170,'Bruce Fummey - About Robert the Bruce','http://www3.clikpic.com/ajdickson/images/Bruce_Fummey_-_About_Robert_the_Bruce_1_thumb.jpg',130, 55,0, 0,'','','','Lochinver Village Hall, Assynt, Sutherland','','');
photos[3] = new photo(3880277,'','','','http://www3.clikpic.com/ajdickson/images/Eric_Bogle_and_John_Munro.jpg',400,220,'Eric Bogle and John Munro','http://www3.clikpic.com/ajdickson/images/Eric_Bogle_and_John_Munro_thumb.jpg',130, 72,0, 0,'','','','Lochinver Village Hall, Assynt, Sutherland','','');
photos[4] = new photo(3880290,'','','','http://www3.clikpic.com/ajdickson/images/Fiona_Mackenzie.JPG',600,392,'Fiona Mackenzie Trio','http://www3.clikpic.com/ajdickson/images/Fiona_Mackenzie_thumb.JPG',130, 85,0, 0,'','','','Lochinver Village Hall, Assynt, Sutherland','','');
photos[5] = new photo(3880304,'','','','http://www3.clikpic.com/ajdickson/images/hans-theessink.jpg',197,250,'Hans Theessink','http://www3.clikpic.com/ajdickson/images/hans-theessink_thumb.jpg',130, 165,0, 0,'','','','Lochinver Village Hall, Assynt, Sutherland','','');
photos[6] = new photo(3880311,'','','','http://www3.clikpic.com/ajdickson/images/I_Miss_Communism_8.jpg',144,250,'I Miss Communism -','http://www3.clikpic.com/ajdickson/images/I_Miss_Communism_8_thumb.jpg',130, 226,0, 0,'','','','Lochinver Village Hall, Assynt, Sutherland','','');
photos[7] = new photo(3880338,'','','','http://www3.clikpic.com/ajdickson/images/kakatsitsi.jpg',433,265,'Kataksiski','http://www3.clikpic.com/ajdickson/images/kakatsitsi_thumb.jpg',130, 80,0, 0,'','','','Lochinver Village Hall, Assynt, Sutherland','','');
photos[8] = new photo(3880349,'','','','http://www3.clikpic.com/ajdickson/images/lastcuckoo.jpg',175,250,'The Last Cuckoo','http://www3.clikpic.com/ajdickson/images/lastcuckoo_thumb.jpg',130, 186,0, 0,'','','','Lochinver Village Hall, Assynt, Sutherland','','');
photos[9] = new photo(3880359,'','','','http://www3.clikpic.com/ajdickson/images/Mauvais_Sort_mono_2.jpg',400,225,'Mauvais Sort','http://www3.clikpic.com/ajdickson/images/Mauvais_Sort_mono_2_thumb.jpg',130, 73,0, 0,'','','','Lochinver Village Hall, Assynt, Sutherland','','');
photos[10] = new photo(3880486,'','','','http://www3.clikpic.com/ajdickson/images/Tailor_of_Inverness.jpg',157,249,'The Tailor of Inverness','http://www3.clikpic.com/ajdickson/images/Tailor_of_Inverness_thumb.jpg',130, 206,0, 0,'','','','Lochinver Village Hall, Assynt, Sutherland','','');
photos[11] = new photo(3880945,'','','','http://www3.clikpic.com/ajdickson/images/chet_baker_2.jpg',250,297,'Chet Baker - A Funny Valentine<br>\r\nMike Maran Productions','http://www3.clikpic.com/ajdickson/images/chet_baker_2_thumb.jpg',130, 154,0, 0,'','','','Lochinver Village Hall, Assynt, Sutherland','','');
photos[12] = new photo(3882044,'','','','http://www3.clikpic.com/ajdickson/images/bagpipes1.jpg',550,431,'Bagpipes','http://www3.clikpic.com/ajdickson/images/bagpipes1_thumb.jpg',130, 102,1, 0,'','','','Bagpipes, Lochinver Village Hall, Assynt, Sutherland','','');
photos[13] = new photo(3882099,'235819','','section287365','http://www3.clikpic.com/ajdickson/images/BlackUmfolosi1.jpg',520,347,'Black Umfolosi','http://www3.clikpic.com/ajdickson/images/BlackUmfolosi1_thumb.jpg',130, 87,1, 1,'','','','Lochinver Village Hall, Assynt, Sutherland','','');
photos[14] = new photo(3882112,'235819','','section287365','http://www3.clikpic.com/ajdickson/images/Blas_Festival.jpg',550,290,'The Blas Festival','http://www3.clikpic.com/ajdickson/images/Blas_Festival_thumb.jpg',130, 69,1, 1,'','','','Lochinver Village Hall, Assynt, Sutherland','','');
photos[15] = new photo(3882117,'235819','','section287365','http://www3.clikpic.com/ajdickson/images/Bombskare.jpg',550,366,'Bombskare','http://www3.clikpic.com/ajdickson/images/Bombskare_thumb.jpg',130, 87,1, 1,'','','Martin Morrison, Assynt photographics','Lochinver Village Hall, Assynt, Sutherland','','');
photos[16] = new photo(3882120,'235819','','section287365','http://www3.clikpic.com/ajdickson/images/Bruce_Fummey_-_About_Robert_the_Bruce.jpg',500,213,'Bruce Fummey','http://www3.clikpic.com/ajdickson/images/Bruce_Fummey_-_About_Robert_the_Bruce_thumb.jpg',130, 55,1, 1,'','','','Lochinver Village Hall, Assynt, Sutherland','','');
photos[17] = new photo(3882124,'235819','','section287365','http://www3.clikpic.com/ajdickson/images/Hans-Theessink-Promofoto-1.jpg',550,369,'Hans Theessink','http://www3.clikpic.com/ajdickson/images/Hans-Theessink-Promofoto-1_thumb.jpg',130, 87,1, 1,'','','','Lochinver Village Hall, Assynt, Sutherland','','');
photos[18] = new photo(3882129,'235819','','section287365','http://www3.clikpic.com/ajdickson/images/kakatsitsi_2.jpg',550,347,'Kakatsitsi','http://www3.clikpic.com/ajdickson/images/kakatsitsi_2_thumb.jpg',130, 82,1, 1,'','','','Lochinver Village Hall, Assynt, Sutherland','','');
photos[19] = new photo(3882135,'235819','','section287365','http://www3.clikpic.com/ajdickson/images/Luminescent_Orchestrii_2.jpg',450,434,'Luminescent Orchestrii','http://www3.clikpic.com/ajdickson/images/Luminescent_Orchestrii_2_thumb.jpg',130, 125,1, 1,'','','','Lochinver Village Hall, Assynt, Sutherland','','');
photos[20] = new photo(3882140,'235819','','section287365','http://www3.clikpic.com/ajdickson/images/Peatbog_Faeries.jpg',550,227,'Peatbog Faeries','http://www3.clikpic.com/ajdickson/images/Peatbog_Faeries_thumb.jpg',130, 54,1, 1,'','','','Lochinver Village Hall, Assynt, Sutherland','','');
photos[21] = new photo(3882145,'235819','','section287365','http://www3.clikpic.com/ajdickson/images/Skatalites_sax_players.jpg',507,381,'The Skatalites','http://www3.clikpic.com/ajdickson/images/Skatalites_sax_players_thumb.jpg',130, 98,1, 1,'','','Martin Morrison, Assynt photographics','Lochinver Village Hall, Assynt, Sutherland','','');
photos[22] = new photo(3882152,'235819','','section287365','http://www3.clikpic.com/ajdickson/images/Trombone.jpg',302,450,'The Skatalites','http://www3.clikpic.com/ajdickson/images/Trombone_thumb.jpg',130, 194,1, 1,'','','Martin Morrison, Assynt photographics','Lochinver Village Hall, Assynt, Sutherland','','');
photos[23] = new photo(3882169,'235819','','section287365','http://www3.clikpic.com/ajdickson/images/urachadh.jpg',600,450,'Urachadh with James Graham','http://www3.clikpic.com/ajdickson/images/urachadh_thumb.jpg',130, 98,1, 1,'','','','Lochinver, Assynt, Sutherland','','');
photos[24] = new photo(3882175,'235819','','section287365','http://www3.clikpic.com/ajdickson/images/Vladimir_McTavish.JPG',274,450,'Vladimir_McTavish','http://www3.clikpic.com/ajdickson/images/Vladimir_McTavish_thumb.JPG',130, 214,1, 1,'','','','Lochinver Village Hall, Assynt, Sutherland','','');
photos[25] = new photo(3896303,'235819','','section287365','http://www3.clikpic.com/ajdickson/images/Anita_Wardell.jpg',333,500,'Anita Wardell','http://www3.clikpic.com/ajdickson/images/Anita_Wardell_thumb.jpg',130, 195,1, 0,'','','','Lochinver Village Hall, Lochinver, Assynt, Sutherland','','');
photos[26] = new photo(3896306,'235819','','section287365','http://www3.clikpic.com/ajdickson/images/archie_fisher.jpg',600,480,'Archie Fisher','http://www3.clikpic.com/ajdickson/images/archie_fisher_thumb.jpg',130, 104,1, 0,'','','','Lochinver Village Hall, Lochinver, Assynt, Sutherland','','');
photos[27] = new photo(3896311,'235819','','section287365','http://www3.clikpic.com/ajdickson/images/Battlefield_Band.jpg',600,339,'Battlefield Band','http://www3.clikpic.com/ajdickson/images/Battlefield_Band_thumb.jpg',130, 73,1, 1,'','','','Lochinver Village Hall, Lochinver, Assynt, Sutherland','','');
photos[28] = new photo(3896315,'235819','','section287365','http://www3.clikpic.com/ajdickson/images/blazin_fiddles.jpg',416,500,'Blazin\' Fiddles','http://www3.clikpic.com/ajdickson/images/blazin_fiddles_thumb.jpg',130, 156,1, 1,'','','','Lochinver Village Hall, Lochinver, Assynt, Sutherland','','');
photos[29] = new photo(3896320,'235819','','section287365','http://www3.clikpic.com/ajdickson/images/Boothy_Graffoe.jpg',229,318,'Boothby Graffoe','http://www3.clikpic.com/ajdickson/images/Boothy_Graffoe_thumb.jpg',130, 181,1, 0,'','','','Lochinver Village Hall, Lochinver, Assynt, Sutherland','','');
photos[30] = new photo(3896325,'235819','','section287365','http://www3.clikpic.com/ajdickson/images/Cathie_Rae.jpg',333,500,'Cathie Rae','http://www3.clikpic.com/ajdickson/images/Cathie_Rae_thumb.jpg',130, 195,1, 1,'','','','Lochinver Village Hall, Lochinver, Assynt, Sutherland','','');
photos[31] = new photo(3896351,'235819','','section287365','http://www3.clikpic.com/ajdickson/images/dochas.jpg',600,399,'Dochas','http://www3.clikpic.com/ajdickson/images/dochas_thumb.jpg',130, 86,1, 0,'','','','','','');
photos[32] = new photo(3896355,'235819','','section287365','http://www3.clikpic.com/ajdickson/images/Hank_Wangford.jpg',350,444,'Hank Wangford','http://www3.clikpic.com/ajdickson/images/Hank_Wangford_thumb.jpg',130, 165,1, 0,'','','','','','');
photos[33] = new photo(3896356,'235819','','section287365','http://www3.clikpic.com/ajdickson/images/Jock_Tamsons_Bairns.jpg',489,500,'Jock Tamson\'s Bairns','http://www3.clikpic.com/ajdickson/images/Jock_Tamsons_Bairns_thumb.jpg',130, 133,1, 1,'','','','','','');
photos[34] = new photo(3896363,'235819','','section287365','http://www3.clikpic.com/ajdickson/images/kent_duchaine.jpg',600,793,'Kent Duchaine','http://www3.clikpic.com/ajdickson/images/kent_duchaine_thumb.jpg',130, 172,1, 1,'','','','','','');
photos[35] = new photo(3896365,'235819','','section287365','http://www3.clikpic.com/ajdickson/images/Mull_Theatre.jpg',395,265,'Mull Theatre','http://www3.clikpic.com/ajdickson/images/Mull_Theatre_thumb.jpg',130, 87,1, 1,'','','','','','');
photos[36] = new photo(3896368,'235819','','section287365','http://www3.clikpic.com/ajdickson/images/National_Theatre_of_Scotland.jpg',600,240,'National Theatre of Scotland','http://www3.clikpic.com/ajdickson/images/National_Theatre_of_Scotland_thumb.jpg',130, 52,1, 1,'','','','','','');
photos[37] = new photo(3896369,'235819','','section287365','http://www3.clikpic.com/ajdickson/images/Phil_Kay.jpg',310,467,'Phil Kay','http://www3.clikpic.com/ajdickson/images/Phil_Kay_thumb.jpg',130, 196,1, 1,'','','','','','');
photos[38] = new photo(3896376,'','','','http://www3.clikpic.com/ajdickson/images/Siyaya.jpg',417,500,'Siyaya','http://www3.clikpic.com/ajdickson/images/Siyaya_thumb.jpg',130, 156,1, 1,'','','','','','');
photos[39] = new photo(3896380,'','','','http://www3.clikpic.com/ajdickson/images/tam_white.jpg',493,500,'Tam White','http://www3.clikpic.com/ajdickson/images/tam_white_thumb.jpg',130, 132,1, 1,'','','','','','');
photos[40] = new photo(3896384,'','','','http://www3.clikpic.com/ajdickson/images/tango_siempre.jpg',550,362,'Tango Siempre','http://www3.clikpic.com/ajdickson/images/tango_siempre_thumb.jpg',130, 86,1, 1,'','','','','','');
photos[41] = new photo(3896385,'','','','http://www3.clikpic.com/ajdickson/images/Tannahill_Weavers.JPG',600,460,'Tannahill Weavers','http://www3.clikpic.com/ajdickson/images/Tannahill_Weavers_thumb.JPG',130, 100,1, 1,'','','','','','');
photos[42] = new photo(3896388,'','','','http://www3.clikpic.com/ajdickson/images/Vatersay_Boys.jpg',550,309,'Vatersay Boys','http://www3.clikpic.com/ajdickson/images/Vatersay_Boys_thumb.jpg',130, 73,1, 1,'','','','','','');
photos[43] = new photo(3896390,'','','','http://www3.clikpic.com/ajdickson/images/Voces_del_Sur.jpg',550,412,'Voces del Sur','http://www3.clikpic.com/ajdickson/images/Voces_del_Sur_thumb.jpg',130, 97,1, 1,'','','','','','');
photos[44] = new photo(3914785,'','','','http://www3.clikpic.com/ajdickson/images/James_Graham_a.jpg',250,210,'James Graham, singer','http://www3.clikpic.com/ajdickson/images/James_Graham_a_thumb.jpg',130, 109,0, 0,'First male and Gael to win Young Traditional Musician of the Year and winner of many awards at all age categories at the National Mod','','','Lochinver, Assynt, Sutherland','','');
photos[45] = new photo(3914804,'235819','','section287365','http://www3.clikpic.com/ajdickson/images/James_Graham_b.jpg',600,504,'','http://www3.clikpic.com/ajdickson/images/James_Graham_b_thumb.jpg',130, 109,1, 1,'','','','','','');
photos[46] = new photo(3921240,'','','','http://www3.clikpic.com/ajdickson/images/Scottish_Arts_Council.jpg',200,99,'Scottish Arts Council','http://www3.clikpic.com/ajdickson/images/Scottish_Arts_Council_thumb.jpg',130, 64,0, 0,'','','','','','');
photos[47] = new photo(3921286,'','','','http://www3.clikpic.com/ajdickson/images/HClogo.jpg',200,103,'Highland Council','http://www3.clikpic.com/ajdickson/images/HClogo_thumb.jpg',130, 67,0, 0,'','','','','','');
photos[48] = new photo(3921676,'','','','http://www3.clikpic.com/ajdickson/images/blackblank.jpg',100,120,'','http://www3.clikpic.com/ajdickson/images/blackblank_thumb.jpg',130, 156,0, 0,'','','','','','');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
galleries = new Array();
galleries[0] = new gallery(235819,'3914804,3896369,3896368,3896365,3896363,3896356,3896325,3896315,3896311,3882175,3882169,3882152,3882145,3882140,3882135,3882129,3882124,3882120,3882117,3882112,3882099','Gallery','section287365');

