/***************************************************************************
* 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('1848999');
	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('1848999');
	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 = 'www.WOW PORTRAITS.co.uk: ' + 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(1848993,'190116','1','gallery','http://www1.clikpic.com/PeterAllen/images/1.gif',500,336,'','http://www1.clikpic.com/PeterAllen/images/1_thumb.gif',130, 87,0, 0,'','','','','','');
photos[1] = new photo(1848994,'190117','2','gallery','http://www1.clikpic.com/PeterAllen/images/2.gif',452,600,'','http://www1.clikpic.com/PeterAllen/images/2_thumb.gif',130, 173,0, 0,'','','','','','');
photos[2] = new photo(1848996,'190114','3','gallery','http://www1.clikpic.com/PeterAllen/images/3.gif',500,335,'','http://www1.clikpic.com/PeterAllen/images/3_thumb.gif',130, 87,0, 0,'','','','','','');
photos[3] = new photo(1848998,'190112','4','gallery','http://www1.clikpic.com/PeterAllen/images/4.gif',500,410,'','http://www1.clikpic.com/PeterAllen/images/4_thumb.gif',130, 107,0, 0,'','','','','','');
photos[4] = new photo(1848999,'190112','5','gallery','http://www1.clikpic.com/PeterAllen/images/5.gif',500,251,'','http://www1.clikpic.com/PeterAllen/images/5_thumb.gif',130, 65,1, 0,'','','','','','');
photos[5] = new photo(1849002,'190112','','gallery','http://www1.clikpic.com/PeterAllen/images/7.gif',450,600,'','http://www1.clikpic.com/PeterAllen/images/7_thumb.gif',130, 173,0, 0,'','','','','','');
photos[6] = new photo(1849004,'190117','','gallery','http://www1.clikpic.com/PeterAllen/images/9.gif',449,600,'','http://www1.clikpic.com/PeterAllen/images/9_thumb.gif',130, 174,0, 0,'','','','','','');
photos[7] = new photo(1849014,'190112','','gallery','http://www1.clikpic.com/PeterAllen/images/12.gif',500,250,'','http://www1.clikpic.com/PeterAllen/images/12_thumb.gif',130, 65,0, 0,'','','','','','');
photos[8] = new photo(1849019,'190117','','gallery','http://www1.clikpic.com/PeterAllen/images/17gif.gif',402,600,'','http://www1.clikpic.com/PeterAllen/images/17gif_thumb.gif',130, 194,0, 0,'','','','','','');
photos[9] = new photo(1849021,'190115','','gallery','http://www1.clikpic.com/PeterAllen/images/18.gif',407,606,'','http://www1.clikpic.com/PeterAllen/images/18_thumb.gif',130, 194,0, 0,'','','','','','');
photos[10] = new photo(1849022,'190117','','gallery','http://www1.clikpic.com/PeterAllen/images/19.gif',449,600,'','http://www1.clikpic.com/PeterAllen/images/19_thumb.gif',130, 174,0, 0,'','','','','','');
photos[11] = new photo(1849023,'190114','','gallery','http://www1.clikpic.com/PeterAllen/images/20.gif',450,600,'','http://www1.clikpic.com/PeterAllen/images/20_thumb.gif',130, 173,0, 0,'','','','','','');
photos[12] = new photo(1849025,'190112','','gallery','http://www1.clikpic.com/PeterAllen/images/21.gif',500,376,'','http://www1.clikpic.com/PeterAllen/images/21_thumb.gif',130, 98,0, 0,'','','','','','');
photos[13] = new photo(1849030,'190116','','gallery','http://www1.clikpic.com/PeterAllen/images/25.gif',500,401,'','http://www1.clikpic.com/PeterAllen/images/25_thumb.gif',130, 104,0, 0,'','','','','','');
photos[14] = new photo(1849034,'190117','','gallery','http://www1.clikpic.com/PeterAllen/images/24.gif',482,600,'','http://www1.clikpic.com/PeterAllen/images/24_thumb.gif',130, 162,0, 0,'','','','','','');
photos[15] = new photo(1849035,'190117','','gallery','http://www1.clikpic.com/PeterAllen/images/26.gif',482,600,'','http://www1.clikpic.com/PeterAllen/images/26_thumb.gif',130, 162,0, 0,'','','','','','');
photos[16] = new photo(3356090,'190114','','gallery','http://www1.clikpic.com/PeterAllen/images/_011542.gif',432,432,'','http://www1.clikpic.com/PeterAllen/images/_011542_thumb.gif',130, 130,0, 0,'','','','','','');
photos[17] = new photo(3356116,'190116','','gallery','http://www1.clikpic.com/PeterAllen/images/010050.gif',435,399,'','http://www1.clikpic.com/PeterAllen/images/010050_thumb.gif',130, 119,0, 0,'','','','','','');
photos[18] = new photo(3356117,'190114','','gallery','http://www1.clikpic.com/PeterAllen/images/blanford.gif',435,309,'','http://www1.clikpic.com/PeterAllen/images/blanford_thumb.gif',130, 92,0, 0,'','','','','','');
photos[19] = new photo(3356119,'190112','','gallery','http://www1.clikpic.com/PeterAllen/images/dog1.gif',500,251,'','http://www1.clikpic.com/PeterAllen/images/dog1_thumb.gif',130, 65,0, 0,'','','','','','');
photos[20] = new photo(3356122,'190117','','gallery','http://www1.clikpic.com/PeterAllen/images/girls12.gif',500,357,'','http://www1.clikpic.com/PeterAllen/images/girls12_thumb.gif',130, 93,0, 0,'','','','','','');
photos[21] = new photo(3356127,'190114','','gallery','http://www1.clikpic.com/PeterAllen/images/john.gif',435,435,'','http://www1.clikpic.com/PeterAllen/images/john_thumb.gif',130, 130,0, 0,'','','','','','');
photos[22] = new photo(3356130,'190117','','gallery','http://www1.clikpic.com/PeterAllen/images/L_005783.gif',435,435,'','http://www1.clikpic.com/PeterAllen/images/L_005783_thumb.gif',130, 130,0, 0,'','','','','','');
photos[23] = new photo(3356131,'190117','','gallery','http://www1.clikpic.com/PeterAllen/images/L_008129.gif',500,127,'','http://www1.clikpic.com/PeterAllen/images/L_008129_thumb.gif',130, 33,0, 0,'','','','','','');
photos[24] = new photo(3356134,'190116','','gallery','http://www1.clikpic.com/PeterAllen/images/L_010051.gif',435,399,'','http://www1.clikpic.com/PeterAllen/images/L_010051_thumb.gif',130, 119,0, 0,'','','','','','');
photos[25] = new photo(3356137,'190117','','gallery','http://www1.clikpic.com/PeterAllen/images/L_010352.gif',432,432,'','http://www1.clikpic.com/PeterAllen/images/L_010352_thumb.gif',130, 130,0, 0,'','','','','','');
photos[26] = new photo(3356138,'190117','','gallery','http://www1.clikpic.com/PeterAllen/images/L_011219.gif',500,358,'','http://www1.clikpic.com/PeterAllen/images/L_011219_thumb.gif',130, 93,0, 0,'','','','','','');
photos[27] = new photo(3356139,'190114','','gallery','http://www1.clikpic.com/PeterAllen/images/L_011363.gif',500,358,'','http://www1.clikpic.com/PeterAllen/images/L_011363_thumb.gif',130, 93,0, 0,'','','','','','');
photos[28] = new photo(3356140,'190114','','gallery','http://www1.clikpic.com/PeterAllen/images/L_011454.gif',435,435,'','http://www1.clikpic.com/PeterAllen/images/L_011454_thumb.gif',130, 130,0, 0,'','','','','','');
photos[29] = new photo(3356143,'190114','','gallery','http://www1.clikpic.com/PeterAllen/images/L_012082.gif',435,435,'','http://www1.clikpic.com/PeterAllen/images/L_012082_thumb.gif',130, 130,0, 0,'','','','','','');
photos[30] = new photo(3356146,'190116','','gallery','http://www1.clikpic.com/PeterAllen/images/L_012523.gif',500,220,'','http://www1.clikpic.com/PeterAllen/images/L_012523_thumb.gif',130, 57,0, 0,'','','','','','');
photos[31] = new photo(3356150,'190116','','gallery','http://www1.clikpic.com/PeterAllen/images/L_012687.gif',435,291,'','http://www1.clikpic.com/PeterAllen/images/L_012687_thumb.gif',130, 87,0, 0,'','','','','','');
photos[32] = new photo(3356152,'190116','','gallery','http://www1.clikpic.com/PeterAllen/images/Lhi-key_011105.gif',500,287,'','http://www1.clikpic.com/PeterAllen/images/Lhi-key_011105_thumb.gif',130, 75,0, 0,'','','','','','');
photos[33] = new photo(3356154,'190116','','gallery','http://www1.clikpic.com/PeterAllen/images/Lhi-key-b&w6x4_011273.gif',288,432,'','http://www1.clikpic.com/PeterAllen/images/Lhi-key-b&w6x4_011273_thumb.gif',130, 195,0, 0,'','','','','','');
photos[34] = new photo(3356157,'190114','','gallery','http://www1.clikpic.com/PeterAllen/images/no4-high.gif',327,435,'','http://www1.clikpic.com/PeterAllen/images/no4-high_thumb.gif',130, 173,0, 0,'','','','','','');
photos[35] = new photo(3396049,'190116','','gallery','http://admin.clikpic.com/PeterAllen/images/image 1 001.gif',432,360,'','http://admin.clikpic.com/PeterAllen/images/image 1 001_thumb.gif',130, 108,0, 0,'','','','','','');
photos[36] = new photo(3396050,'190116','','gallery','http://admin.clikpic.com/PeterAllen/images/image 1 002.gif',363,435,'','http://admin.clikpic.com/PeterAllen/images/image 1 002_thumb.gif',130, 156,0, 0,'','','','','','');
photos[37] = new photo(3396053,'190115','','gallery','http://admin.clikpic.com/PeterAllen/images/image 1 004.gif',291,435,'','http://admin.clikpic.com/PeterAllen/images/image 1 004_thumb.gif',130, 194,0, 0,'','','','','','');
photos[38] = new photo(3396056,'190117','','gallery','http://admin.clikpic.com/PeterAllen/images/image 1 006.gif',288,432,'','http://admin.clikpic.com/PeterAllen/images/image 1 006_thumb.gif',130, 195,0, 0,'','','','','','');
photos[39] = new photo(3396060,'190116','','gallery','http://admin.clikpic.com/PeterAllen/images/image 1 007.gif',500,251,'','http://admin.clikpic.com/PeterAllen/images/image 1 007_thumb.gif',130, 65,0, 0,'','','','','','');
photos[40] = new photo(3396061,'190116','','gallery','http://admin.clikpic.com/PeterAllen/images/image 1 008.gif',435,363,'','http://admin.clikpic.com/PeterAllen/images/image 1 008_thumb.gif',130, 108,0, 0,'','','','','','');
photos[41] = new photo(3396062,'190114','','gallery','http://admin.clikpic.com/PeterAllen/images/image 1 009.gif',500,201,'','http://admin.clikpic.com/PeterAllen/images/image 1 009_thumb.gif',130, 52,0, 0,'','','','','','');
photos[42] = new photo(3396066,'190116','','gallery','http://admin.clikpic.com/PeterAllen/images/image 1 011.gif',363,435,'','http://admin.clikpic.com/PeterAllen/images/image 1 011_thumb.gif',130, 156,0, 0,'','','','','','');
photos[43] = new photo(3396067,'190116','','gallery','http://admin.clikpic.com/PeterAllen/images/image 1 012.gif',435,381,'','http://admin.clikpic.com/PeterAllen/images/image 1 012_thumb.gif',130, 114,0, 0,'','','','','','');
photos[44] = new photo(1849000,'124434','6','gallery','http://www1.clikpic.com/PeterAllen/images/6.gif',500,500,'','http://www1.clikpic.com/PeterAllen/images/6_thumb.gif',130, 130,0, 0,'','','','','','');
photos[45] = new photo(1849003,'124434','','gallery','http://www1.clikpic.com/PeterAllen/images/8.gif',500,358,'','http://www1.clikpic.com/PeterAllen/images/8_thumb.gif',130, 93,0, 0,'','','','','','');
photos[46] = new photo(1849005,'124434','','gallery','http://www1.clikpic.com/PeterAllen/images/11.gif',500,251,'','http://www1.clikpic.com/PeterAllen/images/11_thumb.gif',130, 65,0, 0,'','','','','','');
photos[47] = new photo(1849015,'124434','','gallery','http://www1.clikpic.com/PeterAllen/images/13.gif',500,250,'','http://www1.clikpic.com/PeterAllen/images/13_thumb.gif',130, 65,0, 0,'','','','','','');
photos[48] = new photo(1849016,'124434','','gallery','http://www1.clikpic.com/PeterAllen/images/14gif.gif',482,600,'','http://www1.clikpic.com/PeterAllen/images/14gif_thumb.gif',130, 162,0, 0,'','','','','','');
photos[49] = new photo(1849017,'124434','','gallery','http://www1.clikpic.com/PeterAllen/images/15.gif',482,600,'','http://www1.clikpic.com/PeterAllen/images/15_thumb.gif',130, 162,0, 0,'','','','','','');
photos[50] = new photo(1849018,'124434','','gallery','http://www1.clikpic.com/PeterAllen/images/16.gif',404,600,'','http://www1.clikpic.com/PeterAllen/images/16_thumb.gif',130, 193,0, 0,'','','','','','');
photos[51] = new photo(1849026,'124434','','gallery','http://www1.clikpic.com/PeterAllen/images/22.gif',403,600,'','http://www1.clikpic.com/PeterAllen/images/22_thumb.gif',130, 194,0, 0,'','','','','','');
photos[52] = new photo(1849029,'124434','','gallery','http://www1.clikpic.com/PeterAllen/images/23.gif',500,402,'','http://www1.clikpic.com/PeterAllen/images/23_thumb.gif',130, 105,0, 0,'','','','','','');
photos[53] = new photo(1849043,'124434','','gallery','http://www1.clikpic.com/PeterAllen/images/10gif2.gif',451,600,'','http://www1.clikpic.com/PeterAllen/images/10gif2_thumb.gif',130, 173,0, 0,'','','','','','');
photos[54] = new photo(3356082,'124434','','gallery','http://www1.clikpic.com/PeterAllen/images/20x16.gif',435,363,'','http://www1.clikpic.com/PeterAllen/images/20x16_thumb.gif',130, 108,0, 0,'','','','','','');
photos[55] = new photo(3356107,'124434','','gallery','http://www1.clikpic.com/PeterAllen/images/009759.gif',500,250,'','http://www1.clikpic.com/PeterAllen/images/009759_thumb.gif',130, 65,0, 0,'','','','','','');
photos[56] = new photo(3356114,'124434','','gallery','http://www1.clikpic.com/PeterAllen/images/009802.gif',500,358,'','http://www1.clikpic.com/PeterAllen/images/009802_thumb.gif',130, 93,0, 0,'','','','','','');
photos[57] = new photo(3356120,'124434','','gallery','http://www1.clikpic.com/PeterAllen/images/girl.gif',500,250,'','http://www1.clikpic.com/PeterAllen/images/girl_thumb.gif',130, 65,0, 0,'','','','','','');
photos[58] = new photo(3356151,'124434','','gallery','http://www1.clikpic.com/PeterAllen/images/Lb&w010745.gif',432,432,'','http://www1.clikpic.com/PeterAllen/images/Lb&w010745_thumb.gif',130, 130,0, 0,'','','','','','');
photos[59] = new photo(3356156,'124434','','gallery','http://www1.clikpic.com/PeterAllen/images/Lmute_010739.gif',363,363,'','http://www1.clikpic.com/PeterAllen/images/Lmute_010739_thumb.gif',130, 130,0, 0,'','','','','','');
photos[60] = new photo(3356160,'124434','','gallery','http://www1.clikpic.com/PeterAllen/images/no10-high.gif',363,435,'','http://www1.clikpic.com/PeterAllen/images/no10-high_thumb.gif',130, 156,0, 0,'','','','','','');
photos[61] = new photo(3396051,'124434','','gallery','http://admin.clikpic.com/PeterAllen/images/image 1 003.gif',500,500,'','http://admin.clikpic.com/PeterAllen/images/image 1 003_thumb.gif',130, 130,0, 0,'','','','','','');
photos[62] = new photo(3396055,'124434','','gallery','http://admin.clikpic.com/PeterAllen/images/image 1 005.gif',500,376,'','http://admin.clikpic.com/PeterAllen/images/image 1 005_thumb.gif',130, 98,0, 0,'','','','','','');
photos[63] = new photo(3396064,'124434','','gallery','http://admin.clikpic.com/PeterAllen/images/image 1 010.gif',435,435,'','http://admin.clikpic.com/PeterAllen/images/image 1 010_thumb.gif',130, 130,0, 0,'','','','','','');
photos[64] = new photo(3396069,'124434','','gallery','http://admin.clikpic.com/PeterAllen/images/image 1 013.gif',500,251,'','http://admin.clikpic.com/PeterAllen/images/image 1 013_thumb.gif',130, 65,0, 0,'','','','','','');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
galleries = new Array();
galleries[0] = new gallery(190115,'3396053,1849021','COUPLES','gallery');
galleries[1] = new gallery(190114,'3396062,3356157,3356143,3356140,3356139,3356127,3356117,3356090,1849023,1848996','FAMILIES','gallery');
galleries[2] = new gallery(190116,'3396067,3396066,3396061,3396060,3396050,3396049,3356154,3356152,3356150,3356146','FRIENDS','gallery');
galleries[3] = new gallery(190112,'3356119,1849025,1849014,1849002,1848999,1848998','PETS','gallery');
galleries[4] = new gallery(190117,'3396056,3356138,3356137,3356131,3356130,3356122,1849035,1849034,1849022,1849019','TEENS','gallery');
galleries[5] = new gallery(124434,'3396069,3396064,3396055,3396051,3356160,3356156,3356151,3356120,3356114,3356107','KIDS','gallery');

