/***************************************************************************
* 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('781115');
	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('781115');
	for (j = 0; j < photos.length; j++) {
		if (photos[j].id == imageID) {
			if ('section274112' != '') {
						if (photos[j].galleries_id != '') {
						document.write('<a href="' + photos[j].section_code + '_' + photos[j].galleries_id + '.html">');
						}
						else {
						document.write('<a href="section274112.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 ('section274112' != '') {
				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) || (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 + '">';
						field.value = photos[nextImg].id;
			document.getElementById('imageTitle').innerHTML = photos[nextImg].caption;
									document.title = 'ally gore: ' + 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(813788,'','','','http://www4.clikpic.com/allygore/images/AG14 Natural balance copy2.jpg',160,500,'','http://www4.clikpic.com/allygore/images/AG14 Natural balance copy2_thumb.jpg',87, 272,0, 1,'','','','','','');
photos[1] = new photo(813792,'','','','http://www4.clikpic.com/allygore/images/AG26 copy.jpg',160,500,'','http://www4.clikpic.com/allygore/images/AG26 copy_thumb.jpg',87, 272,0, 1,'','','','','','');
photos[2] = new photo(813794,'','','','http://www4.clikpic.com/allygore/images/AG10 Sent with love copy 2.jpg',160,500,'','http://www4.clikpic.com/allygore/images/AG10 Sent with love copy 2_thumb.jpg',87, 272,0, 1,'','','','','','');
photos[3] = new photo(813800,'','','','http://www4.clikpic.com/allygore/images/AG18 Birthday wishes copy.jpg',160,500,'','http://www4.clikpic.com/allygore/images/AG18 Birthday wishes copy_thumb.jpg',87, 272,0, 0,'','','','','','');
photos[4] = new photo(813795,'','','','http://www4.clikpic.com/allygore/images/AG80 copy.jpg',160,500,'','http://www4.clikpic.com/allygore/images/AG80 copy_thumb.jpg',87, 272,0, 1,'','','','','','');
photos[5] = new photo(813798,'','','','http://www4.clikpic.com/allygore/images/AG13 Special delivery copy.jpg',160,500,'','http://www4.clikpic.com/allygore/images/AG13 Special delivery copy_thumb.jpg',87, 272,0, 1,'','','','','','');
photos[6] = new photo(813802,'','','','http://www4.clikpic.com/allygore/images/AG19 Hats off to you copy.jpg',160,500,'','http://www4.clikpic.com/allygore/images/AG19 Hats off to you copy_thumb.jpg',87, 272,0, 1,'','','','','','');
photos[7] = new photo(813804,'','','','http://www4.clikpic.com/allygore/images/AG27 copy2.jpg',160,500,'','http://www4.clikpic.com/allygore/images/AG27 copy2_thumb.jpg',87, 272,0, 0,'','','','','','');
photos[8] = new photo(781115,'60584','','gallery','http://www4.clikpic.com/allygore/images/Sculpture 14 text.jpg',227,272,'','http://www4.clikpic.com/allygore/images/Sculpture 14 text_thumb.jpg',130, 156,1, 1,'','','','','','');
photos[9] = new photo(3703264,'223799','','section274112','http://www4.clikpic.com/allygore/images/treewebfinal5002.jpg',500,500,'','http://www4.clikpic.com/allygore/images/treewebfinal5002_thumb.jpg',130, 130,0, 1,'Paper tree, pack of 6 greeting cards. Laser cut and printed inside.','','','',12.50,'Ref: Pack of 6 AG01 paper tree ');
photos[10] = new photo(781119,'60584','','gallery','http://www4.clikpic.com/allygore/images/Sculpture 11 text.jpg',227,272,'','http://www4.clikpic.com/allygore/images/Sculpture 11 text_thumb.jpg',130, 156,0, 0,'','','','','','');
photos[11] = new photo(3665095,'223799','','section274112','http://www4.clikpic.com/allygore/images/redbirdweb600_copy.jpg',500,500,'','http://www4.clikpic.com/allygore/images/redbirdweb600_copy_thumb.jpg',130, 130,0, 0,'Blossom bird, pack of 6 greeting cards. Laser cut and printed inside.','','','',12.50,'Ref: Pack of 6 AG02 blossom bird');
photos[12] = new photo(781124,'60584','','gallery','http://www4.clikpic.com/allygore/images/Sculpture 29 text.jpg',227,272,'','http://www4.clikpic.com/allygore/images/Sculpture 29 text_thumb.jpg',130, 156,0, 1,'','','','','','');
photos[13] = new photo(3665387,'223799','','section274112','http://www4.clikpic.com/allygore/images/pinkbird500.jpg',500,500,'','http://www4.clikpic.com/allygore/images/pinkbird500_thumb.jpg',130, 130,0, 0,'Bird silhouette, pack of 6 greeting cards. Laser cut and printed inside. Text reads \'Happy Birthday\'.','','','',12.50,'Ref: Pack of 6 AG03 bird silhouette');
photos[14] = new photo(781128,'60584','','gallery','http://www4.clikpic.com/allygore/images/Sculpture 34 text.jpg',227,272,'','http://www4.clikpic.com/allygore/images/Sculpture 34 text_thumb.jpg',130, 156,0, 1,'','','','','','');
photos[15] = new photo(3669065,'223799','','section274112','http://www4.clikpic.com/allygore/images/greenbird500web.jpg',500,500,'','http://www4.clikpic.com/allygore/images/greenbird500web_thumb.jpg',130, 130,0, 0,'Four green trees, pack of 6 greeting cards. Laser cut and printed inside.','','','',12.50,'Ref: Pack of 6 AG04 four green trees');
photos[16] = new photo(781132,'60584','','gallery','http://www4.clikpic.com/allygore/images/Sculpture 15 text.jpg',227,272,'','http://www4.clikpic.com/allygore/images/Sculpture 15 text_thumb.jpg',130, 156,0, 1,'','','','','','');
photos[17] = new photo(3669087,'223799','','section274112','http://www4.clikpic.com/allygore/images/bluedamask500.jpg',500,500,'','http://www4.clikpic.com/allygore/images/bluedamask500_thumb.jpg',130, 130,0, 0,'Vintage damask, pack of 6 greeting cards. Laser cut and printed inside.','','','',12.50,'Ref: Pack of 6 AG05 vintage damask');
photos[18] = new photo(781161,'60584','','gallery','http://www4.clikpic.com/allygore/images/Sculpture 18 text.jpg',227,272,'','http://www4.clikpic.com/allygore/images/Sculpture 18 text_thumb.jpg',130, 156,0, 1,'','','','','','');
photos[19] = new photo(3669768,'223799','','section274112','http://www4.clikpic.com/allygore/images/deerweb500.jpg',500,500,'','http://www4.clikpic.com/allygore/images/deerweb500_thumb.jpg',130, 130,0, 0,'Woodland, pack of 6 greeting cards. Laser cut and printed inside.','','','',12.50,'Ref: Pack of 6 AG06 woodland');
photos[20] = new photo(781166,'60584','','gallery','http://www4.clikpic.com/allygore/images/Sculpture 31 text.jpg',227,272,'','http://www4.clikpic.com/allygore/images/Sculpture 31 text_thumb.jpg',130, 156,0, 1,'','','','','','');
photos[21] = new photo(3669988,'223799','','section274112','http://www4.clikpic.com/allygore/images/butterflyweb500.jpg',500,500,'','http://www4.clikpic.com/allygore/images/butterflyweb500_thumb.jpg',130, 130,0, 0,'Orange butterfly, pack of 6 greeting cards. Laser cut and printed inside.','','','',12.50,'Ref: Pack of 6 AG07 orange butterfly');
photos[22] = new photo(781189,'60584','','gallery','http://www4.clikpic.com/allygore/images/Sculpture 30 text.jpg',227,272,'','http://www4.clikpic.com/allygore/images/Sculpture 30 text_thumb.jpg',130, 156,0, 0,'','','','','','');
photos[23] = new photo(3669989,'223799','','section274112','http://www4.clikpic.com/allygore/images/carweb5002.jpg',500,500,'','http://www4.clikpic.com/allygore/images/carweb5002_thumb.jpg',130, 130,0, 0,'Road trip, pack of 6 greeting cards. Laser cut and printed inside.','','','',12.50,'Ref: Pack of 6 AG08 road trip');
photos[24] = new photo(785054,'60584','','gallery','http://www4.clikpic.com/allygore/images/Sculpture 32 text3.jpg',227,272,'','http://www4.clikpic.com/allygore/images/Sculpture 32 text3_thumb.jpg',130, 156,0, 1,'','','','','','');
photos[25] = new photo(3672425,'223799','','section274112','http://www4.clikpic.com/allygore/images/funkeygreyweb500.jpg',500,500,'','http://www4.clikpic.com/allygore/images/funkeygreyweb500_thumb.jpg',130, 130,0, 0,'Abstract, pack of 6 greeting cards. Laser cut and printed inside.','','','',12.50,'Ref: Pack of 6 AG09 abstract');
photos[26] = new photo(785058,'60584','','gallery','http://www4.clikpic.com/allygore/images/Sculpture 48 text1.jpg',227,272,'','http://www4.clikpic.com/allygore/images/Sculpture 48 text1_thumb.jpg',130, 156,0, 1,'','','','','','');
photos[27] = new photo(3672489,'223799','','section274112','http://www4.clikpic.com/allygore/images/pinkshapeweb500.jpg',500,500,'','http://www4.clikpic.com/allygore/images/pinkshapeweb500_thumb.jpg',130, 130,0, 0,'Flower power, pack of 6 greeting cards. Laser cut and printed inside. Text reads \'Happy Birthday\'.','','','',12.50,'Ref: Pack of 6 AG10 flower power');
photos[28] = new photo(785063,'60584','','gallery','http://www4.clikpic.com/allygore/images/Sculpture 25 text3.jpg',227,272,'','http://www4.clikpic.com/allygore/images/Sculpture 25 text3_thumb.jpg',130, 156,0, 1,'','','','','','');
photos[29] = new photo(3672443,'223799','','section274112','http://www4.clikpic.com/allygore/images/dragonflyweb500.jpg',500,500,'','http://www4.clikpic.com/allygore/images/dragonflyweb500_thumb.jpg',130, 130,0, 0,'Fleur, pack of 6 greeting cards. Laser cut and printed inside. Text reads \'Fleur\'.','','','',12.50,'Ref: Pack of 6 AG11 fleur');
photos[30] = new photo(785066,'60584','','gallery','http://www4.clikpic.com/allygore/images/Scuplture 22 text3.jpg',227,272,'','http://www4.clikpic.com/allygore/images/Scuplture 22 text3_thumb.jpg',130, 156,0, 0,'','','','','','');
photos[31] = new photo(3672763,'223799','','section274112','http://www4.clikpic.com/allygore/images/happybirthdayweb500.jpg',500,500,'','http://www4.clikpic.com/allygore/images/happybirthdayweb500_thumb.jpg',130, 130,0, 0,'Happy Birthday, pack of 6 greeting cards. Laser cut and printed inside.','','','',12.50,'Ref: Pack of 6 AG12 happy birthday');
photos[32] = new photo(785071,'60584','','gallery','http://www4.clikpic.com/allygore/images/Sculpture 52 text2.jpg',227,272,'','http://www4.clikpic.com/allygore/images/Sculpture 52 text2_thumb.jpg',130, 156,0, 0,'','','','','','');
photos[33] = new photo(3703267,'223799','','section274112','http://www4.clikpic.com/allygore/images/6cards3.jpg',500,500,'','http://www4.clikpic.com/allygore/images/6cards3_thumb.jpg',130, 130,0, 0,'Multi pack of 6 greeting cards. Papertree, Abstract, Road trip, Four green trees, Woodland, Bird silhouette. Laser cut and printed inside. Bird silhouette text reads \' Happy Birthday\'.','','','',12.50,'Ref: Pack of 6 cards AGmulti pack 01');
photos[34] = new photo(785082,'60584','','gallery','http://www4.clikpic.com/allygore/images/Sculpture 45 text1.jpg',227,272,'','http://www4.clikpic.com/allygore/images/Sculpture 45 text1_thumb.jpg',130, 156,0, 0,'','','','','','');
photos[35] = new photo(3703270,'223799','','section274112','http://www4.clikpic.com/allygore/images/6cards4.jpg',500,500,'','http://www4.clikpic.com/allygore/images/6cards4_thumb.jpg',130, 130,0, 0,'Multi pack of 6 greeting cards. Orange butterfly, Fleur, Blossom bird, Flower power, Happy Birthday, Vintage demask. Laser cut and printed inside. Flower power text reads \'Happy Birthday\'.','','','',12.50,'Ref: Pack of 6 cards AGmulti pack 02');
photos[36] = new photo(785087,'60584','','gallery','http://www4.clikpic.com/allygore/images/Scuplture 7 text2.jpg',227,272,'','http://www4.clikpic.com/allygore/images/Scuplture 7 text2_thumb.jpg',130, 156,0, 1,'','','','','','');
photos[37] = new photo(3703274,'223799','','section274112','http://www4.clikpic.com/allygore/images/12cards.jpg',500,500,'','http://www4.clikpic.com/allygore/images/12cards_thumb.jpg',130, 130,0, 0,'Multi pack of 12 greeting cards. Papertree, Abstract, Road trip, Four green trees, Woodland, Bird silhouette, Orange butterfly, Blossom bird, Fleur, Flower power, Happy Birthday, Vintage demask. Laser cut and printed inside. Bird silhouette and Flower power text reads \'Happy Birthday\'.','','','',25.00,'Ref: Pack of 12 cards AGmulti pack 03');
photos[38] = new photo(786562,'60584','','gallery','http://www4.clikpic.com/allygore/images/Sculpture 35 text.jpg',227,272,'','http://www4.clikpic.com/allygore/images/Sculpture 35 text_thumb.jpg',130, 156,0, 0,'','','','','','');
photos[39] = new photo(786514,'60584','','gallery','http://www4.clikpic.com/allygore/images/Sculpture 2 text copy 21.jpg',227,272,'','http://www4.clikpic.com/allygore/images/Sculpture 2 text copy 21_thumb.jpg',130, 156,0, 1,'','','','','','');
photos[40] = new photo(786545,'60584','','gallery','http://www4.clikpic.com/allygore/images/Sculpture 51 text1.jpg',227,272,'','http://www4.clikpic.com/allygore/images/Sculpture 51 text1_thumb.jpg',130, 156,0, 0,'','','','','','');
photos[41] = new photo(786551,'60584','','gallery','http://www4.clikpic.com/allygore/images/Sculpture 3 text1.jpg',227,272,'','http://www4.clikpic.com/allygore/images/Sculpture 3 text1_thumb.jpg',130, 156,0, 1,'','','','','','');
photos[42] = new photo(786556,'60584','','gallery','http://www4.clikpic.com/allygore/images/Sculpture 38 text1.jpg',227,272,'','http://www4.clikpic.com/allygore/images/Sculpture 38 text1_thumb.jpg',130, 156,0, 0,'','','','','','');
photos[43] = new photo(786577,'60584','','gallery','http://www4.clikpic.com/allygore/images/Sculpture 27 text1.jpg',227,272,'','http://www4.clikpic.com/allygore/images/Sculpture 27 text1_thumb.jpg',130, 156,0, 1,'','','','','','');
photos[44] = new photo(786631,'60584','','gallery','http://www4.clikpic.com/allygore/images/Sculpture 37 text.jpg',227,272,'','http://www4.clikpic.com/allygore/images/Sculpture 37 text_thumb.jpg',130, 156,0, 0,'','','','','','');
photos[45] = new photo(789824,'60584','','gallery','http://www4.clikpic.com/allygore/images/Sculpture 12 text.jpg',227,272,'','http://www4.clikpic.com/allygore/images/Sculpture 12 text_thumb.jpg',130, 156,0, 1,'','','','','','');
photos[46] = new photo(789828,'60584','','gallery','http://www4.clikpic.com/allygore/images/Sculpture 53 text4.jpg',227,272,'','http://www4.clikpic.com/allygore/images/Sculpture 53 text4_thumb.jpg',130, 156,0, 0,'','','','','','');
photos[47] = new photo(3673095,'60597','','gallery','http://www4.clikpic.com/allygore/images/treewebfinal5001.jpg',500,500,'','http://www4.clikpic.com/allygore/images/treewebfinal5001_thumb.jpg',130, 130,0, 1,'','','','','','');
photos[48] = new photo(3673107,'60597','','gallery','http://www4.clikpic.com/allygore/images/redbirdweb500_copy1.jpg',500,500,'','http://www4.clikpic.com/allygore/images/redbirdweb500_copy1_thumb.jpg',130, 130,0, 0,'','','','','','');
photos[49] = new photo(3673111,'60597','','gallery','http://www4.clikpic.com/allygore/images/pinkbirdweb5001.jpg',500,500,'','http://www4.clikpic.com/allygore/images/pinkbirdweb5001_thumb.jpg',130, 130,0, 0,'','','','','','');
photos[50] = new photo(3673115,'60597','','gallery','http://www4.clikpic.com/allygore/images/greenbird500web1.jpg',500,500,'','http://www4.clikpic.com/allygore/images/greenbird500web1_thumb.jpg',130, 130,0, 0,'','','','','','');
photos[51] = new photo(3699631,'60597','','gallery','http://www4.clikpic.com/allygore/images/bluedamask5001.jpg',500,500,'','http://www4.clikpic.com/allygore/images/bluedamask5001_thumb.jpg',130, 130,0, 0,'','','','','','');
photos[52] = new photo(3699634,'60597','','gallery','http://www4.clikpic.com/allygore/images/deerweb5001.jpg',500,500,'','http://www4.clikpic.com/allygore/images/deerweb5001_thumb.jpg',130, 130,0, 0,'','','','','','');
photos[53] = new photo(3699638,'60597','','gallery','http://www4.clikpic.com/allygore/images/butterflyweb5001.jpg',500,500,'','http://www4.clikpic.com/allygore/images/butterflyweb5001_thumb.jpg',130, 130,0, 0,'','','','','','');
photos[54] = new photo(3699641,'60597','','gallery','http://www4.clikpic.com/allygore/images/carweb5001.jpg',500,500,'','http://www4.clikpic.com/allygore/images/carweb5001_thumb.jpg',130, 130,0, 0,'','','','','','');
photos[55] = new photo(3699645,'60597','','gallery','http://www4.clikpic.com/allygore/images/funkeygreyweb5001.jpg',500,500,'','http://www4.clikpic.com/allygore/images/funkeygreyweb5001_thumb.jpg',130, 130,0, 0,'','','','','','');
photos[56] = new photo(3699648,'60597','','gallery','http://www4.clikpic.com/allygore/images/pinkshapeweb5001.jpg',500,500,'','http://www4.clikpic.com/allygore/images/pinkshapeweb5001_thumb.jpg',130, 130,0, 0,'','','','','','');
photos[57] = new photo(3699650,'60597','','gallery','http://www4.clikpic.com/allygore/images/dragonflyweb5001.jpg',500,500,'','http://www4.clikpic.com/allygore/images/dragonflyweb5001_thumb.jpg',130, 130,0, 0,'','','','','','');
photos[58] = new photo(3699652,'60597','','gallery','http://www4.clikpic.com/allygore/images/happybirthdayweb5001.jpg',500,500,'','http://www4.clikpic.com/allygore/images/happybirthdayweb5001_thumb.jpg',130, 130,0, 0,'','','','','','');
photos[59] = new photo(3776599,'230345','','section281615','http://www4.clikpic.com/allygore/images/post.jpg',500,500,'','http://www4.clikpic.com/allygore/images/post_thumb.jpg',130, 130,0, 0,'','','','','','');
photos[60] = new photo(3776681,'230345','','section281615','http://www4.clikpic.com/allygore/images/post2.jpg',500,500,'','http://www4.clikpic.com/allygore/images/post2_thumb.jpg',130, 130,0, 0,'','','','','','');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
galleries = new Array();
galleries[0] = new gallery(60584,'789824,786577,786551,786514,785087,785063,785058,785054,781166,781161,781132,781128,781124,781115','gallery one','gallery');
galleries[1] = new gallery(223799,'3703264','shop ','section274112');
galleries[2] = new gallery(60597,'3673095','gallery two','gallery');
galleries[3] = new gallery(230345,'3776681,3776599','shipping & info','section281615');

