/***************************************************************************
* 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('3177278');
	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('3177278');
	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 && !((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 = 'daniela     di      cesare      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(3167884,'','','','http://admin2.clikpic.com/finerri/images/L1010067.JPG',500,281,'','http://admin2.clikpic.com/finerri/images/L1010067_thumb.JPG',130, 73,0, 1,'','','','','','');
photos[1] = new photo(3177278,'','','','http://admin2.clikpic.com/finerri/images/e.jpg',500,281,'','http://admin2.clikpic.com/finerri/images/e_thumb.jpg',130, 73,1, 0,'','','','','','');
photos[2] = new photo(3177565,'193914','','gallery','http://admin2.clikpic.com/finerri/images/L1000548.JPG',500,375,'','http://admin2.clikpic.com/finerri/images/L1000548_thumb.JPG',130, 98,0, 0,'','','','','','');
photos[3] = new photo(3177542,'193914','','gallery','http://admin2.clikpic.com/finerri/images/L1010600.JPG',500,281,'','http://admin2.clikpic.com/finerri/images/L1010600_thumb.JPG',130, 73,0, 0,'','','','','','');
photos[4] = new photo(3177540,'193914','','gallery','http://admin2.clikpic.com/finerri/images/L1000534.JPG',500,281,'','http://admin2.clikpic.com/finerri/images/L1000534_thumb.JPG',130, 73,0, 0,'','','','','','');
photos[5] = new photo(3177536,'193914','','gallery','http://admin2.clikpic.com/finerri/images/27-11-07 056.jpg',500,375,'','http://admin2.clikpic.com/finerri/images/27-11-07 056_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[6] = new photo(3177539,'193914','','gallery','http://admin2.clikpic.com/finerri/images/L1000947.JPG',500,281,'','http://admin2.clikpic.com/finerri/images/L1000947_thumb.JPG',130, 73,0, 0,'','','','','','');
photos[7] = new photo(3177559,'193914','','gallery','http://admin2.clikpic.com/finerri/images/L1000953.JPG',500,281,'','http://admin2.clikpic.com/finerri/images/L1000953_thumb.JPG',130, 73,0, 0,'','','','','','');
photos[8] = new photo(3177631,'193914','','gallery','http://admin2.clikpic.com/finerri/images/L1000943.JPG',500,281,'','http://admin2.clikpic.com/finerri/images/L1000943_thumb.JPG',130, 73,0, 0,'','','','','','');
photos[9] = new photo(3177673,'193914','','gallery','http://admin2.clikpic.com/finerri/images/L1010589.JPG',500,375,'','http://admin2.clikpic.com/finerri/images/L1010589_thumb.JPG',130, 98,0, 0,'','','','','','');
photos[10] = new photo(3177688,'193914','','gallery','http://admin2.clikpic.com/finerri/images/L10005501.JPG',500,375,'','http://admin2.clikpic.com/finerri/images/L10005501_thumb.JPG',130, 98,0, 0,'','','','','','');
photos[11] = new photo(3177697,'193914','','gallery','http://admin2.clikpic.com/finerri/images/L1000522.JPG',500,281,'','http://admin2.clikpic.com/finerri/images/L1000522_thumb.JPG',130, 73,0, 0,'','','','','','');
photos[12] = new photo(3177679,'193914','','gallery','http://admin2.clikpic.com/finerri/images/mongolfiera22-09-07 176.jpg',500,375,'','http://admin2.clikpic.com/finerri/images/mongolfiera22-09-07 176_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[13] = new photo(3202366,'193914','','gallery','http://admin2.clikpic.com/finerri/images/14feb08 047low.jpg',600,450,'','http://admin2.clikpic.com/finerri/images/14feb08 047low_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[14] = new photo(3202370,'193914','','gallery','http://admin2.clikpic.com/finerri/images/14feb08 049low.jpg',600,450,'','http://admin2.clikpic.com/finerri/images/14feb08 049low_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[15] = new photo(3227934,'193914','','gallery','http://admin2.clikpic.com/finerri/images/mongolfiera22-09-07 031low.jpg',600,450,'','http://admin2.clikpic.com/finerri/images/mongolfiera22-09-07 031low_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[16] = new photo(3227936,'193914','','gallery','http://admin2.clikpic.com/finerri/images/mongolfiera22-09-07 034low.jpg',600,450,'','http://admin2.clikpic.com/finerri/images/mongolfiera22-09-07 034low_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[17] = new photo(3227937,'193914','','gallery','http://admin2.clikpic.com/finerri/images/mongolfiera22-09-07 036low.jpg',600,450,'','http://admin2.clikpic.com/finerri/images/mongolfiera22-09-07 036low_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[18] = new photo(3227938,'193914','','gallery','http://admin2.clikpic.com/finerri/images/mongolfiera22-09-07 056low.jpg',600,450,'','http://admin2.clikpic.com/finerri/images/mongolfiera22-09-07 056low_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[19] = new photo(3227939,'193914','','gallery','http://admin2.clikpic.com/finerri/images/mongolfiera22-09-07 062low.jpg',450,600,'','http://admin2.clikpic.com/finerri/images/mongolfiera22-09-07 062low_thumb.jpg',98, 130,0, 0,'','','','','','');
photos[20] = new photo(3227940,'193914','','gallery','http://admin2.clikpic.com/finerri/images/mongolfiera22-09-07 075low.jpg',600,450,'','http://admin2.clikpic.com/finerri/images/mongolfiera22-09-07 075low_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[21] = new photo(3177768,'194430','','section239914','http://admin2.clikpic.com/finerri/images/IMG_7170.JPG',500,375,'','http://admin2.clikpic.com/finerri/images/IMG_7170_thumb.JPG',130, 98,0, 0,'','','','','','');
photos[22] = new photo(3177809,'194430','','section239914','http://admin2.clikpic.com/finerri/images/L1010425.JPG',500,375,'','http://admin2.clikpic.com/finerri/images/L1010425_thumb.JPG',130, 98,0, 0,'','','','','','');
photos[23] = new photo(3177779,'194430','','section239914','http://admin2.clikpic.com/finerri/images/L1010240.JPG',500,281,'','http://admin2.clikpic.com/finerri/images/L1010240_thumb.JPG',130, 73,0, 0,'','','','','','');
photos[24] = new photo(3177823,'194430','','section239914','http://admin2.clikpic.com/finerri/images/L1010534.JPG',500,281,'','http://admin2.clikpic.com/finerri/images/L1010534_thumb.JPG',130, 73,0, 0,'','','','','','');
photos[25] = new photo(3177810,'194430','','section239914','http://admin2.clikpic.com/finerri/images/L1010459.JPG',500,281,'','http://admin2.clikpic.com/finerri/images/L1010459_thumb.JPG',130, 73,0, 0,'','','','','','');
photos[26] = new photo(3177720,'194430','','section239914','http://admin2.clikpic.com/finerri/images/IMG_52981.JPG',480,640,'','http://admin2.clikpic.com/finerri/images/IMG_52981_thumb.JPG',98, 130,0, 0,'','','','','','');
photos[27] = new photo(3177731,'194430','','section239914','http://admin2.clikpic.com/finerri/images/IMG_7152.JPG',500,375,'','http://admin2.clikpic.com/finerri/images/IMG_7152_thumb.JPG',130, 98,0, 0,'','','','','','');
photos[28] = new photo(3177769,'194430','','section239914','http://admin2.clikpic.com/finerri/images/IMG_7173bw.jpg',450,600,'','http://admin2.clikpic.com/finerri/images/IMG_7173bw_thumb.jpg',98, 130,0, 0,'','','','','','');
photos[29] = new photo(3177842,'194430','','section239914','http://admin2.clikpic.com/finerri/images/nzjan08 196.jpg',500,375,'','http://admin2.clikpic.com/finerri/images/nzjan08 196_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[30] = new photo(3177844,'194430','','section239914','http://admin2.clikpic.com/finerri/images/nzjan08 204.jpg',500,375,'','http://admin2.clikpic.com/finerri/images/nzjan08 204_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[31] = new photo(3177780,'194430','','section239914','http://admin2.clikpic.com/finerri/images/L1010249.JPG',360,640,'','http://admin2.clikpic.com/finerri/images/L1010249_thumb.JPG',73, 130,0, 0,'','','','','','');
photos[32] = new photo(3177822,'194430','','section239914','http://admin2.clikpic.com/finerri/images/L1010492.JPG',360,640,'','http://admin2.clikpic.com/finerri/images/L1010492_thumb.JPG',73, 130,0, 0,'','','','','','');
photos[33] = new photo(3177800,'194430','','section239914','http://admin2.clikpic.com/finerri/images/L1010398.JPG',480,640,'','http://admin2.clikpic.com/finerri/images/L1010398_thumb.JPG',98, 130,0, 0,'','','','','','');
photos[34] = new photo(3177808,'194430','','section239914','http://admin2.clikpic.com/finerri/images/L1010412.JPG',480,640,'','http://admin2.clikpic.com/finerri/images/L1010412_thumb.JPG',98, 130,0, 0,'','','','','','');
photos[35] = new photo(3181878,'194430','','section239914','http://admin2.clikpic.com/finerri/images/IMG_0481.JPG',600,450,'','http://admin2.clikpic.com/finerri/images/IMG_0481_thumb.JPG',130, 98,0, 0,'','','','','','');
photos[36] = new photo(3181879,'194430','','section239914','http://admin2.clikpic.com/finerri/images/IMG_0489.JPG',600,450,'','http://admin2.clikpic.com/finerri/images/IMG_0489_thumb.JPG',130, 98,0, 0,'','','','','','');
photos[37] = new photo(3181881,'194430','','section239914','http://admin2.clikpic.com/finerri/images/IMG_0580.JPG',600,450,'','http://admin2.clikpic.com/finerri/images/IMG_0580_thumb.JPG',130, 98,0, 0,'','','','','','');
photos[38] = new photo(3318967,'194430','','section239914','http://admin2.clikpic.com/finerri/images/dia_0014low.jpg',600,404,'','http://admin2.clikpic.com/finerri/images/dia_0014low_thumb.jpg',130, 88,0, 0,'','','','','','');
photos[39] = new photo(3188024,'194430','','section239914','http://admin2.clikpic.com/finerri/images/5 481.jpg',600,450,'','http://admin2.clikpic.com/finerri/images/5 481_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[40] = new photo(3318968,'194430','','section239914','http://admin2.clikpic.com/finerri/images/dia_0016low.jpg',600,404,'','http://admin2.clikpic.com/finerri/images/dia_0016low_thumb.jpg',130, 88,0, 0,'','','','','','');
photos[41] = new photo(3318972,'194430','','section239914','http://admin2.clikpic.com/finerri/images/dia_0023low.jpg',600,404,'','http://admin2.clikpic.com/finerri/images/dia_0023low_thumb.jpg',130, 88,0, 0,'','','','','','');
photos[42] = new photo(3318973,'194430','','section239914','http://admin2.clikpic.com/finerri/images/dia_0024low.jpg',600,404,'','http://admin2.clikpic.com/finerri/images/dia_0024low_thumb.jpg',130, 88,0, 0,'','','','','','');
photos[43] = new photo(3318977,'194430','','section239914','http://admin2.clikpic.com/finerri/images/dia_0025r.jpg',465,600,'','http://admin2.clikpic.com/finerri/images/dia_0025r_thumb.jpg',101, 130,0, 0,'','','','','','');
photos[44] = new photo(3170692,'193915','','section239915','http://admin2.clikpic.com/finerri/images/108_IMG_5177.JPG',480,640,'','http://admin2.clikpic.com/finerri/images/108_IMG_5177_thumb.JPG',98, 130,0, 0,'','','','','','');
photos[45] = new photo(3178116,'193915','','section239915','http://admin2.clikpic.com/finerri/images/c.jpg',500,281,'','http://admin2.clikpic.com/finerri/images/c_thumb.jpg',130, 73,0, 0,'','','','','','');
photos[46] = new photo(3178128,'193915','','section239915','http://admin2.clikpic.com/finerri/images/maladriano.jpg',500,636,'','http://admin2.clikpic.com/finerri/images/maladriano_thumb.jpg',102, 130,0, 0,'','','','','','');
photos[47] = new photo(3167989,'193915','','section239915','http://admin2.clikpic.com/finerri/images/107_IMG_5176.JPG',500,375,'','http://admin2.clikpic.com/finerri/images/107_IMG_5176_thumb.JPG',130, 98,0, 0,'','','','','','');
photos[48] = new photo(3178126,'193915','','section239915','http://admin2.clikpic.com/finerri/images/L1010532.JPG',500,281,'','http://admin2.clikpic.com/finerri/images/L1010532_thumb.JPG',130, 73,0, 0,'','','','','','');
photos[49] = new photo(3187558,'193915','','section239915','http://admin2.clikpic.com/finerri/images/L1010106bw.jpg',600,450,'','http://admin2.clikpic.com/finerri/images/L1010106bw_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[50] = new photo(3178121,'193915','','section239915','http://admin2.clikpic.com/finerri/images/f.jpg',500,281,'','http://admin2.clikpic.com/finerri/images/f_thumb.jpg',130, 73,0, 0,'','','','','','');
photos[51] = new photo(3178123,'193915','','section239915','http://admin2.clikpic.com/finerri/images/L1010158.JPG',500,281,'','http://admin2.clikpic.com/finerri/images/L1010158_thumb.JPG',130, 73,0, 0,'','','','','','');
photos[52] = new photo(3187902,'193915','','section239915','http://admin2.clikpic.com/finerri/images/antigua 135bw.jpg',450,600,'','http://admin2.clikpic.com/finerri/images/antigua 135bw_thumb.jpg',98, 130,0, 0,'','','','','','');
photos[53] = new photo(3187903,'193915','','section239915','http://admin2.clikpic.com/finerri/images/5 521bw.jpg',553,600,'','http://admin2.clikpic.com/finerri/images/5 521bw_thumb.jpg',120, 130,0, 0,'','','','','','');
photos[54] = new photo(3187904,'193915','','section239915','http://admin2.clikpic.com/finerri/images/19mag07 060.jpg',600,450,'','http://admin2.clikpic.com/finerri/images/19mag07 060_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[55] = new photo(3187907,'193915','','section239915','http://admin2.clikpic.com/finerri/images/grecia-favignana 091.jpg',600,450,'','http://admin2.clikpic.com/finerri/images/grecia-favignana 091_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[56] = new photo(3167646,'193960','','section239928','http://admin2.clikpic.com/finerri/images/L1010379.JPG',500,281,'','http://admin2.clikpic.com/finerri/images/L1010379_thumb.JPG',130, 73,0, 0,'','','','','','');
photos[57] = new photo(3170700,'193960','','section239928','http://admin2.clikpic.com/finerri/images/L1010375.JPG',500,281,'','http://admin2.clikpic.com/finerri/images/L1010375_thumb.JPG',130, 73,0, 0,'','','','','','');
photos[58] = new photo(3177771,'193960','','section239928','http://admin2.clikpic.com/finerri/images/L1010341.JPG',500,281,'','http://admin2.clikpic.com/finerri/images/L1010341_thumb.JPG',130, 73,0, 0,'','','','','','');
photos[59] = new photo(3177789,'193960','','section239928','http://admin2.clikpic.com/finerri/images/L1010355.JPG',500,281,'','http://admin2.clikpic.com/finerri/images/L1010355_thumb.JPG',130, 73,0, 0,'','','','','','');
photos[60] = new photo(3177797,'193960','','section239928','http://admin2.clikpic.com/finerri/images/L1010004.JPG',500,281,'','http://admin2.clikpic.com/finerri/images/L1010004_thumb.JPG',130, 73,0, 0,'','','','','','');
photos[61] = new photo(3178086,'193960','','section239928','http://admin2.clikpic.com/finerri/images/L1010480.JPG',500,281,'','http://admin2.clikpic.com/finerri/images/L1010480_thumb.JPG',130, 73,0, 0,'','','','','','');
photos[62] = new photo(3178105,'193960','','section239928','http://admin2.clikpic.com/finerri/images/L1010476.JPG',360,640,'','http://admin2.clikpic.com/finerri/images/L1010476_thumb.JPG',73, 130,0, 0,'','','','','','');
photos[63] = new photo(3178108,'193960','','section239928','http://admin2.clikpic.com/finerri/images/L1010368.JPG',500,375,'','http://admin2.clikpic.com/finerri/images/L1010368_thumb.JPG',130, 98,0, 0,'','','','','','');
photos[64] = new photo(3170697,'193963','','section239929','http://admin2.clikpic.com/finerri/images/IMG_5296.JPG',480,640,'','http://admin2.clikpic.com/finerri/images/IMG_5296_thumb.JPG',98, 130,0, 0,'','','','','','');
photos[65] = new photo(3178137,'193963','','section239929','http://admin2.clikpic.com/finerri/images/IMG_5554.JPG',480,640,'','http://admin2.clikpic.com/finerri/images/IMG_5554_thumb.JPG',98, 130,0, 0,'','','','','','');
photos[66] = new photo(3178139,'193963','','section239929','http://admin2.clikpic.com/finerri/images/L1000796.JPG',500,281,'','http://admin2.clikpic.com/finerri/images/L1000796_thumb.JPG',130, 73,0, 0,'','','','','','');
photos[67] = new photo(3178140,'193963','','section239929','http://admin2.clikpic.com/finerri/images/L1010390.JPG',600,338,'','http://admin2.clikpic.com/finerri/images/L1010390_thumb.JPG',130, 73,0, 0,'','','','','','');
photos[68] = new photo(3178142,'193963','','section239929','http://admin2.clikpic.com/finerri/images/L1010504.JPG',500,281,'','http://admin2.clikpic.com/finerri/images/L1010504_thumb.JPG',130, 73,0, 0,'','','','','','');
photos[69] = new photo(3178144,'193963','','section239929','http://admin2.clikpic.com/finerri/images/L1010463.JPG',600,338,'','http://admin2.clikpic.com/finerri/images/L1010463_thumb.JPG',130, 73,0, 0,'','','','','','');
photos[70] = new photo(3178145,'193963','','section239929','http://admin2.clikpic.com/finerri/images/L10104401.JPG',500,281,'','http://admin2.clikpic.com/finerri/images/L10104401_thumb.JPG',130, 73,0, 0,'','','','','','');
photos[71] = new photo(3170695,'193963','','section239929','http://admin2.clikpic.com/finerri/images/IMG_4917bw.jpg',600,450,'','http://admin2.clikpic.com/finerri/images/IMG_4917bw_thumb.jpg',130, 98,0, 0,'','','','','','');
photos[72] = new photo(3422301,'209178','','section257424','http://admin2.clikpic.com/finerri/images/L1010773.JPG',600,338,'','http://admin2.clikpic.com/finerri/images/L1010773_thumb.JPG',130, 73,0, 0,'','','','','','');
photos[73] = new photo(3422303,'209178','','section257424','http://admin2.clikpic.com/finerri/images/L1010784.JPG',600,338,'','http://admin2.clikpic.com/finerri/images/L1010784_thumb.JPG',130, 73,0, 0,'','','','','','');
photos[74] = new photo(3422311,'209178','','section257424','http://admin2.clikpic.com/finerri/images/L1010786.JPG',600,338,'','http://admin2.clikpic.com/finerri/images/L1010786_thumb.JPG',130, 73,0, 0,'','','','','','');
photos[75] = new photo(3422312,'209178','','section257424','http://admin2.clikpic.com/finerri/images/L1010796.JPG',600,338,'','http://admin2.clikpic.com/finerri/images/L1010796_thumb.JPG',130, 73,0, 0,'','','','','','');
photos[76] = new photo(3422315,'209178','','section257424','http://admin2.clikpic.com/finerri/images/L1010797.JPG',600,338,'','http://admin2.clikpic.com/finerri/images/L1010797_thumb.JPG',130, 73,0, 0,'','','','','','');
photos[77] = new photo(3422321,'209178','','section257424','http://admin2.clikpic.com/finerri/images/L1010798.JPG',600,338,'','http://admin2.clikpic.com/finerri/images/L1010798_thumb.JPG',130, 73,0, 0,'','','','','','');
photos[78] = new photo(3422324,'209178','','section257424','http://admin2.clikpic.com/finerri/images/L1010815.JPG',600,338,'','http://admin2.clikpic.com/finerri/images/L1010815_thumb.JPG',130, 73,0, 0,'','','','','','');
photos[79] = new photo(3422326,'209178','','section257424','http://admin2.clikpic.com/finerri/images/L1010918.JPG',600,338,'','http://admin2.clikpic.com/finerri/images/L1010918_thumb.JPG',130, 73,0, 0,'','','','','','');
photos[80] = new photo(3422330,'209178','','section257424','http://admin2.clikpic.com/finerri/images/L1010973.JPG',600,338,'','http://admin2.clikpic.com/finerri/images/L1010973_thumb.JPG',130, 73,0, 0,'','','','','','');
photos[81] = new photo(3422333,'209178','','section257424','http://admin2.clikpic.com/finerri/images/L1010995.JPG',600,338,'','http://admin2.clikpic.com/finerri/images/L1010995_thumb.JPG',130, 73,0, 0,'','','','','','');
photos[82] = new photo(3422335,'209178','','section257424','http://admin2.clikpic.com/finerri/images/L1020055.JPG',600,338,'','http://admin2.clikpic.com/finerri/images/L1020055_thumb.JPG',130, 73,0, 0,'','','','','','');
photos[83] = new photo(3422336,'209178','','section257424','http://admin2.clikpic.com/finerri/images/L1020056.JPG',600,338,'','http://admin2.clikpic.com/finerri/images/L1020056_thumb.JPG',130, 73,0, 0,'','','','','','');
photos[84] = new photo(3422340,'209178','','section257424','http://admin2.clikpic.com/finerri/images/L1020108.JPG',600,338,'','http://admin2.clikpic.com/finerri/images/L1020108_thumb.JPG',130, 73,0, 0,'','','','','','');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
galleries = new Array();
galleries[0] = new gallery(193914,'3227940,3227939,3227938,3227937,3227936,3227934,3202370,3202366,3177697,3177688','toscana','gallery');
galleries[1] = new gallery(194430,'3318977,3318973,3318972,3318968,3318967,3188024,3181881,3181879,3181878,3177844','travels','section239914');
galleries[2] = new gallery(193915,'3187907,3187904,3187903,3187902,3187558,3178128,3178126,3178123,3178121,3178116','portraits','section239915');
galleries[3] = new gallery(193960,'3178108,3178105,3178086,3177797,3177789,3177771,3170700,3167646','footprints','section239928');
galleries[4] = new gallery(193963,'3178145,3178144,3178142,3178140,3178139,3178137,3170697,3170695','passion','section239929');
galleries[5] = new gallery(209178,'3422340,3422336,3422335,3422333,3422330,3422326,3422324,3422321,3422315,3422312','goa','section257424');


