/***************************************************************************
* 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('3648395,3648389,3648236,3648228,3648224,3647928,3647869,3647329');
	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('3648395,3648389,3648236,3648228,3648224,3647928,3647869,3647329');
	for (j = 0; j < photos.length; j++) {
		if (photos[j].id == imageID) {
			if ('section273125' != '') {
						if (photos[j].galleries_id != '') {
						document.write('<a href="' + photos[j].section_code + '_' + photos[j].galleries_id + '.html">');
						}
						else {
						document.write('<a href="section273125.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 ('section273125' != '') {
				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;
										/* 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].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>Copyright © Sarah Mawdsley </strong>' +  photos[nextImg].location + '</p>';
			}
			
			if (photos[nextImg].photographer != '') {
				debug('Resetting photographer');
				temp = temp + '<p class="imageinfo" id="imagePhotographer"><strong>All Rights Reserved </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(3462980,'211670','','gallery','http://www3.clikpic.com/sarahmawdsley/images/300_5245pol.jpg',600,746,'','http://www3.clikpic.com/sarahmawdsley/images/300_5245pol_thumb.jpg',130, 162,0, 0,'','','.','2006-2009','','');
photos[1] = new photo(3482758,'211670','','gallery','http://www3.clikpic.com/sarahmawdsley/images/301_1614.jpg',534,720,'','http://www3.clikpic.com/sarahmawdsley/images/301_1614_thumb.jpg',130, 175,0, 0,'','','.','2006-2009','','');
photos[2] = new photo(3647169,'211672','','section273125','http://www3.clikpic.com/sarahmawdsley/images/SarahMawdsley_2.jpg',600,429,'','http://www3.clikpic.com/sarahmawdsley/images/SarahMawdsley_2_thumb.jpg',130, 93,0, 0,'','','.','2008-2009','','');
photos[3] = new photo(3647928,'211673','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_9034CLEAN.jpg',600,435,'','http://www3.clikpic.com/sarahmawdsley/images/300_9034CLEAN_thumb.jpg',130, 94,1, 0,'','','.','2008-2009','','');
photos[4] = new photo(3647931,'211673','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_9021.jpg',600,441,'','http://www3.clikpic.com/sarahmawdsley/images/300_9021_thumb.jpg',130, 96,0, 0,'','','.','2008-2009','','');
photos[5] = new photo(3648236,'222965','','section273125','http://www3.clikpic.com/sarahmawdsley/images/Five.jpg',600,453,'','http://www3.clikpic.com/sarahmawdsley/images/Five_thumb.jpg',130, 98,1, 0,'','','.','2008-2009','','');
photos[6] = new photo(3648352,'223058','','section273125','http://www3.clikpic.com/sarahmawdsley/images/3056922332_649d0eac1e_o.jpg',600,442,'','http://www3.clikpic.com/sarahmawdsley/images/3056922332_649d0eac1e_o_thumb.jpg',130, 96,0, 0,'','','.','2008-2009','','');
photos[7] = new photo(3648366,'223057','','section273125','http://www3.clikpic.com/sarahmawdsley/images/DSC01503.jpg',600,444,'','http://www3.clikpic.com/sarahmawdsley/images/DSC01503_thumb.jpg',130, 96,0, 0,'','','.','2008-2009','','');
photos[8] = new photo(3648389,'222965','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_7216v3.jpg',600,443,'','http://www3.clikpic.com/sarahmawdsley/images/300_7216v3_thumb.jpg',130, 96,1, 0,'','','.','2008-2009','','');
photos[9] = new photo(3648395,'211673','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_8788sfw.jpg',600,444,'','http://www3.clikpic.com/sarahmawdsley/images/300_8788sfw_thumb.jpg',130, 96,1, 0,'','','.','2008-2009','','');
photos[10] = new photo(3648401,'222967','','section273125','http://www3.clikpic.com/sarahmawdsley/images/301_2023Hope-Street.jpg',310,450,'','http://www3.clikpic.com/sarahmawdsley/images/301_2023Hope-Street_thumb.jpg',130, 189,0, 0,'','','.','2008-2009','','');
photos[11] = new photo(3648412,'222967','','section273125','http://www3.clikpic.com/sarahmawdsley/images/L1000352.jpg',325,450,'','http://www3.clikpic.com/sarahmawdsley/images/L1000352_thumb.jpg',130, 180,0, 0,'','','.','2008-2009','','');
photos[12] = new photo(3647043,'211673','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_8422.jpg',600,435,'','http://www3.clikpic.com/sarahmawdsley/images/300_8422_thumb.jpg',130, 94,0, 0,'','','.','2008-2009','','');
photos[13] = new photo(3647044,'211673','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_8535.jpg',600,435,'','http://www3.clikpic.com/sarahmawdsley/images/300_8535_thumb.jpg',130, 94,0, 0,'','','.','2008-2009','','');
photos[14] = new photo(3647045,'211673','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_9443.jpg',600,438,'','http://www3.clikpic.com/sarahmawdsley/images/300_9443_thumb.jpg',130, 95,0, 0,'','','.','2008-2009','','');
photos[15] = new photo(3647070,'211673','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_9656.jpg',600,429,'','http://www3.clikpic.com/sarahmawdsley/images/300_9656_thumb.jpg',130, 93,0, 0,'','','.','2008-2009','','');
photos[16] = new photo(3647278,'211672','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_2493_800.jpg',600,400,'','http://www3.clikpic.com/sarahmawdsley/images/300_2493_800_thumb.jpg',130, 87,0, 0,'','','.','2008-2009','','');
photos[17] = new photo(3647279,'211672','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_2788_800.jpg',600,430,'','http://www3.clikpic.com/sarahmawdsley/images/300_2788_800_thumb.jpg',130, 93,0, 0,'','','.','2008-2009','','');
photos[18] = new photo(3647280,'211672','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_3274_800.jpg',600,411,'','http://www3.clikpic.com/sarahmawdsley/images/300_3274_800_thumb.jpg',130, 89,0, 0,'','','.','2008-2009','','');
photos[19] = new photo(3647281,'211672','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_3338_800.jpg',600,467,'','http://www3.clikpic.com/sarahmawdsley/images/300_3338_800_thumb.jpg',130, 101,0, 0,'','','.','2008-2009','','');
photos[20] = new photo(3647282,'211672','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_3340_800.jpg',600,441,'','http://www3.clikpic.com/sarahmawdsley/images/300_3340_800_thumb.jpg',130, 96,0, 0,'','','.','2008-2009','','');
photos[21] = new photo(3647331,'211672','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_3215v11.jpg',600,398,'','http://www3.clikpic.com/sarahmawdsley/images/300_3215v11_thumb.jpg',130, 86,0, 0,'','','','','','');
photos[22] = new photo(3647332,'211672','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_3279v11.jpg',600,398,'','http://www3.clikpic.com/sarahmawdsley/images/300_3279v11_thumb.jpg',130, 86,0, 0,'','','','','','');
photos[23] = new photo(3647345,'211672','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_1918v1sfw.jpg',600,433,'','http://www3.clikpic.com/sarahmawdsley/images/300_1918v1sfw_thumb.jpg',130, 94,0, 0,'','','','','','');
photos[24] = new photo(3647346,'211672','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_3150v11.jpg',600,398,'','http://www3.clikpic.com/sarahmawdsley/images/300_3150v11_thumb.jpg',130, 86,0, 0,'','','','','','');
photos[25] = new photo(3647868,'211673','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_8921.jpg',600,448,'','http://www3.clikpic.com/sarahmawdsley/images/300_8921_thumb.jpg',130, 97,0, 0,'','','.','2008-2009','','');
photos[26] = new photo(3647917,'211673','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_8602.jpg',587,450,'','http://www3.clikpic.com/sarahmawdsley/images/300_8602_thumb.jpg',130, 100,0, 0,'','','','','','');
photos[27] = new photo(3647969,'223011','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_7408---Version-2.jpg',600,444,'','http://www3.clikpic.com/sarahmawdsley/images/300_7408---Version-2_thumb.jpg',130, 96,0, 0,'','','.','2008-2009','','');
photos[28] = new photo(3647971,'223011','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_7649---Version-2.jpg',600,419,'','http://www3.clikpic.com/sarahmawdsley/images/300_7649---Version-2_thumb.jpg',130, 91,0, 0,'','','.','2008-2009','','');
photos[29] = new photo(3648193,'223041','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_4387.jpg',600,413,'','http://www3.clikpic.com/sarahmawdsley/images/300_4387_thumb.jpg',130, 89,0, 0,'','','','','','');
photos[30] = new photo(3648195,'223041','','section273125','http://www3.clikpic.com/sarahmawdsley/images/DSC_2401.jpg',600,412,'','http://www3.clikpic.com/sarahmawdsley/images/DSC_2401_thumb.jpg',130, 89,0, 0,'','','','','','');
photos[31] = new photo(3648197,'223041','','section273125','http://www3.clikpic.com/sarahmawdsley/images/DSC_5392.jpg',600,423,'','http://www3.clikpic.com/sarahmawdsley/images/DSC_5392_thumb.jpg',130, 92,0, 0,'','','','','','');
photos[32] = new photo(3648222,'222965','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_6379.jpg',600,406,'','http://www3.clikpic.com/sarahmawdsley/images/300_6379_thumb.jpg',130, 88,0, 0,'','','','','','');
photos[33] = new photo(3648224,'222965','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_6398.jpg',600,398,'','http://www3.clikpic.com/sarahmawdsley/images/300_6398_thumb.jpg',130, 86,1, 0,'','','','','','');
photos[34] = new photo(3648226,'222965','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_6818.jpg',600,415,'','http://www3.clikpic.com/sarahmawdsley/images/300_6818_thumb.jpg',130, 90,0, 0,'','','','','','');
photos[35] = new photo(3648228,'222965','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_6965.jpg',600,441,'','http://www3.clikpic.com/sarahmawdsley/images/300_6965_thumb.jpg',130, 96,1, 0,'','','','','','');
photos[36] = new photo(3647287,'211672','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_3379_8001.jpg',294,400,'','http://www3.clikpic.com/sarahmawdsley/images/300_3379_8001_thumb.jpg',130, 177,0, 0,'','','.','2008-2009','','');
photos[37] = new photo(3647326,'211672','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_1887-2print.jpg',298,450,'','http://www3.clikpic.com/sarahmawdsley/images/300_1887-2print_thumb.jpg',130, 196,0, 0,'','','.','2008-2009','','');
photos[38] = new photo(3647327,'211672','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_1947.jpg',298,450,'','http://www3.clikpic.com/sarahmawdsley/images/300_1947_thumb.jpg',130, 196,0, 0,'','','','','','');
photos[39] = new photo(3647328,'211672','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_2080.jpg',300,450,'','http://www3.clikpic.com/sarahmawdsley/images/300_2080_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[40] = new photo(3647329,'211672','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_2437.jpg',299,450,'','http://www3.clikpic.com/sarahmawdsley/images/300_2437_thumb.jpg',130, 196,1, 0,'','','','','','');
photos[41] = new photo(3647330,'211672','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_2941.jpg',300,450,'','http://www3.clikpic.com/sarahmawdsley/images/300_2941_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[42] = new photo(3647344,'211672','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_1813v1.jpg',330,450,'','http://www3.clikpic.com/sarahmawdsley/images/300_1813v1_thumb.jpg',130, 177,0, 0,'','','.','2008-2009','','');
photos[43] = new photo(3647419,'211672','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_3329v2.jpg',305,450,'','http://www3.clikpic.com/sarahmawdsley/images/300_3329v2_thumb.jpg',130, 192,0, 0,'','','.','2008-2009','','');
photos[44] = new photo(3647869,'211673','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_9016.jpg',600,434,'','http://www3.clikpic.com/sarahmawdsley/images/300_9016_thumb.jpg',130, 94,1, 0,'','','.','2008-2009','','');
photos[45] = new photo(3647870,'211673','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_9028.jpg',303,450,'','http://www3.clikpic.com/sarahmawdsley/images/300_9028_thumb.jpg',130, 193,0, 0,'','','.','2008-2009','','');
photos[46] = new photo(3647871,'211673','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_9527.jpg',318,450,'','http://www3.clikpic.com/sarahmawdsley/images/300_9527_thumb.jpg',130, 184,0, 0,'','','.','2008-2009','','');
photos[47] = new photo(3647913,'223011','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_7647---Version-3.jpg',315,450,'','http://www3.clikpic.com/sarahmawdsley/images/300_7647---Version-3_thumb.jpg',130, 186,0, 0,'','','.','2006-2009','','');
photos[48] = new photo(3647914,'211673','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_8417.jpg',311,450,'','http://www3.clikpic.com/sarahmawdsley/images/300_8417_thumb.jpg',130, 188,0, 0,'','','','','','');
photos[49] = new photo(3647915,'211673','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_8433.jpg',311,450,'','http://www3.clikpic.com/sarahmawdsley/images/300_8433_thumb.jpg',130, 188,0, 0,'','','','','','');
photos[50] = new photo(3647916,'211673','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_8464.jpg',311,450,'','http://www3.clikpic.com/sarahmawdsley/images/300_8464_thumb.jpg',130, 188,0, 0,'','','.','2008-2009','','');
photos[51] = new photo(3647918,'211673','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_8646.jpg',325,450,'','http://www3.clikpic.com/sarahmawdsley/images/300_8646_thumb.jpg',130, 180,0, 0,'','','','','','');
photos[52] = new photo(3647919,'211673','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_8651.jpg',311,450,'','http://www3.clikpic.com/sarahmawdsley/images/300_8651_thumb.jpg',130, 188,0, 0,'','','','','','');
photos[53] = new photo(3647935,'211673','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_9191.jpg',310,450,'','http://www3.clikpic.com/sarahmawdsley/images/300_9191_thumb.jpg',130, 189,0, 0,'','','.','2008-2009','','');
photos[54] = new photo(3648162,'223041','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_4150.jpg',310,450,'','http://www3.clikpic.com/sarahmawdsley/images/300_4150_thumb.jpg',130, 189,0, 0,'','','.','2008-2009','','');
photos[55] = new photo(3648163,'223041','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_4161.jpg',310,450,'','http://www3.clikpic.com/sarahmawdsley/images/300_4161_thumb.jpg',130, 189,0, 0,'','','.','2008-2009','','');
photos[56] = new photo(3648164,'223041','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_4200.jpg',331,450,'','http://www3.clikpic.com/sarahmawdsley/images/300_4200_thumb.jpg',130, 177,0, 0,'','','.','2008-2009','','');
photos[57] = new photo(3648165,'223041','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_4286.jpg',331,450,'','http://www3.clikpic.com/sarahmawdsley/images/300_4286_thumb.jpg',130, 177,0, 0,'','','.','2008-2009','','');
photos[58] = new photo(3648166,'223041','','section273125','http://www3.clikpic.com/sarahmawdsley/images/DSC_5391.jpg',282,450,'','http://www3.clikpic.com/sarahmawdsley/images/DSC_5391_thumb.jpg',130, 207,0, 0,'','','.','2008-2009','','');
photos[59] = new photo(3648194,'223041','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_4394.jpg',322,450,'','http://www3.clikpic.com/sarahmawdsley/images/300_4394_thumb.jpg',130, 182,0, 0,'','','','','','');
photos[60] = new photo(3648196,'223041','','section273125','http://www3.clikpic.com/sarahmawdsley/images/DSC_4211.jpg',310,450,'','http://www3.clikpic.com/sarahmawdsley/images/DSC_4211_thumb.jpg',130, 189,0, 0,'','','','','','');
photos[61] = new photo(3648223,'222965','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_6392_Westminster.jpg',331,450,'','http://www3.clikpic.com/sarahmawdsley/images/300_6392_Westminster_thumb.jpg',130, 177,0, 0,'','','','','','');
photos[62] = new photo(3648225,'222965','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_6402.jpg',600,600,'','http://www3.clikpic.com/sarahmawdsley/images/300_6402_thumb.jpg',130, 130,0, 0,'','','','','','');
photos[63] = new photo(3648296,'223041','','section273125','http://www3.clikpic.com/sarahmawdsley/images/Redhead-copy-v1.jpg',362,450,'','http://www3.clikpic.com/sarahmawdsley/images/Redhead-copy-v1_thumb.jpg',130, 162,0, 0,'','','.','2006-2009','','');
photos[64] = new photo(3648375,'223041','','section273125','http://www3.clikpic.com/sarahmawdsley/images/301_0584bw2.jpg',321,450,'','http://www3.clikpic.com/sarahmawdsley/images/301_0584bw2_thumb.jpg',130, 182,0, 0,'','','.','2008-2009','','');
photos[65] = new photo(3657499,'223011','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_7572---Version-2.jpg',330,450,'','http://www3.clikpic.com/sarahmawdsley/images/300_7572---Version-2_thumb.jpg',130, 177,0, 0,'','','.','2006-2009','','');
photos[66] = new photo(3657500,'223011','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_8203.jpg',331,450,'','http://www3.clikpic.com/sarahmawdsley/images/300_8203_thumb.jpg',130, 177,0, 0,'','','.','2006-2009','','');
photos[67] = new photo(3657502,'223011','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_7643---Version-2.jpg',308,450,'','http://www3.clikpic.com/sarahmawdsley/images/300_7643---Version-2_thumb.jpg',130, 190,0, 0,'','','.','2006-2009','','');
photos[68] = new photo(3657503,'211672','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_2256v1.jpg',302,450,'','http://www3.clikpic.com/sarahmawdsley/images/300_2256v1_thumb.jpg',130, 194,0, 0,'','','','','','');
photos[69] = new photo(3657504,'211672','','section273125','http://www3.clikpic.com/sarahmawdsley/images/300_2379-v-4.jpg',324,450,'','http://www3.clikpic.com/sarahmawdsley/images/300_2379-v-4_thumb.jpg',130, 181,0, 0,'','','','','','');
photos[70] = new photo(3657505,'211672','','section273125','http://admin.clikpic.com/sarahmawdsley/images/300_3370.jpg',413,600,'','http://admin.clikpic.com/sarahmawdsley/images/300_3370_thumb.jpg',130, 189,0, 0,'','','','','','');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
galleries = new Array();
galleries[0] = new gallery(223011,'3657502,3657500,3657499,3647971,3647969,3647913','Abruzzo','section273125');
galleries[1] = new gallery(223041,'3648375,3648296,3648197,3648196,3648195,3648194,3648193,3648166,3648165,3648164','Chicago','section273125');
galleries[2] = new gallery(223000,'3648366,3648352','Finland','section273125');
galleries[3] = new gallery(223057,'3648366','Helsinki','section273125');
galleries[4] = new gallery(211669,'3657502,3657500,3657499,3648395,3647971,3647969,3647935,3647931,3647928,3647919','Italy','section273125');
galleries[5] = new gallery(211670,'3482758,3462980','Lensbaby','gallery');
galleries[6] = new gallery(222967,'3648412,3648401','Liverpool','section273125');
galleries[7] = new gallery(222965,'3648389,3648236,3648228,3648226,3648225,3648224,3648223,3648222','London','section273125');
galleries[8] = new gallery(211672,'3657505,3657504,3657503,3647419,3647346,3647345,3647344,3647332,3647331,3647330','Morocco','section273125');
galleries[9] = new gallery(211673,'3648395,3647935,3647931,3647928,3647919,3647918,3647917,3647916,3647915,3647914','Rome','section273125');
galleries[10] = new gallery(223058,'3648352','Tampere','section273125');
galleries[11] = new gallery(222964,'3648412,3648401,3648389,3648236,3648228,3648226,3648225,3648224,3648223,3648222','UK','section273125');
galleries[12] = new gallery(222962,'3648375,3648296,3648197,3648196,3648195,3648194,3648193,3648166,3648165,3648164','USA','section273125');

