/***************************************************************************
* 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('196916');
	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('196916');
	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) || (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 = 'Bruce Elliott Photography: ' + 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(1632770,'','','','http://www4.clikpic.com/Bruce/images/Clikpic-001-Calendar-Cover.jpg',600,425,'','http://www4.clikpic.com/Bruce/images/Clikpic-001-Calendar-Cover_thumb.jpg',130, 92,0, 1,'','','','',4.00,'Urban Rugby Calendar 2008');
photos[1] = new photo(1258933,'17698','','gallery','http://www4.clikpic.com/Bruce/images/ConnorOnBlue.jpg',400,600,'','http://www4.clikpic.com/Bruce/images/ConnorOnBlue_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[2] = new photo(1258935,'17698','','gallery','http://www4.clikpic.com/Bruce/images/PirateTrip1.jpg',600,323,'','http://www4.clikpic.com/Bruce/images/PirateTrip1_thumb.jpg',130, 70,0, 0,'','','','','','');
photos[3] = new photo(1258936,'17698','','gallery','http://www4.clikpic.com/Bruce/images/Bubbles1.jpg',600,327,'','http://www4.clikpic.com/Bruce/images/Bubbles1_thumb.jpg',130, 71,0, 0,'','','','','','');
photos[4] = new photo(196916,'17698','','gallery','http://www4.clikpic.com/Bruce/images/Ella\'s-Foot.jpg',600,399,'','http://www4.clikpic.com/Bruce/images/Ella\'s-Foot_thumb.jpg',130, 86,1, 0,'','','','','','');
photos[5] = new photo(891048,'17698','','gallery','http://www4.clikpic.com/Bruce/images/DA23282-10x82.jpg',600,480,'','http://www4.clikpic.com/Bruce/images/DA23282-10x82_thumb.jpg',130, 104,0, 0,'','','','','','');
photos[6] = new photo(754477,'17698','','gallery','http://www4.clikpic.com/Bruce/images/L19015a-BW.jpg',600,400,'','http://www4.clikpic.com/Bruce/images/L19015a-BW_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[7] = new photo(754479,'17698','','gallery','http://www4.clikpic.com/Bruce/images/L19923.jpg',600,400,'','http://www4.clikpic.com/Bruce/images/L19923_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[8] = new photo(596721,'17698','','gallery','http://www4.clikpic.com/Bruce/images/JCE-Cowling-6-11-15-1.jpg',600,403,'','http://www4.clikpic.com/Bruce/images/JCE-Cowling-6-11-15-1_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[9] = new photo(754478,'17698','','gallery','http://www4.clikpic.com/Bruce/images/L19341.jpg',600,400,'','http://www4.clikpic.com/Bruce/images/L19341_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[10] = new photo(754482,'17698','','gallery','http://www4.clikpic.com/Bruce/images/19315-7.jpg',400,600,'','http://www4.clikpic.com/Bruce/images/19315-7_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[11] = new photo(754490,'17698','','gallery','http://www4.clikpic.com/Bruce/images/19555.jpg',400,600,'','http://www4.clikpic.com/Bruce/images/19555_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[12] = new photo(754491,'17698','','gallery','http://www4.clikpic.com/Bruce/images/19584.jpg',400,600,'','http://www4.clikpic.com/Bruce/images/19584_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[13] = new photo(1258919,'89570','','gallery','http://www4.clikpic.com/Bruce/images/w27314pete.jpg',400,600,'','http://www4.clikpic.com/Bruce/images/w27314pete_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[14] = new photo(1258923,'89570','','gallery','http://www4.clikpic.com/Bruce/images/29354Y-G-7-7-28.jpg',400,600,'','http://www4.clikpic.com/Bruce/images/29354Y-G-7-7-28_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[15] = new photo(1258928,'89570','','gallery','http://www4.clikpic.com/Bruce/images/w27224revisedagain.jpg',480,600,'','http://www4.clikpic.com/Bruce/images/w27224revisedagain_thumb.jpg',130, 163,0, 0,'','','','','','');
photos[16] = new photo(1258930,'89570','','gallery','http://www4.clikpic.com/Bruce/images/JJ1.jpg',400,600,'','http://www4.clikpic.com/Bruce/images/JJ1_thumb.jpg',130, 195,0, 1,'','','','','','');
photos[17] = new photo(1350734,'89570','','gallery','http://www4.clikpic.com/Bruce/images/Fisherman001763.jpg',600,400,'','http://www4.clikpic.com/Bruce/images/Fisherman001763_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[18] = new photo(806615,'62522','','gallery','http://www4.clikpic.com/Bruce/images/16264.jpg',600,400,'','http://www4.clikpic.com/Bruce/images/16264_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[19] = new photo(806616,'62522','','gallery','http://www4.clikpic.com/Bruce/images/17078.jpg',600,400,'','http://www4.clikpic.com/Bruce/images/17078_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[20] = new photo(806621,'62522','','gallery','http://www4.clikpic.com/Bruce/images/21578.jpg',600,400,'','http://www4.clikpic.com/Bruce/images/21578_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[21] = new photo(806618,'62522','','gallery','http://www4.clikpic.com/Bruce/images/21561.jpg',600,400,'','http://www4.clikpic.com/Bruce/images/21561_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[22] = new photo(806625,'62522','','gallery','http://www4.clikpic.com/Bruce/images/21600.jpg',400,600,'','http://www4.clikpic.com/Bruce/images/21600_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[23] = new photo(806626,'62522','','gallery','http://www4.clikpic.com/Bruce/images/21603.jpg',400,600,'','http://www4.clikpic.com/Bruce/images/21603_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[24] = new photo(806619,'62522','','gallery','http://www4.clikpic.com/Bruce/images/21565.jpg',400,600,'','http://www4.clikpic.com/Bruce/images/21565_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[25] = new photo(806620,'62522','','gallery','http://www4.clikpic.com/Bruce/images/21575.jpg',400,600,'','http://www4.clikpic.com/Bruce/images/21575_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[26] = new photo(806623,'62522','','gallery','http://www4.clikpic.com/Bruce/images/21585.jpg',400,600,'','http://www4.clikpic.com/Bruce/images/21585_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[27] = new photo(806617,'62522','','gallery','http://www4.clikpic.com/Bruce/images/21533.jpg',400,600,'','http://www4.clikpic.com/Bruce/images/21533_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[28] = new photo(806627,'62522','','gallery','http://www4.clikpic.com/Bruce/images/PJDog.jpg',600,600,'','http://www4.clikpic.com/Bruce/images/PJDog_thumb.jpg',130, 130,0, 0,'','','','','','');
photos[29] = new photo(198269,'18069','','gallery','http://www4.clikpic.com/Bruce/images/a10682.jpg',267,400,'','http://www4.clikpic.com/Bruce/images/a10682_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[30] = new photo(198271,'18069','','gallery','http://www4.clikpic.com/Bruce/images/b12708-MWin.jpg',267,400,'','http://www4.clikpic.com/Bruce/images/b12708-MWin_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[31] = new photo(198272,'18069','','gallery','http://www4.clikpic.com/Bruce/images/c6516.jpg',267,400,'','http://www4.clikpic.com/Bruce/images/c6516_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[32] = new photo(198273,'18069','','gallery','http://www4.clikpic.com/Bruce/images/dEHT-Funnell-Cornerman.jpg',266,400,'','http://www4.clikpic.com/Bruce/images/dEHT-Funnell-Cornerman_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[33] = new photo(198274,'18069','','gallery','http://www4.clikpic.com/Bruce/images/eEHT-Funnell-Cornerman1.jpg',306,400,'','http://www4.clikpic.com/Bruce/images/eEHT-Funnell-Cornerman1_thumb.jpg',130, 170,0, 0,'','','','','','');
photos[34] = new photo(198275,'18069','','gallery','http://www4.clikpic.com/Bruce/images/fKM12754-MWin.jpg',267,400,'','http://www4.clikpic.com/Bruce/images/fKM12754-MWin_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[35] = new photo(198277,'18069','','gallery','http://www4.clikpic.com/Bruce/images/a11191.jpg',400,267,'','http://www4.clikpic.com/Bruce/images/a11191_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[36] = new photo(198278,'18069','','gallery','http://www4.clikpic.com/Bruce/images/b11690.jpg',400,267,'','http://www4.clikpic.com/Bruce/images/b11690_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[37] = new photo(198279,'18069','','gallery','http://www4.clikpic.com/Bruce/images/c11783.jpg',400,267,'','http://www4.clikpic.com/Bruce/images/c11783_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[38] = new photo(198281,'18069','','gallery','http://www4.clikpic.com/Bruce/images/d11827.jpg',400,267,'','http://www4.clikpic.com/Bruce/images/d11827_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[39] = new photo(198282,'18069','','gallery','http://www4.clikpic.com/Bruce/images/e12251.jpg',400,267,'','http://www4.clikpic.com/Bruce/images/e12251_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[40] = new photo(198284,'18069','','gallery','http://www4.clikpic.com/Bruce/images/f12310.jpg',400,267,'','http://www4.clikpic.com/Bruce/images/f12310_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[41] = new photo(198285,'18069','','gallery','http://www4.clikpic.com/Bruce/images/g12682a.jpg',400,267,'','http://www4.clikpic.com/Bruce/images/g12682a_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[42] = new photo(198287,'18069','','gallery','http://www4.clikpic.com/Bruce/images/h12741.jpg',400,267,'','http://www4.clikpic.com/Bruce/images/h12741_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[43] = new photo(198289,'18069','','gallery','http://www4.clikpic.com/Bruce/images/i12822.jpg',400,267,'','http://www4.clikpic.com/Bruce/images/i12822_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[44] = new photo(198292,'18069','','gallery','http://www4.clikpic.com/Bruce/images/j12949.jpg',400,267,'','http://www4.clikpic.com/Bruce/images/j12949_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[45] = new photo(198293,'18069','','gallery','http://www4.clikpic.com/Bruce/images/k13022.jpg',400,267,'','http://www4.clikpic.com/Bruce/images/k13022_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[46] = new photo(198296,'18069','','gallery','http://www4.clikpic.com/Bruce/images/l13023.jpg',400,267,'','http://www4.clikpic.com/Bruce/images/l13023_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[47] = new photo(198298,'18069','','gallery','http://www4.clikpic.com/Bruce/images/m13084a.jpg',400,267,'','http://www4.clikpic.com/Bruce/images/m13084a_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[48] = new photo(198299,'18069','','gallery','http://www4.clikpic.com/Bruce/images/n5256.jpg',400,267,'','http://www4.clikpic.com/Bruce/images/n5256_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[49] = new photo(198301,'18069','','gallery','http://www4.clikpic.com/Bruce/images/o7432.jpg',400,267,'','http://www4.clikpic.com/Bruce/images/o7432_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[50] = new photo(198302,'18069','','gallery','http://www4.clikpic.com/Bruce/images/p8025-pb.jpg',400,267,'','http://www4.clikpic.com/Bruce/images/p8025-pb_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[51] = new photo(198304,'18069','','gallery','http://www4.clikpic.com/Bruce/images/q8075-pb.jpg',400,267,'','http://www4.clikpic.com/Bruce/images/q8075-pb_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[52] = new photo(198307,'18069','','gallery','http://www4.clikpic.com/Bruce/images/r8235-pb.jpg',400,267,'','http://www4.clikpic.com/Bruce/images/r8235-pb_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[53] = new photo(198308,'18069','','gallery','http://www4.clikpic.com/Bruce/images/sEHT-Funnell-Chamrock.jpg',400,290,'','http://www4.clikpic.com/Bruce/images/sEHT-Funnell-Chamrock_thumb.jpg',130, 94,0, 0,'','','','','','');
photos[54] = new photo(198309,'18069','','gallery','http://www4.clikpic.com/Bruce/images/tkcc7.jpg',400,233,'','http://www4.clikpic.com/Bruce/images/tkcc7_thumb.jpg',130, 76,0, 0,'','','','','','');
photos[55] = new photo(1258937,'18069','','gallery','http://www4.clikpic.com/Bruce/images/27789.jpg',600,400,'','http://www4.clikpic.com/Bruce/images/27789_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[56] = new photo(1265816,'90074','','gallery','http://www4.clikpic.com/Bruce/images/w31120.jpg',402,600,'','http://www4.clikpic.com/Bruce/images/w31120_thumb.jpg',130, 194,0, 1,'','','','','','');
photos[57] = new photo(1265817,'90074','','gallery','http://www4.clikpic.com/Bruce/images/w31136.jpg',600,400,'','http://www4.clikpic.com/Bruce/images/w31136_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[58] = new photo(1265818,'90074','','gallery','http://www4.clikpic.com/Bruce/images/w31163.jpg',402,600,'','http://www4.clikpic.com/Bruce/images/w31163_thumb.jpg',130, 194,0, 0,'','','','','','');
photos[59] = new photo(1265820,'90074','','gallery','http://www4.clikpic.com/Bruce/images/w31176.jpg',402,600,'','http://www4.clikpic.com/Bruce/images/w31176_thumb.jpg',130, 194,0, 0,'','','','','','');
photos[60] = new photo(1265822,'90074','','gallery','http://www4.clikpic.com/Bruce/images/w31208.jpg',600,400,'','http://www4.clikpic.com/Bruce/images/w31208_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[61] = new photo(1265826,'90074','','gallery','http://www4.clikpic.com/Bruce/images/w31282.jpg',600,402,'','http://www4.clikpic.com/Bruce/images/w31282_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[62] = new photo(1265827,'90074','','gallery','http://www4.clikpic.com/Bruce/images/w31299.jpg',600,400,'','http://www4.clikpic.com/Bruce/images/w31299_thumb.jpg',130, 87,0, 0,'','','','','','');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
galleries = new Array();
galleries[0] = new gallery(17698,'1258936,1258935,1258933,891048,754491,754490,754482,754479,754478,754477','Portraits','gallery');
galleries[1] = new gallery(89570,'1258930','Lighting on location','gallery');
galleries[2] = new gallery(62522,'806627,806626,806625,806623,806621,806620,806619,806618,806617,806616','Pets','gallery');
galleries[3] = new gallery(18069,'1258937,198309,198308,198307,198304,198302,198301,198299,198298,198296','Sport','gallery');
galleries[4] = new gallery(90074,'1265816','Photoshoot example','gallery');

